|
@@ -114,6 +114,14 @@ public class OaRenewServiceImpl implements OaRenewService {
|
|
|
if (loginEmployee == null || (stagingReqVO.getEmployeeId() != null && employee == null)) {
|
|
|
throw exception(ErrorCodeConstants.OA_EMPLOYEE_NOT_EXISTS);
|
|
|
}
|
|
|
+ // 续签结束日期不能小于续签开始日期
|
|
|
+ String renewContractStartDate = stagingReqVO.getRenewContractStartDate();
|
|
|
+ String renewContractEndDate = stagingReqVO.getRenewContractEndDate();
|
|
|
+ if (StrUtil.isNotBlank(renewContractStartDate) && StrUtil.isNotBlank(renewContractEndDate)) {
|
|
|
+ if (renewContractStartDate.compareTo(renewContractEndDate) > 0) {
|
|
|
+ throw exception(ErrorCodeConstants.OA_RENEW_CONTRACT_START_DATE_GREATER_THAN_END_DATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
OaRenewDO oaRenew = BeanUtils.toBean(stagingReqVO, OaRenewDO.class);
|
|
|
if (StringUtils.isBlank(oaRenew.getRenewId())) {
|
|
@@ -175,6 +183,14 @@ public class OaRenewServiceImpl implements OaRenewService {
|
|
|
if (loginEmployee == null || employee == null) {
|
|
|
throw exception(ErrorCodeConstants.OA_EMPLOYEE_NOT_EXISTS);
|
|
|
}
|
|
|
+ // 续签结束日期不能小于续签开始日期
|
|
|
+ String renewContractStartDate = commitReqVO.getRenewContractStartDate();
|
|
|
+ String renewContractEndDate = commitReqVO.getRenewContractEndDate();
|
|
|
+ if (StrUtil.isNotBlank(renewContractStartDate) && StrUtil.isNotBlank(renewContractEndDate)) {
|
|
|
+ if (renewContractStartDate.compareTo(renewContractEndDate) > 0) {
|
|
|
+ throw exception(ErrorCodeConstants.OA_RENEW_CONTRACT_START_DATE_GREATER_THAN_END_DATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
OaRenewDO oaRenew = BeanUtils.toBean(commitReqVO, OaRenewDO.class);
|
|
@@ -505,6 +521,14 @@ public class OaRenewServiceImpl implements OaRenewService {
|
|
|
if (loginEmployee == null || employee == null) {
|
|
|
throw exception(ErrorCodeConstants.OA_EMPLOYEE_NOT_EXISTS);
|
|
|
}
|
|
|
+ // 续签结束日期不能小于续签开始日期
|
|
|
+ String renewContractStartDate = reCommitReqVO.getRenewContractStartDate();
|
|
|
+ String renewContractEndDate = reCommitReqVO.getRenewContractEndDate();
|
|
|
+ if (StrUtil.isNotBlank(renewContractStartDate) && StrUtil.isNotBlank(renewContractEndDate)) {
|
|
|
+ if (renewContractStartDate.compareTo(renewContractEndDate) > 0) {
|
|
|
+ throw exception(ErrorCodeConstants.OA_RENEW_CONTRACT_START_DATE_GREATER_THAN_END_DATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
OaRenewDO oaRenewNew = BeanUtils.toBean(reCommitReqVO, OaRenewDO.class);
|
|
|
OaRenewDO oaRenewOld = validateOaRenewExists(oaRenewNew.getId());
|