时间范围判断
This commit is contained in:
parent
7206ba5cea
commit
90206a50e1
|
|
@ -331,6 +331,31 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements BeforeF
|
|||
}
|
||||
getModel().setValue("name", newName.toString());
|
||||
}
|
||||
// 比较时间段
|
||||
if (StringUtils.equals("tqq9_date", name) || StringUtils.equals("tqq9_exclusiondate", name)) {
|
||||
Date tqq9_startdate = (Date) dataEntity.get("tqq9_startdate"); // 返利开始时间
|
||||
Date tqq9_enddate = (Date) dataEntity.get("tqq9_enddate"); // 返利结束时间
|
||||
Date tqq9_startexcludate = (Date) dataEntity.get("tqq9_startexcludate"); // 排除开始时间
|
||||
Date tqq9_endexcludate = (Date) dataEntity.get("tqq9_endexcludate"); // 排除结束时间
|
||||
// 首先判断返利时间范围是否填写
|
||||
if (tqq9_startdate == null || tqq9_enddate == null) {
|
||||
this.getView().showErrorNotification("返利时间范围未填写");
|
||||
return;
|
||||
}
|
||||
// 判断排除时间范围是否填写
|
||||
if (tqq9_startexcludate != null || tqq9_endexcludate != null) {
|
||||
if (tqq9_startexcludate == null || tqq9_endexcludate == null) {
|
||||
this.getView().showErrorNotification("排除时间范围需完整填写");
|
||||
return;
|
||||
}
|
||||
// 判断返利时间范围是否大于等于排除时间范围
|
||||
if (tqq9_startdate.compareTo(tqq9_startexcludate) > 0 || tqq9_enddate.compareTo(tqq9_endexcludate) < 0) {
|
||||
this.getView().showErrorNotification("返利时间范围应大于等于排除时间范围");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue