Explorar o código

erp站点逻辑调整

eganwu hai 1 ano
pai
achega
f83e45980c

+ 3 - 0
src/custom/service/AftersalesmagAutoRecheckService.java

@@ -33,6 +33,9 @@ public class AftersalesmagAutoRecheckService extends ServiceController {
 
     public void serviceRun() throws YosException {
         for (String siteid : siteids) {
+            if (dbConnect.runSqlQuery("SELECT 1 from  sys_site WHERE siteid='" + siteid + "'").isEmpty()) {
+                continue;
+            }
             Properties yosProperties = properties.getYosProperties();
             if (yosProperties.getProperty("system.runmode.debug").equalsIgnoreCase("false")) {
                 Rows rows = dbConnect.runSqlQuery("select * from sa_aftersalesmag where status='审核' and type='换货单' and siteid='" + siteid + "'");

+ 3 - 1
src/custom/service/AutoDockItemService.java

@@ -28,7 +28,9 @@ public class AutoDockItemService extends ServiceController {
     @Override
     public void serviceRun() throws YosException {
         for (String siteid : siteids) {
-
+            if (dbConnect.runSqlQuery("SELECT 1 from  sys_site WHERE siteid='" + siteid + "'").isEmpty()) {
+                continue;
+            }
             ArrayList<String> sqlList = new ArrayList<>();
             Rows rows = new DBConnect().runSqlQuery("select * from sys_parameter where paramname='AutoDockItemServiceTime'");
             Date date = new Date();

+ 3 - 0
src/custom/service/DispatchAutoCloseService.java

@@ -34,6 +34,9 @@ public class DispatchAutoCloseService extends ServiceController {
 
     public void serviceRun() throws YosException {
         for (String siteid : siteids) {
+            if (dbConnect.runSqlQuery("SELECT 1 from  sys_site WHERE siteid='" + siteid + "'").isEmpty()) {
+                continue;
+            }
             Properties yosProperties = properties.getYosProperties();
             if (yosProperties.getProperty("system.runmode.debug").equalsIgnoreCase("false")) {
                 Rows rows = dbConnect.runSqlQuery("select * from sa_dispatch where status='复核' and siteid='" + siteid + "'");

+ 3 - 0
src/custom/service/StockAutoDockAftersalesmagService.java

@@ -28,6 +28,9 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
     @Override
     public void serviceRun() throws YosException {
         for (String siteid : siteids) {
+            if (dbConnect.runSqlQuery("SELECT 1 from  sys_site WHERE siteid='" + siteid + "'").isEmpty()) {
+                continue;
+            }
             Properties yosProperties = properties.getYosProperties();
             if (yosProperties.getProperty("system.runmode.debug").equalsIgnoreCase("false")) {
 

+ 3 - 0
src/custom/service/StockAutoDockDispatchService.java

@@ -33,6 +33,9 @@ public class StockAutoDockDispatchService extends ServiceController {
     @Override
     public void serviceRun() throws YosException {
         for (String siteid : siteids) {
+            if (dbConnect.runSqlQuery("SELECT 1 from  sys_site WHERE siteid='" + siteid + "'").isEmpty()) {
+                continue;
+            }
             System.out.println("销售出库单自动同步任务");
             Properties yosProperties = properties.getYosProperties();
             if (yosProperties.getProperty("system.runmode.debug").equalsIgnoreCase("false")) {