From 6b71f2bac8f3d349dd90eb850a66d4238c3972e6 Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Fri, 8 Jan 2021 23:48:27 +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=E6=A3=80=E6=9F=A5=E4=BC=81=E4=B8=9A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taskcheck/v2/TaskCheckController.java | 58 +++++++ .../taskcheck/v2/TaskCheckAppController.java | 21 +++ .../dao/taskcheck/v2/ITaskCheckDao.java | 27 +++ .../pojo/dtos/taskcheck/v2/TaskCheckDTO.java | 6 + .../vos/taskcheck/v2/TaskCheckReportVO.java | 58 +++++++ .../taskcheck/v2/ITaskCheckService.java | 41 +++++ .../v2/impl/TaskCheckServiceImpl.java | 76 +++++++- .../taskcheck/v2/taskcheck-v2-mapper.xml | 81 +++++++++ .../taskcheck/v2/list-task-enterprise.html | 164 ++++++++++++++++++ .../route/taskcheck/v2/list-taskcheck.html | 16 ++ 10 files changed, 539 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java create mode 100644 src/main/resources/static/route/taskcheck/v2/list-task-enterprise.html diff --git a/src/main/java/com/cm/inspection/controller/apis/taskcheck/v2/TaskCheckController.java b/src/main/java/com/cm/inspection/controller/apis/taskcheck/v2/TaskCheckController.java index 924b0e2..8baa0c9 100644 --- a/src/main/java/com/cm/inspection/controller/apis/taskcheck/v2/TaskCheckController.java +++ b/src/main/java/com/cm/inspection/controller/apis/taskcheck/v2/TaskCheckController.java @@ -139,4 +139,62 @@ public class TaskCheckController extends AbstractController { return taskCheckService.listRandomGridPersonnel(randomCount, params); } + @ApiOperation(value = "检查任务分页列表", notes = "检查任务分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagetaskcheck") + public SuccessResultList> listPageTaskCheck(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return taskCheckService.listPageTaskCheck(page); + } + + @ApiOperation(value = "任务详情", notes = "任务详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("gettaskbyid/{taskId}") + public TaskCheckDTO getTaskById(@PathVariable("taskId") String taskId) { + return taskCheckService.getTaskById(taskId); + } + + @ApiOperation(value = "任务企业分页列表", notes = "任务企业分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "path"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagetaskenterprise/{taskId}") + public SuccessResultList> listPageTaskEnterprise(@PathVariable("taskId") String taskId, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return taskCheckService.listPageTaskEnterprise(taskId, page); + } + + @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("listcheckitem/{checkItemListType}/{taskEnterpriseId}") + public List listCheckItem(@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.listCheckItem(checkItemListType, taskEnterpriseId); + } + } 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 4a60267..946838b 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 @@ -1,16 +1,20 @@ package com.cm.inspection.controller.app.apis.taskcheck.v2; +import com.cm.common.annotation.CheckRequestBodyAnnotation; import com.cm.common.base.AbstractController; import com.cm.common.constants.ISystemConstant; import com.cm.common.exception.ParamsException; 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.vos.taskcheck.v2.TaskCheckReportVO; import com.cm.inspection.service.taskcheck.v2.ITaskCheckService; import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -35,6 +39,23 @@ public class TaskCheckAppController extends AbstractController { @Resource(name = "taskCheckV2Service") private ITaskCheckService taskCheckService; + @ApiOperation(value = "上报检查任务", notes = "上报检查任务接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("savetaskcheckreport") + @CheckRequestBodyAnnotation + public synchronized SuccessResult saveTaskCheckReport(@RequestHeader("token") String token, @RequestBody TaskCheckReportVO taskCheckReportVO) throws Exception { + if (StringUtils.isBlank(taskCheckReportVO.getCheckLng()) || StringUtils.equals(String.valueOf(Double.MIN_VALUE), taskCheckReportVO.getCheckLng())) { + throw new ParamsException("检查经度有误"); + } + if (StringUtils.isBlank(taskCheckReportVO.getCheckLat()) || StringUtils.equals(String.valueOf(Double.MIN_VALUE), taskCheckReportVO.getCheckLat())) { + throw new ParamsException("检查纬度有误"); + } + return taskCheckService.saveTaskCheckReport(token, taskCheckReportVO); + } + @ApiOperation(value = "我的检查任务分页列表", notes = "我的检查任务分页列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), 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 699e733..1282395 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 org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; import java.util.List; @@ -56,6 +57,15 @@ public interface ITaskCheckDao { */ List listTask(Map params) throws SearchException; + /** + * 任务详情 + * + * @param params + * @return + * @throws SearchException + */ + TaskCheckDTO getTask(Map params) throws SearchException; + /** * 保存任务企业 * @@ -88,6 +98,22 @@ public interface ITaskCheckDao { */ void deleteTaskEnterpriseCheckItem(Map params) throws RemoveException; + /** + * 更新企业检查状态 + * + * @param params + * @throws UpdateException + */ + void updateTaskEnterpriseStatus(Map params) throws UpdateException; + + /** + * 保存任务检查上报 + * + * @param params + * @throws SaveException + */ + void saveTaskCheckReport(Map params) throws SaveException; + /** * 检查任务企业列表 * @@ -114,4 +140,5 @@ public interface ITaskCheckDao { * @throws SearchException */ List listEnterpriseCheckItem(Map params) throws SearchException; + } diff --git a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckDTO.java index 760eaaa..9fc157d 100644 --- a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckDTO.java +++ b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/v2/TaskCheckDTO.java @@ -77,10 +77,16 @@ public class TaskCheckDTO { private String enterpriseAddress; @ApiModelProperty(name = "enterpriseLegalPerson", value = "企业法人") private String enterpriseLegalPerson; + @ApiModelProperty(name = "enterpriseLng", value = "企业经度") + private String enterpriseLng; + @ApiModelProperty(name = "enterpriseLat", value = "企业纬度") + private String enterpriseLat; @ApiModelProperty(name = "industryId", value = "行业ID") private String industryId; @ApiModelProperty(name = "checkUserId", value = "检查人ID") private String checkUserId; + @ApiModelProperty(name = "checkUserName", value = "检查人名称") + private String checkUserName; @ApiModelProperty(name = "isChecked", value = "是否检查") private Integer isChecked; @ApiModelProperty(name = "checkTime", value = "检查时间") 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 new file mode 100644 index 0000000..208a9fe --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/vos/taskcheck/v2/TaskCheckReportVO.java @@ -0,0 +1,58 @@ +package com.cm.inspection.pojo.vos.taskcheck.v2; + +import com.cm.common.annotation.CheckEmptyAnnotation; +import com.cm.common.annotation.CheckListAnnotation; +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: TaskCheckReportVO + * @Description: 任务上报 + * @Author: wanggeng + * @Date: 2021/1/8 6:19 下午 + * @Version: 1.0 + */ +@Data +@ApiModel +public class TaskCheckReportVO { + + @ApiModelProperty(name = "taskId", value = "任务ID") + @CheckEmptyAnnotation(name = "任务ID不能为空") + private String taskId; + @ApiModelProperty(name = "taskEnterpriseId", value = "任务企业ID") + @CheckEmptyAnnotation(name = "任务企业ID不能为空") + private String taskEnterpriseId; + @ApiModelProperty(name = "checkLng", value = "检查经度") + @CheckEmptyAnnotation(name = "检查经度") + private String checkLng; + @ApiModelProperty(name = "checkLat", value = "检查纬度") + @CheckEmptyAnnotation(name = "检查纬度") + private String checkLat; + @ApiModelProperty(name = "scenePhotos", value = "佐证图片") + private String scenePhotos; + @ApiModelProperty(name = "taskCheckReportItems", value = "检查项列表") + @CheckListAnnotation(name = "检查项列表") + private List taskCheckReportItems; + + @Data + @ApiModel + public static class TaskCheckReportItemVO { + @ApiModelProperty(name = "checkItemId", value = "检查项ID") + private String checkItemId; + @ApiModelProperty(name = "checkItemOptionId", value = "检查项结果") + private String checkItemOptionId; + @ApiModelProperty(name = "checkItemOptionType", value = "检查项选项类型,1:勾选,2:数字,3:文本") + private String checkItemOptionType; + @ApiModelProperty(name = "scenePhotos", value = "佐证图片") + private String scenePhotos; + @ApiModelProperty(name = "checkResult", value = "检查结果") + private String checkResult; + } + +} 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 90ed001..b553e03 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 @@ -1,6 +1,7 @@ package com.cm.inspection.service.taskcheck.v2; import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SaveException; import com.cm.common.exception.SearchException; import com.cm.common.pojo.ListPage; import com.cm.common.result.SuccessResult; @@ -9,6 +10,7 @@ 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.vos.taskcheck.v2.TaskCheckReportVO; import com.cm.inspection.pojo.vos.taskcheck.v2.TaskCheckVO; import java.util.List; @@ -56,6 +58,16 @@ public interface ITaskCheckService { */ SuccessResult delete(String ids) throws RemoveException; + /** + * 上报检查任务 + * + * @param token + * @param taskCheckReportVO + * @return + * @throws SaveException + */ + SuccessResult saveTaskCheckReport(String token, TaskCheckReportVO taskCheckReportVO) throws Exception; + /** * 检查任务列表 * @@ -74,6 +86,15 @@ public interface ITaskCheckService { */ SuccessResultList> listPageTask(ListPage page) throws SearchException; + /** + * 任务详情 + * + * @param taskId + * @return + * @throws SearchException + */ + TaskCheckDTO getTaskById(String taskId) throws SearchException; + /** * 随机企业列表 * @@ -134,4 +155,24 @@ public interface ITaskCheckService { * @throws SearchException */ List listCheckItem(Integer checkItemListType, String taskEnterpriseId) throws SearchException; + + /** + * 检查任务分页列表 + * + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPageTaskCheck(ListPage page) throws SearchException; + + /** + * 任务企业分页列表 + * + * @param taskId + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPageTaskEnterprise(String taskId, ListPage page) 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 33fdff5..3f476ac 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,18 +2,23 @@ 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; import com.cm.common.pojo.ListPage; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultList; import com.cm.common.token.app.AppTokenManager; import com.cm.common.token.app.entity.AppTokenUser; +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.enterprise.EnterpriseDTO; import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO; import com.cm.inspection.pojo.dtos.taskcheck.v2.TaskCheckDTO; +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; import com.cm.inspection.service.BaseService; @@ -51,9 +56,6 @@ import java.util.concurrent.TimeUnit; @Service("taskCheckV2Service") public class TaskCheckServiceImpl extends BaseService implements ITaskCheckService { - /** - * 线程池 - */ private static ExecutorService executorService = new ThreadPoolExecutor(2, 100, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(1024), new ThreadFactoryBuilder().setDaemon(true).setNameFormat("task-check-pool-%d").build(), new ThreadPoolExecutor.AbortPolicy()); @@ -75,6 +77,8 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi private IGridPersonnelService gridPersonnelService; @Autowired private DataSourceTransactionManager dataSourceTransactionManager; + @Autowired + private IUserService userService; @Override public SuccessResult save(TaskCheckVO taskCheckVO) throws Exception { @@ -115,6 +119,28 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi return new SuccessResult(); } + @Override + public SuccessResult saveTaskCheckReport(String token, TaskCheckReportVO taskCheckReportVO) throws Exception { + AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser(); + Map params = getHashMap(16); + params.put("taskEnterpriseId", taskCheckReportVO.getTaskEnterpriseId()); + params.put("checkLng", taskCheckReportVO.getCheckLng()); + params.put("checkLat", taskCheckReportVO.getCheckLat()); + params.put("scenePhotos", taskCheckReportVO.getScenePhotos()); + params.put("isChecked", 1); + params.put("isCompleted", 1); + params.put("checkTime", DateUtil.getTime()); + taskCheckDao.updateTaskEnterpriseStatus(params); + for (TaskCheckReportVO.TaskCheckReportItemVO taskCheckReportItemVO : taskCheckReportVO.getTaskCheckReportItems()) { + params = HashMapUtil.beanToMap(taskCheckReportItemVO); + params.put("taskId", taskCheckReportVO.getTaskId()); + params.put("taskEnterpriseId", taskCheckReportVO.getTaskEnterpriseId()); + setSaveInfoByUserId(params, appTokenUser.getId()); + taskCheckDao.saveTaskCheckReport(params); + } + return new SuccessResult(); + } + @Override public List listTask(Map params) throws SearchException { return taskCheckDao.listTask(params); @@ -128,6 +154,13 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi return new SuccessResultList<>(taskCheckDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + @Override + public TaskCheckDTO getTaskById(String taskId) throws SearchException { + Map params = getHashMap(2); + params.put("taskId", taskId); + return taskCheckDao.getTask(params); + } + @Override public List listRandomEnterprise(int randomCount, Map params) throws SearchException { params.put("isLogOff", 0); @@ -192,6 +225,18 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi public SuccessResultList> listPageTaskCheckOfMine(String token, ListPage page) throws SearchException { AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser(); page.getParams().put("checkUserId", appTokenUser.getId()); + return listPageTaskCheck(page); + } + + @Override + public SuccessResultList> listPageTaskEnterpriseOfMine(String token, String taskId, ListPage page) throws SearchException { + AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser(); + page.getParams().put("checkUserId", appTokenUser.getId()); + return listPageTaskEnterprise(taskId, page); + } + + @Override + public SuccessResultList> listPageTaskCheck(ListPage page) throws SearchException { PageHelper.startPage(page.getPage(), page.getRows()); List taskCheckDTOs = taskCheckDao.listTask(page.getParams()); PageInfo pageInfo = new PageInfo(taskCheckDTOs); @@ -199,14 +244,27 @@ public class TaskCheckServiceImpl extends BaseService implements ITaskCheckServi } @Override - public SuccessResultList> listPageTaskEnterpriseOfMine(String token, String taskId, ListPage page) throws SearchException { - AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser(); - page.getParams().put("checkUserId", appTokenUser.getId()); + public SuccessResultList> listPageTaskEnterprise(String taskId, ListPage page) throws SearchException { page.getParams().put("taskId", taskId); PageHelper.startPage(page.getPage(), page.getRows()); - List taskCheckDTOs = taskCheckDao.listTaskEnterprise(page.getParams()); - PageInfo pageInfo = new PageInfo(taskCheckDTOs); - return new SuccessResultList<>(taskCheckDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + List taskEnterpriseDTOs = taskCheckDao.listTaskEnterprise(page.getParams()); + PageInfo pageInfo = new PageInfo(taskEnterpriseDTOs); + if (page.getParams().get("checkUserId") == null) { + List userIds = new ArrayList<>(); + for (TaskCheckDTO.EnterpriseDTO enterpriseDTO : taskEnterpriseDTOs) { + userIds.add(enterpriseDTO.getCheckUserId()); + } + List userResourceBOs = userService.listUserResourceByIds(userIds); + for (TaskCheckDTO.EnterpriseDTO enterpriseDTO : taskEnterpriseDTOs) { + for (UserResourceBO userResourceBO : userResourceBOs) { + if (StringUtils.equals(enterpriseDTO.getCheckUserId(), userResourceBO.getUserId())) { + enterpriseDTO.setCheckUserName(userResourceBO.getUserName()); + break; + } + } + } + } + return new SuccessResultList<>(taskEnterpriseDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } @Override 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 1573dd6..c729960 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 @@ -30,6 +30,8 @@ + + @@ -172,6 +174,39 @@ + + + INSERT INTO gen_task_enterprise_v2( @@ -234,6 +269,50 @@ + + + UPDATE + gen_task_enterprise_v2 + SET + check_lng = #{checkLng}, + check_lat = #{checkLat}, + scene_photos = #{scenePhotos}, + is_checked = #{isChecked}, + is_completed = #{isCompleted}, + check_time = #{checkTime} + WHERE + task_enterprise_id = #{taskEnterpriseId} + + + + + INSERT INTO gen_task_check_report_v2( + task_check_report_id, + check_item_id, + check_item_option_id, + check_item_option_type, + check_result, + scene_photos, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{taskCheckReportId}, + #{checkItemId}, + #{checkItemOptionId}, + #{checkItemOptionType}, + #{checkResult}, + #{scenePhotos}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + +