diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/MesConstants.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/MesConstants.java
index ea62d1d8..35122054 100644
--- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/MesConstants.java
+++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/MesConstants.java
@@ -9,11 +9,22 @@ package com.hw.common.core.constant;
*/
public class MesConstants {
- /*条码类型*/
- public static final String MES_BARCODE_TYPE_RAW = "1";//原材料
- public static final String MES_BARCODE_TYPE_SEMI = "2";//半成品
- public static final String MES_BARCODE_TYPE_PRODUCT = "3";//成品
- public static final String MES_BARCODE_TYPE_BACKPLATE = "4";//背板
+ /**
+ * 条码类型:原材料
+ */
+ public static final String MES_BARCODE_TYPE_RAW = "1";
+ /**
+ * 条码类型:半成品
+ */
+ public static final String MES_BARCODE_TYPE_SEMI = "2";
+ /**
+ * 条码类型:成品
+ */
+ public static final String MES_BARCODE_TYPE_PRODUCT = "3";
+ /**
+ * 条码类型:背板
+ */
+ public static final String MES_BARCODE_TYPE_BACKPLATE = "4";
/** 条码批次标识;0-否 */
public static final String NOT_IS_BATCH = "0";
diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java
index a6f81457..b5a4c9e3 100644
--- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java
+++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/uuid/Seq.java
@@ -99,15 +99,24 @@ public class Seq {
// 生产批次代码标识
public static final String mesBatchCodeCode = "PC";
- // 条码内容记录标识
+ // 原材料条码内容记录标识
public static final String mesBarcodeSeqType = "BAR_CODE";
- // 条码内容序列数
+ // 原材料条码内容序列数
private static AtomicInteger mesBarcodeSeq = new AtomicInteger(1);
- // 条码内容标识
+ // 原材料条码内容标识
public static final String mesBarcodeCode = "TM";
+ // 成品条码内容记录标识
+ public static final String mesCompBarcodeSeqType = "COMP_BAR_CODE";
+
+ // 成品条码内容序列数
+ private static AtomicInteger mesCompBarcodeSeq = new AtomicInteger(1);
+
+ // 成品条码内容标识
+ public static final String mesCompBarcodeCode = "CP";
+
// 设备报修工单编号记录标识
public static final String dmsBillsFaultInstanceSeqType = "DMSBILLSFAULTINSTANCE";
@@ -266,6 +275,8 @@ public class Seq {
atomicInt = planLubeSeq;
}else if(lubeInstanceSeqType.equals(type)) {
atomicInt = lubeInstanceSeq;
+ }else if(mesCompBarcodeSeqType.equals(type)) {
+ atomicInt = mesCompBarcodeSeq;
}
return getId(atomicInt, 3, code);
}
diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlan.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlan.java
index c15e06c4..2703663f 100644
--- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlan.java
+++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesProductPlan.java
@@ -128,6 +128,10 @@ public class MesProductPlan extends BaseEntity
@Excel(name = "是否标识")
private String isFlag;
+ /** sop附件ID,关联附件信息主键 */
+ @Excel(name = "sop附件ID")
+ private String sopId;
+
/**
* 计划交付日期
*/
@@ -151,6 +155,14 @@ public class MesProductPlan extends BaseEntity
/** 工单已派工数量 */
private BigDecimal dispatchedAmount;
+ public String getSopId() {
+ return sopId;
+ }
+
+ public void setSopId(String sopId) {
+ this.sopId = sopId;
+ }
+
public String getOrderCode() {
return orderCode;
}
diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java
index 499c2a16..26a7403b 100644
--- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java
+++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java
@@ -68,13 +68,14 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
/**
* 新增条码信息
- *
+ * barcode_type '条码类型(1=原材料,2=半成品,3=成品,4=背板)'
* @param mesBaseBarcodeInfo 条码信息
* @return 结果
*/
@Override
public int insertMesBaseBarcodeInfo(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
mesBaseBarcodeInfo.setCreateTime(DateUtils.getNowDate());
+ // 生成原材料条码
if (mesBaseBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_RAW)) {
//同一批次的批次代码相同
mesBaseBarcodeInfo.setBatchCode(Seq.getId(Seq.mesBatchCodeSeqType, Seq.mesBatchCodeCode));
@@ -92,6 +93,18 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
mesBaseBarcodeInfoMapper.insertMesBaseBarcodeInfo(mesBaseBarcodeInfo);
}
}
+ // 生成成品条码
+ if (mesBaseBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_PRODUCT)) {
+ // 批次代码 == 条码内容
+ int frequency = mesBaseBarcodeInfo.getAmount().intValue();
+ for (int i = 0; i < frequency; i++) {
+ String code = Seq.getId(Seq.mesCompBarcodeSeqType, Seq.mesCompBarcodeCode);
+ mesBaseBarcodeInfo.setBatchCode(code);
+ mesBaseBarcodeInfo.setBarcodeInfo(code);
+ mesBaseBarcodeInfo.setAmount(new BigDecimal(1));
+ mesBaseBarcodeInfoMapper.insertMesBaseBarcodeInfo(mesBaseBarcodeInfo);
+ }
+ }
return 1;
}
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 f7e244bf..ec689992 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
@@ -40,6 +40,7 @@
+
@@ -91,6 +92,7 @@
mpp.real_begin_time,
mpp.real_end_time,
mpp.attach_id,
+ mpp.sop_id,
mpp.plan_status,
mpp.is_flag,
mpp.remark,
@@ -208,6 +210,7 @@
create_time,
update_by,
update_time,
+ sop_id,
#{productOrderId},
@@ -235,6 +238,7 @@
#{createTime},
#{updateBy},
#{updateTime},
+ #{sopId},
@@ -266,6 +270,7 @@
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
+ sop_id = #{sopId},
where plan_id = #{planId}
diff --git a/hw-ui/src/views/mes/barcode/endProductIndex.vue b/hw-ui/src/views/mes/barcode/endProductIndex.vue
index 04989495..b4a64603 100644
--- a/hw-ui/src/views/mes/barcode/endProductIndex.vue
+++ b/hw-ui/src/views/mes/barcode/endProductIndex.vue
@@ -1,162 +1,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
搜索
重置
@@ -238,19 +46,21 @@
size="mini"
@click="handleAdd"
v-hasPermi="['mes:barcode:add']"
- >新增
-
-
- 修改
+ >新增
+
+
+
+
+
+
+
+
+
+
+
+
+
删除
+ >删除
+
导出
+ >导出
+
-
+
-
-
- {{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
@@ -318,19 +122,27 @@
{{ parseTime(scope.row.lastOutstockDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+ {{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
-
-
+
-
+
{{ parseTime(scope.row.bindTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
@@ -342,22 +154,31 @@
{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
+
修改
- 删除
+ icon="el-icon-printer"
+ @click="handlePrintBarCode(scope.row)"
+ >打印
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -372,63 +193,43 @@
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- {{dict.label}}
-
-
-
-
- {{dict.label}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{dict.label}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/hw-ui/src/views/mes/barcode/tergumIndex.vue b/hw-ui/src/views/mes/barcode/tergumIndex.vue
new file mode 100644
index 00000000..04989495
--- /dev/null
+++ b/hw-ui/src/views/mes/barcode/tergumIndex.vue
@@ -0,0 +1,744 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+ {{ parseTime(scope.row.acceptedDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+ {{ parseTime(scope.row.lastOutstockDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.bindTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+ {{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+