|
|
@ -155,37 +155,48 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void addBusinessAlertList(List<BusinessAlertVo> alertVoList) { |
|
|
|
if(!alertVoList.isEmpty()) { |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(alertVoList)){ |
|
|
|
throw new ServiceException("参数为空!"); |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
incrementalCount(alertVoList); |
|
|
|
//用于短信推送
|
|
|
|
List<Map<String, Object>> noticeList=new ArrayList<>(); |
|
|
|
List<RemoteStartProcess> remoteStartProcessList = new ArrayList<>(); |
|
|
|
for (BusinessAlertVo alertVo : alertVoList) { |
|
|
|
Map<String,Object>map=new HashMap<>(); |
|
|
|
alertVo.setBusinessType(2); |
|
|
|
alertVo.setHandleType(BusinessStatusEnum.WAITING.getStatus()); |
|
|
|
BusinessAlert alert = addBusinessAlert(alertVo); |
|
|
|
RemoteStartProcess startProcess = new RemoteStartProcess(); |
|
|
|
startProcess.setBusinessId(String.valueOf(alert.getId())); |
|
|
|
startProcess.setFlowCode("alertChz"); |
|
|
|
map.put("deptId",alertVo.getDeptId()); |
|
|
|
map.put("deptName",alertVo.getDeptName()); |
|
|
|
map.put("labelCn",alertVo.getLabelCn()); |
|
|
|
map.put("labelEn",alertVo.getLabelEn()); |
|
|
|
map.put("jobName",alertVo.getJobName()); |
|
|
|
noticeList.add(map); |
|
|
|
remoteStartProcessList.add(startProcess); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getMessage(),e); |
|
|
|
} |
|
|
|
|
|
|
|
int startIndex = 0; // 从第 0 条开始
|
|
|
|
int batchSize = 5; // 每批处理 5 条
|
|
|
|
boolean flag = BatchProcessorUtil.processBatches(remoteStartProcessList, batchSize, startIndex, batch -> { |
|
|
|
//批量新增部门区域数据
|
|
|
|
remoteWorkflowService.startWorkFlowBatch(batch); |
|
|
|
}); |
|
|
|
remoteSubmailConfigService.remoteSend("smsMultixsend",noticeList); |
|
|
|
//用于短信推送
|
|
|
|
List<Map<String, Object>> noticeList=new ArrayList<>(); |
|
|
|
List<RemoteStartProcess> remoteStartProcessList = new ArrayList<>(); |
|
|
|
for (BusinessAlertVo alertVo : alertVoList) { |
|
|
|
Map<String,Object>map=new HashMap<>(); |
|
|
|
alertVo.setBusinessType(2); |
|
|
|
BusinessAlert alert = addBusinessAlert(alertVo); |
|
|
|
RemoteStartProcess startProcess = new RemoteStartProcess(); |
|
|
|
startProcess.setBusinessId(String.valueOf(alert.getId())); |
|
|
|
|
|
|
|
String flowCode = remoteWorkflowService.getFlowCode(alertVo.getLabelEn()); |
|
|
|
log.info("flowCode:{}",flowCode); |
|
|
|
|
|
|
|
startProcess.setFlowCode(flowCode); |
|
|
|
map.put("deptId",alertVo.getDeptId()); |
|
|
|
map.put("deptName",alertVo.getDeptName()); |
|
|
|
map.put("labelCn",alertVo.getLabelCn()); |
|
|
|
map.put("labelEn",alertVo.getLabelEn()); |
|
|
|
map.put("jobName",alertVo.getJobName()); |
|
|
|
noticeList.add(map); |
|
|
|
remoteStartProcessList.add(startProcess); |
|
|
|
} |
|
|
|
|
|
|
|
int startIndex = 0; // 从第 0 条开始
|
|
|
|
int batchSize = 5; // 每批处理 5 条
|
|
|
|
boolean flag = BatchProcessorUtil.processBatches(remoteStartProcessList, batchSize, startIndex, batch -> { |
|
|
|
//批量新增部门区域数据
|
|
|
|
remoteWorkflowService.startWorkFlowBatch(batch); |
|
|
|
}); |
|
|
|
remoteSubmailConfigService.remoteSend("smsMultixsend",noticeList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|