Commit c71774d157438af53fc679d14fded885c728cddf
1 parent
b7151b25
优化
Showing
12 changed files
with
32 additions
and
43 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanDetailReqVO.java
| ... | ... | @@ -20,10 +20,10 @@ public class AppInspectionPlanDetailReqVO { |
| 20 | 20 | @NotBlank(message = "批次号不能为空") |
| 21 | 21 | private String batchNo; |
| 22 | 22 | |
| 23 | - @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") | |
| 23 | + @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效;4:已终止") | |
| 24 | 24 | @NotNull(message = "完成状态不能为空") |
| 25 | 25 | @Min(value = 1, message = "状态最小为1") |
| 26 | - @Max(value = 3, message = "状态不能大于4") | |
| 26 | + @Max(value = 4, message = "状态不能大于4") | |
| 27 | 27 | private Integer finishState; |
| 28 | 28 | |
| 29 | 29 | @Schema(description = "公司ID") |
| ... | ... | @@ -34,8 +34,9 @@ public class AppInspectionPlanDetailReqVO { |
| 34 | 34 | @Hidden |
| 35 | 35 | private List<String> busiLineList; |
| 36 | 36 | |
| 37 | - @Schema(description = "系统时间") | |
| 37 | + @Schema(description = "部门") | |
| 38 | 38 | @Hidden |
| 39 | - private LocalDateTime localDateTime; | |
| 39 | + private Long deptId; | |
| 40 | + | |
| 40 | 41 | } |
| 41 | 42 | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/inspectionplan/vo/AppInspectionPlanPageReqVO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailListByRoadPageReqVO.java
| ... | ... | @@ -23,24 +23,18 @@ public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { |
| 23 | 23 | @NotNull |
| 24 | 24 | private Long roadId; |
| 25 | 25 | |
| 26 | - @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") | |
| 26 | + @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效;4:终止") | |
| 27 | 27 | @NotNull(message = "完成状态不能为空") |
| 28 | 28 | @Min(value = 1, message = "状态最小为1") |
| 29 | - @Max(value = 3, message = "状态不能大于4") | |
| 29 | + @Max(value = 4, message = "状态不能大于4") | |
| 30 | 30 | private Integer finishState; |
| 31 | 31 | |
| 32 | 32 | @Schema(description = "计划名称") |
| 33 | 33 | private String planName; |
| 34 | 34 | |
| 35 | -// @Schema(description = "计划批次号列表") | |
| 36 | -// @Hidden | |
| 37 | -// private Set<String> batchNos; | |
| 38 | 35 | |
| 39 | 36 | @Schema(description = "业务线") |
| 40 | 37 | @Hidden |
| 41 | 38 | private List<String> busiLineList; |
| 42 | 39 | |
| 43 | - @Schema(description = "系统时间") | |
| 44 | - @Hidden | |
| 45 | - private LocalDateTime localDateTime; | |
| 46 | 40 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPagePlanTypeReqVO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPageRoadReqVO.java
| ... | ... | @@ -37,4 +37,11 @@ public class AppMaintainPlanPageRoadReqVO extends PageParam { |
| 37 | 37 | @Schema(description = "业务线") |
| 38 | 38 | @Hidden |
| 39 | 39 | private List<String> busiLineList; |
| 40 | + | |
| 41 | + @Schema(description = "部门id") | |
| 42 | + @Hidden | |
| 43 | + private Long deptId; | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 40 | 47 | } |
| 41 | 48 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanDetailServiceImpl.java
| ... | ... | @@ -100,7 +100,7 @@ public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailServ |
| 100 | 100 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 101 | 101 | } |
| 102 | 102 | pageReqVO.setCompanyId(companyId); |
| 103 | - pageReqVO.setLocalDateTime(LocalDateTime.now()); | |
| 103 | + pageReqVO.setDeptId(SecurityFrameworkUtils.getDeptId()); | |
| 104 | 104 | |
| 105 | 105 | /*2.明细*/ |
| 106 | 106 | return inspectionPlanDetailMapper.getInspectionPlanDetailForApp(pageReqVO); | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanServiceImpl.java
| ... | ... | @@ -368,7 +368,7 @@ public class InspectionPlanServiceImpl implements InspectionPlanService { |
| 368 | 368 | if (CollectionUtils.isEmpty(roleIds)) { |
| 369 | 369 | return new PageResult<>(null, 0L); |
| 370 | 370 | } |
| 371 | - | |
| 371 | + pageReqVO.setDeptId(SecurityFrameworkUtils.getDeptId()); | |
| 372 | 372 | pageReqVO.setRoleIds(new HashSet<>(roleIds)); |
| 373 | 373 | /*2.分页*/ |
| 374 | 374 | IPage<AppInspectionPlanRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
| ... | ... | @@ -377,13 +377,13 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { |
| 377 | 377 | pageReqVO.setBusiLineList(Arrays.asList(busiLine.split(","))); |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | - /*1.查询登录用户计划编码列表*/ | |
| 381 | 380 | /*1.查询登录用户角色*/ |
| 382 | 381 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 383 | 382 | if (CollectionUtils.isEmpty(roleIds)) { |
| 384 | 383 | new PageResult<>(null, 0L); |
| 385 | 384 | } |
| 386 | 385 | pageReqVO.setRoleIds(new HashSet<>(roleIds)); |
| 386 | + pageReqVO.setDeptId(SecurityFrameworkUtils.getDeptId()); | |
| 387 | 387 | /*2.分页*/ |
| 388 | 388 | IPage<AppMaintainPlanPageRoadRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| 389 | 389 | IPage<AppMaintainPlanPageRoadRespVO> page = maintainPlanMapper.appMaintainPlanRoadPage(mpPage, pageReqVO); |
| ... | ... | @@ -402,7 +402,7 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { |
| 402 | 402 | if (CollectionUtils.isEmpty(roleIds)) { |
| 403 | 403 | return new PageResult<>(null, 0L); |
| 404 | 404 | } |
| 405 | - | |
| 405 | + pageReqVO.setDeptId(SecurityFrameworkUtils.getDeptId()); | |
| 406 | 406 | pageReqVO.setRoleIds(new HashSet<>(roleIds)); |
| 407 | 407 | /*2.分页*/ |
| 408 | 408 | IPage<AppMaintainPlanPagePlanTypeRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | ... | ... |
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanDetailMapper.xml
| ... | ... | @@ -38,6 +38,7 @@ |
| 38 | 38 | AND a.deleted = 0 |
| 39 | 39 | AND a.batch_no = #{req.batchNo} |
| 40 | 40 | AND a.company_id = #{req.companyId} |
| 41 | + AND a.dept_id = #{req.deptId} | |
| 41 | 42 | <if test="req.busiLineList != null and req.busiLineList.size() > 0"> |
| 42 | 43 | AND a.busi_line IN |
| 43 | 44 | <foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")"> |
| ... | ... | @@ -45,19 +46,7 @@ |
| 45 | 46 | </foreach> |
| 46 | 47 | </if> |
| 47 | 48 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 48 | - <if test="req.finishState == 3"> | |
| 49 | - and b.finish_state = #{req.finishState} | |
| 50 | - <![CDATA[and b.end_time < #{req.localDateTime}]]> | |
| 51 | - </if> | |
| 52 | - <if test="req.finishState == 2"> | |
| 53 | - and b.finish_state = #{req.finishState} | |
| 54 | - </if> | |
| 55 | - <if test="req.finishState == 1"> | |
| 56 | - and b.finish_state = #{req.finishState} | |
| 57 | - <![CDATA[ and b.begin_time <= #{req.localDateTime} | |
| 58 | - and b.end_time >= #{req.localDateTime}]]> | |
| 59 | - </if> | |
| 60 | - | |
| 49 | + and b.finish_state = #{req.finishState} | |
| 61 | 50 | </select> |
| 62 | 51 | |
| 63 | 52 | ... | ... |
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanMapper.xml
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| ... | ... | @@ -46,19 +46,7 @@ |
| 46 | 46 | AND a.batch_no= #{req.batchNo} |
| 47 | 47 | </if> |
| 48 | 48 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 49 | - <if test="req.finishState == 3"> | |
| 50 | - and a.finish_state = #{req.finishState} | |
| 51 | - <![CDATA[and c.end_time < #{req.localDateTime}]]> | |
| 52 | - </if> | |
| 53 | - <if test="req.finishState == 2"> | |
| 54 | - and c.finish_state = #{req.finishState} | |
| 55 | - </if> | |
| 56 | - <if test="req.finishState == 1"> | |
| 57 | - and c.finish_state = #{req.finishState} | |
| 58 | - <![CDATA[and c.end_time >= #{req.localDateTime}]]> | |
| 59 | - <![CDATA[and c.begin_time <= #{req.localDateTime}]]> | |
| 60 | - | |
| 61 | - </if> | |
| 49 | + and a.finish_state = #{req.finishState} | |
| 62 | 50 | </select> |
| 63 | 51 | |
| 64 | 52 | <select id="getMaintainNotFinishPlanCommitDetail" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO"> |
| ... | ... | @@ -84,6 +72,5 @@ |
| 84 | 72 | AND a.plan_type_id = #{req.planTypeId} |
| 85 | 73 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 86 | 74 | and c.finish_state = #{req.finishState} |
| 87 | - <![CDATA[and c.end_time >= #{req.localDateTime}]]> | |
| 88 | 75 | </select> |
| 89 | 76 | </mapper> | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanMapper.xml
| ... | ... | @@ -33,6 +33,7 @@ |
| 33 | 33 | AND a.dept_id = c.dept_id |
| 34 | 34 | AND a.deleted = b.deleted |
| 35 | 35 | AND a.deleted = 0 |
| 36 | + AND a.dept_id = #{req.deptId} | |
| 36 | 37 | <if test="req.roadName != null and req.roadName !=''"> |
| 37 | 38 | AND a.road_name LIKE CONCAT('%',#{req.roadName},'%') |
| 38 | 39 | </if> |
| ... | ... | @@ -75,6 +76,7 @@ |
| 75 | 76 | AND a.dept_id = d.dept_id |
| 76 | 77 | AND a.deleted=c.deleted |
| 77 | 78 | AND a.deleted=0 |
| 79 | + AND a.dept_id = #{req.deptId} | |
| 78 | 80 | AND a.plan_type_id = #{req.planTypeId} |
| 79 | 81 | <if test="req.planName != null and req.planName !=''"> |
| 80 | 82 | AND a.plan_type_id LIKE CONCAT('%',#{req.planName},'%') | ... | ... |