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] =?UTF-8?q?=E4=BA=A4=E6=8E=A5=E7=8F=AD=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=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); // 更新交班值班