代码更新
This commit is contained in:
@@ -1681,7 +1681,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
||||
@@ -1738,10 +1738,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
JSONObject paramMst = new JSONObject();
|
||||
JSONArray paramArr = new JSONArray();
|
||||
|
||||
paramMst.put("BLDAT", jo_mst.getString("biz_date"));
|
||||
paramMst.put("BUDAT", jo_mst.getString("biz_date"));
|
||||
paramMst.put("BKTXT", ""); // 凭证抬头文本
|
||||
paramMst.put("XBLNR", ""); // 参考
|
||||
// 去除日期中的横杠、冒号、空格
|
||||
String biz_date = jo_mst.getString("biz_date");
|
||||
String response = biz_date.replaceAll("[[\\s-:punct:]]","");
|
||||
|
||||
paramMst.put("BLDAT", response); // 去掉-
|
||||
paramMst.put("BUDAT", response); // 去掉-
|
||||
paramMst.put("BKTXT", jo_mst.getString("bill_code")); // 凭证抬头文本: 出库主表单据号
|
||||
paramMst.put("XBLNR", jo_mst.getString("input_optname")); // 参考:出库单创建人name
|
||||
|
||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||
for (int i = 0; i < disArr.size(); i++) {
|
||||
@@ -1754,12 +1758,25 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonDtl.put("BWART", "311");
|
||||
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
|
||||
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
|
||||
jsonDtl.put("LGORT", ""); // 库存地点
|
||||
|
||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
String sale_order_name = jsonSub.getString("sale_order_name");
|
||||
|
||||
// 销售订单:子卷包装关系 - 前内容
|
||||
jsonDtl.put("KDAUF", sale_order_name.substring(0, sale_order_name.indexOf("-")));
|
||||
// 销售订单行项目:子卷包装关系 - 后内容
|
||||
jsonDtl.put("KDPOS", sale_order_name.substring(sale_order_name.indexOf("-")+1, sale_order_name.length()));
|
||||
}
|
||||
|
||||
jsonDtl.put("CHARG", json.getString("pcsn"));
|
||||
jsonDtl.put("UMLGO", ""); // 收货库存地点
|
||||
jsonDtl.put("UMLGO", ""); // 收货库存地点:线边库外部标识
|
||||
jsonDtl.put("UMCHA", json.getString("pcsn"));
|
||||
jsonDtl.put("KDAUF", ""); // 销售订单
|
||||
jsonDtl.put("KDPOS", ""); // 销售订单行项目
|
||||
paramArr.add(jsonDtl);
|
||||
}
|
||||
paramMst.put("item", paramArr);
|
||||
|
||||
Reference in New Issue
Block a user