From deaf61a2a888f8885eab37555ed517ca689a6f04 Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 3 Sep 2024 22:58:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E5=85=A5=E5=BA=93=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SpWarehouseOutServiceImpl.java | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java index b34560f..1913632 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java @@ -16,6 +16,7 @@ import com.hnac.hzims.spare.service.*; import com.hnac.hzims.spare.vo.SpWarehouseOutVO; import com.hnac.hzims.spare.vo.WtSpBasicVO; import lombok.AllArgsConstructor; +import org.apache.commons.lang3.ObjectUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springblade.core.log.exception.ServiceException; @@ -258,16 +259,18 @@ public class SpWarehouseOutServiceImpl extends ServiceImpl basicVOList = new ArrayList<>(); for (int i = 0; i < basicList.size(); i++) { WtSpBasicEntity spBasicEntity = basicService.getById(basicList.get(i).getSpBasicId()); - WtSpBasicVO spBasicVO = new WtSpBasicVO(); - spBasicVO.setId(spBasicEntity.getId()); - spBasicVO.setCode(spBasicEntity.getCode()); - spBasicVO.setName(spBasicEntity.getName()); - spBasicVO.setSpecifications(spBasicEntity.getSpecifications()); - spBasicVO.setUnit(spBasicEntity.getUnit()); - spBasicVO.setPrice(spBasicEntity.getPrice()); - spBasicVO.setStock(basicList.get(i).getAmount().longValue()); - spBasicVO.setCreateTime(spBasicEntity.getCreateTime()); - basicVOList.add(spBasicVO); + if (ObjectUtils.isNotEmpty(spBasicEntity)) { + WtSpBasicVO spBasicVO = new WtSpBasicVO(); + spBasicVO.setId(spBasicEntity.getId()); + spBasicVO.setCode(spBasicEntity.getCode()); + spBasicVO.setName(spBasicEntity.getName()); + spBasicVO.setSpecifications(spBasicEntity.getSpecifications()); + spBasicVO.setUnit(spBasicEntity.getUnit()); + spBasicVO.setPrice(spBasicEntity.getPrice()); + spBasicVO.setStock(basicList.get(i).getAmount().longValue()); + spBasicVO.setCreateTime(spBasicEntity.getCreateTime()); + basicVOList.add(spBasicVO); + } } spWarehouseOutVO.setBasicVOList(basicVOList); return spWarehouseOutVO; From 91f752e40bfe0c7534ffc699af5a2a91f6f08249 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 3 Sep 2024 23:30:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?#=E5=9F=B9=E8=AE=AD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hnac/hzims/safeproduct/train/vo/TrainParamVo.java | 3 +++ .../hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/TrainParamVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/TrainParamVo.java index 0e2f95e..02ab22e 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/TrainParamVo.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/TrainParamVo.java @@ -20,4 +20,7 @@ public class TrainParamVo { @ApiModelProperty(value = "培训结束时间") private String endTime; + + @ApiModelProperty(value = "主讲人名称") + private String speakerName; } \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java index c32aa89..734eb35 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java @@ -32,7 +32,7 @@ public class TrainServiceImpl extends ServiceImpl impl LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); wrapper.orderByDesc(TrainEntity::getCreateTime); if(StringUtil.isNotBlank(params.getStationId())){ - wrapper.eq(TrainEntity::getStationId,params.getStartTime()); + wrapper.eq(TrainEntity::getStationId,params.getStationId()); } if(StringUtil.isNotBlank(params.getStartTime())){ wrapper.ge(TrainEntity::getTrainStartTime,params.getStartTime() + " 00:00:00"); @@ -40,6 +40,9 @@ public class TrainServiceImpl extends ServiceImpl impl if(StringUtil.isNotBlank(params.getEndTime())){ wrapper.le(TrainEntity::getTrainStartTime,params.getEndTime() + " 23:59:59"); } + if(StringUtil.isNotBlank(params.getSpeakerName())){ + wrapper.like(TrainEntity::getSpeakerName,params.getSpeakerName()); + } return super.page(page,wrapper); } From 2dacb0ac0bef27c1cdb7e9fbac40f9b559a8e6f8 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 4 Sep 2024 10:06:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?#=E5=B7=A1=E6=A3=80=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2mapper=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java | 4 ++-- .../src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java index 7191f38..826224b 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java @@ -41,8 +41,8 @@ public class TaskServiceImpl extends ServiceImpl impleme // 查询所有巡检任务 List tasks = this.list(new LambdaQueryWrapper() {{ ge(TaskEntity::getPlanStartTime, start) - .le(TaskEntity::getPlanStartTime, end) - .in(TaskEntity::getCreateDept, areas); + .le(TaskEntity::getPlanStartTime, end) + .in(TaskEntity::getCreateDept, areas); }}); if(CollectionUtil.isEmpty(tasks)){ return task; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml index 7ed3974..abc6520 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml @@ -16,7 +16,7 @@ and t.PLAN_START_TIME >= #{task.planStartTime} - and t.PLAN_START_TIME >= #{task.planStartTime} + and t.PLAN_START_TIME <= #{task.planStartTimeEnd} and t.PLAN_END_TIME <= #{task.planEndTime}