From 9129a1bd10ae3bdc4cfc6c06d3841294a8be12e3 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Sun, 4 Feb 2024 14:12:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java | 9 ++++++--- .../operational/access/controller/ConstructionController.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java index 06ca26c..a00ca41 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java @@ -6,14 +6,18 @@ import com.hnac.hzims.alarm.config.entity.AlarmEntity; import com.hnac.hzims.alarm.monitor.service.AlarmSaveService; import com.hnac.hzims.alarm.show.service.AlarmService; import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo; +import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import java.util.List; +import java.util.stream.Collectors; /** * @author ysj @@ -38,13 +42,12 @@ public class AlarmSaveServiceImpl implements AlarmSaveService { */ @Override public Boolean save(List alarms) { - - /*// 步骤1.查询告警数据对应站点 + // 步骤1.查询告警数据对应站点 R> result = stationClient.querySatationByCodes(alarms.stream().map(AlarmEntity::getStationId).collect(Collectors.toList())); if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ log.error("alarm query station is null : {}",alarms.stream().map(AlarmEntity::getAlarmId).collect(Collectors.toList())); return false; - }*/ + } // 步骤2.遍历保存告警数据 alarms.forEach(alarm->{ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java index d8f3950..99bbf37 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java @@ -72,7 +72,7 @@ public class ConstructionController extends BladeController { public R> list(ConstructionVo construction, Query query) { return R.data(service.pageCondition(Condition.getPage(query), construction)); } - + @GetMapping("/preview") @ApiOperationSupport(order = 6) @ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") From 64c2ee199850230910f900ec0d4ab30913dbcc6d Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Sun, 4 Feb 2024 14:55:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E7=8F=AD=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/duty/service/impl/ImsDutyRecServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java index ff91a6a..c5b1caa 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java @@ -1420,17 +1420,18 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpllambdaQuery() - .eq(ImsDutyLogEntity::getDutyId, imsDutyLogEntity.getDutyId()) + .eq(ImsDutyLogEntity::getDutyId, headDutyMain.getId()) .last("limit 1")); - update.setCarryTime(DateUtil.format(new Date(), PATTERN_DATETIME)); - imsDutyLogService.updateById(update); + if(ObjectUtil.isNotEmpty(update)) { + update.setCarryTime(DateUtil.format(new Date(), PATTERN_DATETIME)); + imsDutyLogService.updateById(update); // imsDutyLogService.update(Wrappers.lambdaUpdate() // .set(ImsDutyLogEntity::getCarryTime, DateUtil.format(new Date(), PATTERN_DATETIME)) // .eq(ImsDutyLogEntity::getDutyId,imsDutyLogEntity.getDutyId()) // ); - log.info("更新值班日志"); + log.info("更新值班日志"); + } } ImsDutyRecEntity dutyRec = BeanUtil.copy(recDTO, ImsDutyRecEntity.class); // 更新交班值班