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); // 更新交班值班