Browse Source

Merge remote-tracking branch 'origin/develop' into develop

hu 4 months ago
parent
commit
bd4956d290
2 changed files with 12 additions and 3 deletions
  1. 1 1
      pom.xml
  2. 11 2
      src/custom/service/GetStockBillFromU8.java

+ 1 - 1
pom.xml

@@ -108,7 +108,7 @@
         <dependency>
             <groupId>com.yunlian.yos</groupId>
             <artifactId>yos-core</artifactId>
-            <version>3.4.8</version>
+            <version>3.4.9</version>
         </dependency>
         <dependency>
             <groupId>com.microsoft.sqlserver</groupId>

+ 11 - 2
src/custom/service/GetStockBillFromU8.java

@@ -88,9 +88,18 @@ public class GetStockBillFromU8 extends ServiceController {
                         }
 
                     }
+                    Rows u8billmxCodeRows = u8billmxCodeRowsMap.get(id);
+                    ArrayList<String> skuArrayList = SQLFactory.createQuerySQL(dbConnect, "sa_itemsku", "sku").setWhere("sku", u8billmxCodeRows.toArrayList("cinvsn")).query().toArrayList("sku");
+                    for (Row codeRow : u8billmxCodeRows) {
+                        String cinvsn = codeRow.getString("cinvsn");
+                        if (!skuArrayList.contains(cinvsn)) {
+                            YUNl_DB.runSqlUpdate("update RdRecord set ErrTimes=isnull(ErrTimes,0)+1,failreason='序列号不存在' where ID =" + id + " and billtype='10' ");
+                            logger.info("入库单{}序列号{}不存在", ccode, cinvsn);
+                            continue foreachbill;
+                        }
+                    }
 
-                    RowsMap u8billmxCodeMXRowsMap = u8billmxCodeRowsMap.get(id).toRowsMap("ivouchsid");//获取表体序列号
-
+                    RowsMap u8billmxCodeMXRowsMap = u8billmxCodeRows.toRowsMap("ivouchsid");//获取表体序列号
                     String cmemo = cInvCodeRow.getString("cmemo");
                     String dnverifytime = cInvCodeRow.getString("dnverifytime");
                     String chandler = cInvCodeRow.getString("chandler");