wangxichen 1 неделя назад
Родитель
Сommit
a0b911a9c4

+ 4 - 3
src/main/java/com/jeesite/modules/mes/service/MesLaserService.java

@@ -203,10 +203,11 @@ public class MesLaserService {
 				"DELETE FROM mes_product_laser WHERE steel_sn = ?",
 				steelSn);
 
-		// 插入新的绑定关系
+		// 插入新的绑定关系。只做绑定,不入打印队列
+		// cmt_print_status / rivet_print_status 走表的 DEFAULT 0
 		jdbcTemplate.update(
-				"INSERT INTO mes_product_laser(id,customer_sn,steel_sn,print_status,create_by,create_date,update_by,update_date) " +
-						"VALUES (?,?,?,1,'pda',now(),'pda',now())",
+				"INSERT INTO mes_product_laser(id,customer_sn,steel_sn,create_by,create_date,update_by,update_date) " +
+						"VALUES (?,?,?,'pda',now(),'pda',now())",
 				UUID.randomUUID().toString().replace("-", ""), customerSn, steelSn);
 	}
 

+ 15 - 5
src/main/resources/views/modules/mes/mesProductLaserList.html

@@ -91,22 +91,32 @@ function fmtRivetStatus(v){
 	if (v == 3 || v === '3') return '<span class="label label-danger">打印失败</span>';
 	return v;
 }
+// 客户码前缀 → 产品映射
+function fmtProduct(customerSn){
+	if (!customerSn) return '';
+	var pfx = customerSn.substring(0, 4).toUpperCase();
+	if (pfx === '+KB6') return 'T09';
+	if (pfx === '+KB8') return 'T68';
+	// 精确匹配前 5 位再兜底
+	pfx = customerSn.substring(0, 5).toUpperCase();
+	if (pfx === '+KB60') return 'T09';
+	if (pfx === '+KB87') return 'T68';
+	return '';
+}
 $('#dataGrid').dataGrid({
 	searchForm: $("#searchForm"),
 	columnModel: [
-		{header:'${text("产品标识")}', name:'prodCode', index:'a.prod_code', width:80, align:"center"},
+		{header:'${text("产品")}', name:'customerSn', index:'a.customer_sn', width:70, align:"center",
+			formatter: function(v){ return fmtProduct(v); }},
 		{header:'${text("钢印码")}', name:'steelSn', index:'a.steel_sn', width:160, align:"center"},
 		{header:'${text("客户码")}', name:'customerSn', index:'a.customer_sn', width:200, align:"center"},
-		{header:'${text("产线")}', name:'lineSn', index:'a.line_sn', width:70, align:"center"},
 		{header:'${text("CMT")}', name:'cmtPrintStatus', index:'a.cmt_print_status', width:80, align:"center",
 			formatter: function(v){ return fmtCmtStatus(v); }},
 		{header:'${text("拉铆")}', name:'rivetPrintStatus', index:'a.rivet_print_status', width:80, align:"center",
 			formatter: function(v){ return fmtRivetStatus(v); }},
 		{header:'${text("CMT打印时间")}', name:'cmtPrintTime', index:'a.cmt_print_time', width:140, align:"center"},
 		{header:'${text("拉铆打印时间")}', name:'rivetPrintTime', index:'a.rivet_print_time', width:140, align:"center"},
-		{header:'${text("失败原因")}', name:'printMsg', index:'a.print_msg', width:180, align:"left"},
-		{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:140, align:"center"},
-		{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:140, align:"center"}
+		{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:140, align:"center"}
 	],
 	ajaxSuccess: function(data){
 	}