Commit 758c32c27edddd19b341d785f1ae604fe2abff82
1 parent
cfa1dff1
app养护计划明细提交
Showing
24 changed files
with
521 additions
and
177 deletions
urbanops-framework/urbanops-spring-boot-starter-security/src/main/java/com/zteits/urbanops/framework/security/core/util/SecurityFrameworkUtils.java
| @@ -136,6 +136,17 @@ public class SecurityFrameworkUtils { | @@ -136,6 +136,17 @@ public class SecurityFrameworkUtils { | ||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | /** | 138 | /** |
| 139 | + * 获得当前用户的业务线,从上下文中 | ||
| 140 | + * | ||
| 141 | + * @return 部门编号 | ||
| 142 | + */ | ||
| 143 | + @Nullable | ||
| 144 | + public static Long getDeptId() { | ||
| 145 | + LoginUser loginUser = getLoginUser(); | ||
| 146 | + return loginUser != null ? MapUtil.getLong(loginUser.getInfo(), LoginUser.INFO_KEY_DEPT_ID) : null; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + /** | ||
| 139 | * 设置当前用户 | 150 | * 设置当前用户 |
| 140 | * | 151 | * |
| 141 | * @param loginUser 登录用户 | 152 | * @param loginUser 登录用户 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanCommitRespVO.java
| @@ -84,14 +84,6 @@ public class MaintainPlanCommitRespVO { | @@ -84,14 +84,6 @@ public class MaintainPlanCommitRespVO { | ||
| 84 | @ExcelProperty("提交人用户ID") | 84 | @ExcelProperty("提交人用户ID") |
| 85 | private String userName; | 85 | private String userName; |
| 86 | 86 | ||
| 87 | - @Schema(description = "角色ID", example = "你猜") | ||
| 88 | - @ExcelProperty("角色ID") | ||
| 89 | - private Long roleId; | ||
| 90 | - | ||
| 91 | - @Schema(description = "角色", example = "你猜") | ||
| 92 | - @ExcelProperty("角色") | ||
| 93 | - private String roleName; | ||
| 94 | - | ||
| 95 | @Schema(description = "备注", example = "你猜") | 87 | @Schema(description = "备注", example = "你猜") |
| 96 | @ExcelProperty("备注") | 88 | @ExcelProperty("备注") |
| 97 | private String remark; | 89 | private String remark; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanDetailReqVO.java
| @@ -30,10 +30,6 @@ public class AppInspectionPlanDetailReqVO { | @@ -30,10 +30,6 @@ public class AppInspectionPlanDetailReqVO { | ||
| 30 | @Hidden | 30 | @Hidden |
| 31 | private Long companyId; | 31 | private Long companyId; |
| 32 | 32 | ||
| 33 | - @Schema(description = "角色IDS") | ||
| 34 | - @Hidden | ||
| 35 | - private List<Long> roleIds; | ||
| 36 | - | ||
| 37 | @Schema(description = "业务线") | 33 | @Schema(description = "业务线") |
| 38 | @Hidden | 34 | @Hidden |
| 39 | private List<String> busiLineList; | 35 | private List<String> busiLineList; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/AppMaintainPlanCommitController.java
| 1 | package com.zteits.urbanops.module.garden.controller.app.maintainplan; | 1 | package com.zteits.urbanops.module.garden.controller.app.maintainplan; |
| 2 | 2 | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | -import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitDetailRespVO; | 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO; | ||
| 6 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitPageReqVO; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitSaveReqVO; | 7 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitSaveReqVO; |
| 6 | import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanCommitService; | 8 | import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanCommitService; |
| 7 | import io.swagger.v3.oas.annotations.Operation; | 9 | import io.swagger.v3.oas.annotations.Operation; |
| 8 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 9 | import io.swagger.v3.oas.annotations.tags.Tag; | 10 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 10 | import jakarta.annotation.Resource; | 11 | import jakarta.annotation.Resource; |
| 11 | import jakarta.validation.Valid; | 12 | import jakarta.validation.Valid; |
| 12 | -import jakarta.validation.constraints.NotBlank; | ||
| 13 | import org.springframework.validation.annotation.Validated; | 13 | import org.springframework.validation.annotation.Validated; |
| 14 | -import org.springframework.web.bind.annotation.*; | ||
| 15 | - | ||
| 16 | -import java.util.List; | 14 | +import org.springframework.web.bind.annotation.PostMapping; |
| 15 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 16 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 17 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | 18 | ||
| 18 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | 19 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
| 19 | 20 | ||
| @@ -33,12 +34,11 @@ public class AppMaintainPlanCommitController { | @@ -33,12 +34,11 @@ public class AppMaintainPlanCommitController { | ||
| 33 | return success(maintainPlanCommitService.appCreateMaintainPlanCommit(createReqVO)); | 34 | return success(maintainPlanCommitService.appCreateMaintainPlanCommit(createReqVO)); |
| 34 | } | 35 | } |
| 35 | 36 | ||
| 36 | - @GetMapping("/get/plan-no") | 37 | + @PostMapping("/page") |
| 37 | @Operation(summary = "获取养护计划-共同处理人明细") | 38 | @Operation(summary = "获取养护计划-共同处理人明细") |
| 38 | - @Parameter(name = "plan_no", description = "计划编号", required = true, example = "1024") | ||
| 39 | //@PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-commit:query')") | 39 | //@PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-commit:query')") |
| 40 | - public CommonResult<List<MaintainPlanCommitDetailRespVO>> getMaintainPlanCommitDetailByPlanNo(@RequestParam("plan_no") @NotBlank String planNo) { | ||
| 41 | - return success( maintainPlanCommitService.getMaintainPlanCommitDetailByPlanNo(planNo)); | 40 | + public CommonResult<PageResult<AppMaintainPlanCommitDetailPageRespVO>> appMaintainPlanCommitDetailPage(@Valid @RequestBody AppMaintainPlanCommitPageReqVO pageReqVO) { |
| 41 | + return success(maintainPlanCommitService.appMaintainPlanCommitDetailPage(pageReqVO)); | ||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | } | 44 | } |
| 45 | \ No newline at end of file | 45 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/AppMaintainPlanDetailController.java
| 1 | package com.zteits.urbanops.module.garden.controller.app.maintainplan; | 1 | package com.zteits.urbanops.module.garden.controller.app.maintainplan; |
| 2 | 2 | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 5 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailReqVO; | ||
| 6 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO; | ||
| 7 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailListByRoadPageReqVO; | ||
| 4 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | 8 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; |
| 5 | import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanDetailService; | 9 | import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanDetailService; |
| 6 | import io.swagger.v3.oas.annotations.Operation; | 10 | import io.swagger.v3.oas.annotations.Operation; |
| 7 | import io.swagger.v3.oas.annotations.Parameter; | 11 | import io.swagger.v3.oas.annotations.Parameter; |
| 8 | import io.swagger.v3.oas.annotations.tags.Tag; | 12 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 9 | import jakarta.annotation.Resource; | 13 | import jakarta.annotation.Resource; |
| 10 | -import jakarta.validation.constraints.NotNull; | 14 | +import jakarta.validation.Valid; |
| 11 | import org.springframework.validation.annotation.Validated; | 15 | import org.springframework.validation.annotation.Validated; |
| 12 | -import org.springframework.web.bind.annotation.GetMapping; | ||
| 13 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 14 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 15 | -import org.springframework.web.bind.annotation.RestController; | 16 | +import org.springframework.web.bind.annotation.*; |
| 16 | 17 | ||
| 17 | import java.util.List; | 18 | import java.util.List; |
| 18 | 19 | ||
| @@ -30,17 +31,17 @@ public class AppMaintainPlanDetailController { | @@ -30,17 +31,17 @@ public class AppMaintainPlanDetailController { | ||
| 30 | 31 | ||
| 31 | @GetMapping("/get/details-road") | 32 | @GetMapping("/get/details-road") |
| 32 | @Operation(summary = "app-获得养护计划明细") | 33 | @Operation(summary = "app-获得养护计划明细") |
| 33 | - @Parameter(name = "road_id", description = "道路ID", 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") | ||
| 36 | - // @PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-detail:road:query')") | ||
| 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); | ||
| 41 | - return success(list); | 34 | + // @PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-detail:road:query')") |
| 35 | + public CommonResult<PageResult<AppMaintainPlanDetailRespVO>> appMaintainPlanDetailListByRoad(@Valid AppMaintainPlanDetailListByRoadPageReqVO pageReqVO) { | ||
| 36 | + PageResult<AppMaintainPlanDetailRespVO> pageResult = maintainPlanDetailService.appMaintainPlanDetailListByRoadPage(pageReqVO); | ||
| 37 | + return success(pageResult); | ||
| 42 | } | 38 | } |
| 43 | 39 | ||
| 44 | - | ||
| 45 | - | 40 | + @PostMapping("/get/not-finish") |
| 41 | + @Operation(summary = "获取未养护计划明细") | ||
| 42 | + @Parameter(name = "plan_no", description = "计划编号", required = true, example = "1024") | ||
| 43 | + //@PreAuthorize("@ss.hasPermission('app:garden:maintain-plan-commit:query')") | ||
| 44 | + public CommonResult<List<AppMaintainNotFinishPlanDetailRespVO>> getMaintainNotFinishPlanCommitDetail(@Valid @RequestBody AppMaintainNotFinishPlanDetailReqVO reqVO) { | ||
| 45 | + return success( maintainPlanDetailService.getMaintainNotFinishPlanCommitDetail(reqVO)); | ||
| 46 | + } | ||
| 46 | } | 47 | } |
| 47 | \ No newline at end of file | 48 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainNotFinishPlanDetailReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.Hidden; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotEmpty; | ||
| 6 | +import jakarta.validation.constraints.NotNull; | ||
| 7 | +import lombok.Data; | ||
| 8 | + | ||
| 9 | +@Schema(description = "管理后台 - 未完成养护计划明细 Request VO") | ||
| 10 | +@Data | ||
| 11 | +public class AppMaintainNotFinishPlanDetailReqVO { | ||
| 12 | + | ||
| 13 | + @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 14 | + @NotEmpty(message = "计划编码不能为空") | ||
| 15 | + private String planNo; | ||
| 16 | + | ||
| 17 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | ||
| 18 | + @NotNull(message = "养护类型不能为空") | ||
| 19 | + private Integer planTypeId; | ||
| 20 | + | ||
| 21 | + @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") | ||
| 22 | + @Hidden | ||
| 23 | + private Integer finishState; | ||
| 24 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainNotFinishPlanDetailRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | ||
| 2 | + | ||
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotNull; | ||
| 6 | +import lombok.Data; | ||
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | + | ||
| 9 | +import java.time.LocalDateTime; | ||
| 10 | + | ||
| 11 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; | ||
| 12 | + | ||
| 13 | +@Schema(description = "管理后台 - 未完成养护计划明细 Request VO") | ||
| 14 | +@Data | ||
| 15 | +public class AppMaintainNotFinishPlanDetailRespVO { | ||
| 16 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") | ||
| 17 | + private String batchNo; | ||
| 18 | + | ||
| 19 | + @Schema(description = "计划编码", example = "王五") | ||
| 20 | + private String planNo; | ||
| 21 | + | ||
| 22 | + @Schema(description = "计划名称", example = "王五") | ||
| 23 | + private String planName; | ||
| 24 | + | ||
| 25 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | ||
| 26 | + @NotNull(message = "养护类型不能为空") | ||
| 27 | + private Integer planTypeId; | ||
| 28 | + | ||
| 29 | + @Schema(description = "次数 如:1/3等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1/3") | ||
| 30 | + @ExcelProperty("次数 如:1/3等") | ||
| 31 | + private String rate; | ||
| 32 | + | ||
| 33 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | ||
| 34 | + @ExcelProperty("周期ID: 1:日/次;2:周/次;3:月/次;4:年/次") | ||
| 35 | + private Integer cycleId; | ||
| 36 | + | ||
| 37 | + @Schema(description = "本次完成百分比") | ||
| 38 | + @ExcelProperty("本次完成百分比") | ||
| 39 | + private Integer finishPercent; | ||
| 40 | + | ||
| 41 | + @Schema(description = "提交人用户", example = "19167") | ||
| 42 | + @ExcelProperty("提交人用户") | ||
| 43 | + private Long userId; | ||
| 44 | + | ||
| 45 | + @Schema(description = "提交人用户ID", example = "王五") | ||
| 46 | + @ExcelProperty("提交人用户ID") | ||
| 47 | + private String userName; | ||
| 48 | + | ||
| 49 | + @Schema(description = "备注", example = "你猜") | ||
| 50 | + @ExcelProperty("备注") | ||
| 51 | + private String remark; | ||
| 52 | + | ||
| 53 | + @Schema(description = "完成时间") | ||
| 54 | + @ExcelProperty("完成时间") | ||
| 55 | + private LocalDateTime finishTime; | ||
| 56 | + | ||
| 57 | + @Schema(description = "执行开始时间") | ||
| 58 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) | ||
| 59 | + private LocalDateTime beginTime; | ||
| 60 | + | ||
| 61 | + @Schema(description = "执行时间") | ||
| 62 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) | ||
| 63 | + private LocalDateTime endTime; | ||
| 64 | + | ||
| 65 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanCommitDetailPageRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +import java.time.LocalDateTime; | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 9 | +@Schema(description = "管理后台 - 养护计划 Response VO") | ||
| 10 | +@Data | ||
| 11 | +public class AppMaintainPlanCommitDetailPageRespVO { | ||
| 12 | + | ||
| 13 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 14 | + private String batchNo; | ||
| 15 | + | ||
| 16 | + @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 17 | + private String planNo; | ||
| 18 | + | ||
| 19 | + @Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 20 | + private String planName; | ||
| 21 | + | ||
| 22 | + @Schema(description = "排序号:第n次计划", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 23 | + private Integer sortNum; | ||
| 24 | + | ||
| 25 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | ||
| 26 | + private Integer planTypeId; | ||
| 27 | + | ||
| 28 | + @Schema(description = "次数 如:1/3等", requiredMode = Schema.RequiredMode.REQUIRED, example = "1/3") | ||
| 29 | + private String rate; | ||
| 30 | + | ||
| 31 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | ||
| 32 | + private Integer cycleId; | ||
| 33 | + | ||
| 34 | + @Schema(description = "计划次数") | ||
| 35 | + private Integer planNum; | ||
| 36 | + | ||
| 37 | + @Schema(description = "照片host") | ||
| 38 | + private String imgHost; | ||
| 39 | + | ||
| 40 | + @Schema(description = "开始照片") | ||
| 41 | + private String beginImg; | ||
| 42 | + | ||
| 43 | + @Schema(description = "开始照片") | ||
| 44 | + private List<String> beginImgList; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 养护面积:单位m² | ||
| 48 | + */ | ||
| 49 | + private Double opArea; | ||
| 50 | + /** | ||
| 51 | + * 操作时长 | ||
| 52 | + */ | ||
| 53 | + private Double opTime; | ||
| 54 | + | ||
| 55 | + @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 56 | + private Integer finishPercent; | ||
| 57 | + | ||
| 58 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 59 | + private Integer finishState; | ||
| 60 | + | ||
| 61 | + @Schema(description = "执行开始时间") | ||
| 62 | + private LocalDateTime beginTime; | ||
| 63 | + | ||
| 64 | + @Schema(description = "执行时间") | ||
| 65 | + private LocalDateTime endTime; | ||
| 66 | + | ||
| 67 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanCommitPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | ||
| 2 | + | ||
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotBlank; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +@Schema(description = "管理后台 - 未完成养护计划明细 Request VO") | ||
| 9 | +@Data | ||
| 10 | +public class AppMaintainPlanCommitPageReqVO extends PageParam { | ||
| 11 | + | ||
| 12 | + @Schema(description = "计划编码") | ||
| 13 | + @NotBlank(message = "计划编码不能为空") | ||
| 14 | + private String planNo; | ||
| 15 | + | ||
| 16 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailListByRoadPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.maintainplan.vo; | ||
| 2 | + | ||
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 4 | +import io.swagger.v3.oas.annotations.Hidden; | ||
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | +import jakarta.validation.constraints.Max; | ||
| 7 | +import jakarta.validation.constraints.Min; | ||
| 8 | +import jakarta.validation.constraints.NotNull; | ||
| 9 | +import lombok.Data; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDate; | ||
| 12 | +import java.util.List; | ||
| 13 | +import java.util.Set; | ||
| 14 | + | ||
| 15 | +@Schema(description = "管理后台 - 养护计划汇总分页 Request VO") | ||
| 16 | +@Data | ||
| 17 | +public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + @Schema(description = "道路名称") | ||
| 21 | + @NotNull | ||
| 22 | + private Long roadId; | ||
| 23 | + | ||
| 24 | + @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") | ||
| 25 | + @NotNull(message = "完成状态不能为空") | ||
| 26 | + @Min(value = 1, message = "状态最小为1") | ||
| 27 | + @Max(value = 3, message = "状态不能大于4") | ||
| 28 | + private Integer finishState; | ||
| 29 | + | ||
| 30 | + @Schema(description = "计划名称") | ||
| 31 | + private String planName; | ||
| 32 | + | ||
| 33 | + @Schema(description = "计划批次号列表") | ||
| 34 | + @Hidden | ||
| 35 | + private Set<String> batchNos; | ||
| 36 | + | ||
| 37 | + @Schema(description = "业务线") | ||
| 38 | + @Hidden | ||
| 39 | + private List<String> busiLineList; | ||
| 40 | + | ||
| 41 | + @Schema(description = "系统时间") | ||
| 42 | + @Hidden | ||
| 43 | + private LocalDate localDate; | ||
| 44 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPagePlanTypeReqVO.java
| @@ -10,6 +10,7 @@ import lombok.Data; | @@ -10,6 +10,7 @@ import lombok.Data; | ||
| 10 | 10 | ||
| 11 | import java.time.LocalDate; | 11 | import java.time.LocalDate; |
| 12 | import java.util.List; | 12 | import java.util.List; |
| 13 | +import java.util.Set; | ||
| 13 | 14 | ||
| 14 | @Schema(description = "管理后台 - 养护计划汇总分页 Request VO") | 15 | @Schema(description = "管理后台 - 养护计划汇总分页 Request VO") |
| 15 | @Data | 16 | @Data |
| @@ -28,13 +29,10 @@ public class AppMaintainPlanPagePlanTypeReqVO extends PageParam { | @@ -28,13 +29,10 @@ public class AppMaintainPlanPagePlanTypeReqVO extends PageParam { | ||
| 28 | @Max(value = 3, message = "状态不能大于4") | 29 | @Max(value = 3, message = "状态不能大于4") |
| 29 | private Integer finishState; | 30 | private Integer finishState; |
| 30 | 31 | ||
| 31 | - @Schema(description = "公司ID") | ||
| 32 | - @Hidden | ||
| 33 | - private Long companyId; | ||
| 34 | 32 | ||
| 35 | - @Schema(description = "角色IDS") | 33 | + @Schema(description = "计划批次号列表") |
| 36 | @Hidden | 34 | @Hidden |
| 37 | - private List<Long> roleIds; | 35 | + private Set<String> batchNos; |
| 38 | 36 | ||
| 39 | @Schema(description = "业务线") | 37 | @Schema(description = "业务线") |
| 40 | @Hidden | 38 | @Hidden |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPageRoadReqVO.java
| @@ -7,12 +7,10 @@ import jakarta.validation.constraints.Max; | @@ -7,12 +7,10 @@ import jakarta.validation.constraints.Max; | ||
| 7 | import jakarta.validation.constraints.Min; | 7 | import jakarta.validation.constraints.Min; |
| 8 | import jakarta.validation.constraints.NotNull; | 8 | import jakarta.validation.constraints.NotNull; |
| 9 | import lombok.Data; | 9 | import lombok.Data; |
| 10 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 11 | 10 | ||
| 12 | import java.time.LocalDate; | 11 | import java.time.LocalDate; |
| 13 | import java.util.List; | 12 | import java.util.List; |
| 14 | - | ||
| 15 | -import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 13 | +import java.util.Set; |
| 16 | 14 | ||
| 17 | @Schema(description = "管理后台 - 养护计划汇总分页 Request VO") | 15 | @Schema(description = "管理后台 - 养护计划汇总分页 Request VO") |
| 18 | @Data | 16 | @Data |
| @@ -27,13 +25,10 @@ public class AppMaintainPlanPageRoadReqVO extends PageParam { | @@ -27,13 +25,10 @@ public class AppMaintainPlanPageRoadReqVO extends PageParam { | ||
| 27 | @Max(value = 3, message = "状态不能大于4") | 25 | @Max(value = 3, message = "状态不能大于4") |
| 28 | private Integer finishState; | 26 | private Integer finishState; |
| 29 | 27 | ||
| 30 | - @Schema(description = "公司ID") | ||
| 31 | - @Hidden | ||
| 32 | - private Long companyId; | ||
| 33 | 28 | ||
| 34 | - @Schema(description = "角色IDS") | 29 | + @Schema(description = "批次号") |
| 35 | @Hidden | 30 | @Hidden |
| 36 | - private List<Long> roleIds; | 31 | + private Set<String> batchNos; |
| 37 | 32 | ||
| 38 | @Schema(description = "业务线") | 33 | @Schema(description = "业务线") |
| 39 | @Hidden | 34 | @Hidden |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanCommitMapper.java
| @@ -3,9 +3,12 @@ package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; | @@ -3,9 +3,12 @@ package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; | ||
| 3 | 3 | ||
| 4 | import com.baomidou.mybatisplus.core.metadata.IPage; | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
| 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.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitPageReqVO; | ||
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitRespVO; | ||
| 8 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO; | ||
| 9 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitPageReqVO; | ||
| 6 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommitDO; | 10 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommitDO; |
| 7 | import org.apache.ibatis.annotations.Mapper; | 11 | import org.apache.ibatis.annotations.Mapper; |
| 8 | -import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | ||
| 9 | import org.apache.ibatis.annotations.Param; | 12 | import org.apache.ibatis.annotations.Param; |
| 10 | 13 | ||
| 11 | import java.util.List; | 14 | import java.util.List; |
| @@ -25,5 +28,11 @@ public interface MaintainPlanCommitMapper extends BaseMapperX<MaintainPlanCommit | @@ -25,5 +28,11 @@ public interface MaintainPlanCommitMapper extends BaseMapperX<MaintainPlanCommit | ||
| 25 | */ | 28 | */ |
| 26 | IPage<MaintainPlanCommitRespVO> selectForPage(@Param("page") IPage<MaintainPlanCommitRespVO> page, @Param("req") MaintainPlanCommitPageReqVO req, @Param("busiLineList") List<String> busiLineList); | 29 | IPage<MaintainPlanCommitRespVO> selectForPage(@Param("page") IPage<MaintainPlanCommitRespVO> page, @Param("req") MaintainPlanCommitPageReqVO req, @Param("busiLineList") List<String> busiLineList); |
| 27 | 30 | ||
| 28 | - | 31 | + /** |
| 32 | + * 查询已完成明细 | ||
| 33 | + * | ||
| 34 | + * @param pageReqVO 分页参数 | ||
| 35 | + * @return 分页结果 | ||
| 36 | + */ | ||
| 37 | + IPage<AppMaintainPlanCommitDetailPageRespVO> appMaintainPlanCommitDetailPage(@Param("page") IPage<AppMaintainPlanCommitDetailPageRespVO> page, @Param("req") AppMaintainPlanCommitPageReqVO pageReqVO); | ||
| 29 | } | 38 | } |
| 30 | \ No newline at end of file | 39 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanDetailMapper.java
| 1 | package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; | 1 | package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 5 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | 6 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 7 | -import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | 7 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailPageReqVO; | ||
| 9 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailReqVO; | ||
| 10 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO; | ||
| 11 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailListByRoadPageReqVO; | ||
| 8 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | 12 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; |
| 9 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; | 13 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; |
| 10 | -import org.apache.commons.lang3.StringUtils; | ||
| 11 | import org.apache.ibatis.annotations.Mapper; | 14 | import org.apache.ibatis.annotations.Mapper; |
| 12 | -import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | ||
| 13 | import org.apache.ibatis.annotations.Param; | 15 | import org.apache.ibatis.annotations.Param; |
| 14 | 16 | ||
| 15 | -import java.time.LocalDate; | ||
| 16 | -import java.util.ArrayList; | ||
| 17 | -import java.util.Arrays; | ||
| 18 | import java.util.List; | 17 | import java.util.List; |
| 19 | 18 | ||
| 20 | /** | 19 | /** |
| @@ -46,16 +45,19 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail | @@ -46,16 +45,19 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail | ||
| 46 | int deleteByBatchNo(@Param("batchNo") String batchNo); | 45 | int deleteByBatchNo(@Param("batchNo") String batchNo); |
| 47 | 46 | ||
| 48 | /** | 47 | /** |
| 49 | - * app-查询指定业务线的指定道路的养护计划 | ||
| 50 | - * @param busiLineList | ||
| 51 | - * @param roadId | ||
| 52 | - * @param companyId | ||
| 53 | - * @param roleIds | ||
| 54 | - * @param now | ||
| 55 | - * @return | 48 | + * app-按养护类型获取巡检计划列表-app |
| 49 | + * | ||
| 50 | + * @param page | ||
| 51 | + * @param req | ||
| 52 | + * @return 列表 | ||
| 56 | */ | 53 | */ |
| 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, @Param("planName") String planName); | 54 | + IPage<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoadPage(@Param("page") IPage<AppMaintainPlanDetailRespVO> page, @Param("req") AppMaintainPlanDetailListByRoadPageReqVO req); |
| 59 | 55 | ||
| 56 | + /** | ||
| 57 | + * app-获取未完成养护计划列表-app | ||
| 58 | + * @param reqVO 入参数 | ||
| 59 | + * @return 列表 | ||
| 60 | + */ | ||
| 61 | + List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(AppMaintainNotFinishPlanDetailReqVO reqVO); | ||
| 60 | 62 | ||
| 61 | } | 63 | } |
| 62 | \ No newline at end of file | 64 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanDetailServiceImpl.java
| 1 | package com.zteits.urbanops.module.garden.service.inspectionplan; | 1 | package com.zteits.urbanops.module.garden.service.inspectionplan; |
| 2 | 2 | ||
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 4 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 3 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | 5 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanDetailPageReqVO; | ||
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanDetailSaveReqVO; | ||
| 4 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanDetailReqVO; | 8 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanDetailReqVO; |
| 5 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanDetailRespVO; | 9 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanDetailRespVO; |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | ||
| 11 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanDetailMapper; | ||
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanRoleMapper; | ||
| 6 | import com.zteits.urbanops.module.system.api.permission.RoleApi; | 13 | import com.zteits.urbanops.module.system.api.permission.RoleApi; |
| 14 | +import jakarta.annotation.Resource; | ||
| 7 | import org.apache.commons.lang3.StringUtils; | 15 | import org.apache.commons.lang3.StringUtils; |
| 8 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
| 9 | -import jakarta.annotation.Resource; | ||
| 10 | import org.springframework.validation.annotation.Validated; | 17 | import org.springframework.validation.annotation.Validated; |
| 11 | 18 | ||
| 12 | -import java.time.LocalDate; | ||
| 13 | import java.time.LocalDateTime; | 19 | import java.time.LocalDateTime; |
| 14 | -import java.util.*; | ||
| 15 | -import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | ||
| 16 | -import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | ||
| 17 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 18 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 19 | - | ||
| 20 | -import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanDetailMapper; | ||
| 21 | - | ||
| 22 | -import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 23 | -import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | 20 | +import java.util.Arrays; |
| 21 | +import java.util.List; | ||
| 24 | 22 | ||
| 25 | /** | 23 | /** |
| 26 | * 巡检计划 Service 实现类 | 24 | * 巡检计划 Service 实现类 |
| @@ -35,6 +33,9 @@ public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailServ | @@ -35,6 +33,9 @@ public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailServ | ||
| 35 | private InspectionPlanDetailMapper inspectionPlanDetailMapper; | 33 | private InspectionPlanDetailMapper inspectionPlanDetailMapper; |
| 36 | 34 | ||
| 37 | @Resource | 35 | @Resource |
| 36 | + private InspectionPlanRoleMapper inspectionPlanRoleMapper; | ||
| 37 | + | ||
| 38 | + @Resource | ||
| 38 | private RoleApi roleApi; | 39 | private RoleApi roleApi; |
| 39 | 40 | ||
| 40 | @Override | 41 | @Override |
| @@ -91,16 +92,15 @@ public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailServ | @@ -91,16 +92,15 @@ public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailServ | ||
| 91 | public List<AppInspectionPlanDetailRespVO> getInspectionPlanDetailForApp(AppInspectionPlanDetailReqVO pageReqVO) { | 92 | public List<AppInspectionPlanDetailRespVO> getInspectionPlanDetailForApp(AppInspectionPlanDetailReqVO pageReqVO) { |
| 92 | String busiLine = SecurityFrameworkUtils.getBusiLine(); | 93 | String busiLine = SecurityFrameworkUtils.getBusiLine(); |
| 93 | Long companyId = SecurityFrameworkUtils.getCompanyId(); | 94 | Long companyId = SecurityFrameworkUtils.getCompanyId(); |
| 95 | + Long deptId = SecurityFrameworkUtils.getDeptId(); | ||
| 94 | if (StringUtils.isNotEmpty(busiLine)) { | 96 | if (StringUtils.isNotEmpty(busiLine)) { |
| 95 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); | 97 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 96 | } | 98 | } |
| 97 | pageReqVO.setCompanyId(companyId); | 99 | pageReqVO.setCompanyId(companyId); |
| 98 | 100 | ||
| 99 | - /*1.查询登录用户角色*/ | ||
| 100 | - List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | ||
| 101 | - pageReqVO.setRoleIds(roleIds); | ||
| 102 | pageReqVO.setLocalDateTime(LocalDateTime.now()); | 101 | pageReqVO.setLocalDateTime(LocalDateTime.now()); |
| 103 | - /*2.明细*/ | 102 | + |
| 103 | + /*2.明细*/ | ||
| 104 | return inspectionPlanDetailMapper.getInspectionPlanDetailForApp(pageReqVO); | 104 | return inspectionPlanDetailMapper.getInspectionPlanDetailForApp(pageReqVO); |
| 105 | } | 105 | } |
| 106 | 106 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanCommitService.java
| @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.garden.service.maintainplan; | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.garden.service.maintainplan; | ||
| 2 | 2 | ||
| 3 | import java.util.*; | 3 | import java.util.*; |
| 4 | 4 | ||
| 5 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO; | ||
| 6 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitPageReqVO; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitSaveReqVO; | 7 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitSaveReqVO; |
| 6 | import jakarta.validation.*; | 8 | import jakarta.validation.*; |
| 7 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | 9 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| @@ -78,4 +80,13 @@ public interface MaintainPlanCommitService { | @@ -78,4 +80,13 @@ public interface MaintainPlanCommitService { | ||
| 78 | */ | 80 | */ |
| 79 | PageResult<MaintainPlanCommitRespVO> getMaintainPlanCommitPage(MaintainPlanCommitPageReqVO pageReqVO); | 81 | PageResult<MaintainPlanCommitRespVO> getMaintainPlanCommitPage(MaintainPlanCommitPageReqVO pageReqVO); |
| 80 | 82 | ||
| 83 | + /** | ||
| 84 | + * app-获得养护计划明细分页 | ||
| 85 | + * | ||
| 86 | + * @param pageReqVO 分页查询 | ||
| 87 | + * @return 养护计划明细分页 | ||
| 88 | + */ | ||
| 89 | + PageResult<AppMaintainPlanCommitDetailPageRespVO> appMaintainPlanCommitDetailPage(AppMaintainPlanCommitPageReqVO pageReqVO); | ||
| 90 | + | ||
| 91 | + | ||
| 81 | } | 92 | } |
| 82 | \ No newline at end of file | 93 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanCommitServiceImpl.java
| @@ -10,7 +10,7 @@ import com.zteits.urbanops.framework.common.util.string.StrUtils; | @@ -10,7 +10,7 @@ import com.zteits.urbanops.framework.common.util.string.StrUtils; | ||
| 10 | import com.zteits.urbanops.framework.mybatis.core.util.MyBatisUtils; | 10 | import com.zteits.urbanops.framework.mybatis.core.util.MyBatisUtils; |
| 11 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | 11 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 12 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | 12 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| 13 | -import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitSaveReqVO; | 13 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.*; |
| 14 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommitDO; | 14 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommitDO; |
| 15 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommonUserDO; | 15 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanCommonUserDO; |
| 16 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDO; | 16 | import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDO; |
| @@ -210,6 +210,20 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService | @@ -210,6 +210,20 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService | ||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | @Override | 212 | @Override |
| 213 | + public PageResult<AppMaintainPlanCommitDetailPageRespVO> appMaintainPlanCommitDetailPage(AppMaintainPlanCommitPageReqVO pageReqVO) { | ||
| 214 | + //分页 | ||
| 215 | + IPage<AppMaintainPlanCommitDetailPageRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | ||
| 216 | + IPage<AppMaintainPlanCommitDetailPageRespVO> page = maintainPlanCommitMapper.appMaintainPlanCommitDetailPage(mpPage, pageReqVO); | ||
| 217 | + | ||
| 218 | + page.getRecords().forEach(respVO -> { | ||
| 219 | + respVO.setBeginImgList(StrUtils.imgProcess(respVO.getBeginImg(), "")); | ||
| 220 | + }); | ||
| 221 | + | ||
| 222 | + // 转换返回 | ||
| 223 | + return new PageResult<>(page.getRecords(), page.getTotal()); | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + @Override | ||
| 213 | public List<MaintainPlanCommitDetailRespVO> getMaintainPlanCommitDetailByPlanNo(String planNo) { | 227 | public List<MaintainPlanCommitDetailRespVO> getMaintainPlanCommitDetailByPlanNo(String planNo) { |
| 214 | List<MaintainPlanCommitDetailRespVO> respList = new ArrayList<>(); | 228 | List<MaintainPlanCommitDetailRespVO> respList = new ArrayList<>(); |
| 215 | /*1.查询处理明细*/ | 229 | /*1.查询处理明细*/ |
| @@ -270,7 +284,6 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService | @@ -270,7 +284,6 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService | ||
| 270 | // 转换返回 | 284 | // 转换返回 |
| 271 | return new PageResult<>(page.getRecords(), page.getTotal()); | 285 | return new PageResult<>(page.getRecords(), page.getTotal()); |
| 272 | } | 286 | } |
| 273 | - | ||
| 274 | /** | 287 | /** |
| 275 | * 回填部门/公司/角色 | 288 | * 回填部门/公司/角色 |
| 276 | * @param list 分页对象 | 289 | * @param list 分页对象 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailService.java
| @@ -2,6 +2,9 @@ package com.zteits.urbanops.module.garden.service.maintainplan; | @@ -2,6 +2,9 @@ package com.zteits.urbanops.module.garden.service.maintainplan; | ||
| 2 | 2 | ||
| 3 | import java.util.*; | 3 | import java.util.*; |
| 4 | 4 | ||
| 5 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailReqVO; | ||
| 6 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO; | ||
| 7 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailListByRoadPageReqVO; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | 8 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; |
| 6 | import jakarta.validation.*; | 9 | import jakarta.validation.*; |
| 7 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | 10 | import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; |
| @@ -62,9 +65,16 @@ public interface MaintainPlanDetailService { | @@ -62,9 +65,16 @@ public interface MaintainPlanDetailService { | ||
| 62 | 65 | ||
| 63 | /** | 66 | /** |
| 64 | * 按照道路查询养护计划列表 | 67 | * 按照道路查询养护计划列表 |
| 65 | - * @param roadId 道路ID | 68 | + * @param pageReqVO 道路ID |
| 66 | * @return | 69 | * @return |
| 67 | */ | 70 | */ |
| 68 | - List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState, String planName); | 71 | + PageResult<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoadPage(AppMaintainPlanDetailListByRoadPageReqVO pageReqVO); |
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 获得未完成养护计划明细列表 | ||
| 75 | + * @param reqVO | ||
| 76 | + * @return | ||
| 77 | + */ | ||
| 78 | + List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(AppMaintainNotFinishPlanDetailReqVO reqVO); | ||
| 69 | 79 | ||
| 70 | } | 80 | } |
| 71 | \ No newline at end of file | 81 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| 1 | package com.zteits.urbanops.module.garden.service.maintainplan; | 1 | package com.zteits.urbanops.module.garden.service.maintainplan; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 7 | +import com.zteits.urbanops.framework.mybatis.core.util.MyBatisUtils; | ||
| 3 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | 8 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailPageReqVO; | ||
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanDetailSaveReqVO; | ||
| 11 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailReqVO; | ||
| 12 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO; | ||
| 13 | +import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailListByRoadPageReqVO; | ||
| 4 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; | 14 | import com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO; |
| 15 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; | ||
| 16 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanRoleDO; | ||
| 17 | +import com.zteits.urbanops.module.garden.dal.mysql.maintainplan.MaintainPlanDetailMapper; | ||
| 18 | +import com.zteits.urbanops.module.garden.dal.mysql.maintainplan.MaintainPlanRoleMapper; | ||
| 5 | import com.zteits.urbanops.module.system.api.permission.RoleApi; | 19 | import com.zteits.urbanops.module.system.api.permission.RoleApi; |
| 20 | +import jakarta.annotation.Resource; | ||
| 6 | import org.apache.commons.lang3.StringUtils; | 21 | import org.apache.commons.lang3.StringUtils; |
| 7 | import org.springframework.stereotype.Service; | 22 | import org.springframework.stereotype.Service; |
| 8 | -import jakarta.annotation.Resource; | 23 | +import org.springframework.util.CollectionUtils; |
| 9 | import org.springframework.validation.annotation.Validated; | 24 | import org.springframework.validation.annotation.Validated; |
| 10 | 25 | ||
| 11 | import java.time.LocalDate; | 26 | import java.time.LocalDate; |
| 12 | -import java.util.*; | ||
| 13 | -import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.*; | ||
| 14 | -import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDetailDO; | ||
| 15 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 16 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 17 | - | ||
| 18 | -import com.zteits.urbanops.module.garden.dal.mysql.maintainplan.MaintainPlanDetailMapper; | 27 | +import java.util.Arrays; |
| 28 | +import java.util.Collections; | ||
| 29 | +import java.util.List; | ||
| 30 | +import java.util.Set; | ||
| 31 | +import java.util.stream.Collectors; | ||
| 19 | 32 | ||
| 20 | 33 | ||
| 21 | /** | 34 | /** |
| @@ -31,6 +44,9 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | @@ -31,6 +44,9 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 31 | private MaintainPlanDetailMapper maintainPlanDetailMapper; | 44 | private MaintainPlanDetailMapper maintainPlanDetailMapper; |
| 32 | 45 | ||
| 33 | @Resource | 46 | @Resource |
| 47 | + private MaintainPlanRoleMapper maintainPlanRoleMapper; | ||
| 48 | + | ||
| 49 | + @Resource | ||
| 34 | private RoleApi roleApi; | 50 | private RoleApi roleApi; |
| 35 | 51 | ||
| 36 | @Override | 52 | @Override |
| @@ -84,18 +100,48 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | @@ -84,18 +100,48 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 84 | } | 100 | } |
| 85 | 101 | ||
| 86 | @Override | 102 | @Override |
| 87 | - public List<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoad(Long roadId, Integer finishState, String planName) { | 103 | + public PageResult<AppMaintainPlanDetailRespVO> appMaintainPlanDetailListByRoadPage(AppMaintainPlanDetailListByRoadPageReqVO pageReqVO) { |
| 88 | String busiLine = SecurityFrameworkUtils.getBusiLine(); | 104 | String busiLine = SecurityFrameworkUtils.getBusiLine(); |
| 89 | - Long companyId = SecurityFrameworkUtils.getCompanyId(); | ||
| 90 | - List<String> busiLineList = new ArrayList<>(); | ||
| 91 | if (StringUtils.isNotEmpty(busiLine)) { | 105 | if (StringUtils.isNotEmpty(busiLine)) { |
| 92 | - busiLineList = Arrays.asList(busiLine.split(",")); | 106 | + pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 93 | } | 107 | } |
| 94 | 108 | ||
| 95 | /*1.查询登录用户角色*/ | 109 | /*1.查询登录用户角色*/ |
| 110 | + Set<String> batchNos = this.getBatchNosByLoginUserId(); | ||
| 111 | + pageReqVO.setLocalDate(LocalDate.now()); | ||
| 112 | + pageReqVO.setBatchNos(batchNos); | ||
| 113 | + /*2.分页*/ | ||
| 114 | + IPage<AppMaintainPlanDetailRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | ||
| 115 | + IPage<AppMaintainPlanDetailRespVO> page = maintainPlanDetailMapper.appMaintainPlanDetailListByRoadPage(mpPage, pageReqVO); | ||
| 116 | + // 转换返回 | ||
| 117 | + return new PageResult<>(page.getRecords(), page.getTotal()); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + @Override | ||
| 121 | + public List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(AppMaintainNotFinishPlanDetailReqVO reqVO) { | ||
| 122 | + //完成状态 1:未完成;2:已完成;3:已失效 | ||
| 123 | + reqVO.setFinishState(1); | ||
| 124 | + return maintainPlanDetailMapper.getMaintainNotFinishPlanCommitDetail(reqVO); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + /** | ||
| 128 | + * 获取登录用户批次号List | ||
| 129 | + */ | ||
| 130 | + private Set<String> getBatchNosByLoginUserId() { | ||
| 131 | + Long companyId = SecurityFrameworkUtils.getCompanyId(); | ||
| 132 | + Long deptId = SecurityFrameworkUtils.getDeptId(); | ||
| 133 | + /*1.查询登录用户角色*/ | ||
| 96 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | 134 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 97 | - LocalDate now = LocalDate.now(); | ||
| 98 | - return maintainPlanDetailMapper.appMaintainPlanDetailListByRoad(busiLineList, roadId, companyId, roleIds, now, finishState, planName); | 135 | + QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 136 | + roleSql.select("batch_no"); | ||
| 137 | + roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). | ||
| 138 | + eq(MaintainPlanRoleDO::getCompanyId, companyId) | ||
| 139 | + .eq(MaintainPlanRoleDO::getDeptId, deptId); | ||
| 140 | + List<MaintainPlanRoleDO> roleList = maintainPlanRoleMapper.selectList(roleSql); | ||
| 141 | + if (CollectionUtils.isEmpty(roleList)) { | ||
| 142 | + return Collections.emptySet(); | ||
| 143 | + } | ||
| 144 | + return roleList.stream().map(MaintainPlanRoleDO::getBatchNo).collect(Collectors.toSet()); | ||
| 99 | } | 145 | } |
| 100 | 146 | ||
| 101 | } | 147 | } |
| 102 | \ No newline at end of file | 148 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
| @@ -341,17 +341,14 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | @@ -341,17 +341,14 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | ||
| 341 | @Override | 341 | @Override |
| 342 | public PageResult<AppMaintainPlanPageRoadRespVO> appMaintainPlanRoadPage(AppMaintainPlanPageRoadReqVO pageReqVO) { | 342 | public PageResult<AppMaintainPlanPageRoadRespVO> appMaintainPlanRoadPage(AppMaintainPlanPageRoadReqVO pageReqVO) { |
| 343 | String busiLine = SecurityFrameworkUtils.getBusiLine(); | 343 | String busiLine = SecurityFrameworkUtils.getBusiLine(); |
| 344 | - Long companyId = SecurityFrameworkUtils.getCompanyId(); | ||
| 345 | if (StringUtils.isNotEmpty(busiLine)) { | 344 | if (StringUtils.isNotEmpty(busiLine)) { |
| 346 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); | 345 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 347 | } | 346 | } |
| 348 | - pageReqVO.setCompanyId(companyId); | ||
| 349 | 347 | ||
| 350 | - /*1.查询登录用户角色*/ | ||
| 351 | - List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | ||
| 352 | - pageReqVO.setRoleIds(roleIds); | 348 | + /*1.查询登录用户计划编码列表*/ |
| 349 | + Set<String> batchNos = this.getBatchNosByLoginUserId(); | ||
| 350 | + pageReqVO.setBatchNos(batchNos); | ||
| 353 | pageReqVO.setLocalDate(LocalDate.now()); | 351 | pageReqVO.setLocalDate(LocalDate.now()); |
| 354 | - | ||
| 355 | /*2.分页*/ | 352 | /*2.分页*/ |
| 356 | IPage<AppMaintainPlanPageRoadRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | 353 | IPage<AppMaintainPlanPageRoadRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| 357 | IPage<AppMaintainPlanPageRoadRespVO> page = maintainPlanMapper.appMaintainPlanRoadPage(mpPage, pageReqVO); | 354 | IPage<AppMaintainPlanPageRoadRespVO> page = maintainPlanMapper.appMaintainPlanRoadPage(mpPage, pageReqVO); |
| @@ -359,6 +356,26 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | @@ -359,6 +356,26 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | ||
| 359 | return new PageResult<>(page.getRecords(), page.getTotal()); | 356 | return new PageResult<>(page.getRecords(), page.getTotal()); |
| 360 | } | 357 | } |
| 361 | 358 | ||
| 359 | + /** | ||
| 360 | + * 获取登录用户批次号List | ||
| 361 | + */ | ||
| 362 | + private Set<String> getBatchNosByLoginUserId() { | ||
| 363 | + Long companyId = SecurityFrameworkUtils.getCompanyId(); | ||
| 364 | + Long deptId = SecurityFrameworkUtils.getDeptId(); | ||
| 365 | + /*1.查询登录用户角色*/ | ||
| 366 | + List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | ||
| 367 | + QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); | ||
| 368 | + roleSql.select("batch_no"); | ||
| 369 | + roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). | ||
| 370 | + eq(MaintainPlanRoleDO::getCompanyId, companyId) | ||
| 371 | + .eq(MaintainPlanRoleDO::getDeptId, deptId); | ||
| 372 | + List<MaintainPlanRoleDO> roleList = maintainPlanRoleMapper.selectList(roleSql); | ||
| 373 | + if (CollectionUtils.isEmpty(roleList)) { | ||
| 374 | + return Collections.emptySet(); | ||
| 375 | + } | ||
| 376 | + return roleList.stream().map(MaintainPlanRoleDO::getBatchNo).collect(Collectors.toSet()); | ||
| 377 | + } | ||
| 378 | + | ||
| 362 | @Override | 379 | @Override |
| 363 | public PageResult<AppMaintainPlanPagePlanTypeRespVO> appMaintainPlanPlanTypePage(AppMaintainPlanPagePlanTypeReqVO pageReqVO) { | 380 | public PageResult<AppMaintainPlanPagePlanTypeRespVO> appMaintainPlanPlanTypePage(AppMaintainPlanPagePlanTypeReqVO pageReqVO) { |
| 364 | String busiLine = SecurityFrameworkUtils.getBusiLine(); | 381 | String busiLine = SecurityFrameworkUtils.getBusiLine(); |
| @@ -366,11 +383,9 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | @@ -366,11 +383,9 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | ||
| 366 | if (StringUtils.isNotEmpty(busiLine)) { | 383 | if (StringUtils.isNotEmpty(busiLine)) { |
| 367 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); | 384 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 368 | } | 385 | } |
| 369 | - pageReqVO.setCompanyId(companyId); | ||
| 370 | - | ||
| 371 | - /*1.查询登录用户角色*/ | ||
| 372 | - List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | ||
| 373 | - pageReqVO.setRoleIds(roleIds); | 386 | + /*1.查询登录用户计划编码列表*/ |
| 387 | + Set<String> batchNos = this.getBatchNosByLoginUserId(); | ||
| 388 | + pageReqVO.setBatchNos(batchNos); | ||
| 374 | pageReqVO.setLocalDate(LocalDate.now()); | 389 | pageReqVO.setLocalDate(LocalDate.now()); |
| 375 | /*2.分页*/ | 390 | /*2.分页*/ |
| 376 | IPage<AppMaintainPlanPagePlanTypeRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | 391 | IPage<AppMaintainPlanPagePlanTypeRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanDetailMapper.xml
| @@ -32,8 +32,7 @@ | @@ -32,8 +32,7 @@ | ||
| 32 | b.end_time | 32 | b.end_time |
| 33 | FROM | 33 | FROM |
| 34 | garden_inspection_plan a, | 34 | garden_inspection_plan a, |
| 35 | - garden_inspection_plan_detail b, | ||
| 36 | - garden_inspection_plan_role c | 35 | + garden_inspection_plan_detail b |
| 37 | WHERE | 36 | WHERE |
| 38 | a.batch_no = b.batch_no | 37 | a.batch_no = b.batch_no |
| 39 | AND b.batch_no=c.batch_no | 38 | AND b.batch_no=c.batch_no |
| @@ -43,12 +42,6 @@ | @@ -43,12 +42,6 @@ | ||
| 43 | AND a.deleted = 0 | 42 | AND a.deleted = 0 |
| 44 | AND a.batch_no = #{req.batchNo} | 43 | AND a.batch_no = #{req.batchNo} |
| 45 | AND a.company_id = #{req.companyId} | 44 | AND a.company_id = #{req.companyId} |
| 46 | - <if test="req.roleIds != null and req.roleIds.size() > 0"> | ||
| 47 | - AND c.role_id IN | ||
| 48 | - <foreach collection="req.roleIds" item="roleId" open="(" separator="," close=")"> | ||
| 49 | - #{roleId} | ||
| 50 | - </foreach> | ||
| 51 | - </if> | ||
| 52 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> | 45 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> |
| 53 | AND a.busi_line IN | 46 | AND a.busi_line IN |
| 54 | <foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")"> | 47 | <foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")"> |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| @@ -79,4 +79,35 @@ | @@ -79,4 +79,35 @@ | ||
| 79 | </if> | 79 | </if> |
| 80 | </select> | 80 | </select> |
| 81 | 81 | ||
| 82 | + <select id="appMaintainPlanCommitDetailPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO"> | ||
| 83 | + SELECT | ||
| 84 | + a.batch_no, | ||
| 85 | + a.plan_no, | ||
| 86 | + b.plan_name, | ||
| 87 | + b.road_id, | ||
| 88 | + b.road_name, | ||
| 89 | + b.level_id, | ||
| 90 | + b.plan_attr, | ||
| 91 | + b.plan_type_id, | ||
| 92 | + b.cycle_id, | ||
| 93 | + b.plan_num, | ||
| 94 | + b.busi_line, | ||
| 95 | + b.plan_finish_num, | ||
| 96 | + a.begin_time, | ||
| 97 | + a.end_time, | ||
| 98 | + a.company_id, | ||
| 99 | + a.dept_id, | ||
| 100 | + a.finish_percent, | ||
| 101 | + c.role_name, | ||
| 102 | + c.finish_time, | ||
| 103 | + c.user_name | ||
| 104 | + FROM | ||
| 105 | + garden_maintain_plan_detail a, | ||
| 106 | + garden_maintain_plan b, | ||
| 107 | + garden_maintain_plan_commit c | ||
| 108 | + WHERE | ||
| 109 | + a.batch_no = b.batch_no | ||
| 110 | + AND a.plan_no = c.plan_no | ||
| 111 | + AND c.plan_no = #{req.planNo} | ||
| 112 | + </select> | ||
| 82 | </mapper> | 113 | </mapper> |
| 83 | \ No newline at end of file | 114 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | delete from garden_maintain_plan_detail where batch_no =#{batchNo} | 13 | delete from garden_maintain_plan_detail where batch_no =#{batchNo} |
| 14 | </delete> | 14 | </delete> |
| 15 | 15 | ||
| 16 | - <select id="appMaintainPlanDetailListByRoad" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO"> | 16 | + <select id="appMaintainPlanDetailListByRoadPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO"> |
| 17 | SELECT | 17 | SELECT |
| 18 | c.batch_no, | 18 | c.batch_no, |
| 19 | c.plan_no, | 19 | c.plan_no, |
| @@ -29,40 +29,61 @@ | @@ -29,40 +29,61 @@ | ||
| 29 | c.sort_num | 29 | c.sort_num |
| 30 | FROM | 30 | FROM |
| 31 | garden_maintain_plan a, | 31 | garden_maintain_plan a, |
| 32 | - garden_maintain_plan_role b, | ||
| 33 | garden_maintain_plan_detail c | 32 | garden_maintain_plan_detail c |
| 34 | - WHERE | ||
| 35 | - a.batch_no = b.batch_no | ||
| 36 | - and a.batch_no=b.batch_no | ||
| 37 | - AND a.dept_id =b.dept_id | 33 | + WHERE a.batch_no=c.batch_no |
| 38 | AND a.deleted=0 | 34 | AND a.deleted=0 |
| 39 | - AND a.company_id = #{companyId} | ||
| 40 | - AND a.road_id = #{roadId} | ||
| 41 | - <if test="planName != null and planName !=''"> | ||
| 42 | - AND a.plan_name LIKE CONCAT('%',#{planName},'%') | 35 | + AND a.road_id = #{req.roadId} |
| 36 | + <if test="req.planName != null and req.planName !=''"> | ||
| 37 | + AND a.plan_name LIKE CONCAT('%',#{req.planName},'%') | ||
| 43 | </if> | 38 | </if> |
| 44 | - <if test="roleIds != null and roleIds.size() > 0"> | ||
| 45 | - AND b.role_id IN | ||
| 46 | - <foreach collection="roleIds" item="roleId" open="(" separator="," close=")"> | ||
| 47 | - #{roleId} | ||
| 48 | - </foreach> | ||
| 49 | - </if> | ||
| 50 | - <if test="busiLineList != null and busiLineList.size() > 0"> | 39 | + <if test="req.busiLineList != null and req.busiLineList.size() > 0"> |
| 51 | AND a.busi_line IN | 40 | AND a.busi_line IN |
| 52 | - <foreach collection="busiLineList" item="busiLine" open="(" separator="," close=")"> | 41 | + <foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")"> |
| 53 | #{busiLine} | 42 | #{busiLine} |
| 54 | </foreach> | 43 | </foreach> |
| 55 | </if> | 44 | </if> |
| 45 | + <if test="req.batchNos != null and req.batchNos.size() > 0"> | ||
| 46 | + AND a.batch_no IN | ||
| 47 | + <foreach collection="req.batchNos" item="batchNo" open="(" separator="," close=")"> | ||
| 48 | + #{batchNo} | ||
| 49 | + </foreach> | ||
| 50 | + </if> | ||
| 56 | <!--状态 1:未完成;2:已完成;3:已失效--> | 51 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 57 | - <if test="finishState == 3"> | ||
| 58 | - <![CDATA[and c.end_time < #{localDate}]]> | 52 | + <if test="req.finishState == 3"> |
| 53 | + <![CDATA[and c.end_time < #{req.localDate}]]> | ||
| 59 | </if> | 54 | </if> |
| 60 | - <if test="finishState == 2"> | ||
| 61 | - and c.finish_state = #{finishState} | 55 | + <if test="req.finishState == 2"> |
| 56 | + and c.finish_state = #{req.finishState} | ||
| 62 | </if> | 57 | </if> |
| 63 | - <if test="finishState == 1"> | ||
| 64 | - and c.finish_state = #{finishState} | ||
| 65 | - <![CDATA[and c.end_time >= #{localDate}]]> | 58 | + <if test="req.finishState == 1"> |
| 59 | + and c.finish_state = #{req.finishState} | ||
| 60 | + <![CDATA[and c.end_time >= #{req.localDate}]]> | ||
| 66 | </if> | 61 | </if> |
| 67 | </select> | 62 | </select> |
| 63 | + | ||
| 64 | + <select id="getMaintainNotFinishPlanCommitDetail" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO"> | ||
| 65 | + SELECT | ||
| 66 | + c.batch_no, | ||
| 67 | + c.plan_no, | ||
| 68 | + a.plan_name, | ||
| 69 | + a.plan_type_id, | ||
| 70 | + a.rate, | ||
| 71 | + a.cycle_id, | ||
| 72 | + c.plan_num, | ||
| 73 | + c.finish_percent, | ||
| 74 | + c.finish_state, | ||
| 75 | + c.begin_time, | ||
| 76 | + c.end_time, | ||
| 77 | + c.sort_num | ||
| 78 | + FROM | ||
| 79 | + garden_maintain_plan a, | ||
| 80 | + garden_maintain_plan_detail c | ||
| 81 | + WHERE a.batch_no=c.batch_no | ||
| 82 | + AND a.deleted=0 | ||
| 83 | + AND c.plan_no = #{req.planNo} | ||
| 84 | + AND a.plan_type_id = #{req.planTypeId} | ||
| 85 | + <!--状态 1:未完成;2:已完成;3:已失效--> | ||
| 86 | + and c.finish_state = #{req.finishState} | ||
| 87 | + <![CDATA[and c.end_time >= #{req.localDate}]]> | ||
| 88 | + </select> | ||
| 68 | </mapper> | 89 | </mapper> |
| 69 | \ No newline at end of file | 90 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanMapper.xml
| @@ -20,25 +20,20 @@ | @@ -20,25 +20,20 @@ | ||
| 20 | a.road_name, | 20 | a.road_name, |
| 21 | a.level_id, | 21 | a.level_id, |
| 22 | a.finish_state, | 22 | a.finish_state, |
| 23 | - max(a.plan_num) as plan_num, | ||
| 24 | - max(a.plan_finish_num) as plan_finish_num, | 23 | + a.plan_num, |
| 24 | + a.plan_finish_num, | ||
| 25 | a.begin_time, | 25 | a.begin_time, |
| 26 | a.end_time | 26 | a.end_time |
| 27 | FROM | 27 | FROM |
| 28 | - garden_maintain_plan a, | ||
| 29 | - garden_maintain_plan_role b | ||
| 30 | - WHERE | ||
| 31 | - a.batch_no = b.batch_no | ||
| 32 | - AND a.dept_id =b.dept_id | ||
| 33 | - AND a.deleted=0 | ||
| 34 | - AND a.company_id = #{req.companyId} | 28 | + garden_maintain_plan a |
| 29 | + WHERE a.deleted=0 | ||
| 35 | <if test="req.roadName != null and req.roadName !=''"> | 30 | <if test="req.roadName != null and req.roadName !=''"> |
| 36 | AND a.road_name LIKE CONCAT('%',#{req.roadName},'%') | 31 | AND a.road_name LIKE CONCAT('%',#{req.roadName},'%') |
| 37 | </if> | 32 | </if> |
| 38 | - <if test="req.roleIds != null and req.roleIds.size() > 0"> | ||
| 39 | - AND b.role_id IN | ||
| 40 | - <foreach collection="req.roleIds" item="roleId" open="(" separator="," close=")"> | ||
| 41 | - #{roleId} | 33 | + <if test="req.batchNos != null and req.batchNos.size() > 0"> |
| 34 | + AND a.batch_no IN | ||
| 35 | + <foreach collection="req.batchNos" item="batchNo" open="(" separator="," close=")"> | ||
| 36 | + #{batchNo} | ||
| 42 | </foreach> | 37 | </foreach> |
| 43 | </if> | 38 | </if> |
| 44 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> | 39 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> |
| @@ -58,14 +53,6 @@ | @@ -58,14 +53,6 @@ | ||
| 58 | and a.finish_state = #{req.finishState} | 53 | and a.finish_state = #{req.finishState} |
| 59 | <![CDATA[and a.end_time >= #{req.localDate}]]> | 54 | <![CDATA[and a.end_time >= #{req.localDate}]]> |
| 60 | </if> | 55 | </if> |
| 61 | - GROUP BY | ||
| 62 | - a.batch_no, | ||
| 63 | - a.road_id, | ||
| 64 | - a.road_name, | ||
| 65 | - a.level_id, | ||
| 66 | - a.finish_state, | ||
| 67 | - a.begin_time, | ||
| 68 | - a.end_time | ||
| 69 | </select> | 56 | </select> |
| 70 | 57 | ||
| 71 | <select id="appMaintainPlanPlanTypePage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanPagePlanTypeRespVO"> | 58 | <select id="appMaintainPlanPlanTypePage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanPagePlanTypeRespVO"> |
| @@ -83,22 +70,19 @@ | @@ -83,22 +70,19 @@ | ||
| 83 | c.end_time | 70 | c.end_time |
| 84 | FROM | 71 | FROM |
| 85 | garden_maintain_plan a, | 72 | garden_maintain_plan a, |
| 86 | - garden_maintain_plan_role b, | ||
| 87 | garden_maintain_plan_detail c | 73 | garden_maintain_plan_detail c |
| 88 | WHERE | 74 | WHERE |
| 89 | - a.batch_no = b.batch_no | ||
| 90 | - and a.batch_no=b.batch_no | ||
| 91 | - AND a.dept_id =b.dept_id | 75 | + a.batch_no = c.batch_no |
| 76 | + AND a.deleted=b.deleted | ||
| 92 | AND a.deleted=0 | 77 | AND a.deleted=0 |
| 93 | - AND a.company_id = #{req.companyId} | ||
| 94 | AND a.plan_type_id = #{req.planTypeId} | 78 | AND a.plan_type_id = #{req.planTypeId} |
| 95 | <if test="req.planName != null and req.planName !=''"> | 79 | <if test="req.planName != null and req.planName !=''"> |
| 96 | AND a.plan_type_id LIKE CONCAT('%',#{req.planName},'%') | 80 | AND a.plan_type_id LIKE CONCAT('%',#{req.planName},'%') |
| 97 | </if> | 81 | </if> |
| 98 | - <if test="req.roleIds != null and req.roleIds.size() > 0"> | ||
| 99 | - AND b.role_id IN | ||
| 100 | - <foreach collection="req.roleIds" item="roleId" open="(" separator="," close=")"> | ||
| 101 | - #{roleId} | 82 | + <if test="req.batchNos != null and req.batchNos.size() > 0"> |
| 83 | + AND a.batch_no IN | ||
| 84 | + <foreach collection="req.batchNos" item="batchNo" open="(" separator="," close=")"> | ||
| 85 | + #{batchNo} | ||
| 102 | </foreach> | 86 | </foreach> |
| 103 | </if> | 87 | </if> |
| 104 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> | 88 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> |