From 26788889e59d3b609152e87e0c9666d00cb8ea08 Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 9 Aug 2024 19:27:16 +0800 Subject: [PATCH] =?UTF-8?q?2.9.0=20MES:=20-=E7=94=9F=E4=BA=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=92=8C=E7=94=9F=E4=BA=A7=E6=B4=BE=E5=B7=A5=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug=20=E8=BD=A6=E9=97=B4MES:=20=E4=B8=80=E6=A5=BC?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E5=92=8C4=E6=A5=BC=E8=A3=85=E9=85=8D?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E5=BC=80=E5=A7=8B=E5=92=8C=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E4=B8=80=E6=A5=BC=E6=88=90=E5=93=81?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hw/mes/config/MesConfig.java | 10 ++ .../hw/mes/domain/MesProductPlanDetail.java | 4 +- .../impl/MesProductOrderServiceImpl.java | 5 +- .../impl/MesProductPlanDetailServiceImpl.java | 17 +- .../views/board/barcode/workshopBarcode.vue | 8 +- hw-ui/src/views/board/firstFloor/index.vue | 164 ++++++++++-------- .../src/views/board/fourthFloor/assemble.vue | 143 ++++++++------- .../views/board/fourthFloor/laserLight.vue | 5 +- hw-ui/src/views/board/fourthFloor/weld.vue | 4 +- hw-ui/src/views/mes/productOrder/index.vue | 6 +- .../views/mes/productplan/editProductPlan.vue | 29 ++-- 11 files changed, 230 insertions(+), 165 deletions(-) diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/config/MesConfig.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/config/MesConfig.java index 755f895..0c077d3 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/config/MesConfig.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/config/MesConfig.java @@ -29,6 +29,8 @@ public class MesConfig */ private int socketServerReadTimeOut; + private Long laserProcessId; + public String getSocketServerHost() { return socketServerHost; } @@ -52,4 +54,12 @@ public class MesConfig public void setSocketServerReadTimeOut(int socketServerReadTimeOut) { this.socketServerReadTimeOut = socketServerReadTimeOut; } + + public Long getLaserProcessId() { + return laserProcessId; + } + + public void setLaserProcessId(Long laserProcessId) { + this.laserProcessId = laserProcessId; + } } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlanDetail.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlanDetail.java index f5191ce..2785a1b 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlanDetail.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlanDetail.java @@ -41,12 +41,12 @@ public class MesProductPlanDetail extends BaseEntity private String userName; /** 开始时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") private Date realBeginTime; /** 完成时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") private Date realEndTime; 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 47ce422..8d4cd52 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 @@ -336,10 +336,9 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService { } - - /** * 在生产派工时校验库存信息 + * * @param mesProductOrder */ @Override @@ -358,7 +357,7 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService { //工单状态:0-待发布;1-已发布;2-已完成;3-已开始;4-暂停;8-已撤回;9-已删除 //找到派工数量大于0,并且状态是已发布或者已开始的或者暂停的 List filterProductOrders = mesProductOrders.stream().filter(p -> - (p.getDispatchAmount().compareTo(BigDecimal.ONE) >= 0) && + (p.getDispatchAmount() != null && p.getDispatchAmount().compareTo(BigDecimal.ONE) >= 0) && (p.getOrderStatus().equals(MesConstants.PUBLISHED) || p.getOrderStatus().equals(MesConstants.BEGIN) || p.getOrderStatus().equals(MesConstants.PAUSE)) ).collect(Collectors.toList()); diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java index 7b1f2ea..63088e4 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java @@ -7,6 +7,7 @@ import com.hw.common.core.utils.StringUtils; import com.hw.common.core.utils.uuid.Seq; import com.hw.common.security.utils.SecurityUtils; import com.hw.mes.api.domain.MesBaseBarcodeInfo; +import com.hw.mes.config.MesConfig; import com.hw.mes.domain.*; import com.hw.mes.domain.vo.MesProductPlanDetailVo; import com.hw.mes.mapper.*; @@ -49,6 +50,9 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer @Autowired private MesProductOrderMapper mesProductOrderMapper; + @Autowired + private MesConfig mesConfig; + /** * 查询生产计划明细 * @@ -301,11 +305,18 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer Date currentDate = new Date(); String userName = SecurityUtils.getUsername(); BigDecimal planAmount = null; +// BigDecimal dispatchAmount = null; //获取计划数量 + //如果是按图纸生产(激光切割工序),则判断完成数量不能大于图纸的数量, + //如果不是按图纸生产,则判断完成数量不能大于计划的数量 String attachId = dbProductPlan.getAttachId(); - if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的 - String[] attachIdArr = attachId.split(","); - planAmount = new BigDecimal(attachIdArr.length); + if (dbProductPlan.getProcessId().equals(mesConfig.getLaserProcessId())) { + if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的 + String[] attachIdArr = attachId.split(","); + planAmount = new BigDecimal(attachIdArr.length); + } else { + planAmount = BigDecimal.ONE; + } } else { planAmount = dbProductPlan.getPlanAmount(); } diff --git a/hw-ui/src/views/board/barcode/workshopBarcode.vue b/hw-ui/src/views/board/barcode/workshopBarcode.vue index c804b1f..603048f 100644 --- a/hw-ui/src/views/board/barcode/workshopBarcode.vue +++ b/hw-ui/src/views/board/barcode/workshopBarcode.vue @@ -382,6 +382,7 @@ export default { }, BARCODE_TYPE_PARAM: { + PRODUCT:'3',//成品 PRODUCT_BARCODE: '4',//成品配对码 SPLIT_BIND_BARCODE: '5', //拆分配对码 }, @@ -474,7 +475,12 @@ export default { } else { this.addInternalBtnVisible = false; this.addProductBarcodeBtnVisible = false; - this.addBindBarcodeBtnVisible = true; + if(this.barcodeTypeParam === this.BARCODE_TYPE_PARAM.PRODUCT){ + this.addBindBarcodeBtnVisible = false; + }else{ + this.addBindBarcodeBtnVisible = true; + } + if (this.total === 1 && this.barcodeTypeParam === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) { this.handleAddBindBarcode(this.form.bindBarcode); } diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue index f45c93a..43ee4d1 100644 --- a/hw-ui/src/views/board/firstFloor/index.vue +++ b/hw-ui/src/views/board/firstFloor/index.vue @@ -3,7 +3,7 @@
京源环保生产管理系统
-
派工信息
+
生产派工
+ + - 明细 - + @@ -151,7 +157,6 @@
@@ -240,7 +245,8 @@ size="small" type="text" @click="print(scope.row)" - v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED" + v-if="(scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED) + && finalProcessFlag ==='1'" > 条码 @@ -315,7 +321,8 @@ - + @@ -382,7 +389,8 @@ - + @@ -392,7 +400,8 @@ - + @@ -476,7 +485,7 @@