From 43e1bf0ccd1da4f46f845889573a65c3b4ef0cf3 Mon Sep 17 00:00:00 2001 From: xs Date: Wed, 3 Jul 2024 15:51:32 +0800 Subject: [PATCH] =?UTF-8?q?2.5.3=20mes:=201=E3=80=81=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E3=80=81=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=92=8C=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=AE=8C=E5=96=84?= =?UTF-8?q?=202=E3=80=81=E8=BD=A6=E9=97=B4=E7=94=9F=E4=BA=A7=E5=AE=8C?= =?UTF-8?q?=E5=96=84=203=E3=80=81=E8=BF=9E=E6=8E=A5=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E6=9E=AA=E9=80=9A=E7=94=A8=E6=96=B9=E6=B3=95js=20wms=EF=BC=9A?= =?UTF-8?q?=201=E8=8E=B7=E5=8F=96=E4=BB=93=E5=BA=93=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/common/core/constant/WmsConstants.java | 1 + .../impl/MesProductOrderServiceImpl.java | 2 + .../impl/MesProductPlanServiceImpl.java | 8 +- .../mapper/mes/MesProductPlanMapper.xml | 1 + .../impl/WmsBaseWarehouseServiceImpl.java | 3 + .../impl/WmsProductInstockServiceImpl.java | 9 +- .../service/impl/WmsRawReturnServiceImpl.java | 6 +- hw-ui/src/layout/components/Navbar.vue | 2 +- hw-ui/src/utils/serial.js | 3 + hw-ui/src/views/board/fifthFloor/index.vue | 4 +- hw-ui/src/views/board/firstFloor/index.vue | 177 ++++++++++++++---- .../src/views/board/fourthFloor/assemble.vue | 16 +- .../views/board/fourthFloor/laserLight.vue | 16 +- hw-ui/src/views/board/fourthFloor/weld.vue | 28 +-- hw-ui/src/views/mes/productOrder/index.vue | 24 ++- hw-ui/src/views/mes/purchaseOrder/index.vue | 4 +- hw-ui/src/views/mes/saleOrder/index.vue | 93 +++------ 17 files changed, 239 insertions(+), 158 deletions(-) diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/WmsConstants.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/WmsConstants.java index 9909d83..810f3b9 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/WmsConstants.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/WmsConstants.java @@ -239,4 +239,5 @@ public class WmsConstants { //车间生产区域类型 public static final String MES_AREA_TYPE_FOUTHFLOOR_ASSEMBLE = "3";//四楼装配区域 + public static final String MES_AREA_TYPE_FOUTHFLOOR_PARTS = "4";//四楼零配件仓库 } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductOrderServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductOrderServiceImpl.java index bd15970..d8ebae2 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductOrderServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductOrderServiceImpl.java @@ -64,6 +64,8 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService { //销售订单添加工单:校验是否超出销售数量 if (mesProductOrder.getSaleOrderFlag().equals("1") && StringUtils.isNotNull(mesProductOrder.getSaleOrderId())) { checkSalesQuantity(mesProductOrder); + }else{ + mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount()); } return mesProductOrderMapper.insertMesProductOrder(mesProductOrder); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java index 92cbd47..1ea9163 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java @@ -2,6 +2,7 @@ package com.hw.mes.service.impl; import java.math.BigDecimal; import java.util.*; +import java.util.stream.Collectors; import com.alibaba.fastjson.JSONObject; import com.hw.common.core.constant.MesConstants; @@ -279,7 +280,12 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { public List selectMesProductPlanJoinList(MesProductPlan mesProductPlan) { Long stationId = SecurityUtils.getStationId(); mesProductPlan.setStationId(stationId); - return mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan); + + List mesProductPlans = mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan); + return mesProductPlans; +// return mesProductPlans.stream(). +// filter(e -> e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_DISPATCHED) || +// e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_STARTED)).collect(Collectors.toList()); } diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml index 1308bde..173c340 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml @@ -341,6 +341,7 @@ and mpp.station_id = #{stationId} and mpp.plan_status = #{planStatus} + order by mpo.plan_delivery_date diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseWarehouseServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseWarehouseServiceImpl.java index 1e6e669..dfd0a7c 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseWarehouseServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseWarehouseServiceImpl.java @@ -52,6 +52,9 @@ public class WmsBaseWarehouseServiceImpl implements IWmsBaseWarehouseService if(wmsBaseWarehouse.getMesAreaType().equals(WmsConstants.MES_AREA_TYPE_FOUTHFLOOR_ASSEMBLE)){ wmsBaseWarehouse.setWarehouseId(wmsConfig.getFourthFloorPartsWarehouseId()); } + if(wmsBaseWarehouse.getMesAreaType().equals(WmsConstants.MES_AREA_TYPE_FOUTHFLOOR_PARTS)){ + wmsBaseWarehouse.setWarehouseId(wmsConfig.getFourthFloorPartsWarehouseId()); + } } return wmsBaseWarehouseMapper.selectWmsBaseWarehouseList(wmsBaseWarehouse); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java index 0324764..7fe4696 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java @@ -4,6 +4,7 @@ import java.math.BigDecimal; import java.util.Date; import java.util.List; +import com.hw.common.core.constant.MesConstants; import com.hw.common.core.constant.SecurityConstants; import com.hw.common.core.constant.WmsConstants; import com.hw.common.core.domain.R; @@ -350,17 +351,21 @@ public class WmsProductInstockServiceImpl implements IWmsProductInstockService { String materialBarcode = wmsProduceInstockVo.getMaterialBarcode(); R baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER); if (baseBarcodeInfoR == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData(); if (baseBarcodeInfo == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } if (baseBarcodeInfo.getBarcodeType().equals(WmsConstants.RWA_STOCK_STOCK_TYPE_RAW)) { throw new ServiceException("此物料条码为原材料,非成品条码"); } + if (baseBarcodeInfo.getPrintFlag().equals(MesConstants.MES_BARCODE_PRINT_FLAG_NO)) { + throw new ServiceException("此条码还未打印"); + } + //如果执行状态不是已完成,是agv入库,则需要判断是否有入库记录,避免重复提交;如果执行状态是已完成(人工入库),则判断是否有此成品条码库存即可 if (!executeStatus.equals(WmsConstants.WMS_EXECUTE_STATUS_FINISH)) { WmsProductInstock queryProductInstock = new WmsProductInstock(); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java index aca94c8..23f21e5 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawReturnServiceImpl.java @@ -499,11 +499,11 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService { String materialBarcode = rawReturn.getMaterialBarcode(); R baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER); if (baseBarcodeInfoR == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData(); if (baseBarcodeInfo == null) { - throw new ServiceException("物料编码有误"); + throw new ServiceException("物料条码有误"); } String batchFlag = baseBarcodeInfo.getBatchFlag(); if (!batchFlag.equals(MesConstants.IS_BATCH)) { @@ -513,7 +513,7 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService { } if (!baseBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_RAW)) { - throw new ServiceException("物料编码有误,此物料编码非原材料编码"); + throw new ServiceException("物料条码有误,此物料编码非原材料编码"); } WmsRawStock existedRawStock = wmsRawStockMapper.selectRawStockByBarcode(materialBarcode); diff --git a/hw-ui/src/layout/components/Navbar.vue b/hw-ui/src/layout/components/Navbar.vue index 6195667..44a5d5e 100644 --- a/hw-ui/src/layout/components/Navbar.vue +++ b/hw-ui/src/layout/components/Navbar.vue @@ -256,7 +256,7 @@ export default { this.$store.dispatch('app/toggleSideBar') }, async logout() { - this.$confirm('确定注销并退出系统吗?', '提示', { + this.$confirm('确定退出系统吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' diff --git a/hw-ui/src/utils/serial.js b/hw-ui/src/utils/serial.js index 07b5770..9c213a9 100644 --- a/hw-ui/src/utils/serial.js +++ b/hw-ui/src/utils/serial.js @@ -46,6 +46,9 @@ export const monitorSerialData = { } } catch (error) { console.error('连接或读取串口时发生错误:', error); + } finally{ + this.reader.releaseLock(); + await this.serialPort.close(); } }, diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue index 07a68ac..a7a0940 100644 --- a/hw-ui/src/views/board/fifthFloor/index.vue +++ b/hw-ui/src/views/board/fifthFloor/index.vue @@ -340,7 +340,7 @@
- +