|
@@ -32,7 +32,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
ERPDocking erpDocking = new ERPDocking();
|
|
|
- JSONArray ErpSainvoices = erpDocking.queryErpStockBill(100, 1,"销售退货");
|
|
|
+ JSONArray ErpSainvoices = erpDocking.queryErpStockBill(500, 1,"销售退货");
|
|
|
JSONArray flags=new JSONArray();
|
|
|
String siteid = "ccyosg";
|
|
|
if (!ErpSainvoices.isEmpty()) {
|
|
@@ -45,7 +45,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
sys_enterpriseid = dbConnect.runSqlQuery("select sys_enterpriseid from sa_agents where siteid='ccyosg' and agentnum='" + fagentnum + "'").get(0).getLong("sys_enterpriseid");
|
|
|
} else {
|
|
|
JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "4");
|
|
|
flag.put("fupdatewarnlog", "yos中不存在【" + fagentnum + "】经销商");
|
|
|
flags.add(flag);
|
|
@@ -82,7 +82,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
sa_aftersalesmagid = dbConnect.runSqlQuery("select sa_aftersalesmagid from sa_aftersalesmag where siteid='ccyosg' and billno='" + fsourcebillno + "'").get(0).getLong("sa_aftersalesmagid");
|
|
|
} else {
|
|
|
JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "4");
|
|
|
flag.put("fupdatewarnlog", "yos中不存在对应的退货单");
|
|
|
flags.add(flag);
|
|
@@ -90,7 +90,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
}
|
|
|
}else {
|
|
|
JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "4");
|
|
|
flag.put("fupdatewarnlog", "yos中不存在对应的退货单");
|
|
|
flags.add(flag);
|
|
@@ -215,7 +215,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
sqlList.add(sqlFactorydetail.getSQL());
|
|
|
}
|
|
|
sqlList.add("update st_stockbill set status='审核',checkby='" + createby + "',checkdate=CURRENT_TIMESTAMP where st_stockbillid = " + st_stockbillid + " and siteid='ccyosg'"); JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "1");
|
|
|
flag.put("fupdatewarnlog", "");
|
|
|
flags.add(flag);
|
|
@@ -226,7 +226,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
*/
|
|
|
sqlList.add("update st_stockbill set status='新建',checkby='',checkdate=null where st_stockbillid = " + stockbillRows.get(0).getLong("st_stockbillid") + " and siteid='ccyosg'");
|
|
|
JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "99");
|
|
|
flag.put("fupdatewarnlog", "");
|
|
|
flags.add(flag);
|
|
@@ -237,7 +237,7 @@ public class StockAutoDockAftersalesmagService extends ServiceController {
|
|
|
*/
|
|
|
sqlList.add("update st_stockbill set status='新建',checkby='',checkdate=null where st_stockbillid = " + stockbillRows.get(0).getLong("st_stockbillid") + " and siteid='ccyosg'");
|
|
|
JSONObject flag =new JSONObject();
|
|
|
- flag.put("syncyosid",erpSainvoice.getStringValue("tstockbillid"));
|
|
|
+ flag.put("syncyosid",erpSainvoice.getStringValue("syncyosid"));
|
|
|
flag.put("fupdateflag", "1");
|
|
|
flag.put("fupdatewarnlog", "");
|
|
|
flags.add(flag);
|