|
|
@@ -3153,18 +3153,14 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // >>> 临时放行:HMB 一对一型号校验(照 HmbBindTest 补录流程)。回退:把下一行 if(false) 改回 if(true)
|
|
|
- if(false){
|
|
|
- // 一对一规则:底板码前8位必须对应膨胀梁码前13位
|
|
|
- String pairWsn = sn.length() >= 8 ? HMB_PAIR.get(sn.substring(0, 8)) : null;
|
|
|
- if(pairWsn == null){
|
|
|
- return renderResult(Global.FALSE, text("底板码型号未配置对应关系!"));
|
|
|
- }
|
|
|
- if(!wsn.startsWith(pairWsn)){
|
|
|
- return renderResult(Global.FALSE, text("底板码与膨胀梁码型号不匹配!"));
|
|
|
- }
|
|
|
+ // 一对一型号校验:底板码前8位必须对应膨胀梁码前13位
|
|
|
+ String pairWsn = sn.length() >= 8 ? HMB_PAIR.get(sn.substring(0, 8)) : null;
|
|
|
+ if(pairWsn == null){
|
|
|
+ return renderResult(Global.FALSE, text("底板码型号未配置对应关系!"));
|
|
|
+ }
|
|
|
+ if(!wsn.startsWith(pairWsn)){
|
|
|
+ return renderResult(Global.FALSE, text("底板码与膨胀梁码型号不匹配!"));
|
|
|
}
|
|
|
- // <<< 临时放行结束
|
|
|
|
|
|
// 检查前工件码是否已绑定后面板码
|
|
|
MesProductHmb mesProductHmb2 = new MesProductHmb();
|
|
|
@@ -3178,7 +3174,17 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductHmb.setSn(wsn);
|
|
|
MesProductHmb mesProductHmb1 = mesProductHmbService.findInfo(mesProductHmb);
|
|
|
if(ObjectUtils.isEmpty(mesProductHmb1)){
|
|
|
- return renderResult(Global.FALSE, text("后面板码未录入系统"));
|
|
|
+ // 补录:长码未录入时自动登记为已验证,并一次性写入绑定关系
|
|
|
+ MesProductHmb mesProductHmbNew = new MesProductHmb();
|
|
|
+ mesProductHmbNew.setSn(wsn);
|
|
|
+ mesProductHmbNew.setState("1");
|
|
|
+ mesProductHmbNew.setQsn(sn);
|
|
|
+ mesProductHmbNew.setLineSn(lineSn);
|
|
|
+ mesProductHmbNew.setCreateBy(userCode);
|
|
|
+ mesProductHmbNew.setUpdateBy(userCode);
|
|
|
+ mesProductHmbService.save(mesProductHmbNew);
|
|
|
+ logger.info("pcbind补录并绑定长码:" + wsn + ",短码:" + sn + ",lineSn:" + lineSn + ",user:" + userCode);
|
|
|
+ return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}
|
|
|
|
|
|
if(mesProductHmb1.getState().equals("0")){
|