fix 80609 未符合项 新增编辑判断时间赋值

This commit is contained in:
lijiarao
2024-01-25 17:57:14 +08:00
parent a750d0c3d4
commit bac4b1c37d
@@ -156,17 +156,21 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
}
lawsEvaluationNotMet.setStandardId(standardId);
lawsEvaluationNotMet.setSource(source);
//判断预警和超期
Date expectedTime = lawsEvaluationNotMet.getExpectedTime();
DateTime date = DateUtil.date();
DateTime theDayBefore = DateUtil.offsetDay(date, 1);
DateTime theDayAfter = DateUtil.offsetDay(date, -1);
if (expectedTime.compareTo(theDayAfter)<0){
lawsEvaluationNotMet.setState(AssessCommon.OVERDUE);
}else if (expectedTime.compareTo(theDayBefore)<0){
lawsEvaluationNotMet.setState(AssessCommon.WARNING);
//如果待整改判断预警和超期
String state = lawsEvaluationNotMet.getState();
if (AssessCommon.TO_BE_RECTIFIED.equals(state)){
Date expectedTime = lawsEvaluationNotMet.getExpectedTime();
DateTime date = DateUtil.date();
DateTime theDayBefore = DateUtil.offsetDay(date, 1);
DateTime theDayAfter = DateUtil.offsetDay(date, -1);
if (expectedTime.compareTo(theDayAfter)<0){
lawsEvaluationNotMet.setState(AssessCommon.OVERDUE);
}else if (expectedTime.compareTo(theDayBefore)<0){
lawsEvaluationNotMet.setState(AssessCommon.WARNING);
}
}
}
/**