From 137e62ace9926c309269e97c60cbe8a02479c5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?= Date: Wed, 7 Sep 2022 10:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/sch/manage/buss/SendMaterialTask.java | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java index ee5c712..53720a4 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendMaterialTask.java @@ -192,9 +192,7 @@ public class SendMaterialTask extends AbstractAcsTask { throw new BadRequestException("载具不能为空!"); } //判断起点有没有未完成的指令 - JSONObject beforTaskObj = taskTable. - query("is_delete='0' and start_point_code='" + start_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'") - .uniqueResult(0); + JSONObject beforTaskObj = taskTable.query("is_delete='0' and start_point_code='" + start_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'").uniqueResult(0); if (ObjectUtil.isNotEmpty(beforTaskObj)) { throw new BadRequestException("存在指令号为'" + beforTaskObj.getString("task_code") + "' 未完成!"); } @@ -232,8 +230,7 @@ public class SendMaterialTask extends AbstractAcsTask { if (StrUtil.isEmpty(is_full)) { throw new BadRequestException("是否满托不能为空!"); } - JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", start_point_code) - .process().uniqueResult(0); + JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", start_point_code).process().uniqueResult(0); String workprocedure_id = workInfo.getString("workprocedure_id"); WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id); String vehilce_type = ""; @@ -263,9 +260,12 @@ public class SendMaterialTask extends AbstractAcsTask { qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID; bill_type = BillTypeEnum.FJRK.getCode(); endArea_type = AreaEnum.BZZC.getCode(); - vehicle_code = startPoint.getVehicle_code(); if (StrUtil.equals(is_full, "1")) { next_point_code = "BZX01"; + if (StrUtil.equals(vehicle_code, "0")) { + vehicle_code = startPoint.getVehicle_code(); + } + } break; @@ -288,11 +288,7 @@ public class SendMaterialTask extends AbstractAcsTask { //创建入库单据 //假如静置时间为空,则取物料表上的静置时间 if (StrUtil.isEmpty(stewing_time)) { - stewing_time = WQLObject - .getWQLObject("md_me_material") - .query("material_id ='" + material_id + "'") - .uniqueResult(0) - .getString("stewing_time"); + stewing_time = WQLObject.getWQLObject("md_me_material").query("material_id ='" + material_id + "'").uniqueResult(0).getString("stewing_time"); } JSONObject iosObj = new JSONObject(); iosObj.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId()); @@ -330,9 +326,7 @@ public class SendMaterialTask extends AbstractAcsTask { //终点点加锁 HashMap lock_map = new HashMap(); lock_map.put("lock_type", "01"); - WQLObject - .getWQLObject("sch_base_point") - .update(lock_map, "point_code = '" + next_point_code + "'"); + WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + next_point_code + "'"); CodeUtil.getNewCode("TASK_CODE"); JSONObject taskObj = new JSONObject(); taskObj.put("task_id", task_id);