소스 검색

冷板校验

wangxichen 1 주 전
부모
커밋
ef1ada37e6

+ 4 - 6
src/main/java/com/jeesite/modules/mes/web/MesProductRecordController.java

@@ -982,8 +982,9 @@ public class MesProductRecordController extends BaseController {
 				}
 			}
 		}
-		if(CommonUitl.formatOprno(oldOprno).equals("OP300")){ //底护板安装
-			if(res.equals("UD")){ // 检查是否已绑定底护板
+		if(CommonUitl.formatOprno(oldOprno).equals("OP310")){ //成品气密
+			if(res.equals("UD")){
+				// 检查是否已绑定底护板(从OP300挪到OP310检查)
 				String checkDhb = Global.getConfig("mes.dhb.check");
 				if(checkDhb.equals("1")){
 					MesProductDhb mesProductDhb = new MesProductDhb();
@@ -993,11 +994,8 @@ public class MesProductRecordController extends BaseController {
 						return "RSDH"; // 未绑定底护板
 					}
 				}
-			}
-		}
 
-		if(CommonUitl.formatOprno(oldOprno).equals("OP310")){ //成品气密
-			if(res.equals("UD")){ // 检查底护板安装(OP300)到成品气密(OP310)间隔是否超过两小时
+				// 检查底护板安装(OP300)到成品气密(OP310)间隔是否超过两小时
 				MesDeviceTime op300Time = mesDeviceTimeService.getInfoByOprnoAndSnAndCate("OP300A",sn,lineSn);
 				if(op300Time == null){
 					op300Time = mesDeviceTimeService.getInfoByOprnoAndSnAndCate("OP300",sn,lineSn);

+ 4 - 0
src/main/java/com/jeesite/modules/utils/MesMsgUtils.java

@@ -64,6 +64,7 @@ public class MesMsgUtils {
 			"AQDW",//请求查询质量数据报文
 			"MBDW",//绑定报文
 			"MJBW",//解绑报文
+			"VLDW",//校验冷板绑定报文
 			"MQDW",//上传质量数据报文
 			"MKSW", //工位开始工作报文
 			"MSBW",//上传设备状态报文
@@ -375,6 +376,9 @@ public class MesMsgUtils {
 		}else if(msg_type.equalsIgnoreCase("MJBW")){ // 解绑报文
 			String msgType = msg_type;
 			processMsgRet = formatBindResult(msg,channel_ip,msg_type,gw,msgType);
+		}else if(msg_type.equalsIgnoreCase("VLDW")){ // 校验冷板绑定报文
+			String msgType = msg_type;
+			processMsgRet = formatBindResult(msg,channel_ip,msg_type,gw,msgType);
 		}else if(msg_type.equalsIgnoreCase("MCSW")){ // 上传参数结果
 			String msgType = msg_type;
 			processMsgRet = formatResult(msg,channel_ip,msg_type,gw,msgType);

+ 2 - 2
src/main/java/com/jeesite/modules/utils/ProtocolParam.java

@@ -122,7 +122,7 @@ public class ProtocolParam {
 //        String cate = getProductCate(msg);
 //        String oprno = getOprno(msg);
         Integer res = 0;
-        if(msgType.equals("MBDW") || msgType.equals("MJBW") || msgType.equals("AQDW") || msgType.equals("MCJW")||msgType.equals("MKSW")){ // 绑定报文,截取36个字符
+        if(msgType.equals("MBDW") || msgType.equals("MJBW") || msgType.equals("VLDW") || msgType.equals("AQDW") || msgType.equals("MCJW")||msgType.equals("MKSW")){ // 绑定报文,截取36个字符
             if(msg.length() >= fixedLength + length*36){
                 res = length*36;
             }
@@ -152,7 +152,7 @@ public class ProtocolParam {
 //        String cate = getProductCate(msg);
 //        String oprno = getOprno(msg);
         String res = "";
-        if(msgType.equals("MBDW")||msgType.equals("MJBW")||msgType.equals("AQDW")||msgType.equals("MCJW")||msgType.equals("MKSW")){ // 绑定报文,截取36个字符
+        if(msgType.equals("MBDW")||msgType.equals("MJBW")||msgType.equals("VLDW")||msgType.equals("AQDW")||msgType.equals("MCJW")||msgType.equals("MKSW")){ // 绑定报文,截取36个字符
             if(msg.length() >= fixedLength + length*36){
                 res = msg.substring(fixedLength+(num-1)*36,fixedLength + num*36);
             }