|
|
@@ -95,7 +95,11 @@ public class WorkTimer {
|
|
|
MesClient.leakText_1.setText(isEnd ? "" : realtimeResult.leakValue + " " + realtimeResult.leakUnit);
|
|
|
MesClient.setMenuState_1(isEnd ? "该工件可以加工" : "正在加工", 0);
|
|
|
|
|
|
- if (realtimeResult.isCycleEnd && realtimeResult.FIFO_Number > 0) { // 如果查询到测试结束并且待处理结果数大于0
|
|
|
+ if(MesClient.canReadResult1 == 0 && realtimeResult.stepCode < 65533){
|
|
|
+ MesClient.canReadResult1 = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (realtimeResult.isCycleEnd && realtimeResult.FIFO_Number > 0 && MesClient.canReadResult1 > 0) { // 如果查询到测试结束并且待处理结果数大于0
|
|
|
ATEQ.LastResult lastResult = ateq1.readLastResult();
|
|
|
log.info("{}: {}", Config.gw_1, lastResult.toString());
|
|
|
|
|
|
@@ -117,24 +121,29 @@ public class WorkTimer {
|
|
|
MesClient.leakText_1.setText(leakString);
|
|
|
|
|
|
String sn = MesClient.getBarcode33(MesClient.product_sn_1.getText());
|
|
|
- Boolean result = false;
|
|
|
- if(lastResult.leakValue < 1e-10 && lastResult.leakValue > -1e-10 && lastResult.isPass == true) {
|
|
|
- MesClient.setMenuState_1("泄露值为0,请重测", 0);
|
|
|
+ if(!sn.trim().isEmpty()){
|
|
|
+ Boolean result = false;
|
|
|
+ if(lastResult.leakValue < 1e-10 && lastResult.leakValue > -1e-10 && lastResult.isPass == true) {
|
|
|
+ MesClient.setMenuState_1("泄露值为0,请重测", 0);
|
|
|
+ MesClient.resetScanA();
|
|
|
+ } else {
|
|
|
+ // 获取当前运行的程序的填充时间、稳定时间、测试时间
|
|
|
+ ATEQ.Parameters params = ateq1.getParams(lastResult.programNumber);
|
|
|
+ log.info("{}: {}", Config.gw_1, params.toString());
|
|
|
+ // 将气密参数放入本地SQLite数据库
|
|
|
+ QMParamsDAO.insert(Config.gw_1, sn.trim(), lastResult.programNumber, ret, pressureValue, leakValue, lastResult.pressureUnit, lastResult.leakUnit, params.fillTime, params.stabilizeTime, params.testTime, MesClient.user20 );//添加作业人员
|
|
|
+
|
|
|
+
|
|
|
+ result = DataUtil.sendQuality(sn, ret, MesClient.user20, Config.gw_1);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (result) {
|
|
|
+ MesClient.setMenuState_1("加工完成,结果:" + ret, 0);
|
|
|
+ DataUtil.bindLeakValue(sn, leakString, Config.gw_1);
|
|
|
+ }
|
|
|
+ // 刷新工作面板
|
|
|
MesClient.resetScanA();
|
|
|
- } else {
|
|
|
- result = DataUtil.sendQuality(sn, ret, MesClient.user20, Config.gw_1);
|
|
|
- }
|
|
|
- // 获取当前运行的程序的填充时间、稳定时间、测试时间
|
|
|
- ATEQ.Parameters params = ateq1.getParams(lastResult.programNumber);
|
|
|
- log.info("{}: {}", Config.gw_1, params.toString());
|
|
|
-
|
|
|
- if (result) {
|
|
|
- MesClient.setMenuState_1("加工完成,结果:" + ret, 0);
|
|
|
- DataUtil.bindLeakValue(sn, leakString, Config.gw_1);
|
|
|
-
|
|
|
- // 将气密参数放入本地SQLite数据库
|
|
|
- QMParamsDAO.insert(Config.gw_1, sn.trim(), lastResult.programNumber, ret, pressureValue, leakValue, lastResult.pressureUnit, lastResult.leakUnit, params.fillTime, params.stabilizeTime, params.testTime, MesClient.user20 );//添加作业人员
|
|
|
-
|
|
|
+ }else{
|
|
|
// 刷新工作面板
|
|
|
MesClient.resetScanA();
|
|
|
}
|