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