rev:盘点删除修改

This commit is contained in:
2023-04-25 11:09:56 +08:00
parent 6f02e3a418
commit 0a45974220

View File

@@ -85,6 +85,10 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
//任务表
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
//点位表
WQLObject wo_Point = WQLObject.getWQLObject("sch_base_point");
//仓位表
WQLObject wo_Attr = WQLObject.getWQLObject("st_ivt_structattr");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
@@ -96,11 +100,13 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
map.put("update_time", now);
JSONObject jo_mst = wo_mst.query("moveinv_id='" + moveinv_id + "'").uniqueResult(0);
JSONArray ja = wo_dtl.query("moveinv_id='" + moveinv_id + "'").getResultJSONArray(0);
String point_code2 = "";
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
//删除任务
HashMap<String, String> task_map = new HashMap<>();
task_map.put("is_delete", "1");
point_code2 = wo_Task.query("task_id = '" + jo.getString("task_id") + "'").uniqueResult(0).getString("point_code2");
wo_Task.update(task_map, "task_id='" + jo.getString("task_id") + "'");
//解锁起点点位、仓位
JSONObject from_start = new JSONObject();
@@ -133,6 +139,15 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
}
//更新主表
wo_mst.update(map, "moveinv_id='" + moveinv_id + "'");
// 更新移入点位
JSONObject jsonPoint = wo_Point.query("point_code = '" + point_code2 + "'").uniqueResult(0);
jsonPoint.put("vehicle_code", "");
wo_Point.update(jsonPoint);
JSONObject jsonAttr = wo_Attr.query("struct_code = '" + point_code2 + "'").uniqueResult(0);
jsonAttr.put("storagevehicle_code", "");
wo_Attr.update(jsonAttr);
}
@Override