From 92034c83c2ec47ba89b0e4bde848de055d35bd2c Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Sun, 10 Jan 2021 21:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8E=AF=E4=BF=9D=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=BB=93=E6=9E=9C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taskcheck/v2/TaskCheckAppController.java | 23 +++- .../dao/taskcheck/v2/ITaskCheckDao.java | 18 +++ .../v2/TaskCheckReportCheckItemDTO.java | 55 +++++++++ .../dtos/taskcheck/v2/TaskCheckReportDTO.java | 52 ++++++++ .../vos/taskcheck/v2/TaskCheckReportVO.java | 7 +- .../taskcheck/v2/ITaskCheckService.java | 11 ++ .../v2/impl/TaskCheckServiceImpl.java | 110 ++++++++++++++++- .../taskcheck/v2/taskcheck-v2-mapper.xml | 113 ++++++++++++++++++ 8 files changed, 380 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportCheckItemDTO.java create mode 100644 src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportDTO.java diff --git a/src/main/java/com/cm/inspection/controller/app/apis/taskcheck/v2/TaskCheckAppController.java b/src/main/java/com/cm/inspection/controller/app/apis/taskcheck/v2/TaskCheckAppController.java index 946838b..7208f7a 100644 --- a/src/main/java/com/cm/inspection/controller/app/apis/taskcheck/v2/TaskCheckAppController.java +++ b/src/main/java/com/cm/inspection/controller/app/apis/taskcheck/v2/TaskCheckAppController.java @@ -8,9 +8,8 @@ import com.cm.common.pojo.ListPage; import com.cm.common.result.ErrorResult; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultList; -import com.cm.inspection.enums.task.v2.CheckItemListTypeEnum; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckDTO; -import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckEnterpriseDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportCheckItemDTO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckReportVO; import com.cm.inspection.service.taskcheck.v2.ITaskCheckService; import io.swagger.annotations.*; @@ -47,6 +46,11 @@ public class TaskCheckAppController extends AbstractController { @PostMapping("savetaskcheckreport") @CheckRequestBodyAnnotation public synchronized SuccessResult saveTaskCheckReport(@RequestHeader("token") String token, @RequestBody TaskCheckReportVO taskCheckReportVO) throws Exception { + boolean isCheckItemNone = (taskCheckReportVO.getIndustryReportItems() == null || taskCheckReportVO.getIndustryReportItems().isEmpty()) && + (taskCheckReportVO.getEnterpriseReportItems() == null || taskCheckReportVO.getEnterpriseReportItems().isEmpty()); + if (isCheckItemNone) { + throw new ParamsException("检查项列表不能为空"); + } if (StringUtils.isBlank(taskCheckReportVO.getCheckLng()) || StringUtils.equals(String.valueOf(Double.MIN_VALUE), taskCheckReportVO.getCheckLng())) { throw new ParamsException("检查经度有误"); } @@ -104,4 +108,19 @@ public class TaskCheckAppController extends AbstractController { return taskCheckService.listCheckItem(checkItemListType, taskEnterpriseId); } + @ApiOperation(value = "检查结果列表", notes = "检查结果列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "checkItemListType", value = "检查项列表类型, 1:行业检查项,2:企业检查项", paramType = "path"), + @ApiImplicitParam(name = "taskEnterpriseId", value = "检查任务企业ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listtaskcheckreport/{checkItemListType}/{taskEnterpriseId}") + public List listTaskCheckReport(@PathVariable("checkItemListType") Integer checkItemListType, + @PathVariable("taskEnterpriseId") String taskEnterpriseId) { + if (ITaskCheckService.CHECK_ITEM_LIST_TYPE_RELATION != checkItemListType && ITaskCheckService.CHECK_ITEM_LIST_TYPE_CUSTOM != checkItemListType) { + throw new ParamsException("参数错误"); + } + return taskCheckService.listTaskCheckReport(checkItemListType, taskEnterpriseId); + } + } diff --git a/src/main/java/com/cm/inspection/dao/taskcheck/v2/ITaskCheckDao.java b/src/main/java/com/cm/inspection/dao/taskcheck/v2/ITaskCheckDao.java index 1282395..7bc3ea7 100644 --- a/src/main/java/com/cm/inspection/dao/taskcheck/v2/ITaskCheckDao.java +++ b/src/main/java/com/cm/inspection/dao/taskcheck/v2/ITaskCheckDao.java @@ -6,6 +6,7 @@ import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckDTO; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckEnterpriseDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportDTO; import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; @@ -141,4 +142,21 @@ public interface ITaskCheckDao { */ List listEnterpriseCheckItem(Map params) throws SearchException; + /** + * 行业任务检查结果 + * + * @param params + * @return + * @throws SearchException + */ + List listIndustryTaskCheckReport(Map params) throws SearchException; + + /** + * 企业任务检查结果 + * + * @param params + * @return + * @throws SearchException + */ + List listEnterpriseTaskCheckReport(Map params) throws SearchException; } diff --git a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportCheckItemDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportCheckItemDTO.java new file mode 100644 index 0000000..b0655e9 --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportCheckItemDTO.java @@ -0,0 +1,55 @@ +package com.cm.inspection.pojo.dtos.taskcheck.v2; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: TaskCheckReportCheckItemDTO + * @Description: 任务上报检查项 + * @Author: wanggeng + * @Date: 2021/1/10 2:27 下午 + * @Version: 1.0 + */ +@Data +@ApiModel +public class TaskCheckReportCheckItemDTO { + + @ApiModelProperty(name = "checkItemId", value = "检查项ID") + private String checkItemId; + @ApiModelProperty(name = "checkItemParentId", value = "检查项上级ID") + private String checkItemParentId; + @ApiModelProperty(name = "checkItemName", value = "检查项名称") + private String checkItemName; + @ApiModelProperty(name = "checkItemType", value = "检查项类型(1:目录,2:检查项)") + private Integer checkItemType; + @ApiModelProperty(name = "taskItemListType", value = "检查项列表类型(1:行业检查项,2:企业检查项)") + private Integer taskItemListType; + @ApiModelProperty(name = "checkItemOptions", value = "检查项列表") + private List checkItemOptions; + + @Data + @ApiModel + public static class CheckItemOptionDTO { + @ApiModelProperty(name = "checkItemOptionId", value = "检查项ID") + private String checkItemOptionId; + @ApiModelProperty(name = "checkItemOptionType", value = "检查项选项类型,1:勾选,2:数字,3:文本") + private Integer checkItemOptionType; + @ApiModelProperty(name = "checkItemOptionName", value = "检查项名称") + private String checkItemOptionName; + @ApiModelProperty(name = "checkItemOptionUnit", value = "检查项单位") + private String checkItemOptionUnit; + @ApiModelProperty(name = "checkItemIsWrong", value = "是否错误项") + private Integer checkItemIsWrong; + @ApiModelProperty(name = "checkResult", value = "检查结果") + private String checkResult; + @ApiModelProperty(name = "scenePhotos", value = "佐证图片") + private String scenePhotos; + } + +} diff --git a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportDTO.java new file mode 100644 index 0000000..587df21 --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckReportDTO.java @@ -0,0 +1,52 @@ +package com.cm.inspection.pojo.dtos.taskcheck.v2; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: TaskCheckReport + * @Description: 任务上报 + * @Author: wanggeng + * @Date: 2021/1/10 1:21 下午 + * @Version: 1.0 + */ +@Data +@ApiModel +public class TaskCheckReportDTO { + + @ApiModelProperty(name = "taskCheckReportId", value = "任务检查ID") + private String taskCheckReportId; + @ApiModelProperty(name = "taskId", value = "任务ID") + private String taskId; + @ApiModelProperty(name = "taskEnterpriseId", value = "任务企业ID") + private String taskEnterpriseId; + @ApiModelProperty(name = "checkItemId", value = "检查项ID") + private String checkItemId; + @ApiModelProperty(name = "checkItemParentId", value = "检查项上级ID") + private String checkItemParentId; + @ApiModelProperty(name = "checkItemName", value = "检查项名称") + private String checkItemName; + @ApiModelProperty(name = "checkItemType", value = "检查项类型(1:目录,2:检查项)") + private Integer checkItemType; + @ApiModelProperty(name = "taskItemListType", value = "检查项列表类型(1:行业检查项,2:企业检查项)") + private Integer taskItemListType; + @ApiModelProperty(name = "checkItemOptionId", value = "检查项ID") + private String checkItemOptionId; + @ApiModelProperty(name = "checkItemOptionType", value = "检查项选项类型,1:勾选,2:数字,3:文本") + private Integer checkItemOptionType; + @ApiModelProperty(name = "checkItemOptionName", value = "检查项名称") + private String checkItemOptionName; + @ApiModelProperty(name = "checkItemOptionUnit", value = "检查项单位") + private String checkItemOptionUnit; + @ApiModelProperty(name = "checkItemIsWrong", value = "是否错误项") + private Integer checkItemIsWrong; + @ApiModelProperty(name = "checkResult", value = "检查结果") + private String checkResult; + @ApiModelProperty(name = "scenePhotos", value = "佐证图片") + private String scenePhotos; + +} diff --git a/src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java b/src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java index 208a9fe..d0b4a38 100644 --- a/src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java +++ b/src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java @@ -36,9 +36,10 @@ public class TaskCheckReportVO { private String checkLat; @ApiModelProperty(name = "scenePhotos", value = "佐证图片") private String scenePhotos; - @ApiModelProperty(name = "taskCheckReportItems", value = "检查项列表") - @CheckListAnnotation(name = "检查项列表") - private List taskCheckReportItems; + @ApiModelProperty(name = "industryReportItems", value = "行业检查项列表") + private List industryReportItems; + @ApiModelProperty(name = "enterpriseReportItems", value = "企业检查项列表") + private List enterpriseReportItems; @Data @ApiModel diff --git a/src/main/java/com/cm/inspection/service/taskcheck/v2/ITaskCheckService.java b/src/main/java/com/cm/inspection/service/taskcheck/v2/ITaskCheckService.java index b553e03..c2cfcbd 100644 --- a/src/main/java/com/cm/inspection/service/taskcheck/v2/ITaskCheckService.java +++ b/src/main/java/com/cm/inspection/service/taskcheck/v2/ITaskCheckService.java @@ -10,6 +10,8 @@ import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO; import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckDTO; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckEnterpriseDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportCheckItemDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportDTO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckReportVO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckVO; @@ -175,4 +177,13 @@ public interface ITaskCheckService { */ SuccessResultList> listPageTaskEnterprise(String taskId, ListPage page) throws SearchException; + /** + * 检查检查结果列表 + * + * @param checkItemListType 检查项类型ID + * @param taskEnterpriseId 任务企业ID + * @return + * @throws SearchException + */ + List listTaskCheckReport(Integer checkItemListType, String taskEnterpriseId) throws SearchException; } diff --git a/src/main/java/com/cm/inspection/service/taskcheck/v2/impl/TaskCheckServiceImpl.java b/src/main/java/com/cm/inspection/service/taskcheck/v2/impl/TaskCheckServiceImpl.java index 3f476ac..cbb359f 100644 --- a/src/main/java/com/cm/inspection/service/taskcheck/v2/impl/TaskCheckServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/taskcheck/v2/impl/TaskCheckServiceImpl.java @@ -2,7 +2,6 @@ package com.cm.inspection.service.taskcheck.v2.impl; import com.alibaba.druid.util.StringUtils; import com.cm.common.exception.RemoveException; -import com.cm.common.exception.SaveException; import com.cm.common.exception.SearchException; import com.cm.common.plugin.oauth.service.user.IUserService; import com.cm.common.plugin.pojo.bos.UserResourceBO; @@ -15,9 +14,12 @@ import com.cm.common.utils.DateUtil; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.inspection.dao.taskcheck.v2.ITaskCheckDao; +import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO; import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO; import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportCheckItemDTO; +import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckReportDTO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckReportVO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckVO; import com.cm.inspection.runnable.taskcheck.v2.TaskCheckSaveRunnable; @@ -68,7 +70,9 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi @Resource(name = "industryCheckItemV2Service") private IIndustryCheckItemService industryCheckItemService; @Resource(name = "checkItemV2Service") - private ICheckItemService checkItemService; + private ICheckItemService checkItemV2Service; + @Autowired + private com.cm.inspection.service.checkitem.ICheckItemService checkItemService; @Autowired private ICheckItemOptionService checkItemOptionService; @Resource(name = "checkItemOptionServiceV2Impl") @@ -96,7 +100,7 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi TaskCheckSaveRunnable taskCheckSaveRunnable = new TaskCheckSaveRunnable(securityComponent.getCurrentUser().getUserId(), taskId, taskCheckVO); taskCheckSaveRunnable.setDataSourceTransactionManager(dataSourceTransactionManager); taskCheckSaveRunnable.setTaskCheckDao(taskCheckDao); - taskCheckSaveRunnable.setCheckItemService(checkItemService); + taskCheckSaveRunnable.setCheckItemService(checkItemV2Service); taskCheckSaveRunnable.setEnterpriseService(enterpriseService); taskCheckSaveRunnable.setIndustryCheckItemService(industryCheckItemService); taskCheckSaveRunnable.setGridPersonnelService(gridPersonnelService); @@ -131,10 +135,21 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi params.put("isCompleted", 1); params.put("checkTime", DateUtil.getTime()); taskCheckDao.updateTaskEnterpriseStatus(params); - for (TaskCheckReportVO.TaskCheckReportItemVO taskCheckReportItemVO : taskCheckReportVO.getTaskCheckReportItems()) { + for (TaskCheckReportVO.TaskCheckReportItemVO taskCheckReportItemVO : taskCheckReportVO.getIndustryReportItems()) { params = HashMapUtil.beanToMap(taskCheckReportItemVO); + params.put("taskCheckReportId", UUIDUtil.getUUID()); params.put("taskId", taskCheckReportVO.getTaskId()); params.put("taskEnterpriseId", taskCheckReportVO.getTaskEnterpriseId()); + params.put("checkItemListType", 1); + setSaveInfoByUserId(params, appTokenUser.getId()); + taskCheckDao.saveTaskCheckReport(params); + } + for (TaskCheckReportVO.TaskCheckReportItemVO taskCheckReportItemVO : taskCheckReportVO.getEnterpriseReportItems()) { + params = HashMapUtil.beanToMap(taskCheckReportItemVO); + params.put("taskCheckReportId", UUIDUtil.getUUID()); + params.put("taskId", taskCheckReportVO.getTaskId()); + params.put("taskEnterpriseId", taskCheckReportVO.getTaskEnterpriseId()); + params.put("checkItemListType", 2); setSaveInfoByUserId(params, appTokenUser.getId()); taskCheckDao.saveTaskCheckReport(params); } @@ -267,6 +282,93 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi return new SuccessResultList<>(taskEnterpriseDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + @Override + public List listTaskCheckReport(Integer checkItemListType, String taskEnterpriseId) throws SearchException { + Map params = getHashMap(4); + params.put("checkItemListType", checkItemListType); + params.put("taskEnterpriseId", taskEnterpriseId); + List taskCheckReportDTOs = null; + if (CHECK_ITEM_LIST_TYPE_RELATION == checkItemListType) { + taskCheckReportDTOs = taskCheckDao.listIndustryTaskCheckReport(params); + } + if (CHECK_ITEM_LIST_TYPE_CUSTOM == checkItemListType) { + taskCheckReportDTOs = taskCheckDao.listEnterpriseTaskCheckReport(params); + } + if (taskCheckReportDTOs == null || taskCheckReportDTOs.isEmpty()) { + return new ArrayList<>(); + } + // 组合检查项列表 + Map taskCheckReportCheckItemDTOMap = new HashMap<>(); + for (TaskCheckReportDTO taskCheckReportDTO : taskCheckReportDTOs) { + if (taskCheckReportCheckItemDTOMap.get(taskCheckReportDTO) != null) { + continue; + } + TaskCheckReportCheckItemDTO taskCheckReportCheckItemDTO = new TaskCheckReportCheckItemDTO(); + taskCheckReportCheckItemDTO.setCheckItemId(taskCheckReportDTO.getCheckItemId()); + taskCheckReportCheckItemDTO.setCheckItemParentId(taskCheckReportDTO.getCheckItemParentId()); + taskCheckReportCheckItemDTO.setCheckItemName(taskCheckReportDTO.getCheckItemName()); + taskCheckReportCheckItemDTO.setCheckItemType(taskCheckReportDTO.getCheckItemType()); + taskCheckReportCheckItemDTO.setTaskItemListType(checkItemListType); + taskCheckReportCheckItemDTOMap.put(taskCheckReportDTO.getCheckItemId(), taskCheckReportCheckItemDTO); + } + // 获取上级检查项 + List checkItemIds = new ArrayList<>(); + for (Map.Entry kv : taskCheckReportCheckItemDTOMap.entrySet()) { + if (!StringUtils.equals("0", kv.getValue().getCheckItemParentId())) { + checkItemIds.add(kv.getValue().getCheckItemParentId()); + } + } + params.clear(); + params.put("checkItemIds", checkItemIds); + if (CHECK_ITEM_LIST_TYPE_RELATION == checkItemListType && !checkItemIds.isEmpty()) { + List checkItemDTOs = checkItemService.listCheckItem(params); + for (CheckItemDTO checkItemDTO : checkItemDTOs) { + TaskCheckReportCheckItemDTO taskCheckReportCheckItemDTO = new TaskCheckReportCheckItemDTO(); + taskCheckReportCheckItemDTO.setCheckItemId(checkItemDTO.getCheckItemId()); + taskCheckReportCheckItemDTO.setCheckItemParentId(checkItemDTO.getCheckItemParentId()); + taskCheckReportCheckItemDTO.setCheckItemName(checkItemDTO.getName()); + taskCheckReportCheckItemDTO.setCheckItemType(checkItemDTO.getType()); + taskCheckReportCheckItemDTOMap.put(checkItemDTO.getCheckItemId(), taskCheckReportCheckItemDTO); + } + } + if (CHECK_ITEM_LIST_TYPE_CUSTOM == checkItemListType && !checkItemIds.isEmpty()) { + List checkItemDTOs = checkItemV2Service.list(params); + for (com.cm.inspection.pojo.dtos.enterprise.checkitem.v2.CheckItemDTO checkItemDTO : checkItemDTOs) { + TaskCheckReportCheckItemDTO taskCheckReportCheckItemDTO = new TaskCheckReportCheckItemDTO(); + taskCheckReportCheckItemDTO.setCheckItemId(checkItemDTO.getCheckItemId()); + taskCheckReportCheckItemDTO.setCheckItemParentId(checkItemDTO.getCheckItemParentId()); + taskCheckReportCheckItemDTO.setCheckItemName(checkItemDTO.getName()); + taskCheckReportCheckItemDTO.setCheckItemType(checkItemDTO.getType()); + taskCheckReportCheckItemDTOMap.put(checkItemDTO.getCheckItemId(), taskCheckReportCheckItemDTO); + } + } + // 组装检查结果 + List taskCheckReportCheckItemDTOs = new ArrayList<>(); + for (Map.Entry kv : taskCheckReportCheckItemDTOMap.entrySet()) { + TaskCheckReportCheckItemDTO taskCheckReportCheckItemDTO = kv.getValue(); + taskCheckReportCheckItemDTOs.add(taskCheckReportCheckItemDTO); + List checkItemOptions = new ArrayList<>(); + taskCheckReportCheckItemDTO.setCheckItemOptions(checkItemOptions); + for (int i = 0; i < taskCheckReportDTOs.size(); i++) { + TaskCheckReportDTO taskCheckReportDTO = taskCheckReportDTOs.get(i); + if (StringUtils.equals(kv.getKey(), taskCheckReportDTO.getCheckItemId())) { + TaskCheckReportCheckItemDTO.CheckItemOptionDTO checkItemOptionDTO = new TaskCheckReportCheckItemDTO.CheckItemOptionDTO(); + checkItemOptionDTO.setCheckItemOptionId(taskCheckReportDTO.getCheckItemOptionId()); + checkItemOptionDTO.setCheckItemOptionName(taskCheckReportDTO.getCheckItemOptionName()); + checkItemOptionDTO.setCheckItemOptionType(taskCheckReportDTO.getCheckItemOptionType()); + checkItemOptionDTO.setCheckItemOptionUnit(taskCheckReportDTO.getCheckItemOptionUnit()); + checkItemOptionDTO.setCheckItemIsWrong(taskCheckReportDTO.getCheckItemIsWrong()); + checkItemOptionDTO.setCheckResult(taskCheckReportDTO.getCheckResult()); + checkItemOptionDTO.setScenePhotos(taskCheckReportDTO.getScenePhotos()); + checkItemOptions.add(checkItemOptionDTO); + taskCheckReportDTOs.remove(i); + i--; + } + } + } + return taskCheckReportCheckItemDTOs; + } + @Override public List listCheckItem(Integer checkItemListType, String taskEnterpriseId) throws SearchException { Map params = getHashMap(4); diff --git a/src/main/resources/mybatis/mapper/taskcheck/v2/taskcheck-v2-mapper.xml b/src/main/resources/mybatis/mapper/taskcheck/v2/taskcheck-v2-mapper.xml index c729960..fca3fc2 100644 --- a/src/main/resources/mybatis/mapper/taskcheck/v2/taskcheck-v2-mapper.xml +++ b/src/main/resources/mybatis/mapper/taskcheck/v2/taskcheck-v2-mapper.xml @@ -51,6 +51,25 @@ + + + + + + + + + + + + + + + + + + + INSERT INTO gen_task_v2( @@ -287,24 +306,30 @@ INSERT INTO gen_task_check_report_v2( + task_id, + task_enterprise_id, task_check_report_id, check_item_id, check_item_option_id, check_item_option_type, check_result, scene_photos, + check_item_list_type, creator, gmt_create, modifier, gmt_modified, is_delete ) VALUES( + #{taskId}, + #{taskEnterpriseId}, #{taskCheckReportId}, #{checkItemId}, #{checkItemOptionId}, #{checkItemOptionType}, #{checkResult}, #{scenePhotos}, + #{checkItemListType}, #{creator}, #{gmtCreate}, #{modifier}, @@ -413,4 +438,92 @@ + + + + + + \ No newline at end of file