|
@@ -84,9 +84,18 @@ public class StockAutoDockDispatchService extends ServiceController {
|
|
|
String fsourcebillno = erpSainvoice.getString("fsourcebillno");
|
|
String fsourcebillno = erpSainvoice.getString("fsourcebillno");
|
|
|
String fsourcetype = erpSainvoice.getString("fsourcetype");
|
|
String fsourcetype = erpSainvoice.getString("fsourcetype");
|
|
|
long sa_dispatchid = 0;
|
|
long sa_dispatchid = 0;
|
|
|
- if (StringUtils.isNotBlank(fsourcebillno)) {
|
|
|
|
|
- if (dbConnect.runSqlQuery("select sa_dispatchid from sa_dispatch where siteid='" + siteid + "' and billno='" + fsourcebillno + "'").isNotEmpty()) {
|
|
|
|
|
- sa_dispatchid = dbConnect.runSqlQuery("select sa_dispatchid from sa_dispatch where siteid='" + siteid + "' and billno='" + fsourcebillno + "'").get(0).getLong("sa_dispatchid");
|
|
|
|
|
|
|
+ if(siteid.equalsIgnoreCase("CCYOSG")){
|
|
|
|
|
+ if (StringUtils.isNotBlank(fsourcebillno)) {
|
|
|
|
|
+ if (dbConnect.runSqlQuery("select sa_dispatchid from sa_dispatch where siteid='" + siteid + "' and billno='" + fsourcebillno + "'").isNotEmpty()) {
|
|
|
|
|
+ sa_dispatchid = dbConnect.runSqlQuery("select sa_dispatchid from sa_dispatch where siteid='" + siteid + "' and billno='" + fsourcebillno + "'").get(0).getLong("sa_dispatchid");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ JSONObject flag = new JSONObject();
|
|
|
|
|
+ flag.put("syncyosid", erpSainvoice.getStringValue("syncyosid"));
|
|
|
|
|
+ flag.put("fupdateflag", "4");
|
|
|
|
|
+ flag.put("fupdatewarnlog", "yos中不存在对应的发货单");
|
|
|
|
|
+ flags.add(flag);
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
JSONObject flag = new JSONObject();
|
|
JSONObject flag = new JSONObject();
|
|
|
flag.put("syncyosid", erpSainvoice.getStringValue("syncyosid"));
|
|
flag.put("syncyosid", erpSainvoice.getStringValue("syncyosid"));
|
|
@@ -95,16 +104,10 @@ public class StockAutoDockDispatchService extends ServiceController {
|
|
|
flags.add(flag);
|
|
flags.add(flag);
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- JSONObject flag = new JSONObject();
|
|
|
|
|
- flag.put("syncyosid", erpSainvoice.getStringValue("syncyosid"));
|
|
|
|
|
- flag.put("fupdateflag", "4");
|
|
|
|
|
- flag.put("fupdatewarnlog", "yos中不存在对应的发货单");
|
|
|
|
|
- flags.add(flag);
|
|
|
|
|
- continue;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
Long sa_cashbillid = 0L;
|
|
Long sa_cashbillid = 0L;
|
|
|
|
|
|
|
|
Rows stockbillRows = dbConnect.runSqlQuery("select * from st_stockbill where siteid='" + siteid + "' and status='审核' and billno='" + fbillnum + "'");
|
|
Rows stockbillRows = dbConnect.runSqlQuery("select * from st_stockbill where siteid='" + siteid + "' and status='审核' and billno='" + fbillnum + "'");
|