Commit 2cf45c5d5c5a8e08826519e63d84e089e1fc25fb
1 parent
09bad8be
测试bug优化
Showing
4 changed files
with
16 additions
and
9 deletions
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 | 3 | import lombok.*; |
| 4 | 4 | |
| 5 | 5 | import java.time.LocalDate; |
| 6 | +import java.util.List; | |
| 7 | + | |
| 6 | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | 9 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 8 | 10 | import org.springframework.format.annotation.DateTimeFormat; |
| ... | ... | @@ -35,9 +37,12 @@ public class InspectionPlanCommitPageReqVO extends PageParam { |
| 35 | 37 | @Schema(description = "部门ID(道路负责部门id)", example = "2714") |
| 36 | 38 | private Long deptId; |
| 37 | 39 | |
| 38 | - @Schema(description = "道路ID", example = "12917") | |
| 40 | + @Schema(description = "道路", example = "12917") | |
| 39 | 41 | private String roadName; |
| 40 | 42 | |
| 43 | + @Schema(description = "角色名称", example = "12917") | |
| 44 | + private String roleName; | |
| 45 | + | |
| 41 | 46 | @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", example = "10") |
| 42 | 47 | private Integer levelId; |
| 43 | 48 | |
| ... | ... | @@ -56,4 +61,6 @@ public class InspectionPlanCommitPageReqVO extends PageParam { |
| 56 | 61 | |
| 57 | 62 | @Schema(description = "备注", example = "你猜") |
| 58 | 63 | private String remark; |
| 64 | + | |
| 65 | + private List<String> busiLineList; | |
| 59 | 66 | } |
| 60 | 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<InspectionPlanCo |
| 22 | 22 | * @param reqDTO 查询条件 |
| 23 | 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 | 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 | 87 | busiLineList.addAll(Arrays.asList(busiLine.split(","))); |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | + pageReqVO.setBusiLineList(busiLineList); | |
| 90 | 91 | //分页 |
| 91 | 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 | 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 | 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 | 13 | SELECT |
| 14 | 14 | a.plan_no, |
| 15 | 15 | b.plan_name, |
| ... | ... | @@ -44,9 +44,9 @@ |
| 44 | 44 | <if test="req.planName != null and req.planName !=''"> |
| 45 | 45 | AND b.plan_name LIKE CONCAT(#{req.planName},'%') |
| 46 | 46 | </if> |
| 47 | - <if test="busiLineList != null and busiLineList.size() > 0"> | |
| 47 | + <if test="req.busiLineList != null and req.busiLineList.size() > 0"> | |
| 48 | 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 | 50 | #{id} |
| 51 | 51 | </foreach> |
| 52 | 52 | </if> |
| ... | ... | @@ -64,9 +64,8 @@ |
| 64 | 64 | AND b.road_name LIKE CONCAT(#{req.roadName},'%') |
| 65 | 65 | </if> |
| 66 | 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 | 68 | </if> |
| 69 | - | |
| 70 | 69 | <if test="req.companyId != null"> |
| 71 | 70 | and b.company_id = #{req.companyId} |
| 72 | 71 | </if> |
| ... | ... | @@ -77,7 +76,7 @@ |
| 77 | 76 | AND a.user_name LIKE CONCAT('%', #{req.userName},'%') |
| 78 | 77 | </if> |
| 79 | 78 | <if test="req.transState != null"> |
| 80 | - and a.inspection_state = #{req.transState} | |
| 79 | + and a.trans_state = #{req.transState} | |
| 81 | 80 | </if> |
| 82 | 81 | <if test="req.finishTime != null"> |
| 83 | 82 | AND DATE_FORMAT(a.finish_time, '%Y-%m-%d') = #{req.finishTime} | ... | ... |