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())
);
if(bean !=null) {
throw new ServiceException("设备编号已存在,请检查后重新输入");
throw new ServiceException("设备名称已存在,请检查后重新输入");
}
bean = kitchenDeviceInfoMapper.selectOne(
Wrappers.<KitchenDeviceInfo>lambdaQuery()

View File

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