diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java index 7255776..ee865d9 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java @@ -19,7 +19,10 @@ public class StructFindUtil { throw new BadRequestException("托盘不能为空!"); } //根据托盘找托盘类型, - JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0); + JSONObject vehicleObj = WQLObject + .getWQLObject("md_pb_vehicle") + .query("vehicle_code='" + vehicle_code + "'") + .uniqueResult(0); if (ObjectUtil.isEmpty(vehicleObj)) { throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!"); } @@ -30,8 +33,14 @@ public class StructFindUtil { throw new BadRequestException("区域不能为空!"); } String vehice_type = vehicleObj.getString("vehicle_type"); - JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "2") - .addParam("material_id", material_id).addParam("area_type", area_type).addParam("vehice_type", vehice_type).process().uniqueResult(0); + JSONObject result = WQL + .getWO("QSTRUCT_RULE") + .addParam("flag", "2") + .addParam("material_id", material_id) + .addParam("area_type", area_type) + .addParam("vehice_type", vehice_type) + .process() + .uniqueResult(0); return result; } diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java index dba2ff4..b648484 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java @@ -164,15 +164,14 @@ public class CallMaterialTask extends AbstractAcsTask { String start_point_code = form.getString("start_point_code"); String next_point_code = form.getString("next_point_code"); String vehicle_code = form.getString("vehicle_code"); - String task_status = TaskStatusEnum.SURE_START.getCode(); String material_id = form.getString("material_id"); String cust_id = form.getString("cust_id"); String create_mode = form.getString("create_mode"); String pcsn = form.getString("pcsn"); String is_full = form.getString("is_full"); String workprocedure_id = form.getString("workprocedure_id"); - WQLObject taskTable = WQLObject.getWQLObject("SCH_BASE_Task"); String iostorinv_id = form.getString("iostorinv_id"); + WQLObject taskTable = WQLObject.getWQLObject("SCH_BASE_Task"); if (StrUtil.isEmpty(next_point_code)) { throw new BadRequestException("终点不能为空!"); } @@ -183,8 +182,8 @@ public class CallMaterialTask extends AbstractAcsTask { throw new BadRequestException("是否满托不能为空!"); } //判断终点有没有未完成的指令 - JSONObject beforTaskObj = taskTable. - query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'") + JSONObject beforTaskObj = taskTable + .query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'") .uniqueResult(0); if (ObjectUtil.isNotEmpty(beforTaskObj)) { throw new BadRequestException("存在指令号为'" + beforTaskObj.getString("task_code") + "' 未完成!"); @@ -216,12 +215,15 @@ public class CallMaterialTask extends AbstractAcsTask { } PointDto nextPoint = pointService.findByCode(next_point_code); - //如果没给终点,根据起点去找工序,找一个合适的仓位 并且生成入库单,并且锁定点位 + //如果没给起点,根据重点去找工序,找一个合适的仓位 并且生成出库单,并且锁定点位 if (StrUtil.isEmpty(start_point_code)) { if (StrUtil.isEmpty(workprocedure_id)) { - - JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", next_point_code) - .process().uniqueResult(0); + JSONObject workInfo = WQL + .getWO("QSTRUCT_RULE") + .addParam("flag", "1") + .addParam("code", next_point_code) + .process() + .uniqueResult(0); workprocedure_id = workInfo.getString("workprocedure_id"); WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id); @@ -316,7 +318,7 @@ public class CallMaterialTask extends AbstractAcsTask { WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj); } - task_status = TaskStatusEnum.START_AND_POINT.getCode(); + String task_status = TaskStatusEnum.START_AND_POINT.getCode(); PointDto startPoint = pointService.findByCode(start_point_code); start_area = nextPoint.getArea_type(); 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 6fa18bf..9bbf446 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 @@ -258,7 +258,7 @@ public class SendMaterialTask extends AbstractAcsTask { //分拣工序 case FJGX: qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID; - bill_type = BillTypeEnum.SZRK.getCode(); + bill_type = BillTypeEnum.FJRK.getCode(); endArea_type = AreaEnum.BZZC.getCode(); break; default: @@ -278,8 +278,11 @@ public class SendMaterialTask extends AbstractAcsTask { //创建入库单据 //假如静置时间为0 或者为空,则取物料表上的静置时间 if (StrUtil.isEmpty(stewing_time) || StrUtil.equals(stewing_time, "0")) { - 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()); @@ -315,7 +318,9 @@ 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);