Browse Source

[feat]提交;画框预警逻辑

pull/7/head
杨威 3 weeks ago
parent
commit
601dd66b30
  1. 19
      dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java

19
dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java

@ -155,19 +155,31 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
@Override @Override
public void addBusinessAlertList(List<BusinessAlertVo> alertVoList) { public void addBusinessAlertList(List<BusinessAlertVo> alertVoList) {
if(!alertVoList.isEmpty()) {
if (ObjectUtil.isEmpty(alertVoList)){
throw new ServiceException("参数为空!");
}
try {
incrementalCount(alertVoList); incrementalCount(alertVoList);
} catch (Exception e) {
log.error(e.getMessage(),e);
}
//用于短信推送 //用于短信推送
List<Map<String, Object>> noticeList=new ArrayList<>(); List<Map<String, Object>> noticeList=new ArrayList<>();
List<RemoteStartProcess> remoteStartProcessList = new ArrayList<>(); List<RemoteStartProcess> remoteStartProcessList = new ArrayList<>();
for (BusinessAlertVo alertVo : alertVoList) { for (BusinessAlertVo alertVo : alertVoList) {
Map<String,Object>map=new HashMap<>(); Map<String,Object>map=new HashMap<>();
alertVo.setBusinessType(2); alertVo.setBusinessType(2);
alertVo.setHandleType(BusinessStatusEnum.WAITING.getStatus());
BusinessAlert alert = addBusinessAlert(alertVo); BusinessAlert alert = addBusinessAlert(alertVo);
RemoteStartProcess startProcess = new RemoteStartProcess(); RemoteStartProcess startProcess = new RemoteStartProcess();
startProcess.setBusinessId(String.valueOf(alert.getId())); startProcess.setBusinessId(String.valueOf(alert.getId()));
startProcess.setFlowCode("alertChz");
String flowCode = remoteWorkflowService.getFlowCode(alertVo.getLabelEn());
log.info("flowCode:{}",flowCode);
startProcess.setFlowCode(flowCode);
map.put("deptId",alertVo.getDeptId()); map.put("deptId",alertVo.getDeptId());
map.put("deptName",alertVo.getDeptName()); map.put("deptName",alertVo.getDeptName());
map.put("labelCn",alertVo.getLabelCn()); map.put("labelCn",alertVo.getLabelCn());
@ -184,7 +196,6 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
remoteWorkflowService.startWorkFlowBatch(batch); remoteWorkflowService.startWorkFlowBatch(batch);
}); });
remoteSubmailConfigService.remoteSend("smsMultixsend",noticeList); remoteSubmailConfigService.remoteSend("smsMultixsend",noticeList);
}
} }

Loading…
Cancel
Save