Browse Source

发电量填报删除接口

zhongwei
tyty 1 year ago
parent
commit
ee8bb5a4de
  1. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java

@ -78,6 +78,11 @@ public class GenerateServiceImpl extends BaseServiceImpl<GenerateMapper, Generat
GenerateEntity history = this.getOne(new LambdaQueryWrapper<GenerateEntity>(){{ GenerateEntity history = this.getOne(new LambdaQueryWrapper<GenerateEntity>(){{
eq(GenerateEntity::getStationCode, entity.getStationCode()); eq(GenerateEntity::getStationCode, entity.getStationCode());
eq(GenerateEntity::getFillDate,entity.getFillDate()); 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()))){ if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){
throw new ServiceException("日期已经存在填报数据!"); throw new ServiceException("日期已经存在填报数据!");

Loading…
Cancel
Save