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