|
|
@@ -215,7 +215,7 @@ public class FrameworkQmScheduling {
|
|
|
logger.error("框架气密数据保存失败[{}],保持 {}=true 待重试 qmSn={}", ch.name, ch.completeFlag, qmSn);
|
|
|
return;
|
|
|
}
|
|
|
- if (!submitStationResult(ch.name, qmSn, stationResult)) {
|
|
|
+ if (!submitStationResultWithTemplateRetry(ch.name, qmSn, stationResult)) {
|
|
|
logger.error("框架气密工位结果提交失败[{}],保持 {}=true 待重试 qmSn={}", ch.name, ch.completeFlag, qmSn);
|
|
|
return;
|
|
|
}
|
|
|
@@ -254,6 +254,32 @@ public class FrameworkQmScheduling {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 报工:失败时按质量校验同款逻辑补建工位模板记录,再二次提交。
|
|
|
+ */
|
|
|
+ private boolean submitStationResultWithTemplateRetry(String channel, String sn, String result) {
|
|
|
+ if (submitStationResult(channel, sn, result)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ String oprno = getOprno();
|
|
|
+ if (oprno.length() == 5) {
|
|
|
+ oprno = oprno + "A";
|
|
|
+ }
|
|
|
+ String lineSn = getLineSn(sn);
|
|
|
+ if (StringUtils.isBlank(lineSn)) {
|
|
|
+ logger.warn("框架气密补模板跳过[{}]:无法解析产线编号 sn={}", channel, sn);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ logger.warn("框架气密报工失败[{}],补建工位模板后二次提交 sn={} oprno={}", channel, sn, oprno);
|
|
|
+ mesProductRecordController.ensureOprnoTemplateRecords(sn, oprno, lineSn);
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.error("框架气密补建工位模板失败[{}] sn={}:{}", channel, sn, e.getMessage());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return submitStationResult(channel, sn, result);
|
|
|
+ }
|
|
|
+
|
|
|
private boolean submitStationResult(String channel, String sn, String result) {
|
|
|
try {
|
|
|
String oprno = getOprno();
|