Commit 986e3bea by 284718418@qq.com

Merge remote-tracking branch 'origin/develop' into develop

parents c22a7f0f 13863f8d
......@@ -69,6 +69,15 @@ public class HtzzController {
@Value("${config-8timer.Aliyun.endpoint}")
private String endpoint;
@Value("${sftp.client.root}")
private String root;
@Value("${sftp.client.targetPath}")
private String targetPath;
@Value("${sftp.client.serverUrl}")
private String serverUrl;
/**
* 新增证件
......@@ -116,16 +125,19 @@ public class HtzzController {
List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码
List<HtzzAssoHtgx> htgxs = Lists.newArrayList();
for (NotifyPersonDto pre : ids) {
HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
.eq(HtzzAssoHtgx::getPhone, pre.getPhone()));
HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build();
// HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
// .eq(HtzzAssoHtgx::getPhone, pre.getPhone()));
HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build().selectOne(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
.eq(HtzzAssoHtgx::getPhone, pre.getPhone()).eq(HtzzAssoHtgx::getHtid,zzda.getId()));
if (htgx == null) {
htgx = HtzzAssoHtgx.builder().build();
}
htgx.setHtid(zzda.getId());
htgx.setTzrid(pre.getEmpNum());
htgx.setName(pre.getEmpName());
htgx.setPhone(pre.getPhone());
htgx.setOrgCode(orgCode);
htgx.insert();
htgx.insertOrUpdate();
htgxs.add(htgx);
}
HtzzAssoZztx zztx = zzda.getZztx();
......@@ -309,19 +321,20 @@ public class HtzzController {
return ResultUtil.error("操作失败");
}
Map<String, String> url = Maps.newHashMap();
Map<String,String> ftp=Maps.newHashMap();
Map<String, String> ftp = Maps.newHashMap();
ids.forEach(i -> {
HtzzAdminZzda htzzAdminZzda = HtzzAdminZzda.builder().id(i).build().selectById();
if(StringUtil.isNotBlank(htzzAdminZzda.getZjfj())){
if (StringUtil.isNotBlank(htzzAdminZzda.getZjfj())) {
/*格式化获取文字*/
String urla =UrlEncoded.decodeString(htzzAdminZzda.getZjfj());
/*判断是保存在oss还是ftp*/
if(urla.contains(endpoint.replace("http://","."))) {
String urla = UrlEncoded.decodeString(htzzAdminZzda.getZjfj());
/*判断是保存在oss还是服务器*/
if (urla.contains(endpoint.replace("http://", "."))) {
int index = urla.indexOf(project_package);
url.put(htzzAdminZzda.getId() + "_" + htzzAdminZzda.getZjmc(), urla.substring(index));
}else {
} else {
//TODO 区分出云盘文件暂时不下载
ftp.put(htzzAdminZzda.getId()+"_"+htzzAdminZzda.getZjmc(),urla);
StringBuffer newUrl = new StringBuffer(root).append(targetPath).append(urla.substring(serverUrl.length()));
ftp.put(htzzAdminZzda.getId() + "_" + htzzAdminZzda.getZjmc(), newUrl.toString());
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment