Showing
3 changed files
with
6 additions
and
2 deletions
| ... | ... | @@ -215,7 +215,8 @@ public class ContractDistributorStandardServiceImpl extends |
| 215 | 215 | public List<ContractDistributorStandard> query(QueryContractDistributorStandardVo vo) { |
| 216 | 216 | |
| 217 | 217 | List<ContractDistributorStandard> datas = getBaseMapper().query(vo); |
| 218 | - CollectionUtils.emptyIfNull(datas).forEach(data -> data.setCanSplit(isCanSplitByCode(data.getCode()))); | |
| 218 | + CollectionUtils.emptyIfNull(datas).forEach(data -> data.setCanSplit(isCanSplitByCode(data.getCode()) | |
| 219 | + && !Boolean.TRUE.equals(data.getPriceSpecLocked()))); | |
| 219 | 220 | return datas; |
| 220 | 221 | } |
| 221 | 222 | |
| ... | ... | @@ -226,7 +227,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 226 | 227 | if (data == null) { |
| 227 | 228 | return null; |
| 228 | 229 | } |
| 229 | - data.setCanSplit(isCanSplitByCode(data.getCode())); | |
| 230 | + data.setCanSplit(isCanSplitByCode(data.getCode()) && !Boolean.TRUE.equals(data.getPriceSpecLocked())); | |
| 230 | 231 | Wrapper<PurchaseOrderInfo> orderInfoWrapper = Wrappers.lambdaQuery(PurchaseOrderInfo.class) |
| 231 | 232 | .eq(PurchaseOrderInfo::getContractId, data.getId()); |
| 232 | 233 | List<PurchaseOrderInfo> purchaseOrderInfoList = purchaseOrderInfoService.list(orderInfoWrapper); |
| ... | ... | @@ -778,6 +779,9 @@ public class ContractDistributorStandardServiceImpl extends |
| 778 | 779 | if (ObjectUtil.isNull(original)) { |
| 779 | 780 | throw new DefaultClientException("合同不存在!"); |
| 780 | 781 | } |
| 782 | + if (Boolean.TRUE.equals(original.getPriceSpecLocked())) { | |
| 783 | + throw new DefaultClientException("合同已完成锁价/锁规,无法拆分!"); | |
| 784 | + } | |
| 781 | 785 | if (original.getTotalQuantity() == null) { |
| 782 | 786 | throw new DefaultClientException("合同合计数量为空,无法拆分!"); |
| 783 | 787 | } | ... | ... |
No preview for this file type
No preview for this file type