shenjingwei 3 недель назад
Родитель
Сommit
f4ec523d7f

+ 6 - 0
src/custom/service/GetStockBillFromMQWms.java

@@ -70,6 +70,12 @@ public class GetStockBillFromMQWms extends ServiceController {
                     logger.info("序列号{}超过两个月未能正确处理,将中间表状态改为12", sku);
                     continue;
                 }
+
+                String ddate = getDate_Str(createdate);
+                if (dbConnect.runSqlQuery("select * from st_period where isclose=0 and begdate<='" + ddate + "' and enddate>='" + ddate + "'").isEmpty()) {
+                    logger.info("单据日期{}所在会计期间不存在", ddate);
+                    continue;
+                }
                 if (!codeRowsMap.containsKey(sku)) {
                     //序列号不存在,则跳过
                     logger.info("序列号{}不存在", sku);

+ 8 - 0
src/custom/service/GetStockBillFromTQWms.java

@@ -227,6 +227,14 @@ public class GetStockBillFromTQWms extends ServiceController {
                     logger.info("序列号{}超过两个月未能正确处理,将中间表状态改为12", sku);
                     continue;
                 }
+
+                String ddate = getDate_Str(createdate);
+                if (dbConnect.runSqlQuery("select * from st_period where isclose=0 and begdate<='" + ddate + "' and enddate>='" + ddate + "'").isEmpty()) {
+                    //会计期间不存在,直接判定失败
+                    logger.info("单据日期{}所在会计期间不存在", ddate);
+                    continue;
+                }
+
                 if (!codeRowsMap.containsKey(sku)) {
                     //序列号不存在,则跳过
                     logger.info("序列号{}不存在", sku);