Commit cfa1dff1113808fb4041773c2e6fa2dea3650ed7
1 parent
eda571c6
app养护计划明细提交
Showing
8 changed files
with
15 additions
and
9 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanDetailRespVO.java
| @@ -57,7 +57,7 @@ public class MaintainPlanDetailRespVO { | @@ -57,7 +57,7 @@ public class MaintainPlanDetailRespVO { | ||
| 57 | 57 | ||
| 58 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | 58 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) |
| 59 | @ExcelProperty("完成百分比") | 59 | @ExcelProperty("完成百分比") |
| 60 | - private Double finishPercent; | 60 | + private Integer finishPercent; |
| 61 | 61 | ||
| 62 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | 62 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) |
| 63 | @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") | 63 | @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/AppMaintainPlanDetailController.java
| @@ -32,9 +32,12 @@ public class AppMaintainPlanDetailController { | @@ -32,9 +32,12 @@ public class AppMaintainPlanDetailController { | ||
| 32 | @Operation(summary = "app-获得养护计划明细") | 32 | @Operation(summary = "app-获得养护计划明细") |
| 33 | @Parameter(name = "road_id", description = "道路ID", required = true, example = "1024") | 33 | @Parameter(name = "road_id", description = "道路ID", required = true, example = "1024") |
| 34 | @Parameter(name = "finish_state", description = "完成状态 1:未完成;2:已完成;3:已失效", required = true, example = "1024") | 34 | @Parameter(name = "finish_state", description = "完成状态 1:未完成;2:已完成;3:已失效", required = true, example = "1024") |
| 35 | + @Parameter(name = "plan_name", description = "计划名称", required = true, example = "1024") | ||
| 35 | // @PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-detail:road:query')") | 36 | // @PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-detail:road:query')") |
| 36 | - public CommonResult<List<AppMaintainPlanDetailRespVO>> appMaintainPlanDetailListByRoad(@RequestParam("road_id") @NotNull Long roadId, @RequestParam("finish_state") Integer finishState) { | ||
| 37 | - List<AppMaintainPlanDetailRespVO> list = maintainPlanDetailService.appMaintainPlanDetailListByRoad(roadId, finishState); | 37 | + public CommonResult<List<AppMaintainPlanDetailRespVO>> appMaintainPlanDetailListByRoad(@RequestParam("road_id") @NotNull Long roadId, |
| 38 | + @RequestParam("finish_state") Integer finishState, | ||
| 39 | + @RequestParam("plan_name") String planName) { | ||
| 40 | + List<AppMaintainPlanDetailRespVO> list = maintainPlanDetailService.appMaintainPlanDetailListByRoad(roadId, finishState, planName); | ||
| 38 | return success(list); | 41 | return success(list); |
| 39 | } | 42 | } |
| 40 | 43 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailRespVO.java
| @@ -38,7 +38,7 @@ public class AppMaintainPlanDetailRespVO { | @@ -38,7 +38,7 @@ public class AppMaintainPlanDetailRespVO { | ||
| 38 | private Integer planNum; | 38 | private Integer planNum; |
| 39 | 39 | ||
| 40 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | 40 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) |
| 41 | - private Double finishPercent; | 41 | + private Integer finishPercent; |
| 42 | 42 | ||
| 43 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | 43 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) |
| 44 | private Integer finishState; | 44 | private Integer finishState; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPagePlanTypeRespVO.java
| @@ -44,7 +44,7 @@ public class AppMaintainPlanPagePlanTypeRespVO { | @@ -44,7 +44,7 @@ public class AppMaintainPlanPagePlanTypeRespVO { | ||
| 44 | 44 | ||
| 45 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | 45 | @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) |
| 46 | @ExcelProperty("完成百分比") | 46 | @ExcelProperty("完成百分比") |
| 47 | - private Double finishPercent; | 47 | + private Integer finishPercent; |
| 48 | 48 | ||
| 49 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | 49 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) |
| 50 | @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") | 50 | @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanDetailMapper.java
| @@ -55,7 +55,7 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail | @@ -55,7 +55,7 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail | ||
| 55 | * @return | 55 | * @return |
| 56 | */ | 56 | */ |
| 57 | List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(@Param("busiLineList") List<String> busiLineList, @Param("roadId") Long roadId, @Param("companyId") Long companyId, | 57 | List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(@Param("busiLineList") List<String> busiLineList, @Param("roadId") Long roadId, @Param("companyId") Long companyId, |
| 58 | - @Param("roleIds") List<Long> roleIds, @Param("localDate") LocalDate now, @Param("finishState") Integer finishState); | 58 | + @Param("roleIds") List<Long> roleIds, @Param("localDate") LocalDate now, @Param("finishState") Integer finishState, @Param("planName") String planName); |
| 59 | 59 | ||
| 60 | 60 | ||
| 61 | } | 61 | } |
| 62 | \ No newline at end of file | 62 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailService.java
| @@ -65,6 +65,6 @@ public interface MaintainPlanDetailService { | @@ -65,6 +65,6 @@ public interface MaintainPlanDetailService { | ||
| 65 | * @param roadId 道路ID | 65 | * @param roadId 道路ID |
| 66 | * @return | 66 | * @return |
| 67 | */ | 67 | */ |
| 68 | - List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState); | 68 | + List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState, String planName); |
| 69 | 69 | ||
| 70 | } | 70 | } |
| 71 | \ No newline at end of file | 71 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| @@ -84,7 +84,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | @@ -84,7 +84,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | @Override | 86 | @Override |
| 87 | - public List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState) { | 87 | + public List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState, String planName) { |
| 88 | String busiLine = SecurityFrameworkUtils.getBusiLine(); | 88 | String busiLine = SecurityFrameworkUtils.getBusiLine(); |
| 89 | Long companyId = SecurityFrameworkUtils.getCompanyId(); | 89 | Long companyId = SecurityFrameworkUtils.getCompanyId(); |
| 90 | List<String> busiLineList = new ArrayList<>(); | 90 | List<String> busiLineList = new ArrayList<>(); |
| @@ -95,7 +95,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | @@ -95,7 +95,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 95 | /*1.查询登录用户角色*/ | 95 | /*1.查询登录用户角色*/ |
| 96 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | 96 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 97 | LocalDate now = LocalDate.now(); | 97 | LocalDate now = LocalDate.now(); |
| 98 | - return maintainPlanDetailMapper.appMaintainPlanDetailListByRoad(busiLineList, roadId, companyId, roleIds, now, finishState); | 98 | + return maintainPlanDetailMapper.appMaintainPlanDetailListByRoad(busiLineList, roadId, companyId, roleIds, now, finishState, planName); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | } | 101 | } |
| 102 | \ No newline at end of file | 102 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| @@ -38,6 +38,9 @@ | @@ -38,6 +38,9 @@ | ||
| 38 | AND a.deleted=0 | 38 | AND a.deleted=0 |
| 39 | AND a.company_id = #{companyId} | 39 | AND a.company_id = #{companyId} |
| 40 | AND a.road_id = #{roadId} | 40 | AND a.road_id = #{roadId} |
| 41 | + <if test="planName != null and planName !=''"> | ||
| 42 | + AND a.plan_name LIKE CONCAT('%',#{planName},'%') | ||
| 43 | + </if> | ||
| 41 | <if test="roleIds != null and roleIds.size() > 0"> | 44 | <if test="roleIds != null and roleIds.size() > 0"> |
| 42 | AND b.role_id IN | 45 | AND b.role_id IN |
| 43 | <foreach collection="roleIds" item="roleId" open="(" separator="," close=")"> | 46 | <foreach collection="roleIds" item="roleId" open="(" separator="," close=")"> |