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 @@
- +