2 Revīzijas bc0002d0c5 ... 462cd2629e

Autors SHA1 Ziņojums Datums
  wzy 462cd2629e Merge branch 'master' of https://mc.cloudpure.cn/mjava/cont 1 mēnesi atpakaļ
  wzy c1d01434a1 同步销售出库单新增数量和重量字段 1 mēnesi atpakaļ

+ 16 - 3
mjava-jinlun/src/main/java/com/malk/jinlun/service/impl/JinlunTaskServiceImpl.java

@@ -150,7 +150,7 @@ public class JinlunTaskServiceImpl implements JinlunTaskService {
 
         BillQuery billQuery = new BillQuery();
         billQuery.setFormId("SAL_OUTSTOCK");
-        billQuery.setFieldKeys("FBillNo,FBillTypeID.FName,FDate,FSettleCurrID.FName,FCustomerID.FName,FCustomerID.FShortName,FHeadLocationID.FName,FMaterialID.FNumber,FMaterialID.FName,FMaterialID.FSpecification,FMaterialID.F_Sl_ducengid,F_VMKV_Text_WLZT,FPriceUnitQty,FRealQty,FPriceUnitId.FName,FBaseUnitID.FName,FIsFree,FPrice,FTaxPrice,FEntryTaxRate,FAmount,FAllAmount,FDiscount,FEntrynote");
+        billQuery.setFieldKeys("FBillNo,FBillTypeID.FName,FDate,FSettleCurrID.FName,FCustomerID.FName,FCustomerID.FShortName,FHeadLocationID.FName,FMaterialID.FNumber,FMaterialID.FName,FMaterialID.FSpecification,FMaterialID.F_Sl_ducengid,F_VMKV_Text_WLZT,FPriceUnitQty,FRealQty,FUnitID.FName,FPriceUnitId.FName,FAuxUnitID.FName,FAuxUnitQty,FIsFree,FPrice,FTaxPrice,FEntryTaxRate,FAmount,FAllAmount,FDiscount,FEntrynote");
         List<Map> filterString = new ArrayList<>();
 
         //审核日期为昨天至今天
@@ -201,9 +201,14 @@ public class JinlunTaskServiceImpl implements JinlunTaskService {
             entryMap.put("Text1762245901183",UtilMap.getString(saleOut,"F_VMKV_Text_WLZT"));//物料状态
 
             entryMap.put("Number1760153811668",UtilMap.getDouble(saleOut,"FPriceUnitQty"));//计价数量
-            entryMap.put("Number1760153958907",UtilMap.getDouble(saleOut,"FRealQty"));//实发数量
+            Double sfsl = UtilMap.getDouble(saleOut, "FRealQty");
+            entryMap.put("Number1760153958907", sfsl);//实发数量
             entryMap.put("Text1760153793403",UtilMap.getString(saleOut,"FPriceUnitId.FName"));//计价单位
-            entryMap.put("Text1760153804514",UtilMap.getString(saleOut,"FBaseUnitID.FName"));//基本单位
+            String kcdw = UtilMap.getString(saleOut, "FUnitID.FName");
+            entryMap.put("ShortText1762508609328", kcdw);//库存单位
+            entryMap.put("Text1762508629987",UtilMap.getString(saleOut,"FAuxUnitID.FName"));//库存辅单位
+            Double kcfdwsl = UtilMap.getDouble(saleOut, "FAuxUnitQty");
+            entryMap.put("Number1762508641763", kcfdwsl);//库存辅单位数量
             entryMap.put("Logic1760171983887",UtilMap.getBoolean(saleOut,"FIsFree"));//是否赠品
             entryMap.put("Number1760153991898",UtilMap.getDouble(saleOut,"FPrice"));//单价
             entryMap.put("Number1760154006703",UtilMap.getDouble(saleOut,"FTaxPrice"));//计价单价
@@ -213,6 +218,14 @@ public class JinlunTaskServiceImpl implements JinlunTaskService {
             entryMap.put("Number1760154058940",UtilMap.getDouble(saleOut,"FDiscount"));//折扣额
             entryMap.put("ShortText1760154066042",UtilMap.getString(saleOut,"FEntrynote"));//备注
 
+            if ("Pcs".equals(kcdw)){
+                entryMap.put("Number1762509492431",sfsl);//数量
+                entryMap.put("Number1762509515885",kcfdwsl);//重量
+            }else {
+                entryMap.put("Number1762509492431",0);//数量
+                entryMap.put("Number1762509515885",sfsl);//重量
+            }
+
             entry.add(entryMap);
 
             data.put("Sheet1760153734916",entry);