Browse Source

自动任务由ZZYOS站点改为正式站点CCYOSG

hu 2 years ago
parent
commit
8928e73d25

+ 5 - 5
src/custom/restcontroller/webmanage/sale/dispatch/dispatch.java

@@ -476,8 +476,8 @@ public class dispatch extends Controller {
     public String autoClose() throws YosException {
         String finvonum = content.getString("finvonum");
 
-        Rows rows = dbConnect.runSqlQuery("select * from sa_dispatch where status='复核' and siteid='ZZYOS' and billno='"+finvonum+"'");
-        Rows rowsdetail = dbConnect.runSqlQuery("select t1.* from sa_dispatch_items t1 inner join sa_dispatch t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid where t2.status='复核' and t1.siteid='ZZYOS'");
+        Rows rows = dbConnect.runSqlQuery("select * from sa_dispatch where status='复核' and siteid='CCYOSG' and billno='"+finvonum+"'");
+        Rows rowsdetail = dbConnect.runSqlQuery("select t1.* from sa_dispatch_items t1 inner join sa_dispatch t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid where t2.status='复核' and t1.siteid='CCYOSG'");
         RowsMap rowsMap = rowsdetail.toRowsMap("sa_dispatchid");
         ArrayList<String> sqlList = new ArrayList<>();
         ERPDocking erpDocking =new ERPDocking();
@@ -486,7 +486,7 @@ public class dispatch extends Controller {
             String billno = row.getString("billno");
             String result =erpDocking.closeErpSainvoice(billno,false,this, row.getLong("sa_dispatchid"));
             if(result.equals("true")){
-                sqlList.add("update sa_dispatch set status='关闭' where sa_dispatchid='"+sa_dispatchid+"' and siteid='ZZYOS'");
+                sqlList.add("update sa_dispatch set status='关闭' where sa_dispatchid='"+sa_dispatchid+"' and siteid='CCYOSG'");
                 SQLFactory sqlFactory = new SQLFactory(new DataContrlLog(), "数据操作日志新增");
                 sqlFactory.addParameter("ownertable", "sa_dispatch");
                 sqlFactory.addParameter("ownerid", sa_dispatchid);
@@ -494,7 +494,7 @@ public class dispatch extends Controller {
                 sqlFactory.addParameter("remarks", "发货单自动关闭成功");
                 sqlFactory.addParameter("actionuserid", "1");
                 sqlFactory.addParameter("actionby", "admin");
-                sqlFactory.addParameter("siteid", "ZZYOS");
+                sqlFactory.addParameter("siteid", "CCYOSG");
                 sqlList.add(sqlFactory.getSQL());
             }else {
                 logger.info("发货单自动关闭错误:"+result);
@@ -504,7 +504,7 @@ public class dispatch extends Controller {
             if(!jsonArray.isEmpty()){
                 for (Object object:jsonArray) {
                     JSONObject jsonObject = (JSONObject)object;
-                    sqlList.add("update sa_dispatch_items set outwarehouseqty="+jsonObject.getBigDecimalValue("fqty1")+" where rowno ="+jsonObject.getIntValue("frownum")+" and sa_dispatchid='"+sa_dispatchid+"' and siteid='ZZYOS'");
+                    sqlList.add("update sa_dispatch_items set outwarehouseqty="+jsonObject.getBigDecimalValue("fqty1")+" where rowno ="+jsonObject.getIntValue("frownum")+" and sa_dispatchid='"+sa_dispatchid+"' and siteid='CCYOSG'");
                 }
             }
 

+ 4 - 4
src/custom/service/AftersalesmagAutoRecheckService.java

@@ -28,7 +28,7 @@ public class AftersalesmagAutoRecheckService extends ServiceController {
 
     public void serviceRun() throws YosException {
     	 //
-        Rows rows = dbConnect.runSqlQuery("select * from sa_aftersalesmag where status='审核' and type='换货单' and siteid='ZZYOS'");
+        Rows rows = dbConnect.runSqlQuery("select * from sa_aftersalesmag where status='审核' and type='换货单' and siteid='CCYOSG'");
         RowsMap rowsMap1 = rows.toRowsMap("billno");
         ArrayList<String> sqlList = new ArrayList<>();
         ERPDocking erpDocking =new ERPDocking();
@@ -74,7 +74,7 @@ public class AftersalesmagAutoRecheckService extends ServiceController {
                         sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
                         sqlFactory.addParameter("sys_erpupdatelogid", createTableID("sys_erpupdatelog"));
                     }
-                    sqlFactory.addParameter("siteid", "ZZYOS");
+                    sqlFactory.addParameter("siteid", "CCYOSG");
                     sqlFactory.addParameter("userid", 1);
                     sqlFactory.addParameter("username","admin");
                     sqlFactory.addParameter("ownerid", sa_aftersalesmagid);
@@ -96,7 +96,7 @@ public class AftersalesmagAutoRecheckService extends ServiceController {
                     e.printStackTrace();
                 }
                 if(resultobject.getString("errcode").equals("0")){
-                    sqlList.add("update sa_aftersalesmag set status='复核' where sa_aftersalesmagid='"+sa_aftersalesmagid+"' and siteid='ZZYOS'");
+                    sqlList.add("update sa_aftersalesmag set status='复核' where sa_aftersalesmagid='"+sa_aftersalesmagid+"' and siteid='CCYOSG'");
                     SQLFactory sqlFactory = new SQLFactory(new DataContrlLog(), "数据操作日志新增");
                     sqlFactory.addParameter("ownertable", "sa_aftersalesmag");
                     sqlFactory.addParameter("ownerid", sa_aftersalesmagid);
@@ -104,7 +104,7 @@ public class AftersalesmagAutoRecheckService extends ServiceController {
                     sqlFactory.addParameter("remarks", "换货单自动复核成功");
                     sqlFactory.addParameter("actionuserid", "1");
                     sqlFactory.addParameter("actionby", "admin");
-                    sqlFactory.addParameter("siteid", "ZZYOS");
+                    sqlFactory.addParameter("siteid", "CCYOSG");
                     sqlList.add(sqlFactory.getSQL());
                 }else {
                     logger.info("换货单自动复核错误:"+resultobject.getString("errmsg"));

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

@@ -22,7 +22,7 @@ public class AutoDockItemService extends ServiceController {
     @Override
     public void serviceRun() throws YosException {
         ArrayList<String> sqlList = new ArrayList<>();
-        String siteid ="ZZYOS";
+        String siteid ="CCYOSG";
         Rows itemRows = dbConnect.runSqlQuery("SELECT itemid,itemno from  plm_item WHERE siteid = '" + siteid + "' AND status = '新建' ");
         Rows itemRowsAll = dbConnect.runSqlQuery("SELECT itemid,itemno from  plm_item WHERE siteid = '" + siteid + "'");
         //单位

+ 6 - 6
src/custom/service/DispatchAutoCloseService.java

@@ -28,8 +28,8 @@ public class DispatchAutoCloseService extends ServiceController {
 
     public void serviceRun() throws YosException {
     	 //
-        Rows rows = dbConnect.runSqlQuery("select * from sa_dispatch where status='复核' and siteid='ZZYOS'");
-        Rows rowsdetail = dbConnect.runSqlQuery("select t1.* from sa_dispatch_items t1 inner join sa_dispatch t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid where t2.status='复核' and t1.siteid='ZZYOS'");
+        Rows rows = dbConnect.runSqlQuery("select * from sa_dispatch where status='复核' and siteid='CCYOSG'");
+        Rows rowsdetail = dbConnect.runSqlQuery("select t1.* from sa_dispatch_items t1 inner join sa_dispatch t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid where t2.status='复核' and t1.siteid='CCYOSG'");
         RowsMap rowsMap = rowsdetail.toRowsMap("sa_dispatchid");
         RowsMap rowsMap1 = rowsdetail.toRowsMap("billno");
         ArrayList<String> sqlList = new ArrayList<>();
@@ -78,7 +78,7 @@ public class DispatchAutoCloseService extends ServiceController {
                         sqlFactory = new SQLFactory(new UploadDataToERP_HY(), "erp上传日志新增");
                         sqlFactory.addParameter("sys_erpupdatelogid", createTableID("sys_erpupdatelog"));
                     }
-                    sqlFactory.addParameter("siteid", "ZZYOS");
+                    sqlFactory.addParameter("siteid", "CCYOSG");
                     sqlFactory.addParameter("userid", 1);
                     sqlFactory.addParameter("username","admin");
                     sqlFactory.addParameter("ownerid", sa_dispatchid);
@@ -101,7 +101,7 @@ public class DispatchAutoCloseService extends ServiceController {
                 }
 
                 if(resultobject.getString("errcode").equals("0")){
-                    sqlList.add("update sa_dispatch set status='关闭' where sa_dispatchid='"+sa_dispatchid+"' and siteid='ZZYOS'");
+                    sqlList.add("update sa_dispatch set status='关闭' where sa_dispatchid='"+sa_dispatchid+"' and siteid='CCYOSG'");
                     SQLFactory sqlFactory = new SQLFactory(new DataContrlLog(), "数据操作日志新增");
                     sqlFactory.addParameter("ownertable", "sa_dispatch");
                     sqlFactory.addParameter("ownerid", sa_dispatchid);
@@ -109,7 +109,7 @@ public class DispatchAutoCloseService extends ServiceController {
                     sqlFactory.addParameter("remarks", "发货单自动关闭成功");
                     sqlFactory.addParameter("actionuserid", "1");
                     sqlFactory.addParameter("actionby", "admin");
-                    sqlFactory.addParameter("siteid", "ZZYOS");
+                    sqlFactory.addParameter("siteid", "CCYOSG");
                     sqlList.add(sqlFactory.getSQL());
                 }else {
                     logger.info("发货单自动关闭错误:"+resultobject.getString("errmsg"));
@@ -117,7 +117,7 @@ public class DispatchAutoCloseService extends ServiceController {
                 if(!jsonArray.isEmpty()){
                     for (Object object1:jsonArray) {
                         JSONObject jsonObject = (JSONObject)object1;
-                        sqlList.add("update sa_dispatch_items set outwarehouseqty="+jsonObject.getBigDecimalValue("fqty1")+" where rowno ="+jsonObject.getIntValue("frownum")+" and sa_dispatchid='"+sa_dispatchid+"' and siteid='ZZYOS'");
+                        sqlList.add("update sa_dispatch_items set outwarehouseqty="+jsonObject.getBigDecimalValue("fqty1")+" where rowno ="+jsonObject.getIntValue("frownum")+" and sa_dispatchid='"+sa_dispatchid+"' and siteid='CCYOSG'");
                     }
                 }
 

+ 1 - 8
src/custom/service/GetObsCESData.java

@@ -17,13 +17,6 @@ public class GetObsCESData extends ServiceController {
 //            bucketCESManage.getData();
 //        }
 
-        System.err.println("GetObsCESData");
-        Remind remind = new Remind("ZZYOS");
-        remind.setType("test");
-        remind.setTitle("test");
-        remind.setContent("test");
-        remind.setTouserid(17151);
-        remind.sendByDialogMsg();
-        System.err.println("GetObsCESData end");
+
     }
 }