|
|
@@ -313,8 +313,14 @@ public class KwoTradeOrderService {
|
|
|
if (price.compareTo(amount.multiply(param.getUnitPrice())) != 0) {
|
|
|
throw new BusinessException("订单总金额不等于商品单价*订单总量!");
|
|
|
}
|
|
|
- List<FindEntCooperateResVo> entCooperate = remoteManageService.findEntCooperate(param.getProcureEntId()
|
|
|
- , param.getSupplyEntId(), CooperateTypeEnum.SUPPLIER.getCode());
|
|
|
+ List<FindEntCooperateResVo> entCooperate;
|
|
|
+ if (DictEnum.TORDER_SOURCE_1.getValue().equals(param.getOrderSource())) {
|
|
|
+ entCooperate = remoteManageService.findEntCooperate(param.getProcureEntId()
|
|
|
+ , param.getSupplyEntId(), CooperateTypeEnum.SUPPLIER.getCode());
|
|
|
+ } else {
|
|
|
+ entCooperate = remoteManageService.findEntCooperate(param.getSupplyEntId()
|
|
|
+ , param.getProcureEntId(), CooperateTypeEnum.PURCHASER.getCode());
|
|
|
+ }
|
|
|
if (CollectionUtils.isEmpty(entCooperate)) {
|
|
|
throw new BusinessException("供采双方企业无合作关系!");
|
|
|
}
|