Commit 9e5481a8804b661ec3f31456f00a31ca955e5288
1 parent
c12cb982
修复sq当前时间格式
Showing
9 changed files
with
22 additions
and
14 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainNotFinishPlanDetailReqVO.java
| ... | ... | @@ -6,6 +6,8 @@ import jakarta.validation.constraints.NotEmpty; |
| 6 | 6 | import jakarta.validation.constraints.NotNull; |
| 7 | 7 | import lombok.Data; |
| 8 | 8 | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 9 | 11 | @Schema(description = "管理后台 - 未完成养护计划明细 Request VO") |
| 10 | 12 | @Data |
| 11 | 13 | public class AppMaintainNotFinishPlanDetailReqVO { |
| ... | ... | @@ -21,4 +23,8 @@ public class AppMaintainNotFinishPlanDetailReqVO { |
| 21 | 23 | @Schema(description = "完成状态 1:未完成;2:已完成;3:已失效") |
| 22 | 24 | @Hidden |
| 23 | 25 | private Integer finishState; |
| 26 | + | |
| 27 | + @Schema(description = "系统时间") | |
| 28 | + @Hidden | |
| 29 | + private LocalDateTime localDateTime; | |
| 24 | 30 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailListByRoadPageReqVO.java
| ... | ... | @@ -8,7 +8,7 @@ import jakarta.validation.constraints.Min; |
| 8 | 8 | import jakarta.validation.constraints.NotNull; |
| 9 | 9 | import lombok.Data; |
| 10 | 10 | |
| 11 | -import java.time.LocalDate; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | 12 | import java.util.List; |
| 13 | 13 | import java.util.Set; |
| 14 | 14 | |
| ... | ... | @@ -40,5 +40,5 @@ public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { |
| 40 | 40 | |
| 41 | 41 | @Schema(description = "系统时间") |
| 42 | 42 | @Hidden |
| 43 | - private LocalDate localDate; | |
| 43 | + private LocalDateTime localDateTime; | |
| 44 | 44 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanPagePlanTypeReqVO.java
| ... | ... | @@ -8,7 +8,7 @@ import jakarta.validation.constraints.Min; |
| 8 | 8 | import jakarta.validation.constraints.NotNull; |
| 9 | 9 | import lombok.Data; |
| 10 | 10 | |
| 11 | -import java.time.LocalDate; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | 12 | import java.util.List; |
| 13 | 13 | import java.util.Set; |
| 14 | 14 | |
| ... | ... | @@ -40,6 +40,6 @@ public class AppMaintainPlanPagePlanTypeReqVO extends PageParam { |
| 40 | 40 | |
| 41 | 41 | @Schema(description = "系统时间") |
| 42 | 42 | @Hidden |
| 43 | - private LocalDate localDate; | |
| 43 | + private LocalDateTime localDateTime; | |
| 44 | 44 | |
| 45 | 45 | } |
| 46 | 46 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanDetailMapper.java
| ... | ... | @@ -58,6 +58,6 @@ public interface MaintainPlanDetailMapper extends BaseMapperX<MaintainPlanDetail |
| 58 | 58 | * @param reqVO 入参数 |
| 59 | 59 | * @return 列表 |
| 60 | 60 | */ |
| 61 | - List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(AppMaintainNotFinishPlanDetailReqVO reqVO); | |
| 61 | + List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(@Param("req") AppMaintainNotFinishPlanDetailReqVO reqVO); | |
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| ... | ... | @@ -23,7 +23,7 @@ import org.springframework.stereotype.Service; |
| 23 | 23 | import org.springframework.util.CollectionUtils; |
| 24 | 24 | import org.springframework.validation.annotation.Validated; |
| 25 | 25 | |
| 26 | -import java.time.LocalDate; | |
| 26 | +import java.time.LocalDateTime; | |
| 27 | 27 | import java.util.Arrays; |
| 28 | 28 | import java.util.Collections; |
| 29 | 29 | import java.util.List; |
| ... | ... | @@ -108,7 +108,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService |
| 108 | 108 | |
| 109 | 109 | /*1.查询登录用户角色*/ |
| 110 | 110 | Set<String> batchNos = this.getBatchNosByLoginUserId(); |
| 111 | - pageReqVO.setLocalDate(LocalDate.now()); | |
| 111 | + pageReqVO.setLocalDateTime(LocalDateTime.now()); | |
| 112 | 112 | pageReqVO.setBatchNos(batchNos); |
| 113 | 113 | /*2.分页*/ |
| 114 | 114 | IPage<AppMaintainPlanDetailRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| ... | ... | @@ -121,6 +121,7 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService |
| 121 | 121 | public List<AppMaintainNotFinishPlanDetailRespVO> getMaintainNotFinishPlanCommitDetail(AppMaintainNotFinishPlanDetailReqVO reqVO) { |
| 122 | 122 | //完成状态 1:未完成;2:已完成;3:已失效 |
| 123 | 123 | reqVO.setFinishState(1); |
| 124 | + reqVO.setLocalDateTime(LocalDateTime.now()); | |
| 124 | 125 | return maintainPlanDetailMapper.getMaintainNotFinishPlanCommitDetail(reqVO); |
| 125 | 126 | } |
| 126 | 127 | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
| ... | ... | @@ -395,7 +395,7 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { |
| 395 | 395 | return PageResult.empty(); |
| 396 | 396 | } |
| 397 | 397 | pageReqVO.setBatchNos(batchNos); |
| 398 | - pageReqVO.setLocalDate(LocalDate.now()); | |
| 398 | + pageReqVO.setLocalDateTime(LocalDateTime.now()); | |
| 399 | 399 | /*2.分页*/ |
| 400 | 400 | IPage<AppMaintainPlanPagePlanTypeRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| 401 | 401 | IPage<AppMaintainPlanPagePlanTypeRespVO> page = maintainPlanMapper.appMaintainPlanPlanTypePage(mpPage, pageReqVO); | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | </if> |
| 58 | 58 | <if test="req.finishState == 1"> |
| 59 | 59 | and c.finish_state = #{req.finishState} |
| 60 | - <![CDATA[and c.end_time >= #{req.localDate}]]> | |
| 60 | + <![CDATA[and c.end_time >= #{req.localDateTime}]]> | |
| 61 | 61 | </if> |
| 62 | 62 | </select> |
| 63 | 63 | |
| ... | ... | @@ -84,6 +84,6 @@ |
| 84 | 84 | AND a.plan_type_id = #{req.planTypeId} |
| 85 | 85 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 86 | 86 | and c.finish_state = #{req.finishState} |
| 87 | - <![CDATA[and c.end_time >= #{req.localDate}]]> | |
| 87 | + <![CDATA[and c.end_time >= #{req.localDateTime}]]> | |
| 88 | 88 | </select> |
| 89 | 89 | </mapper> |
| 90 | 90 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanMapper.xml
| ... | ... | @@ -73,7 +73,7 @@ |
| 73 | 73 | garden_maintain_plan_detail c |
| 74 | 74 | WHERE |
| 75 | 75 | a.batch_no = c.batch_no |
| 76 | - AND a.deleted=b.deleted | |
| 76 | + AND a.deleted=c.deleted | |
| 77 | 77 | AND a.deleted=0 |
| 78 | 78 | AND a.plan_type_id = #{req.planTypeId} |
| 79 | 79 | <if test="req.planName != null and req.planName !=''"> |
| ... | ... | @@ -93,14 +93,14 @@ |
| 93 | 93 | </if> |
| 94 | 94 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 95 | 95 | <if test="req.finishState == 3"> |
| 96 | - <![CDATA[and c.end_time < #{req.localDate}]]> | |
| 96 | + <![CDATA[and c.end_time < #{req.localDateTime}]]> | |
| 97 | 97 | </if> |
| 98 | 98 | <if test="req.finishState == 2"> |
| 99 | 99 | and c.finish_state = #{req.finishState} |
| 100 | 100 | </if> |
| 101 | 101 | <if test="req.finishState == 1"> |
| 102 | 102 | and c.finish_state = #{req.finishState} |
| 103 | - <![CDATA[and c.end_time >= #{req.localDate}]]> | |
| 103 | + <![CDATA[and c.end_time >= #{req.localDateTime}]]> | |
| 104 | 104 | </if> |
| 105 | 105 | </select> |
| 106 | 106 | ... | ... |