From d92ec484fa59faa7319d2c3e3e1f1e5b7da83819 Mon Sep 17 00:00:00 2001 From: yanps Date: Mon, 18 Nov 2024 14:34:11 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E5=8F=96=E6=B6=88NDC=E4=BB=BB=E5=8A=A1,?= =?UTF-8?q?=E6=89=8B=E6=8C=81=E4=B8=8B=E5=8F=91=E4=BB=BB=E5=8A=A1=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/server/impl/NDCAgvServiceImpl.java | 2 +- .../impl/WmsToConnectorServiceImpl.java | 4 +-- .../service/impl/HandheldServiceImpl.java | 17 +++++----- .../SchBaseVehiclematerialgroupMapper.xml | 3 +- ...chBaseVehiclematerialgroupServiceImpl.java | 9 ++++-- .../service/impl/SchBasePointServiceImpl.java | 3 +- .../src/views/wms/sch/group/index.vue | 31 ++++++++++++++++--- 7 files changed, 47 insertions(+), 22 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java index d43a480..84cea2c 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java @@ -69,7 +69,7 @@ public class NDCAgvServiceImpl implements NDCAgvService { }; log.info("下发删除AGV指令--{}", Bytes2HexString(b)); -// NDCSocketConnectionAutoRun.write(b); + OneNDCSocketConnectionAutoRun.write(b); System.out.println("下发删除agv指令数据:" + Bytes2HexString(b)); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java index bb777e5..cbf0add 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java @@ -60,9 +60,9 @@ public class WmsToConnectorServiceImpl implements WmsToConnectorService { materials.forEach(material -> { String replace = StrUtil.replace(StrUtil.toString(material), "=", ":"); JSONObject jsonObject1 = JSONObject.parseObject(replace); - jsonObject1.put("due_date", "2000-10-01 00:00:00 "); + jsonObject1.put("due_date", "2000-10-01 00:00:00"); jsonObject1.put("next_region_code", ""); - jsonObject1.put("priority", "5"); + jsonObject1.put("priority", ""); objects.add(jsonObject1); }); jsonObject.put("data", objects); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java index f8e8a6c..3e40420 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java @@ -108,6 +108,7 @@ public class HandheldServiceImpl implements HandheldService { private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) { SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code); if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!"); + if (schBasePoint.getIs_lock()) throw new BadRequestException("当前点位存在任务!"); MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle); if (ObjectUtil.isEmpty(mdBaseVehicle)) throw new BadRequestException("载具不存在!"); @@ -127,7 +128,9 @@ public class HandheldServiceImpl implements HandheldService { jo.put("vehicle_type", mdBaseVehicle.getVehicle_type()); jo.put("ext_data", param); connectorTask.apply(jo); - + iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) + .eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) + .set(SchBasePoint::getIs_lock, true)); } /** @@ -285,7 +288,7 @@ public class HandheldServiceImpl implements HandheldService { /** * connector下料入库 * - * @param schBasePoint + * @param * @param param * @param region_code * @param device_code @@ -305,9 +308,7 @@ public class HandheldServiceImpl implements HandheldService { connectorTask.apply(jo); iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) .eq(SchBasePoint::getPoint_code, device_code) - .set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()) - .set(SchBasePoint::getIs_lock, true) - .set(SchBasePoint::getVehicle_code, null)); + .set(SchBasePoint::getIs_lock, true)); } /** @@ -330,12 +331,12 @@ public class HandheldServiceImpl implements HandheldService { if (StrUtil.isBlank(region_code)) { JSONObject json = new JSONObject(); JSONArray jsonArray = new JSONArray(); - HashMap map = new HashMap<>(); materials.stream().forEach(material2 -> { boolean material_code = ObjectUtil.isEmpty(((LinkedHashMap) material2).get("material_code")); if (material_code) { ((LinkedHashMap) material2).remove("material_code"); } + HashMap map = new HashMap<>(); cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material2); map.put("order_code", jsonObject.get("order_code")); map.put("qty", jsonObject.get("material_qty")); @@ -428,9 +429,7 @@ public class HandheldServiceImpl implements HandheldService { connectorTask.apply(jo); iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) .eq(SchBasePoint::getPoint_code, device_code) - .set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()) - .set(SchBasePoint::getIs_lock, true) - .set(SchBasePoint::getVehicle_code, null)); + .set(SchBasePoint::getIs_lock, true)); iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class) .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code)); materials.stream().forEach(material -> { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml index 0df3fc5..e97b36a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/mapper/SchBaseVehiclematerialgroupMapper.xml @@ -78,7 +78,7 @@ ROW_NUMBER() OVER (PARTITION BY vg.vehicle_code ORDER BY vg.due_date) AS rn FROM sch_base_vehiclematerialgroup vg - where 1=1 + where vg.is_delete = 0 AND vg.vehicle_code = #{query.vehicle_code} @@ -97,6 +97,7 @@ AND vg.material_id like CONCAT('%', #{query.material_id}, '%') + order by vg.region_code desc ) SELECT * FROM RankedVehicles diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java index 7d0cb94..cd42975 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java @@ -77,7 +77,7 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl { @@ -193,6 +193,10 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl确认 - - 物料图片 + + 物料图片 - + - + + + @@ -375,6 +388,7 @@ import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue' import WorkOrderDialog from '@/views/wms/sch/group/WorkOrderDialog.vue' import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint' import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion' +import errGif from '@/assets/images/background2.jpg' const defaultForm = { group_id: null, @@ -451,11 +465,13 @@ export default { materialDialog: false, workOrderDialog: false, dialogVisible: false, + dialogVisible1: false, newTask: { point_code2: '', vehicle_code: '', point_code1: '' - } + }, + errGif: errGif } }, created() { @@ -468,6 +484,11 @@ export default { [CRUD.HOOK.beforeRefresh]() { return true }, + showImage(materialId) { + console.log('Clicked material_id:', materialId) + this.dialogVisible1 = true + // 在这里处理点击逻辑,例如弹出图片、显示详情等 + }, getWorkShopList() { // 获取车间列表 crudMdBaseWorkShop.getWorkShopList().then(res => { this.workShopList = res