rev:回传sap更新

This commit is contained in:
2024-03-28 10:22:36 +08:00
parent 635984f957
commit 60d26e40bc
2 changed files with 17 additions and 6 deletions

View File

@@ -4689,6 +4689,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
storPublicService.updateStructAndPoint(from_start);
// 更新分配明细执行状态为 - 99
JSONObject jsonDis = wo_dis.query("iostorinvdis_id = '" + dis.getString("iostorinvdis_id") + "'").uniqueResult(0);
jsonDis.put("work_status", "99");
wo_dis.update(jsonDis);
if (jo_mst.getString("is_overdue").equals("1")) {
if (dis.getString("is_overdue").equals("1")) {
continue;
@@ -4725,11 +4730,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
jsonSub.put("record_id", IdUtil.getSnowflake(1, 1).nextId());
sub_record.insert(jsonSub);
// 更新分配明细执行状态为 - 99
JSONObject jsonDis = wo_dis.query("iostorinvdis_id = '" + dis.getString("iostorinvdis_id") + "'").uniqueResult(0);
jsonDis.put("work_status", "99");
wo_dis.update(jsonDis);
// 更新对应任务为完成
JSONObject jsonTask = taskTab.query("task_id = '" + jsonDis.getString("task_id") + "' and task_status < '07'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonTask)) {

View File

@@ -488,6 +488,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
// 子卷包装关系表
WQLObject subTab2 = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
JSONArray rows = whereJson.getJSONArray("rows");
for (int i = 0; i < rows.size(); i++) {
@@ -682,6 +684,9 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
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)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} else {
JSONObject jsonSub2 = subTab2.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
jsonDis.put("CHARG", jsonSub2.getString("sap_pcsn")); // sap批次
}
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
jsonDis.put("POSNR", json.getString("posnr")); // 项目
@@ -978,6 +983,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
// 子卷包装关系表
WQLObject subTab2 = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
//根据出入单类型判断回传业务
//1、生产入库回传MES手工入库回传SAP
@@ -1299,8 +1306,12 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
}
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批次
} else {
JSONObject jsonSub2 = subTab2.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
jsonDis.put("CHARG", jsonSub2.getString("sap_pcsn")); // sap批次
}
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
jsonDis.put("POSNR", json.getString("posnr")); // 项目