Commit 5c36c998 authored by 韩桐桐's avatar 韩桐桐

两个规定-报检一键提交修改

parent c6897733
...@@ -1939,13 +1939,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -1939,13 +1939,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// 查询所有的 // 查询所有的
Map<String , ESTaskDetailDto> esTaskDetailDtoMap = allESTaskDetailDtos.stream().collect(Collectors.toMap(ESTaskDetailDto::getId, Function.identity())); Map<String , ESTaskDetailDto> esTaskDetailDtoMap = allESTaskDetailDtos.stream().collect(Collectors.toMap(ESTaskDetailDto::getId, Function.identity()));
// 只更新未完成状态 // 只更新未完成状态
planTaskDetails.stream().filter(p-> PlanTaskDetailStatusEnum.NOTSTARTED.getValue().equals(p.getStatus())).collect(Collectors.toList()).forEach(planTaskDetail -> { planTaskDetails.stream().filter(p -> PlanTaskDetailStatusEnum.NOTSTARTED.getValue().equals(p.getStatus())).collect(Collectors.toList()).forEach(planTaskDetail -> {
ESTaskDetailDto esTaskDetailDto = esTaskDetailDtoMap.get(Objects.toString(planTaskDetail.getId())); ESTaskDetailDto esTaskDetailDto = esTaskDetailDtoMap.get(Objects.toString(planTaskDetail.getId()));
JSONObject appCheckInput = esTaskDetailDto.getAppCheckInput(); JSONObject appCheckInput = esTaskDetailDto.getAppCheckInput();
Map<String, List<Map<String, Object>>> mapList = (Map<String, List<Map<String, Object>>>) JSON.parse(appCheckInput.toJSONString()); Map<String, List<Map<String, Object>>> mapList = (Map<String, List<Map<String, Object>>>) JSON.parse(appCheckInput.toJSONString());
if (mapList.isEmpty()) { if (!mapList.isEmpty()) {
return;
}
List<AppCheckInputRespone> appCheckInputRespones = new ArrayList<>(); List<AppCheckInputRespone> appCheckInputRespones = new ArrayList<>();
for (Map<String, Object> map : mapList.get("items")) { for (Map<String, Object> map : mapList.get("items")) {
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
...@@ -1966,6 +1964,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -1966,6 +1964,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
appCheckInputRespones.add(appCheckInputRespone); appCheckInputRespones.add(appCheckInputRespone);
} }
appCheckInput.put("items", appCheckInputRespones); appCheckInput.put("items", appCheckInputRespones);
}
esTaskDetailDto.setPointImgUrls(new ArrayList<>()); esTaskDetailDto.setPointImgUrls(new ArrayList<>());
esTaskDetailDto.setAppCheckInput(appCheckInput); esTaskDetailDto.setAppCheckInput(appCheckInput);
esTaskDetailDto.setPointStatus(String.valueOf(PlanTaskDetailIsFinishEnum.FINISHED.getValue())); esTaskDetailDto.setPointStatus(String.valueOf(PlanTaskDetailIsFinishEnum.FINISHED.getValue()));
......
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