diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 33947910e..b41d6b464 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -9,25 +9,19 @@ import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; - import org.nl.modules.system.util.CodeUtil; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; -import org.nl.system.service.param.ISysParamService; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.ext.acs.service.AcsToWmsService; -import org.nl.wms.log.LokiLog; -import org.nl.wms.log.LokiLogType; import org.nl.wms.pda.mps.service.impl.BakingServiceImpl; import org.nl.wms.pda.st.service.PrintService; import org.nl.wms.sch.manage.TaskStatusEnum; -import org.nl.wms.sch.service.TaskService; import org.nl.wms.sch.tasks.EmptyVehicleTask; import org.nl.wms.sch.tasks.SendOutTask; import org.nl.wms.st.inbill.service.RawAssistIStorService; import org.nl.wms.st.inbill.service.StorPublicService; -import org.nl.wms.st.inbill.service.impl.RawAssistIStorServiceImpl; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -36,7 +30,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; @Service @@ -431,7 +424,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { throw new BadRequestException("未查询到该木箱对应的包装关系!"); } //贴标申请 - String print_type = sub_jo.getString("print_type"); + String print_type = "1"; if (StrUtil.isEmpty(print_type)) { throw new BadRequestException("请指定一台打印机进行打印!"); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java index a3a22c488..fdf94978d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java @@ -157,6 +157,20 @@ public class ProductInstorServiceImpl implements ProductInstorService { if (StrUtil.isEmpty(box_length) || StrUtil.isEmpty(box_width) || StrUtil.isEmpty(box_high)){ throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!"); } + JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '"+point_code+"'").uniqueResult(0); + if (ObjectUtil.isEmpty(point_jo)){ + throw new BadRequestException("未查询到对应的点位!"); + }else { + if (point_jo.getString("is_used").equals("0")){ + throw new BadRequestException("该点位已经被禁用!"); + } + if (point_jo.getString("is_delete").equals("1")){ + throw new BadRequestException("该点位已经被删除!"); + } + if (!point_jo.getString("region_code").equals("NBJ01")){ + throw new BadRequestException("请扫描内包间入库点位!"); + } + } //创建二楼去一楼的任务 JSONObject form = new JSONObject(); form.put("point_code1", point_code); @@ -165,6 +179,11 @@ public class ProductInstorServiceImpl implements ProductInstorService { form.put("task_type", "010507"); cutConveyorTask.createTask(form); } else { + JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0); + if (now_dis_rows.size() > 0) { + throw new BadRequestException("该木箱已经分配过货位,无法继续分配!"); + } + String task_id = IdUtil.getSnowflake(1, 1).nextId() + ""; //直接分配虚拟区货位,并确认 JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id",stor.getString("stor_id")).process().uniqueResult(0); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_ST_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_ST_01.wql index 4242e9316..d5f09bbc8 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_ST_01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/wql/PDA_ST_01.wql @@ -90,7 +90,7 @@ LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no AND sub.container_name = dis.pcsn - LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code + LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code AND task.task_status < '07' AND task.is_delete = '0' WHERE mst.bill_type = '0009' AND sub.STATUS = '1' @@ -152,24 +152,17 @@ IF 输入.flag = "8" QUERY SELECT - sub.package_box_SN, - sub.container_name, - sub.product_name, - sub.product_description, - sub.net_weight + package_box_SN, + container_name, + product_name, + product_description, + net_weight FROM - st_ivt_iostorinvdis dis - LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id - LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn - LEFT JOIN sch_base_task task ON task.vehicle_code = dis.storagevehicle_code + pdm_bi_subpackagerelation sub WHERE - mst.bill_type = '1005' - AND sub.STATUS = '0' - AND mst.is_delete = '0' - AND mst.bill_status = '99' - AND dis.work_status = '99' - AND task.task_id IS NULL - AND sub.package_box_SN = 输入.box_no + sub.status = '0' + AND + sub.package_box_SN = 输入.box_no ENDSELECT ENDQUERY ENDIF diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/RawAssistIStorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/RawAssistIStorServiceImpl.java index 889b35653..8a6be2653 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/RawAssistIStorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/RawAssistIStorServiceImpl.java @@ -231,6 +231,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService { dis.put("material_id", row.get("material_id")); dis.put("pcsn", row.get("pcsn")); dis.put("box_no", row.get("box_no")); + dis.put("storagevehicle_code", row.get("box_no")); dis.put("quality_scode", row.get("quality_scode")); dis.put("work_status", "00"); dis.put("qty_unit_id", material.getString("base_unit_id")); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/wql/QST_IVT_RAWASSISTISTOR.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/wql/QST_IVT_RAWASSISTISTOR.wql index a5288db7d..374dfddbe 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/wql/QST_IVT_RAWASSISTISTOR.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/wql/QST_IVT_RAWASSISTISTOR.wql @@ -176,6 +176,8 @@ OPTION 输入.open_flag = "2" dtl.bill_status IN ('30','40') ENDOPTION + ORDER BY + dtl.box_no ENDSELECT ENDQUERY ENDIF diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/HandMoveStorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/HandMoveStorServiceImpl.java index 58cb6ad3c..27ed9bcac 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/HandMoveStorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/HandMoveStorServiceImpl.java @@ -254,7 +254,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService { task.put("task_id", task_id); task.put("task_code", task_code); task.put("task_type", "010505"); - task.put("task_status", "01"); + task.put("task_status", TaskStatusEnum.START_AND_POINT.getCode()); task.put("point_code1", jo.getString("start_point_code")); task.put("point_code2", point.getString("point_code")); task.put("vehicle_code", jo.getString("storagevehicle_code")); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/task/HandMoveStorAcsTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/task/HandMoveStorAcsTask.java index db1c60c54..044347c5b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/task/HandMoveStorAcsTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/instor/task/HandMoveStorAcsTask.java @@ -86,7 +86,7 @@ public class HandMoveStorAcsTask extends AbstractAcsTask { if(task==null){ throw new BadRequestException("查询不到操作的任务记录!"); } - if("1".equals(status)){ + if(TaskStatusEnum.EXECUTING.equals(status)){ map.put("work_status","02"); wo_dtl.update(map,"task_id='"+task_id+"'"); map.put("task_status","03"); @@ -94,7 +94,7 @@ public class HandMoveStorAcsTask extends AbstractAcsTask { map.put("update_optname",nickName); map.put("update_time",now); wo_Task.update(map,"task_id='"+task_id+"'"); - }else if("2".equals(status)){ + }else if(TaskStatusEnum.FINISHED.equals(status)){ HandMoveStorServiceImpl handMoveStorServiceImpl = SpringContextHolder.getBean(HandMoveStorServiceImpl.class); handMoveStorServiceImpl.finishTask(task); }else if("0".equals(status)){ 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 90e6f0181..99b2e5ac7 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 @@ -258,8 +258,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { // rows.clear(); // 遍历 for (String box_no : boxSet) { - JSONObject jsonObject = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "7").addParam("box_no", box_no).process().uniqueResult(0); - rows.add(jsonObject); + JSONArray jsonArr = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0); + for (int i = 0; i < jsonArr.size(); i++) { + JSONObject jsonObject = jsonArr.getJSONObject(i); + rows.add(jsonObject); + } } } @@ -340,8 +343,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { // 判断此明细子卷是否存在,存在则将此木箱下的子卷全部生成明细 String pcsn = row.getString("pcsn"); + String box_no = row.getString("box_no"); + //查询该箱子所在货位 + JSONObject struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '"+box_no+"'").uniqueResult(0); + String struct_code = struct_jo.getString("struct_code"); if (ObjectUtil.isNotEmpty(pcsn)) { - JSONObject json = ivtTab.query("pcsn = '" + pcsn + "'").uniqueResult(0); + JSONObject json = ivtTab.query("pcsn = '" + pcsn + "' AND struct_code = '"+struct_code+"'").uniqueResult(0); if (ObjectUtil.isEmpty(json)) continue; JSONObject jsonMap = new JSONObject(); @@ -3903,7 +3910,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { //查询对应明细 JSONObject dtl_jo = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("iostorinvdtl_id = '" + dis.getString("iostorinvdtl_id") + "'").uniqueResult(0); // 更新子卷包装关系表 状态 - 3 - JSONObject jsonSub = subTab.query("container_name = '" + dis.getString("pcsn") + "' and status = '2'").uniqueResult(0); + JSONObject jsonSub = subTab.query("container_name = '" + dis.getString("pcsn") + "' and package_box_sn = '"+dis.getString("box_no")+"' and status = '2'").uniqueResult(0); if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("此子卷不存在或不为入库状态:" + dis.getString("pcsn")); // 如果是拆分入库则将包装关系改为生成状态 if (jo_mst.getString("bill_type").equals("1005") || (jo_mst.getString("bill_type").equals("1009") && StrUtil.isEmpty(dtl_jo.getString("source_bill_code")))) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql index 3f85bd4c7..930376121 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT01.wql @@ -137,6 +137,10 @@ attr.block_num = 输入.block_num ENDOPTION + OPTION 输入.stor_id <> "" + attr.stor_id = 输入.stor_id + ENDOPTION + group by attr.storagevehicle_code) a order by a.instorage_time ASC diff --git a/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue b/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue index d64639c27..cc21488a1 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/bi/index.vue @@ -162,7 +162,7 @@ /> --> - + @@ -179,192 +179,196 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -375,72 +379,94 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - + + + - + @@ -455,14 +481,55 @@ import pagination from '@crud/Pagination' import { download } from '@/api/data' import { downloadFile } from '@/utils' -const defaultForm = { workorder_id: null, package_box_sn: null, quanlity_in_box: null, box_weight: null, quality_guaran_period: null, sale_order_name: null, customer_name: null, customer_description: null, product_name: null, product_description: null, date_of_fg_inbound: null, container_name: null, width: null, thickness: null, mass_per_unit_area: null, net_weight: null, length: null, date_of_production: null, is_un_plan_production: null, un_plan_product_property1: null, un_plan_product_property2: null, un_plan_product_property3: null, box_type: null, sap_pcsn: null, remark: null, create_id: null, create_name: null, create_time: null, status: null, isreprintpackageboxlabel: null, isunpackbox: null, thickness_request: null, width_standard: null } +const defaultForm = { + workorder_id: null, + package_box_sn: null, + quanlity_in_box: null, + box_weight: null, + quality_guaran_period: null, + sale_order_name: null, + customer_name: null, + customer_description: null, + product_name: null, + product_description: null, + date_of_fg_inbound: null, + container_name: null, + width: null, + thickness: null, + mass_per_unit_area: null, + net_weight: null, + length: null, + date_of_production: null, + is_un_plan_production: null, + un_plan_product_property1: null, + un_plan_product_property2: null, + un_plan_product_property3: null, + box_type: null, + sap_pcsn: null, + remark: null, + create_id: null, + create_name: null, + create_time: null, + status: null, + isreprintpackageboxlabel: null, + isunpackbox: null, + thickness_request: null, + width_standard: null +} export default { name: 'Subpackagerelation', dicts: ['sub_package_relation', 'IS_OR_NOT'], components: { pagination, crudOperation, rrOperation, udOperation }, mixins: [presenter(), header(), form(defaultForm), crud()], cruds() { - return CRUD({ title: '子卷包装关系', url: 'api/subpackagerelation', idField: 'workorder_id', sort: 'workorder_id,desc', crudMethod: { ...crudSubpackagerelation }}) + return CRUD({ + title: '子卷包装关系', + optShow: { add: true, edit: false, del: false }, + url: 'api/subpackagerelation', + idField: 'workorder_id', + sort: 'workorder_id,desc', + crudMethod: { ...crudSubpackagerelation } + }) }, data() { return { @@ -475,6 +542,7 @@ export default { { 'label': '是', 'value': '1' }, { 'label': '否', 'value': '0' } ], + rules: { customer_description: [ { required: true, message: '客户名称不能为空', trigger: 'blur' } @@ -539,7 +607,8 @@ export default { status: [ { required: true, message: '状态不能为空', trigger: 'blur' } ] - }} + } + } }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 diff --git a/lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue b/lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue index 4e9340495..507a5f415 100644 --- a/lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue +++ b/lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue @@ -138,10 +138,10 @@ - - + + - +