|
|
@@ -134,19 +134,21 @@ public class CommodityInOutboundServiceImpl implements CommodityInOutboundServic
|
|
|
return null;
|
|
|
}
|
|
|
CommodityInOutbound inOutbound = produceCommodityInOutbound(details, type);
|
|
|
- inOutbound.setAffiliatedEnuu(order.getBuyerenuu());
|
|
|
- inOutbound.setAffiliatedEnterprise(order.getBuyerentername());
|
|
|
- if (StringUtils.isEmpty(inOutbound.getAffiliatedEnterprise())) {
|
|
|
- inOutbound.setAffiliatedEnterprise(order.getBuyername());
|
|
|
- }
|
|
|
+
|
|
|
inOutbound.setAssociateOrderid(order.getOrderid());
|
|
|
inOutbound.setAssociateOrderId(order.getId());
|
|
|
- inOutbound.setAffiliatedEnterprise(order.getBuyerentername());
|
|
|
- inOutbound.setAffiliatedEnuu(order.getBuyerenuu());
|
|
|
- if (inOutbound.getAffiliatedEnuu() == null) {
|
|
|
- inOutbound.setAffiliatedEnterprise(order.getBuyername());
|
|
|
- inOutbound.setAffiliatedEnuu(order.getBuyeruu());
|
|
|
+ if (InOutBoundType.OTHER_INBOUND.equals(type) || InOutBoundType.PURCHASE_INBOUND.equals(type)) {
|
|
|
+ inOutbound.setAffiliatedEnuu(order.getSellerenuu());
|
|
|
+ inOutbound.setAffiliatedEnterprise(order.getSellername());
|
|
|
+ } else {
|
|
|
+ inOutbound.setAffiliatedEnuu(order.getBuyerenuu());
|
|
|
+ inOutbound.setAffiliatedEnterprise(order.getBuyerentername());
|
|
|
+ if (inOutbound.getAffiliatedEnuu() == null) {
|
|
|
+ inOutbound.setAffiliatedEnterprise(order.getBuyername());
|
|
|
+ inOutbound.setAffiliatedEnuu(order.getBuyeruu());
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
CommodityInOutbound commodityInOutbound = save(inOutbound);
|
|
|
return commodityInOutbound;
|
|
|
}
|