|
@@ -81,6 +81,13 @@ public class CustomerContractServiceImpl implements CustomerContractService {
|
|
|
if (StrUtil.isNotBlank(customerContractName)) {
|
|
|
validateCustomerContractName(customerContractName, createReqVO.getId());
|
|
|
}
|
|
|
+ String startDate = createReqVO.getStartDate();
|
|
|
+ String endDate = createReqVO.getEndDate();
|
|
|
+ if (StrUtil.isNotBlank(startDate) && StrUtil.isNotBlank(endDate)) {
|
|
|
+ if (startDate.compareTo(endDate) > 0) {
|
|
|
+ throw exception(CUSTOMER_CONTRACT_START_DATE_GREATER_THAN_END_DATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
// 插入
|
|
|
CustomerContractDO customerContract = BeanUtils.toBean(createReqVO, CustomerContractDO.class);
|
|
|
// uuid
|
|
@@ -144,6 +151,13 @@ public class CustomerContractServiceImpl implements CustomerContractService {
|
|
|
if (StrUtil.isNotBlank(customerContractName)) {
|
|
|
validateCustomerContractName(customerContractName, updateReqVO.getId());
|
|
|
}
|
|
|
+ String startDate = updateReqVO.getStartDate();
|
|
|
+ String endDate = updateReqVO.getEndDate();
|
|
|
+ if (StrUtil.isNotBlank(startDate) && StrUtil.isNotBlank(endDate)) {
|
|
|
+ if (startDate.compareTo(endDate) > 0) {
|
|
|
+ throw exception(CUSTOMER_CONTRACT_START_DATE_GREATER_THAN_END_DATE);
|
|
|
+ }
|
|
|
+ }
|
|
|
// 更新
|
|
|
CustomerContractDO updateObj = BeanUtils.toBean(updateReqVO, CustomerContractDO.class);
|
|
|
// 负责人及部门
|