Merge remote-tracking branch 'origin/master'

This commit is contained in:
sxu 2025-07-07 12:56:25 +08:00
commit e32d43897f
2 changed files with 16 additions and 11 deletions

View File

@ -104,7 +104,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
.eq(KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName()) .eq(KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
); );
if(bean !=null) { if(bean !=null) {
throw new ServiceException("设备编号已存在,请检查后重新输入"); throw new ServiceException("设备名称已存在,请检查后重新输入");
} }
bean = kitchenDeviceInfoMapper.selectOne( bean = kitchenDeviceInfoMapper.selectOne(
Wrappers.<KitchenDeviceInfo>lambdaQuery() Wrappers.<KitchenDeviceInfo>lambdaQuery()

View File

@ -111,18 +111,23 @@ public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
//过期状态 //过期状态
int expireCount = 0; int expireCount = 0;
for(KitchenStaffInfo kitchenStaffInfo : selectKitchenStaffInfoList){ for(KitchenStaffInfo kitchenStaffInfo : selectKitchenStaffInfoList){
LocalDate healthCertExpire = kitchenStaffInfo.getHealthCertExpire(); try {
System.err.println("111: " + ChronoUnit.DAYS.between(healthCertExpire,LocalDate.now())); LocalDate healthCertExpire = kitchenStaffInfo.getHealthCertExpire();
System.err.println("222: " + ChronoUnit.DAYS.between(LocalDate.now(),healthCertExpire)); if(healthCertExpire == null){
if(healthCertExpire == null){ lackCount ++;
}else if(ChronoUnit.DAYS.between(LocalDate.now(), healthCertExpire)<inemValue && ChronoUnit.DAYS.between(LocalDate.now(), healthCertExpire)>=0){
adventCount ++;
}else if (ChronoUnit.DAYS.between(LocalDate.now(),healthCertExpire)<0){
expireCount ++;
}else{
normalCount ++;
}
}catch (Exception e){
lackCount ++; lackCount ++;
}else if(ChronoUnit.DAYS.between(LocalDate.now(), healthCertExpire)<inemValue && ChronoUnit.DAYS.between(LocalDate.now(), healthCertExpire)>0){ // e.printStackTrace(); // 定位实际抛出 NPE 的代码行
adventCount ++; // throw new ServiceException("健康证到期时间格式错误");
}else if (ChronoUnit.DAYS.between(LocalDate.now(),healthCertExpire)<0){
expireCount ++;
}else{
normalCount ++;
} }
} }
IndexMapCountVO normal = new IndexMapCountVO(); IndexMapCountVO normal = new IndexMapCountVO();
IndexMapCountVO lack = new IndexMapCountVO(); IndexMapCountVO lack = new IndexMapCountVO();