diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java index b8bff8054..ecd089c8a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java @@ -219,7 +219,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } - public boolean exe_error() { if (this.error == 0) { return true; @@ -242,6 +241,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme protected void thingToNothing() throws Exception { this.setRequireSucess(false); this.setApplySucess(false); + this.writing("to_command", "0"); + this.writing("to_target", "0"); + this.writing("to_container_type", "0"); + this.writing("to_task", "0"); + this.writing("to_strap_times", "0"); + this.writing("to_length", "0"); + this.writing("to_weight", "0"); + this.writing("to_height", "0"); } @@ -332,7 +339,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme /** * 请求指令 - * */ public synchronized boolean instruction_require() throws Exception { Date date = new Date(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index 56b756faa..dcd858f01 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -284,14 +284,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //双任务/单任务 后工位取空时判断动作信号,并反馈 if (mode == 3 && action2 == 1 && move2 == 0 && task2 > 0) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task2)); - String start_device_code = ""; - if (type == 2) { - start_device_code = inst1.getStart_device_code(); - } - if (type == 3) { - start_device_code = inst1.getStart_device_code2(); - } + String start_device_code = inst1.getStart_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); + if (ObjectUtil.isEmpty(startDevice)) { + feedMessage = "后工位取货位:" + start_device_code + "为空!"; + return; + } SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; if (startDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) startDevice.getDeviceDriver(); @@ -307,13 +305,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { log.warn("前工位取货位无货,取货位:{},mode:{},move:{}", start_device_code, mode, move); if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) { - feedMessage = "请检查输送线:mode == 2 && move == 1"; + feedMessage = "请检查输送线:mode == 2 && move == 1,此时读取到mode = " + mode + "move = " + move; } } } } else { if (this.getNow_steps_type2() == 2 || this.getNow_steps_type3() == 2) { - feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 1 && move2 == 0 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -328,7 +327,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 3 || this.getNow_steps_type3() == 3) { - feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 2 && move2 == 1 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -342,7 +342,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 2 || this.getNow_steps_type3() == 4) { - feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0"; + feedMessage = "请检查mode == 3 && action1 == 1 && move1 == 0 && task1 > 0,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -357,7 +358,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 3 || this.getNow_steps_type3() == 5) { - feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0"; + feedMessage = "请检查:mode == 3 && action1 == 2 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -372,7 +374,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 4 || this.getNow_steps_type3() == 6) { - feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0"; + feedMessage = "请检查:mode == 3 && action2 == 3 && move2 == 1 && task2 > 0,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2; } } @@ -402,7 +405,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type2() == 5) { - feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2"; + feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task2 > 0 && type == 2,此时读取到 " + + "mode =" + mode + "action2 = " + action2 + "move2 = " + move2 + "task2 = " + task2 + "type = " + type; } } @@ -412,21 +416,31 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl this.setNow_steps_type3(8); } else { if (this.getNow_steps_type3() == 7) { - feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3"; + feedMessage = "请检查:mode == 3 && action2 == 4 && move2 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode + + "action2 = " + action2 + "move2 = " + move2 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; } } //单任务/双任务 前工位放货时判断放货位光电信号 if (mode == 3 && action1 == 3 && move1 == 1 && task1 > 0) { Instruction inst1 = instructionService.findByCodeFromCache(String.valueOf(task1)); - String next_device_code = inst1.getNext_device_code(); + String next_device_code = ""; + if (type == 1) { + next_device_code = inst1.getNext_device_code(); + } else if (type == 3) { + next_device_code = inst1.getNext_device_code2(); + } Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code); + if (ObjectUtil.isEmpty(nextDevice)) { + feedMessage = "前工位放货位:" + next_device_code + "为空!"; + return; + } SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; if (nextDevice.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) nextDevice.getDeviceDriver(); int move = siemensConveyorDeviceDriver.getMove(); int mode = siemensConveyorDeviceDriver.getMode(); - if (move == 0 && mode == 2) { + if (move == 1 && mode == 2) { this.writing("to_command1", "4"); if (type == 1) { this.setNow_steps_type1(5); @@ -436,13 +450,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { log.warn("后工位放货位有货,放货位:{},mode:{},move:{}", next_device_code, mode, move); if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查输送线:move == 0 && mode == 2"; + feedMessage = "请检查输送线:move == 1 && mode == 2,此时读取到mode = " + mode + "move = " + move; } } } } else { if (this.getNow_steps_type1() == 4 || this.getNow_steps_type3() == 8) { - feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0"; + feedMessage = "请检查:mode == 3 && action1 == 3 && move1 == 1 && task1 > 0,此时读取到mode = " + mode + "action1 = " + + action1 + "move1 = " + move1 + "task1 = " + task1; } } @@ -473,7 +488,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type1() == 5) { - feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1"; + feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && type == 1,此时读取到 mode = " + + mode + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "type = " + type; } } @@ -504,7 +520,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } } else { if (this.getNow_steps_type3() == 9) { - feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3"; + feedMessage = "请检查:mode == 3 && action1 == 4 && move1 == 0 && task1 > 0 && task2 > 0 && type == 3,此时读取到mode = " + mode + + "action1 = " + action1 + "move1 = " + move1 + "task1 = " + task1 + "task2 = " + task2 + "type = " + type; } } @@ -845,9 +862,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl Device nextDevice = deviceAppservice.findDeviceByCode(next_device_code); Device startDevice2 = deviceAppservice.findDeviceByCode(start_device_code2); Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2); + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + ",任务信息为:" + taskDto.toString()); //如果指令表中的取货点1和取货点2 都不为空 则说明时下双工位任务 if (StrUtil.isNotEmpty(start_device_code2) && StrUtil.isNotEmpty(start_device_code)) { type = "3"; + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",任务信息为:" + taskDto.toString()); //判断四个点位是否都设置电气值 this.isSetAddress(startDevice); this.isSetAddress(nextDevice); @@ -862,6 +884,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else if (backGetIndex != -1) { type = "2"; //后工位 } + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",任务信息为:" + taskDto.toString()); //判断单任务下的两个点位是否都设置电气值 this.isSetAddress(startDevice); this.isSetAddress(nextDevice); @@ -905,6 +930,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl instdto.setNext_point_code2(next_point_code2); try { + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "" + + "执行就绪状态下的任务生成指令时:起点1为:" + start_device_code + "起点2为:" + start_device_code2 + + "type值为:" + type + ",创建指令信息为:" + instdto.toString()); instructionService.create(instdto); flag = true; } catch (Exception e) { @@ -927,6 +955,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl //下发电气信号 public synchronized void sendSignalType(Instruction dto, String type) { + logServer.deviceExecuteLog(this.getDeviceCode(), "", "", "开始下发电气信号,即下发电气指令信息为:" + + dto.toString() + ",type = " + type); String start_device_code = dto.getStart_device_code(); String next_device_code = dto.getNext_device_code(); Device startDevice = deviceAppservice.findDeviceByCode(start_device_code); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index c68b21ffc..7345b7676 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -154,7 +154,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { HongXiangStationDeviceDriver hongXiangStationDeviceDriver; if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); - hongXiangStationDeviceDriver.writing(code,value); + hongXiangStationDeviceDriver.writing(code, value); } } response.setStatus(200); @@ -200,8 +200,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("mode", hongXiangStationDeviceDriver.getMode()); jo.put("move", hongXiangStationDeviceDriver.getMove()); - } - else if(device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){ + } else if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver(); jo.put("device_code", parent_device_code); jo.put("mode", hongXiangConveyorDeviceDriver.getMode()); @@ -214,8 +213,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("finish", hongXiangConveyorDeviceDriver.getFinish()); jo.put("task", hongXiangConveyorDeviceDriver.getTask()); jo.put("error", hongXiangConveyorDeviceDriver.getError()); - } - else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) { + } else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) { standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver(); jo.put("device_code", parent_device_code); jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove()); @@ -299,9 +297,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { String storage_task_type = request.getDtl_type(); String agv_system_type = request.getAgv_system_type(); String remark = request.getRemark(); - double oven_time = Double.parseDouble(request.getOven_time()); + double oven_time = 0.00d; + if (StrUtil.isNotEmpty(request.getOven_time())) { + oven_time = Double.parseDouble(request.getOven_time()); + } String temperature = request.getTemperature(); - Map params = request.getParams(); + Map params = request.getParams(); String start_point_code = ""; String start_point_code2 = ""; @@ -339,7 +340,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { if (!ObjectUtil.isEmpty(put_device_json)) { put_point_code = (String) put_device_json.get("parent_storage_code") == null ? put_device_code : (String) next_device_json.get("storage_code"); } - if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) { + if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) { String str[] = start_point_code.split("-"); start_device_code = str[0]; } else { @@ -353,21 +354,21 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { next_device_code = next_point_code; } - if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) { + if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) { String str[] = start_point_code2.split("-"); start_device_code2 = str[0]; } else { start_device_code2 = start_point_code2; } - if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) { + if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) { String str[] = next_point_code2.split("-"); next_device_code2 = str[0]; } else { next_device_code2 = next_point_code2; } - if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) { + if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) { String str[] = put_point_code.split("-"); put_device_code = str[0]; } else { @@ -393,7 +394,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { JSONObject json = new JSONObject(); json.put("task_code", task_code); json.put("ext_task_id", ext_task_id); - json.put("message", request.getStart_device_code() +" 该设备号未找到对应点位"); + json.put("message", request.getStart_device_code() + " 该设备号未找到对应点位"); errArr.add(json); continue; } @@ -401,7 +402,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { JSONObject json = new JSONObject(); json.put("task_code", task_code); json.put("ext_task_id", ext_task_id); - json.put("message", request.getNext_device_code() +" 该设备号未找到对应点位"); + json.put("message", request.getNext_device_code() + " 该设备号未找到对应点位"); errArr.add(json); continue; } @@ -438,7 +439,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { TaskDto task_dto = jo.toJavaObject(TaskDto.class); try { // task_type=7 则是立库任务需要下刻下发 - if(StrUtil.equals(task_dto.getTask_type(),"7")){ + if (StrUtil.equals(task_dto.getTask_type(), "7")) { taskService.create(task_dto); } else { taskService.create(task_dto); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/StructivtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/StructivtServiceImpl.java index 3380583c4..cfd57d5a3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/StructivtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/StructivtServiceImpl.java @@ -183,7 +183,7 @@ public class StructivtServiceImpl implements StructivtService { String package_box_sn = MapUtil.getStr(whereJson, "package_box_sn"); String sale_order_name = MapUtil.getStr(whereJson, "sale_order_name"); JSONObject map = new JSONObject(); - map.put("flag", "1"); + map.put("flag", "2"); map.put("stor_id", stor_id); if (StrUtil.isNotEmpty(material)) { map.put("material", "%" + material + "%"); @@ -217,21 +217,36 @@ public class StructivtServiceImpl implements StructivtService { JSONObject json = resultJSONArray.getJSONObject(i); Map mp = new LinkedHashMap<>(); - mp.put("仓位编码", json.getString("struct_code")); - mp.put("仓位名称", json.getString("struct_name")); mp.put("仓库", json.getString("stor_name")); mp.put("库区", json.getString("sect_name")); + mp.put("仓位编码", json.getString("struct_code")); + mp.put("仓位名称", json.getString("struct_name")); + mp.put("木箱码", json.getString("package_box_sn")); mp.put("物料编码", json.getString("material_code")); mp.put("物料名称", json.getString("material_name")); - mp.put("木箱码", json.getString("package_box_sn")); mp.put("子卷号", json.getString("pcsn")); mp.put("sap批次", json.getString("sap_pcsn")); - mp.put("可用数", json.getString("canuse_qty")); - mp.put("冻结数", json.getString("frozen_qty")); - mp.put("库存数", json.getString("ivt_qty")); - mp.put("待入数", json.getString("warehousing_qty")); - mp.put("计量单位", json.getString("unit_name")); - mp.put("入库时间", json.getString("instorage_time")); + mp.put("重量", json.getString("canuse_qty")); + mp.put("单位", json.getString("unit_name")); + mp.put("客户编码", json.getString("customer_name")); + mp.put("客户名称", json.getString("customer_description")); + mp.put("销售订单", json.getString("sale_order_name")); + mp.put("入库日期", json.getString("instorage_time")); + mp.put("生产日期", json.getString("date_of_production")); + mp.put("产品规格(幅宽)", json.getString("width")); + mp.put("产品厚度", json.getString("thickness")); + mp.put("单位面积重量", json.getString("mass_per_unit_area")); + mp.put("净重", json.getString("net_weight")); + mp.put("长度", json.getString("length")); + mp.put("计划外分切的子卷", json.getString("is_un_plan_production")); + mp.put("子卷的物性值1", json.getString("un_plan_product_property1")); + mp.put("子卷的物性值2", json.getString("un_plan_product_property2")); + mp.put("子卷的物性值3", json.getString("un_plan_product_property3")); + mp.put("备注", json.getString("remark")); + mp.put("是否需要重打外包装标签", json.getString("isreprintpackageboxlabel")); + mp.put("是否需要拆包重打子卷标签", json.getString("isunpackbox")); + mp.put("客户要求规格幅宽", json.getString("width_standard")); + mp.put("物料标准厚度", json.getString("thickness_request")); list.add(mp); } FileUtil.downloadExcel(list, response); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql index fde0ca6e3..2d601ad29 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql @@ -107,5 +107,84 @@ ENDPAGEQUERY ENDIF + IF 输入.flag = "2" + QUERY + SELECT + ivt.*, + attr.sect_id, + attr.sect_code, + attr.sect_name, + attr.stor_name, + mater.material_code, + mater.material_name, + unit.unit_name, + region.region_name, + sub.sap_pcsn, + sub.package_box_sn, + sub.sale_order_name, + sub.customer_name, + sub.customer_description, + sub.date_of_production, + sub.width, + sub.thickness, + sub.mass_per_unit_area, + sub.net_weight, + sub.length, + sub.is_un_plan_production, + sub.un_plan_product_property1, + sub.un_plan_product_property2, + sub.un_plan_product_property3, + sub.remark, + sub.isUnPackBox, + sub.isRePrintPackageBoxLabel, + sub.width_standard, + sub.thickness_request + FROM + ST_IVT_StructIvt ivt + LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id + LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id + LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id + LEFT JOIN SCH_BASE_Region region ON region.region_id = ivt.region_id + LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = ivt.pcsn AND attr.storagevehicle_code = sub.package_box_sn + WHERE + 1 = 1 + and attr.stor_id in 输入.in_stor_id + + OPTION 输入.struct <> "" + ( + ivt.struct_code like 输入.struct or + ivt.struct_name like 输入.struct + ) + ENDOPTION + OPTION 输入.material <> "" + ( + mater.material_code like 输入.material or + mater.material_name like 输入.material + ) + ENDOPTION + OPTION 输入.pcsn <> "" + ivt.pcsn like 输入.pcsn + ENDOPTION + + OPTION 输入.sap_pcsn <> "" + sub.sap_pcsn like 输入.sap_pcsn + ENDOPTION + + OPTION 输入.stor_id <> "" + attr.stor_id = 输入.stor_id + ENDOPTION + + OPTION 输入.package_box_sn <> "" + sub.package_box_sn like 输入.package_box_sn + ENDOPTION + + OPTION 输入.sale_order_name <> "" + sub.sale_order_name like 输入.sale_order_name + ENDOPTION + + ENDSELECT + ENDQUERY + ENDIF + diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index 248cbae3a..05255ca70 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -89,6 +89,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) { map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%"); } + if (StrUtil.isNotEmpty(map.get("cust_code"))) { + map.put("cust_code", "%" + map.get("cust_code") + "%"); + } //获取人员对应的仓库 UserStorServiceImpl userStorService = new UserStorServiceImpl(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql index 56a4315d0..d233913b1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql @@ -47,6 +47,7 @@ 输入.box_no TYPEAS s_string 输入.canuse_qty TYPEAS s_string 输入.sap_pcsn TYPEAS s_string + 输入.cust_code TYPEAS s_string 输入.in_stor_id TYPEAS f_string [临时表] --这边列出来的临时表就会在运行期动态创建 @@ -97,6 +98,11 @@ sub.sap_pcsn like 输入.sap_pcsn ENDOPTION + OPTION 输入.cust_code <> "" + (cu.cust_code like 输入.cust_code or + cu.cust_simple_name like 输入.cust_code) + ENDOPTION + OPTION 输入.pcsn <> "" dis.pcsn like 输入.pcsn ENDOPTION diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue b/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue index 33b18401f..76c15a9de 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/StructIvt.vue @@ -100,10 +100,10 @@ - + - - + + @@ -111,7 +111,7 @@ - +