Commit 48e696b079b33955186a68f6c47363f2c379b8b5
Merge remote-tracking branch 'origin/dev' into dev
Showing
3 changed files
with
21 additions
and
2 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadPageReqVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.road.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.road.vo; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | ||
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | ||
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | ||
| 3 | import lombok.*; | 6 | import lombok.*; |
| 4 | import java.util.*; | 7 | import java.util.*; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| @@ -83,4 +86,12 @@ public class RoadPageReqVO extends PageParam { | @@ -83,4 +86,12 @@ public class RoadPageReqVO extends PageParam { | ||
| 83 | @Schema(description = "更新者", example = "芋艿") | 86 | @Schema(description = "更新者", example = "芋艿") |
| 84 | private String updaterName; | 87 | private String updaterName; |
| 85 | 88 | ||
| 89 | + //对应前端排序字段 | ||
| 90 | + public static final Map<String, SFunction<RoadDO, ?>> SORT_FIELD_MAP = Map.of( | ||
| 91 | + "id", RoadDO::getId, | ||
| 92 | + "greenBeltTreeArea", RoadDO::getGreenBeltTreeArea, | ||
| 93 | + "greenBeltArea", RoadDO::getGreenBeltArea, | ||
| 94 | + "totalArea", RoadDO::getTotalArea, | ||
| 95 | + "treeArea", RoadDO::getTreeArea | ||
| 96 | + ); | ||
| 86 | } | 97 | } |
| 87 | \ No newline at end of file | 98 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadInterceptMapper.java
| @@ -4,6 +4,7 @@ import com.zteits.urbanops.framework.annotation.ProcessBusinessLine; | @@ -4,6 +4,7 @@ import com.zteits.urbanops.framework.annotation.ProcessBusinessLine; | ||
| 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | 5 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 6 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | 6 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.DepartmentCostPageReqVO; | ||
| 7 | import com.zteits.urbanops.module.garden.controller.admin.road.vo.RoadPageReqVO; | 8 | import com.zteits.urbanops.module.garden.controller.admin.road.vo.RoadPageReqVO; |
| 8 | import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | 9 | import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; |
| 9 | import org.apache.ibatis.annotations.Mapper; | 10 | import org.apache.ibatis.annotations.Mapper; |
| @@ -42,7 +43,10 @@ public interface RoadInterceptMapper extends BaseMapperX<RoadDO> { | @@ -42,7 +43,10 @@ public interface RoadInterceptMapper extends BaseMapperX<RoadDO> { | ||
| 42 | .likeIfPresent(RoadDO::getCreatorName, reqVO.getCreatorName()) | 43 | .likeIfPresent(RoadDO::getCreatorName, reqVO.getCreatorName()) |
| 43 | .betweenIfPresent(RoadDO::getCreateTime, reqVO.getCreateTime()) | 44 | .betweenIfPresent(RoadDO::getCreateTime, reqVO.getCreateTime()) |
| 44 | .likeIfPresent(RoadDO::getUpdaterName, reqVO.getUpdaterName()) | 45 | .likeIfPresent(RoadDO::getUpdaterName, reqVO.getUpdaterName()) |
| 45 | - .orderByDesc(RoadDO::getId)); | 46 | + .orderBy(true, reqVO.getSortAsc(), |
| 47 | + RoadPageReqVO.SORT_FIELD_MAP.get(reqVO.getOrderByColumn()) | ||
| 48 | + ) | ||
| 49 | + ); | ||
| 46 | } | 50 | } |
| 47 | 51 | ||
| 48 | } | 52 | } |
| 49 | \ No newline at end of file | 53 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| @@ -38,6 +38,9 @@ | @@ -38,6 +38,9 @@ | ||
| 38 | a.batch_no = b.batch_no | 38 | a.batch_no = b.batch_no |
| 39 | AND a.plan_no = c.plan_no | 39 | AND a.plan_no = c.plan_no |
| 40 | AND b.batch_no = c.batch_no | 40 | AND b.batch_no = c.batch_no |
| 41 | + AND a.deleted = c.deleted | ||
| 42 | + AND a.deleted = b.deleted | ||
| 43 | + AND a.deleted = 0 | ||
| 41 | <if test="req.planNo != null and req.planNo !=''"> | 44 | <if test="req.planNo != null and req.planNo !=''"> |
| 42 | and a.plan_no LIKE CONCAT('%', #{req.planNo},'%') | 45 | and a.plan_no LIKE CONCAT('%', #{req.planNo},'%') |
| 43 | </if> | 46 | </if> |
| @@ -45,7 +48,7 @@ | @@ -45,7 +48,7 @@ | ||
| 45 | and b.plan_name LIKE CONCAT('%', #{req.planName},'%') | 48 | and b.plan_name LIKE CONCAT('%', #{req.planName},'%') |
| 46 | </if> | 49 | </if> |
| 47 | <if test="req.roadName != null and req.roadName !=''"> | 50 | <if test="req.roadName != null and req.roadName !=''"> |
| 48 | - AND b.road_name LIKE CONCAT(#{req.roadName},'%') | 51 | + AND b.road_name LIKE CONCAT('%', #{req.roadName},'%') |
| 49 | </if> | 52 | </if> |
| 50 | <if test="req.levelId != null"> | 53 | <if test="req.levelId != null"> |
| 51 | and b.level_id = #{req.levelId} | 54 | and b.level_id = #{req.levelId} |
| @@ -83,6 +86,7 @@ | @@ -83,6 +86,7 @@ | ||
| 83 | <if test="req.createTimeEnd != null"> | 86 | <if test="req.createTimeEnd != null"> |
| 84 | <![CDATA[AND DATE_FORMAT(a.create_time, '%Y-%m-%d') <= #{req.createTimeEnd}]]> | 87 | <![CDATA[AND DATE_FORMAT(a.create_time, '%Y-%m-%d') <= #{req.createTimeEnd}]]> |
| 85 | </if> | 88 | </if> |
| 89 | + order by c.id desc | ||
| 86 | </select> | 90 | </select> |
| 87 | 91 | ||
| 88 | <select id="appMaintainPlanCommitDetailPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO"> | 92 | <select id="appMaintainPlanCommitDetailPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO"> |