Commit 80ac3fea authored by kongfm's avatar kongfm

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

parents 2fc0d704 0b84614b
......@@ -1098,6 +1098,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
danger.getOrgCode(),
danger.getDangerName(), DateUtil.date2Str(danger.getReformLimitDate(), DateUtil.DATETIME_DEFAULT_FORMAT),
danger.getDangerId(),
danger.getInstanceId(),
danger.getDangerState(),"");
});
}
......@@ -1275,23 +1276,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
Set<String> sendUserIds = Sets.newHashSet(latentDangerBo.getDiscovererUserId());
asyncTask.pushLatentDangerExecuteMessage(informerList, latentDangerBo.getOrgCode(),
latentDangerBo.getDangerName(), pointName,
departmentName, latentDangerBo.getId(), userRealName,
departmentName, latentDangerBo.getId(), latentDangerBo.getInstanceId(), userRealName,
flowTaskName, ExecuteStateEnum.驳回.getName(),
DateUtil.date2Str(new Date(), DateUtil.DATETIME_DEFAULT_FORMAT),
Integer.parseInt(latentDangerBo.getDangerState()));
} else if (excuteTypeEnum.equals(LatentDangerExcuteTypeEnum.隐患验证通过)) {
if (patrolBo != null) {
// RiskFactorBo riskFactorBo = riskFactorMapper.getById(Long.valueOf(patrolBo.getClassifyOriginalId()));
// Set<String> sendUserIds = Sets.newHashSet();
// if (riskFactorBo != null) {
// sendUserIds.addAll(Arrays.asList(riskFactorBo.getUserIds().split(",")));
// sendUserIds.add(riskFactorBo.getFirstEvaluateUserId());
// sendUserIds.add(riskFactorBo.getSecondEvaluateUserId());
// asyncTask.pushRiskWarnMessage(sendUserIds, latentDangerBo.getOrgCode(),
// latentDangerBo.getDangerName(), riskFactorBo.getId(),
// riskFactorBo.getName(), patrolBo.getPointName(),
// DateUtil.date2Str(new Date(), DateUtil.DATETIME_DEFAULT_FORMAT));
// }
// 更新p_check_input表state字段
updateCheckInputDangerState(latentDangerBo.getBizId(), DangerHandleStateEnum.COMPLETED.getCode());
DangerResultBo dangerResultBo = new DangerResultBo();
......@@ -1308,7 +1298,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
asyncTask.pushLatentDangerExecuteMessage(informerList, latentDangerBo.getOrgCode(),
latentDangerBo.getDangerName(), pointName,
departmentName, latentDangerBo.getId(), userRealName,
departmentName, latentDangerBo.getId(), latentDangerBo.getInstanceId(), userRealName,
flowTaskName, excuteTypeEnum.getExcuteState().getName(),
DateUtil.date2Str(new Date(), DateUtil.DATETIME_DEFAULT_FORMAT),
Integer.parseInt(latentDangerBo.getDangerState()));
......@@ -1320,6 +1310,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
latentDangerBo.getOrgCode(), latentDangerBo.getDangerName(),
DateUtil.date2Str(latentDangerBo.getReformLimitDate(), DateUtil.DATETIME_DEFAULT_FORMAT),
latentDangerBo.getId(),
latentDangerBo.getInstanceId(),
Integer.parseInt(latentDangerBo.getDangerState()),userRealName);
}
}
......
......@@ -123,7 +123,7 @@ public class AsyncTask {
@Async("asyncTaskExecutor")
public void pushLatentDangerReformLimitDateExpireMessage(String informerList, String orgCode,
String latentDangerName, String reformLimitDate,
Long latentDangerId, Integer state,
Long latentDangerId, String taskId, Integer state,
String userRealName) {
// if (CollectionUtils.isEmpty(receiverIds)) {
// return;
......@@ -133,7 +133,7 @@ public class AsyncTask {
body += "隐患治理提醒:您好,隐患治理即将到期,请及时处理!" + TAB;
body += "隐患名称:" + latentDangerName + TAB;
body += "治理日期:" + reformLimitDate;
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, state,userRealName);
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, taskId, state,userRealName);
}
/**
......@@ -143,6 +143,7 @@ public class AsyncTask {
public void pushLatentDangerExecuteMessage(String informerList, String orgCode,
String latentDangerName, String pointName,
String exeDeptName, Long latentDangerId,
String taskId,
String exeUserRealName, String flowName,
String flowResult, String executeDate,
Integer state) {
......@@ -154,7 +155,7 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, state,"");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, taskId, state,"");
}
/**
......@@ -162,7 +163,7 @@ public class AsyncTask {
*/
@Async("asyncTaskExecutor")
public void pushRiskWarnMessage(String informerList, String orgCode,
String latentDangerName, Long riskFactorId,
String latentDangerName, Long riskFactorId, String taskId,
String riskFactorName, String pointName,
String executeDate) {
// if (CollectionUtils.isEmpty(sendUserIds)) {
......@@ -177,12 +178,12 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), riskFactorId, null,"");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), riskFactorId,taskId, null,"");
}
private void saveAndSendMsg(String orgCode, String informerList,
String title, String body, String msgType,
Long relationId, Integer state,
Long relationId, String taskId, Integer state,
String userRealName) {
JSONArray array = JSONArray.parseArray(informerList);
Set<String> sendUserIds = new HashSet<>();
......@@ -211,6 +212,7 @@ public class AsyncTask {
Map<String, String> extras = Maps.newHashMap();
extras.put("type", msgType);
extras.put("id", String.valueOf(relationId));
extras.put("taskId", taskId);
if (state != null) {
extras.put("state", String.valueOf(state));
}
......@@ -249,7 +251,7 @@ public class AsyncTask {
body += riskJudgmentName + ":" + dataStr + TAB;
body += departmentName + TAB;
body += "状态:" + statusDesc + TAB;
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), taskId, state,"");
// saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), taskId, state,"");
MsgSubscribeEnum eamilMsgTypeEnum = MsgSubscribeEnum.推送风险研判消息;
Set<String> emailAfterFilterUserIds = userIdFilter(sendUserIds, eamilMsgTypeEnum.getMsgType());
sendEmail(emailAfterFilterUserIds, msgTypeEnum.getTitle(), body);
......
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