Browse Source

fix(入库、批量导入): 入库显示卖家名称。批量导入验证数据格式时包装方式显示错误

yuj 7 years ago
parent
commit
b26d31e301

+ 12 - 10
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/CommodityInOutboundServiceImpl.java

@@ -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;
     }

BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls