|
|
|
@ -175,16 +175,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
public Long saveBaseForm(Map<String, Object> params) {
|
|
|
|
|
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
|
|
|
|
/*
|
|
|
|
|
* 汉桑部门需求二开,添加部门启用时间、封存时间校验
|
|
|
|
|
* 启用时间、封存时间必须大于等于当前日期;
|
|
|
|
|
* 汉桑部门需求二开,添加部门启用日期、封存日期校验
|
|
|
|
|
* 启用日期、封存日期必须大于等于当前日期;
|
|
|
|
|
* 启用日期小于封存日期;
|
|
|
|
|
*/
|
|
|
|
|
String enableDate = Util.null2String(params.get("qyrq"));
|
|
|
|
|
String disableDate = Util.null2String(params.get("fcrq"));
|
|
|
|
|
String currentDate = DateUtil.getCurrentDate();
|
|
|
|
|
|
|
|
|
|
OrganizationAssert.notBlank(enableDate, "启用时间必填");
|
|
|
|
|
OrganizationAssert.isTrue(DateUtil.compDate(currentDate, enableDate) >= 0, "启用时间大于等于当前日期");
|
|
|
|
|
OrganizationAssert.notBlank(enableDate, "启用日期必填");
|
|
|
|
|
OrganizationAssert.isTrue(DateUtil.compDate(currentDate, enableDate) >= 0, "启用日期大于等于当前日期");
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(disableDate)) {
|
|
|
|
|
OrganizationAssert.isTrue(DateUtil.compDate(enableDate, disableDate) > 0, "启用日期小于封存日期");
|
|
|
|
|