Commit 2cf45c5d5c5a8e08826519e63d84e089e1fc25fb

Authored by 王富生
1 parent 09bad8be

测试bug优化

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanCommitPageReqVO.java
@@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; @@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo;
3 import lombok.*; 3 import lombok.*;
4 4
5 import java.time.LocalDate; 5 import java.time.LocalDate;
  6 +import java.util.List;
  7 +
6 import io.swagger.v3.oas.annotations.media.Schema; 8 import io.swagger.v3.oas.annotations.media.Schema;
7 import com.zteits.urbanops.framework.common.pojo.PageParam; 9 import com.zteits.urbanops.framework.common.pojo.PageParam;
8 import org.springframework.format.annotation.DateTimeFormat; 10 import org.springframework.format.annotation.DateTimeFormat;
@@ -35,9 +37,12 @@ public class InspectionPlanCommitPageReqVO extends PageParam { @@ -35,9 +37,12 @@ public class InspectionPlanCommitPageReqVO extends PageParam {
35 @Schema(description = "部门ID(道路负责部门id)", example = "2714") 37 @Schema(description = "部门ID(道路负责部门id)", example = "2714")
36 private Long deptId; 38 private Long deptId;
37 39
38 - @Schema(description = "道路ID", example = "12917") 40 + @Schema(description = "道路", example = "12917")
39 private String roadName; 41 private String roadName;
40 42
  43 + @Schema(description = "角色名称", example = "12917")
  44 + private String roleName;
  45 +
41 @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", example = "10") 46 @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", example = "10")
42 private Integer levelId; 47 private Integer levelId;
43 48
@@ -56,4 +61,6 @@ public class InspectionPlanCommitPageReqVO extends PageParam { @@ -56,4 +61,6 @@ public class InspectionPlanCommitPageReqVO extends PageParam {
56 61
57 @Schema(description = "备注", example = "你猜") 62 @Schema(description = "备注", example = "你猜")
58 private String remark; 63 private String remark;
  64 +
  65 + private List<String> busiLineList;
59 } 66 }
60 \ No newline at end of file 67 \ No newline at end of file
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanCommitMapper.java
@@ -22,7 +22,7 @@ public interface InspectionPlanCommitMapper extends BaseMapperX&lt;InspectionPlanCo @@ -22,7 +22,7 @@ public interface InspectionPlanCommitMapper extends BaseMapperX&lt;InspectionPlanCo
22 * @param reqDTO 查询条件 22 * @param reqDTO 查询条件
23 * @return 分页结果 23 * @return 分页结果
24 */ 24 */
25 - IPage<InspectionPlanCommitRespVO> selectForPage(IPage<InspectionPlanCommitRespVO> page, @Param("req") InspectionPlanCommitPageReqVO reqDTO, @Param("busiLineList") List<String> busiLineList); 25 + IPage<InspectionPlanCommitRespVO> selectForPage(@Param("page") IPage<InspectionPlanCommitRespVO> page, @Param("req") InspectionPlanCommitPageReqVO reqDTO);
26 26
27 27
28 } 28 }
29 \ No newline at end of file 29 \ No newline at end of file
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanCommitServiceImpl.java
@@ -87,9 +87,10 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ @@ -87,9 +87,10 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ
87 busiLineList.addAll(Arrays.asList(busiLine.split(","))); 87 busiLineList.addAll(Arrays.asList(busiLine.split(",")));
88 } 88 }
89 } 89 }
  90 + pageReqVO.setBusiLineList(busiLineList);
90 //分页 91 //分页
91 IPage<InspectionPlanCommitRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); 92 IPage<InspectionPlanCommitRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO);
92 - IPage<InspectionPlanCommitRespVO> page = inspectionPlanCommitMapper.selectForPage(mpPage, pageReqVO, busiLineList); 93 + IPage<InspectionPlanCommitRespVO> page = inspectionPlanCommitMapper.selectForPage(mpPage, pageReqVO);
93 // 转换返回 94 // 转换返回
94 return new PageResult<>(imgProcess(page.getRecords()), page.getTotal()); 95 return new PageResult<>(imgProcess(page.getRecords()), page.getTotal());
95 } 96 }
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ 9 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
10 --> 10 -->
11 <!-- 复杂联表分页查询 --> 11 <!-- 复杂联表分页查询 -->
12 - <select id="selectForPage" resultType="com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanCommitRespVO"> 12 + <select id="selectForPage" resultType="com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanCommitRespVO">
13 SELECT 13 SELECT
14 a.plan_no, 14 a.plan_no,
15 b.plan_name, 15 b.plan_name,
@@ -44,9 +44,9 @@ @@ -44,9 +44,9 @@
44 <if test="req.planName != null and req.planName !=''"> 44 <if test="req.planName != null and req.planName !=''">
45 AND b.plan_name LIKE CONCAT(#{req.planName},'%') 45 AND b.plan_name LIKE CONCAT(#{req.planName},'%')
46 </if> 46 </if>
47 - <if test="busiLineList != null and busiLineList.size() > 0"> 47 + <if test="req.busiLineList != null and req.busiLineList.size() > 0">
48 AND a.busi_line IN 48 AND a.busi_line IN
49 - <foreach collection="busiLineList" item="id" open="(" separator="," close=")"> 49 + <foreach collection="req.busiLineList" item="id" open="(" separator="," close=")">
50 #{id} 50 #{id}
51 </foreach> 51 </foreach>
52 </if> 52 </if>
@@ -64,9 +64,8 @@ @@ -64,9 +64,8 @@
64 AND b.road_name LIKE CONCAT(#{req.roadName},'%') 64 AND b.road_name LIKE CONCAT(#{req.roadName},'%')
65 </if> 65 </if>
66 <if test="req.roleName != null and req.roleName !=''"> 66 <if test="req.roleName != null and req.roleName !=''">
67 - AND a.role_name LIKE CONCAT(#{req.roleName},'%') 67 + AND a.role_name LIKE CONCAT(#{roleName},'%')
68 </if> 68 </if>
69 -  
70 <if test="req.companyId != null"> 69 <if test="req.companyId != null">
71 and b.company_id = #{req.companyId} 70 and b.company_id = #{req.companyId}
72 </if> 71 </if>
@@ -77,7 +76,7 @@ @@ -77,7 +76,7 @@
77 AND a.user_name LIKE CONCAT('%', #{req.userName},'%') 76 AND a.user_name LIKE CONCAT('%', #{req.userName},'%')
78 </if> 77 </if>
79 <if test="req.transState != null"> 78 <if test="req.transState != null">
80 - and a.inspection_state = #{req.transState} 79 + and a.trans_state = #{req.transState}
81 </if> 80 </if>
82 <if test="req.finishTime != null"> 81 <if test="req.finishTime != null">
83 AND DATE_FORMAT(a.finish_time, '%Y-%m-%d') = #{req.finishTime} 82 AND DATE_FORMAT(a.finish_time, '%Y-%m-%d') = #{req.finishTime}