From 97c2a3595f9e41307e577db9e4cd735c299f6101 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 19 Oct 2023 21:24:06 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=9B=86=E4=B8=AD=E7=9B=91=E6=8E=A7=E6=B6=88?= =?UTF-8?q?=E6=81=AFbug=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/census/vo/AccessAssociationVo.java | 16 +++++++++ .../census/vo/MaintenanceAssociationVo.java | 22 +++++++++++++ .../census/vo/MaintenancePhenomenonVo.java | 25 ++++++++++++++ .../census/controller/TargetController.java | 14 ++++---- .../operational/census/service/TargetService.java | 6 ++-- .../census/service/impl/TargetServiceImpl.java | 38 ++++++++++++++++++---- 6 files changed, 104 insertions(+), 17 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AccessAssociationVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenanceAssociationVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AccessAssociationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AccessAssociationVo.java new file mode 100644 index 0000000..26ee184 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AccessAssociationVo.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author ysj + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class AccessAssociationVo extends BusinessQueryVo { + + @ApiModelProperty("任务名称") + private String name; +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenanceAssociationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenanceAssociationVo.java new file mode 100644 index 0000000..127e4e5 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenanceAssociationVo.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author ysj + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class MaintenanceAssociationVo extends BusinessQueryVo { + + @ApiModelProperty("项目名称") + private String title; + + @ApiModelProperty("内容") + private String content; + + @ApiModelProperty("任务类型") + private String taskType; +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java new file mode 100644 index 0000000..ef0cdf5 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author ysj + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class MaintenancePhenomenonVo extends BusinessQueryVo { + + @ApiModelProperty("缺陷名称") + private String name; + + @ApiModelProperty("是否为缺陷") + private Integer isDefect; + + @ApiModelProperty("发现开始时间") + private String findStartTime; + + @ApiModelProperty("发现结束时间") + private String findEndTime; +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java index 387f162..e35dc15 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java @@ -184,23 +184,23 @@ public class TargetController { } @ApiOperation("日常维护-数据关联") - @PostMapping("/maintenance") + @GetMapping("/maintenance") @ApiOperationSupport(order = 15) - public R> maintenance(BusinessQueryVo business,Query query) { + public R> maintenance(MaintenanceAssociationVo business,Query query) { return R.data(service.maintenance(Condition.getPage(query),business)); } @ApiOperation("缺陷-数据关联") - @PostMapping("/phenomenon") - @ApiOperationSupport(order = 17) - public R> phenomenon(BusinessQueryVo business, Query query) { + @GetMapping("/phenomenon") + @ApiOperationSupport(order = 16) + public R> phenomenon(MaintenancePhenomenonVo business, Query query) { return R.data(service.phenomenon(Condition.getPage(query),business)); } @ApiOperation("检修任务-数据关联") - @PostMapping("/access") + @GetMapping("/access") @ApiOperationSupport(order = 17) - public R> access(BusinessQueryVo business,Query query) { + public R> access(AccessAssociationVo business,Query query) { return R.data(service.access(Condition.getPage(query),business)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java index 7db6c60..ffe50ba 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java @@ -66,9 +66,9 @@ public interface TargetService { // 集团工作牌/操作票 IPage dutyGroup(IPage page,String areaName, Long type); - IPage maintenance(IPage page, BusinessQueryVo business); + IPage maintenance(IPage page, MaintenanceAssociationVo business); - IPage phenomenon(IPage page, BusinessQueryVo business); + IPage phenomenon(IPage page, MaintenancePhenomenonVo business); - IPage access(IPage page, BusinessQueryVo business); + IPage access(IPage page, AccessAssociationVo business); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java index d79a891..f4358c9 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java @@ -21,7 +21,6 @@ import com.hnac.hzims.operational.census.vo.WaterTargetVo; import com.hnac.hzims.operational.census.vo.*; import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity; import com.hnac.hzims.operational.defect.service.IOperPhenomenonService; -import com.hnac.hzims.operational.defect.service.impl.OperPhenomenonServiceImpl; import com.hnac.hzims.operational.defect.vo.OperPhenomenonVO; import com.hnac.hzims.operational.defect.wrapper.OperPhenomenonWrapper; import com.hnac.hzims.operational.fill.entity.*; @@ -1105,9 +1104,18 @@ public class TargetServiceImpl implements TargetService { * @return */ @Override - public IPage maintenance(IPage page, BusinessQueryVo business) { + public IPage maintenance(IPage page, MaintenanceAssociationVo business) { Wrapper queryWrapper = new LambdaQueryWrapper() {{ orderByDesc(OperMaintenanceTaskEntity::getDisposeTime); + if (!StringUtil.isEmpty(business.getTitle())) { + like(OperMaintenanceTaskEntity::getTitle, business.getTitle()); + } + if (!StringUtil.isEmpty(business.getTaskType())) { + eq(OperMaintenanceTaskEntity::getTaskType, business.getTaskType()); + } + if (!StringUtil.isEmpty(business.getContent())) { + like(OperMaintenanceTaskEntity::getContent, business.getContent()); + } if (!StringUtil.isEmpty(business.getStartTime())) { ge(OperMaintenanceTaskEntity::getDisposeTime,business.getStartTime()); } @@ -1118,7 +1126,7 @@ public class TargetServiceImpl implements TargetService { eq(OperMaintenanceTaskEntity::getFlowTaskName,"结束"); } if(!StringUtil.isEmpty(business.getDeptIds())){ - in(OperMaintenanceTaskEntity::getCreateDept, Func.toLongList(business.getDeptIds(),",")); + in(OperMaintenanceTaskEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); } }}; IPage pages = maintenanceTaskService.page(page,queryWrapper); @@ -1133,9 +1141,22 @@ public class TargetServiceImpl implements TargetService { * @return */ @Override - public IPage phenomenon(IPage page, BusinessQueryVo business) { + public IPage phenomenon(IPage page, MaintenancePhenomenonVo business) { Wrapper queryWrapper = new LambdaQueryWrapper() {{ orderByDesc(OperPhenomenonEntity::getCreateTime); + if (!StringUtil.isEmpty(business.getName())) { + like(OperPhenomenonEntity::getName,business.getName()); + } + if (!ObjectUtil.isEmpty(business.getIsDefect())) { + eq(OperPhenomenonEntity::getIsDefect,business.getIsDefect()); + } + + if (!StringUtil.isEmpty(business.getFindStartTime())) { + ge(OperPhenomenonEntity::getFindTime,business.getFindStartTime()); + } + if (!StringUtil.isEmpty(business.getFindEndTime())) { + le(OperPhenomenonEntity::getFindTime,business.getFindEndTime()); + } if (!StringUtil.isEmpty(business.getStartTime())) { ge(OperPhenomenonEntity::getCreateTime,business.getStartTime()); } @@ -1146,7 +1167,7 @@ public class TargetServiceImpl implements TargetService { isNotNull(OperPhenomenonEntity::getHandleTaskId); } if(!StringUtil.isEmpty(business.getDeptIds())){ - in(OperPhenomenonEntity::getCreateDept, Func.toLongList(business.getDeptIds(),",")); + in(OperPhenomenonEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); } }}; IPage pages = phenomenonService.page(page, queryWrapper); @@ -1161,9 +1182,12 @@ public class TargetServiceImpl implements TargetService { * @return */ @Override - public IPage access(IPage page, BusinessQueryVo business) { + public IPage access(IPage page, AccessAssociationVo business) { Wrapper queryWrapper = new LambdaQueryWrapper() {{ orderByDesc(OperAccessTaskEntity::getPlanStartTime); + if (!StringUtil.isEmpty(business.getName())) { + like(OperAccessTaskEntity::getName,business.getName()); + } if (!StringUtil.isEmpty(business.getStartTime())) { ge(OperAccessTaskEntity::getPlanStartTime,business.getStartTime()); } @@ -1174,7 +1198,7 @@ public class TargetServiceImpl implements TargetService { eq(OperAccessTaskEntity::getStatus,4); } if(!StringUtil.isEmpty(business.getDeptIds())){ - in(OperAccessTaskEntity::getCreateDept, Func.toLongList(business.getDeptIds(),",")); + in(OperAccessTaskEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); } }}; IPage pages = accessTaskService.page(page, queryWrapper);