diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java index 5c7e1d6..80db3af 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java @@ -78,6 +78,11 @@ public class GenerateServiceImpl extends BaseServiceImpl(){{ eq(GenerateEntity::getStationCode, entity.getStationCode()); eq(GenerateEntity::getFillDate,entity.getFillDate()); + eq(GenerateEntity::getIsDeleted,0); + if (ObjectUtil.isNotEmpty(entity.getId())){ + eq(GenerateEntity::getFillDate,entity.getFillDate()); + } + last("limit 1"); }}); if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){ throw new ServiceException("日期已经存在填报数据!");