Browse Source

如果项目业务已经签订,则不允许修改

anderx 7 years ago
parent
commit
4537f6395d

+ 4 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -403,8 +403,10 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 				if(StringUtils.isNotBlank(ub.getBusinessId())){
 					//更新业务表
 					userBusiness.setId(ub.getBusinessId());
-					if (us.getFollowSituation()==5&& ub.getFollowSituation()!=5) {//如果已签合同,则不允许变更
-						throw new BusinessException(new Error(ErrorConstants.BUSINESS_ALREADY_LOCKED,""));
+					if (us.getFollowSituation()==5) {//如果已签合同,则不允许变更
+						if (ub.getCustomerStatus()!=us.getCustomerStatus()|| ub.getFollowSituation()!=5) {
+							throw new BusinessException(new Error(ErrorConstants.BUSINESS_ALREADY_LOCKED,""));
+						}
 					}
 					//检查业务锁定情况
 					businessLockedList = userMapper.selectLockedProject(fbb.getUid(), null, ub.getBusinessProjectId(), 1, UserLockReleaseStatus.LOCKED.getCode());