|
|
@ -73,10 +73,19 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
} |
|
|
|
List<AiCompareEntity> insertList =new ArrayList<>(); |
|
|
|
for (Map<String,Object> bo : compareDTOList) { |
|
|
|
Long queueId = Convert.toLong(bo.get("queueId")); |
|
|
|
Long queueId = bo.containsKey("queueId") ? Convert.toLong(bo.get("queueId")) : null; |
|
|
|
String waylineId = bo.containsKey("waylineId") ? Convert.toStr(bo.get("waylineId")) : null; |
|
|
|
if(StrUtil.isBlank(waylineId)){ |
|
|
|
throw new RuntimeException("未获取到waylineId"); |
|
|
|
} |
|
|
|
if(ObjectUtil.isNull(queueId)){ |
|
|
|
throw new RuntimeException("未获取到queueId"); |
|
|
|
} |
|
|
|
String templateId = bo.containsKey("templateId") ? Convert.toStr(bo.get("templateId")) : null; |
|
|
|
AiCompareQueueEntity serviceInfo = aiCompareQueueService.getInfo(queueId); |
|
|
|
AiCompareEntity aiCompareEntity = new AiCompareEntity(); |
|
|
|
LoginUser loginUser = LoginHelper.getLoginUser(); |
|
|
|
aiCompareEntity.setWaylineId(waylineId); |
|
|
|
aiCompareEntity.setWaylineName(serviceInfo.getWaylineName()); |
|
|
|
aiCompareEntity.setJobId(serviceInfo.getJobId()); |
|
|
|
aiCompareEntity.setJobName(serviceInfo.getJobName()); |
|
|
@ -87,7 +96,6 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
aiCompareEntity.setCreateDept(loginUser.getDeptId()); |
|
|
|
aiCompareEntity.setStatus(AiCompareStatusConstants.COMPARE_STATUS_1); |
|
|
|
aiCompareEntity.setCreateTime(new Date()); |
|
|
|
String templateId = Convert.toStr(bo.get("templateId")); |
|
|
|
if(ObjectUtil.isNotEmpty(templateId)){ |
|
|
|
aiCompareEntity.setTemplateId(templateId); |
|
|
|
}else { |
|
|
@ -109,16 +117,15 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
List<BatchResult> resultList = aiCompareMapper.insertOrUpdate(insertList, 10); |
|
|
|
System.out.println(resultList); |
|
|
|
List<Long> list =compareDTOList.stream().map(e->Convert.toLong(e.get("queueId"))).collect(Collectors.toList()); |
|
|
|
; |
|
|
|
return aiCompareQueueService.updateStatus(list,AiCompareStatusConstants.QUEUW_TYPE_1); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean update(Map<String,Object> compareDTO) { |
|
|
|
AiCompareEntity aiCompareEntity =new AiCompareEntity(); |
|
|
|
Long id = Convert.toLong(compareDTO.get("id")); |
|
|
|
Long id = compareDTO.containsKey("id") ? Convert.toLong(compareDTO.get("id")) : null; |
|
|
|
String templateId = compareDTO.containsKey("templateId") ? Convert.toStr(compareDTO.get("templateId")) : null; |
|
|
|
aiCompareEntity.setId(id); |
|
|
|
String templateId = Convert.toStr(compareDTO.get("templateId")); |
|
|
|
if(StrUtil.isNotEmpty(templateId)){ |
|
|
|
aiCompareEntity.setTemplateId(templateId); |
|
|
|
} |
|
|
@ -137,4 +144,10 @@ public class AiCompareServiceImpl implements IAiCompareService { |
|
|
|
List<AiCompareMediaFileDTO> mediaFileDTOList = aiCompareMapper.listMediaFile(aiCompareEntity); |
|
|
|
return mediaFileDTOList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean pictureFrame(Map<String, Object> compare) { |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|