|
@ -247,11 +247,14 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Override |
|
|
@Override |
|
|
public Boolean commitAlert(List<Map<String, Object>> alertList) { |
|
|
public Boolean commitAlert(Map<String,Object>compareMap) { |
|
|
|
|
|
|
|
|
|
|
|
Long compareId = Convert.toLong(compareMap.get("compareId")); |
|
|
|
|
|
List<Map<String, Object>>alertList = (List<Map<String, Object>>)compareMap.get("commitAlert"); |
|
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(alertList)) { |
|
|
if (ObjectUtil.isEmpty(alertList)) { |
|
|
throw new ServiceException("预警信息为空!"); |
|
|
throw new ServiceException("预警信息为空!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<RemoteStartProcess> startProcessList = alertList.stream().map(map -> { |
|
|
List<RemoteStartProcess> startProcessList = alertList.stream().map(map -> { |
|
|
String flowCode = remoteWorkflowService.getFlowCode(map.get("labelEn").toString()); |
|
|
String flowCode = remoteWorkflowService.getFlowCode(map.get("labelEn").toString()); |
|
|
RemoteStartProcess remoteStartProcess = new RemoteStartProcess(); |
|
|
RemoteStartProcess remoteStartProcess = new RemoteStartProcess(); |
|
@ -259,10 +262,12 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
remoteStartProcess.setFlowCode(flowCode); |
|
|
remoteStartProcess.setFlowCode(flowCode); |
|
|
return remoteStartProcess; |
|
|
return remoteStartProcess; |
|
|
}).toList(); |
|
|
}).toList(); |
|
|
|
|
|
|
|
|
//更新部门信息
|
|
|
//更新部门信息
|
|
|
businessAlertService.batchUpdateDept(alertList); |
|
|
businessAlertService.batchUpdateDept(alertList); |
|
|
|
|
|
AiCompareEntity aiCompareEntity=new AiCompareEntity(); |
|
|
|
|
|
aiCompareEntity.setId(compareId); |
|
|
|
|
|
aiCompareEntity.setStatus(AiCompareStatusConstants.COMPARE_STATUS_4); |
|
|
|
|
|
aiCompareMapper.updateById(aiCompareEntity); |
|
|
return remoteWorkflowService.startWorkFlowBatch(startProcessList); |
|
|
return remoteWorkflowService.startWorkFlowBatch(startProcessList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|