|
|
@@ -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'");
|
|
|
}
|
|
|
}
|
|
|
|