rev:报废回传修改

This commit is contained in:
2024-06-05 15:24:15 +08:00
parent 06214fa21c
commit 94f17e8464

View File

@@ -407,13 +407,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 所有子卷 // 所有子卷
List<JSONObject> disList = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("box_no in ('" + box_no_in + "') and iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0).toJavaList(JSONObject.class); List<JSONObject> disList = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("box_no in ('" + box_no_in + "') and iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0).toJavaList(JSONObject.class);
// 所有分切计划
// String pcsn_in = disList.stream()
// .map(row -> row.getString("pcsn"))
// .collect(Collectors.joining("','"));
// List<JSONObject> planList = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name in ('" + pcsn_in + "')").getResultJSONArray(0).toJavaList(JSONObject.class);
// 查询仓库 // 查询仓库
JSONObject jsonStor = WQLObject.getWQLObject("st_ivt_bsrealstorattr") JSONObject jsonStor = WQLObject.getWQLObject("st_ivt_bsrealstorattr")
.query("stor_code = '" + jo_mst.getString("stor_code") + "'").uniqueResult(0); .query("stor_code = '" + jo_mst.getString("stor_code") + "'").uniqueResult(0);
@@ -449,7 +442,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 仓库编码 // 仓库编码
param.put("WareHouse", jsonStor.getString("ext_id")); param.put("WareHouse", jsonStor.getString("ext_id"));
// new LmsToMesServiceImpl().ChildScrapUpdate(param); new LmsToMesServiceImpl().ChildScrapUpdate(param);
// 更新分配回传成功 // 更新分配回传成功
JSONObject jsonUpdate = new JSONObject(); JSONObject jsonUpdate = new JSONObject();
@@ -1635,12 +1628,17 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
.map(row -> row.getString("box_no")) .map(row -> row.getString("box_no"))
.collect(Collectors.joining("','")); .collect(Collectors.joining("','"));
// 所有子卷
List<JSONObject> disList = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("box_no in ('" + box_no_in + "') and iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0).toJavaList(JSONObject.class); List<JSONObject> disList = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("box_no in ('" + box_no_in + "') and iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0).toJavaList(JSONObject.class);
// 查询仓库
JSONObject jsonStor = WQLObject.getWQLObject("st_ivt_bsrealstorattr")
.query("stor_code = '" + jo_mst.getString("stor_code") + "'").uniqueResult(0);
for (int j = 0; j < disArr.size(); j++) {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
JSONArray item = new JSONArray(); JSONArray item = new JSONArray();
for (int j = 0; j < disArr.size(); j++) {
JSONObject json = disArr.getJSONObject(j); JSONObject json = disArr.getJSONObject(j);
JSONObject jsonDtl = new JSONObject(); JSONObject jsonDtl = new JSONObject();
@@ -1658,15 +1656,26 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonObject1 = new JSONObject(); JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("ContainerName", jsonObject.getString("pcsn")); jsonObject1.put("ContainerName", jsonObject.getString("pcsn"));
jsonObject1.put("NetWeight", NumberUtil.toStr(jsonObject.getDoubleValue("plan_qty"))); jsonObject1.put("NetWeight",NumberUtil.toStr(jsonObject.getDoubleValue("plan_qty")));
details.add(jsonObject1); details.add(jsonObject1);
} }
jsonDtl.put("Details", details); jsonDtl.put("Details", details);
item.add(jsonDtl); item.add(jsonDtl);
}
param.put("Items", item); param.put("Items", item);
// 仓库编码
param.put("WareHouse", jsonStor.getString("ext_id"));
new LmsToMesServiceImpl().ChildScrapUpdate(param); new LmsToMesServiceImpl().ChildScrapUpdate(param);
// 更新分配回传成功
JSONObject jsonUpdate = new JSONObject();
jsonUpdate.put("is_upload", "1");
WQLObject.getWQLObject("st_ivt_iostorinvdis")
.update(jsonUpdate,"iostorinv_id = '"+jo_mst.getString("iostorinv_id")+"' and box_no = '"+json.getString("box_no")+"'");
}
jo_mst.put("upload_mes", "1"); jo_mst.put("upload_mes", "1");
jo_mst.put("is_upload", "1"); jo_mst.put("is_upload", "1");
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId()); jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());