dev:回传优化
This commit is contained in:
@@ -97,8 +97,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||||
// 库区表
|
// 库区表
|
||||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||||
// 子卷包装关系表
|
|
||||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
|
||||||
|
|
||||||
//根据出入单类型判断回传业务
|
//根据出入单类型判断回传业务
|
||||||
//1、生产入库:回传MES;手工入库:回传SAP
|
//1、生产入库:回传MES;手工入库:回传SAP
|
||||||
@@ -375,7 +373,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
// 库区表
|
// 库区表
|
||||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||||
// 子卷包装关系表
|
// 子卷包装关系表
|
||||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
|
||||||
|
|
||||||
JSONArray rows = whereJson.getJSONArray("rows");
|
JSONArray rows = whereJson.getJSONArray("rows");
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
@@ -422,7 +420,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -495,7 +493,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -569,8 +567,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
||||||
@@ -627,7 +625,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
||||||
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "' AND bill_id = '"+jsonDis.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
paramDis.put("ZHL02", jsonSub.getString("width"));
|
paramDis.put("ZHL02", jsonSub.getString("width"));
|
||||||
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
||||||
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
||||||
@@ -761,7 +759,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -869,7 +867,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
// 库区表
|
// 库区表
|
||||||
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
|
||||||
// 子卷包装关系表
|
// 子卷包装关系表
|
||||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
|
||||||
|
|
||||||
//根据出入单类型判断回传业务
|
//根据出入单类型判断回传业务
|
||||||
//1、生产入库:回传MES;手工入库:回传SAP
|
//1、生产入库:回传MES;手工入库:回传SAP
|
||||||
@@ -941,7 +939,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -995,7 +993,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
|
||||||
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
paramDis.put("MATNR", jsonMater.getString("material_code"));
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "' AND bill_id = '"+jsonDis.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
paramDis.put("ZHL02", jsonSub.getString("width"));
|
paramDis.put("ZHL02", jsonSub.getString("width"));
|
||||||
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
|
||||||
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
|
||||||
@@ -1094,7 +1092,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -1194,7 +1192,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
@@ -1461,7 +1459,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user