Commit 13863f8d by 翁国栋

禅道bug-

1284、合同证照中的到期提醒,如果提醒人一天中存在多个要提醒的证照时,系统只发送最先创建的那一条证照的到期提醒
parent 7ea43215
...@@ -69,6 +69,15 @@ public class HtzzController { ...@@ -69,6 +69,15 @@ public class HtzzController {
@Value("${config-8timer.Aliyun.endpoint}") @Value("${config-8timer.Aliyun.endpoint}")
private String 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 { ...@@ -116,16 +125,19 @@ public class HtzzController {
List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码 List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码
List<HtzzAssoHtgx> htgxs = Lists.newArrayList(); List<HtzzAssoHtgx> htgxs = Lists.newArrayList();
for (NotifyPersonDto pre : ids) { for (NotifyPersonDto pre : ids) {
HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum()) // HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
.eq(HtzzAssoHtgx::getPhone, pre.getPhone())); // .eq(HtzzAssoHtgx::getPhone, pre.getPhone()));
HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build().selectOne(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build(); .eq(HtzzAssoHtgx::getPhone, pre.getPhone()).eq(HtzzAssoHtgx::getHtid,zzda.getId()));
if (htgx == null) {
htgx = HtzzAssoHtgx.builder().build();
}
htgx.setHtid(zzda.getId()); htgx.setHtid(zzda.getId());
htgx.setTzrid(pre.getEmpNum()); htgx.setTzrid(pre.getEmpNum());
htgx.setName(pre.getEmpName()); htgx.setName(pre.getEmpName());
htgx.setPhone(pre.getPhone()); htgx.setPhone(pre.getPhone());
htgx.setOrgCode(orgCode); htgx.setOrgCode(orgCode);
htgx.insert(); htgx.insertOrUpdate();
htgxs.add(htgx); htgxs.add(htgx);
} }
HtzzAssoZztx zztx = zzda.getZztx(); HtzzAssoZztx zztx = zzda.getZztx();
...@@ -309,19 +321,20 @@ public class HtzzController { ...@@ -309,19 +321,20 @@ public class HtzzController {
return ResultUtil.error("操作失败"); return ResultUtil.error("操作失败");
} }
Map<String, String> url = Maps.newHashMap(); Map<String, String> url = Maps.newHashMap();
Map<String,String> ftp=Maps.newHashMap(); Map<String, String> ftp = Maps.newHashMap();
ids.forEach(i -> { ids.forEach(i -> {
HtzzAdminZzda htzzAdminZzda = HtzzAdminZzda.builder().id(i).build().selectById(); HtzzAdminZzda htzzAdminZzda = HtzzAdminZzda.builder().id(i).build().selectById();
if(StringUtil.isNotBlank(htzzAdminZzda.getZjfj())){ if (StringUtil.isNotBlank(htzzAdminZzda.getZjfj())) {
/*格式化获取文字*/ /*格式化获取文字*/
String urla =UrlEncoded.decodeString(htzzAdminZzda.getZjfj()); String urla = UrlEncoded.decodeString(htzzAdminZzda.getZjfj());
/*判断是保存在oss还是ftp*/ /*判断是保存在oss还是服务器*/
if(urla.contains(endpoint.replace("http://","."))) { if (urla.contains(endpoint.replace("http://", "."))) {
int index = urla.indexOf(project_package); int index = urla.indexOf(project_package);
url.put(htzzAdminZzda.getId() + "_" + htzzAdminZzda.getZjmc(), urla.substring(index)); url.put(htzzAdminZzda.getId() + "_" + htzzAdminZzda.getZjmc(), urla.substring(index));
}else { } else {
//TODO 区分出云盘文件暂时不下载 //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