From e2659d21f8dce068e610a242a2b776e7cc6d4dd6 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 28 Aug 2024 09:17:06 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=AE=89=E5=85=A8=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java | 6 ++++++ .../hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java | 4 ++-- .../service/operation/home/impl/RealTargetServiceImpl.java | 2 +- .../java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java | 3 ++- .../safeproduct/train/service/impl/RectificlationServiceImpl.java | 7 +++++++ .../hzims/safeproduct/train/service/impl/TrainServiceImpl.java | 8 ++++---- .../safeproduct/train/service/impl/ViolationServiceImpl.java | 5 +++-- 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java index e869841..8b7d772 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java @@ -24,4 +24,10 @@ public class RectificationParamVo { @ApiModelProperty(value = "责任人") private String personLiableName; + @ApiModelProperty(value = "限时开始时间") + private String startTime; + + @ApiModelProperty(value = "限时结束时间") + private String endTime; + } \ No newline at end of file diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java index 0693b23..85b96b4 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java @@ -317,8 +317,8 @@ public class HistoryDeviceServiceImpl implements IHistoryDeviceService { * @param param */ @Async - @Transactional - private void commonUserSave(HistoryDataParamVo param) { + @Transactional(rollbackFor = Exception.class) + protected void commonUserSave(HistoryDataParamVo param) { // 当前用户Id Long userId = AuthUtil.getUserId(); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java index 4a70760..640ea90 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java @@ -2002,7 +2002,7 @@ public class RealTargetServiceImpl implements RealTargetService { */ private List thirtyGenerations(List stations) { Calendar calendar = Calendar.getInstance(); - String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); + String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME); calendar.add(Calendar.DAY_OF_MONTH,-30); String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); return thirtyGenerateService.list(Wrappers.lambdaQuery() diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java index 3fbbffb..7f5cfc7 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.safeproduct.train.entity.TrainEntity; import com.hnac.hzims.safeproduct.train.vo.TrainParamVo; import com.hnac.hzims.safeproduct.train.vo.TrainSummaryVo; +import org.apache.ibatis.annotations.Param; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; @@ -13,5 +14,5 @@ import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; public interface TrainMapper extends UserDataScopeBaseMapper { - IPage summary(TrainParamVo params, IPage page); + IPage summary(@Param("params") TrainParamVo params, IPage page); } \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java index 1d576d2..d2dcbbc 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.safeproduct.train.entity.RectificationEntity; +import com.hnac.hzims.safeproduct.train.entity.ViolationEntity; import com.hnac.hzims.safeproduct.train.mapper.RectificationMapper; import com.hnac.hzims.safeproduct.train.service.IRectificlationService; import com.hnac.hzims.safeproduct.train.vo.RectificationParamVo; @@ -42,6 +43,12 @@ public class RectificlationServiceImpl extends ServiceImpl impl if(StringUtil.isNotBlank(params.getStationId())){ wrapper.eq(TrainEntity::getStationId,params.getStartTime()); } - if(StringUtil.isNotBlank(params.getStartTime())){ - wrapper.ge(TrainEntity::getTrainStartTime,params.getStartTime()); + if(StringUtil.isNotBlank(params.getStationId())){ + wrapper.ge(TrainEntity::getStationId,params.getStartTime() + " 00:00:00"); } - if(StringUtil.isNotBlank(params.getEndTime())){ - wrapper.le(TrainEntity::getTrainEndTime,params.getEndTime()); + if(StringUtil.isNotBlank(params.getStartTime())){ + wrapper.le(TrainEntity::getTrainStartTime,params.getEndTime() + " 23:59:59"); } return super.page(page,wrapper); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java index 733debf..975bb12 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java @@ -3,6 +3,7 @@ package com.hnac.hzims.safeproduct.train.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.train.entity.TrainEntity; import com.hnac.hzims.safeproduct.train.entity.ViolationEntity; import com.hnac.hzims.safeproduct.train.mapper.ViolationMapper; import com.hnac.hzims.safeproduct.train.service.IViolationService; @@ -33,10 +34,10 @@ public class ViolationServiceImpl extends ServiceImpl