Browse Source

轮胎商城:共享次日达excel导入生成品牌所属公司数据拿取错误修改

纪新园 9 months ago
parent
commit
867e97b4f2

+ 9 - 4
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java

@@ -887,8 +887,13 @@ public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesM
 			brandDescSave.setCreateTime(new Date());
 			brandDescSave.setEnableOrNot(1);
 			brandDescSave.setCname(item.getBrandName());
-			brandDescSave.setSalesCompanyId(Long.parseLong(item.getSrcSalesCompanyId()));
-			brandDescSave.setSalesCompanyName(item.getSrcSalesCompanyName());
+			if (dept == null) {
+				brandDescSave.setSalesCompanyId(Long.parseLong(AuthUtil.getDeptId()));
+				brandDescSave.setSalesCompanyName("");
+			} else {
+				brandDescSave.setSalesCompanyId(dept.getId());
+				brandDescSave.setSalesCompanyName(dept.getDeptName());
+			}
 			brandDescSave.setType("PP");
 			brandDescSave.setSort(1);
 			brandDescSave.setWhetherIntegral("0");
@@ -946,10 +951,10 @@ public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesM
 			goodsDesc.setSpecificationAndModel(item.getSpecificationAndModel());
 			goodsDesc.setBrandItem(item.getBrandItem());
 			goodsDesc.setEnableOrNot(1);
-			if (dept != null){
+			if (dept != null) {
 				goodsDesc.setSalesCompanyId(dept.getId());
 				goodsDesc.setSalesCompanyName(dept.getDeptName());
-			}else{
+			} else {
 				throw new RuntimeException("未找到所属公司");
 			}
 			goodsDesc.setWhetherIntegral("0");

+ 1 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/shoppingCart/service/impl/ShoppingCartServiceImpl.java

@@ -1526,7 +1526,7 @@ public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, PjS
 			orderShare.setRecAddress(address);
 			orderShare.setContacts(corpsAttn.getCname());
 			orderShare.setPhone(corpsAttn.getTel());
-			orderShare.setBsType(OrderTypeEnum.SALES.getType());
+			orderShare.setBsType("GX");
 			orderShare.setBusinessSource("额度支付");
 			orderShare.setReceivableType("网络支付");
 			orderShare.setBillType(1);