|
@@ -3377,12 +3377,12 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
|
- // 三枪:无子结果时允许 OP170A / OP170B / OP170C
|
|
|
|
|
- if(!oldOprno.equals("OP170A") && !oldOprno.equals("OP170B") && !oldOprno.equals("OP170C")){
|
|
|
|
|
|
|
+ // 两枪:无子结果时仅允许 OP170A / OP170B
|
|
|
|
|
+ if(!oldOprno.equals("OP170A") && !oldOprno.equals("OP170B")){
|
|
|
newRet = "QQ"; // 本工位前工序未加工或加工NG
|
|
newRet = "QQ"; // 本工位前工序未加工或加工NG
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- // [旧六枪-C~F门禁] 暂不用,现场三枪任意顺序;恢复时取消注释
|
|
|
|
|
|
|
+ // [旧六枪-C~F门禁] 暂不用,现场仅两枪;恢复时取消注释
|
|
|
/*
|
|
/*
|
|
|
if(oldOprno.equals("OP170C") || oldOprno.equals("OP170D")){
|
|
if(oldOprno.equals("OP170C") || oldOprno.equals("OP170D")){
|
|
|
if(StringUtils.isEmpty(mesProductOprno1.getResult1()) || !mesProductOprno1.getResult1().equals("OK")){
|
|
if(StringUtils.isEmpty(mesProductOprno1.getResult1()) || !mesProductOprno1.getResult1().equals("OK")){
|
|
@@ -3577,8 +3577,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductYtService.save(mesProductYt1);
|
|
mesProductYtService.save(mesProductYt1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!oprno.equals("OP170A") && !oprno.equals("OP170B") && !oprno.equals("OP170C")){
|
|
|
|
|
- resp.setMessage("工位号错误,螺套仅支持OP170A/OP170B/OP170C");
|
|
|
|
|
|
|
+ if(!oprno.equals("OP170A") && !oprno.equals("OP170B")){
|
|
|
|
|
+ resp.setMessage("工位号错误,螺套仅支持OP170A/OP170B");
|
|
|
resp.setResult(Global.FALSE);
|
|
resp.setResult(Global.FALSE);
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
@@ -3591,15 +3591,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
|
- // 三枪:OP170A→result1,OP170B→result2,OP170C→result3;未齐不写本站 NG
|
|
|
|
|
|
|
+ // 两枪:OP170A→result1,OP170B→result2;未齐不写本站 NG
|
|
|
if(oprno.equals("OP170A")){
|
|
if(oprno.equals("OP170A")){
|
|
|
mesProductOprno.setResult1("OK");
|
|
mesProductOprno.setResult1("OK");
|
|
|
}else if(oprno.equals("OP170B")){
|
|
}else if(oprno.equals("OP170B")){
|
|
|
mesProductOprno.setResult2("OK");
|
|
mesProductOprno.setResult2("OK");
|
|
|
- }else if(oprno.equals("OP170C")){
|
|
|
|
|
- mesProductOprno.setResult3("OK");
|
|
|
|
|
}
|
|
}
|
|
|
- // [旧六枪-OP190] 暂不用,恢复时取消注释并隐藏上方三枪分支
|
|
|
|
|
|
|
+ // [旧六枪-OP190] 暂不用,恢复时取消注释并隐藏上方两枪分支
|
|
|
/*
|
|
/*
|
|
|
if(oprno.equals("OP190A")){
|
|
if(oprno.equals("OP190A")){
|
|
|
mesProductOprno.setResult1("OK");
|
|
mesProductOprno.setResult1("OK");
|
|
@@ -3645,15 +3643,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
}else{
|
|
|
- // 三枪:OP170A→result1,OP170B→result2,OP170C→result3
|
|
|
|
|
|
|
+ // 两枪:OP170A→result1,OP170B→result2
|
|
|
if(oprno.equals("OP170A")){
|
|
if(oprno.equals("OP170A")){
|
|
|
mesProductOprno1.setResult1("OK");
|
|
mesProductOprno1.setResult1("OK");
|
|
|
}else if(oprno.equals("OP170B")){
|
|
}else if(oprno.equals("OP170B")){
|
|
|
mesProductOprno1.setResult2("OK");
|
|
mesProductOprno1.setResult2("OK");
|
|
|
- }else if(oprno.equals("OP170C")){
|
|
|
|
|
- mesProductOprno1.setResult3("OK");
|
|
|
|
|
}
|
|
}
|
|
|
- // [旧六枪-OP190] 暂不用,恢复时取消注释并隐藏上方三枪分支
|
|
|
|
|
|
|
+ // [旧六枪-OP190] 暂不用,恢复时取消注释并隐藏上方两枪分支
|
|
|
/*
|
|
/*
|
|
|
if(oprno.equals("OP190A")){
|
|
if(oprno.equals("OP190A")){
|
|
|
mesProductOprno1.setResult1("OK");
|
|
mesProductOprno1.setResult1("OK");
|
|
@@ -3672,10 +3668,9 @@ public class MesProductRecordController extends BaseController {
|
|
|
|
|
|
|
|
mesProductOprnoService.save(mesProductOprno1);
|
|
mesProductOprnoService.save(mesProductOprno1);
|
|
|
|
|
|
|
|
- // 三枪都 OK 才整站 OK(未齐不写 craft,保持 UDF)
|
|
|
|
|
|
|
+ // 两枪都 OK 才整站 OK(未齐不写 craft,保持 UDF)
|
|
|
allOk = !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult1().equals("OK")
|
|
allOk = !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult1().equals("OK")
|
|
|
- && !StringUtils.isEmpty(mesProductOprno1.getResult2()) && mesProductOprno1.getResult2().equals("OK")
|
|
|
|
|
- && !StringUtils.isEmpty(mesProductOprno1.getResult3()) && mesProductOprno1.getResult3().equals("OK");
|
|
|
|
|
|
|
+ && !StringUtils.isEmpty(mesProductOprno1.getResult2()) && mesProductOprno1.getResult2().equals("OK");
|
|
|
// [旧六枪汇总] 暂不用:需 result1~6 全 OK
|
|
// [旧六枪汇总] 暂不用:需 result1~6 全 OK
|
|
|
/*
|
|
/*
|
|
|
if(StringUtils.isEmpty(mesProductOprno1.getResult1()) || !mesProductOprno1.getResult1().equals("OK")){
|
|
if(StringUtils.isEmpty(mesProductOprno1.getResult1()) || !mesProductOprno1.getResult1().equals("OK")){
|
|
@@ -3694,7 +3689,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 仅三枪齐了才回写本站 craft=100000=OK;未齐不落 NG
|
|
|
|
|
|
|
+ // 仅两枪齐了才回写本站 craft=100000=OK;未齐不落 NG
|
|
|
if(allOk){
|
|
if(allOk){
|
|
|
sn = mesProductHmbService.formatHmbSn(sn);
|
|
sn = mesProductHmbService.formatHmbSn(sn);
|
|
|
List<ParamsResp> params = new ArrayList<>();
|
|
List<ParamsResp> params = new ArrayList<>();
|
|
@@ -3724,7 +3719,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
CommonResp<String> resp = new CommonResp<>();
|
|
CommonResp<String> resp = new CommonResp<>();
|
|
|
|
|
|
|
|
String sn = "";
|
|
String sn = "";
|
|
|
- String oprno = "OP170A"; // 螺套三枪兜底
|
|
|
|
|
|
|
+ String oprno = "OP170A"; // 螺套两枪兜底
|
|
|
String lineSn = "XT";
|
|
String lineSn = "XT";
|
|
|
|
|
|
|
|
boolean allOk = false;
|
|
boolean allOk = false;
|
|
@@ -3762,8 +3757,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductYtService.save(mesProductYt1);
|
|
mesProductYtService.save(mesProductYt1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!oprno.equals("OP170A") && !oprno.equals("OP170B") && !oprno.equals("OP170C")){
|
|
|
|
|
- resp.setMessage("工位号错误,螺套仅支持OP170A/OP170B/OP170C");
|
|
|
|
|
|
|
+ if(!oprno.equals("OP170A") && !oprno.equals("OP170B")){
|
|
|
|
|
+ resp.setMessage("工位号错误,螺套仅支持OP170A/OP170B");
|
|
|
resp.setResult(Global.FALSE);
|
|
resp.setResult(Global.FALSE);
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
@@ -3776,25 +3771,21 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
mesProductOprno.setOprno(CommonUitl.formatOprno(oprno));
|
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
|
- // 首枪按 A/B/C 归属,未齐不写本站 NG
|
|
|
|
|
|
|
+ // 首枪按 A/B 归属,未齐不写本站 NG
|
|
|
mesProductOprno.setLineSn(lineSn);
|
|
mesProductOprno.setLineSn(lineSn);
|
|
|
if(oprno.equals("OP170A")){
|
|
if(oprno.equals("OP170A")){
|
|
|
mesProductOprno.setResult1("OK");
|
|
mesProductOprno.setResult1("OK");
|
|
|
- }else if(oprno.equals("OP170B")){
|
|
|
|
|
- mesProductOprno.setResult2("OK");
|
|
|
|
|
}else{
|
|
}else{
|
|
|
- mesProductOprno.setResult3("OK");
|
|
|
|
|
|
|
+ mesProductOprno.setResult2("OK");
|
|
|
}
|
|
}
|
|
|
mesProductOprnoService.save(mesProductOprno);
|
|
mesProductOprnoService.save(mesProductOprno);
|
|
|
}else{
|
|
}else{
|
|
|
mesProductOprno1.setLineSn(lineSn);
|
|
mesProductOprno1.setLineSn(lineSn);
|
|
|
- // 三枪:按枪号写对应子结果
|
|
|
|
|
|
|
+ // 两枪:按枪号写对应子结果
|
|
|
if(oprno.equals("OP170A")){
|
|
if(oprno.equals("OP170A")){
|
|
|
mesProductOprno1.setResult1("OK");
|
|
mesProductOprno1.setResult1("OK");
|
|
|
}else if(oprno.equals("OP170B")){
|
|
}else if(oprno.equals("OP170B")){
|
|
|
mesProductOprno1.setResult2("OK");
|
|
mesProductOprno1.setResult2("OK");
|
|
|
- }else if(oprno.equals("OP170C")){
|
|
|
|
|
- mesProductOprno1.setResult3("OK");
|
|
|
|
|
}
|
|
}
|
|
|
// [旧六枪递进] 暂不用:按空位依次填 result1~6
|
|
// [旧六枪递进] 暂不用:按空位依次填 result1~6
|
|
|
/*
|
|
/*
|
|
@@ -3831,11 +3822,10 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductOprnoService.save(mesProductOprno1);
|
|
mesProductOprnoService.save(mesProductOprno1);
|
|
|
|
|
|
|
|
allOk = !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult1().equals("OK")
|
|
allOk = !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult1().equals("OK")
|
|
|
- && !StringUtils.isEmpty(mesProductOprno1.getResult2()) && mesProductOprno1.getResult2().equals("OK")
|
|
|
|
|
- && !StringUtils.isEmpty(mesProductOprno1.getResult3()) && mesProductOprno1.getResult3().equals("OK");
|
|
|
|
|
|
|
+ && !StringUtils.isEmpty(mesProductOprno1.getResult2()) && mesProductOprno1.getResult2().equals("OK");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 仅三枪齐了才回写本站 OK
|
|
|
|
|
|
|
+ // 仅两枪齐了才回写本站 OK
|
|
|
if(allOk){
|
|
if(allOk){
|
|
|
sn = mesProductHmbService.formatHmbSn(sn);
|
|
sn = mesProductHmbService.formatHmbSn(sn);
|
|
|
mesProductRecordService.updateRecord(sn,oprno,"100000","","OK",oprno,lineSn);
|
|
mesProductRecordService.updateRecord(sn,oprno,"100000","","OK",oprno,lineSn);
|