Переглянути джерело

fix: 优化质检与偏移量检测以及结果反馈的数据

wang.sq@aliyun.com 6 місяців тому
батько
коміт
7e4bf321ef

+ 4 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/StorgeServiceImpl.java

@@ -633,8 +633,8 @@ public class StorgeServiceImpl extends SuperCacheServiceImpl<StorgeMapper, Storg
         if(isFetched) {
             //todo wang.sq三坐标调用地址释放
             // 查询三坐标是否允许取
-            //String fetchStatus = msgUtil.getCcsData("/api/GetMiddleThreeCoordinates", params, taskNode);
-            String fetchStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
+            String fetchStatus = msgUtil.getCcsData("/api/GetMiddleThreeCoordinates", params, taskNode);
+            //String fetchStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
 
             JSONObject fetchObject = JSONObject.parseObject(fetchStatus);
             logger.warn("三坐标节点{}取查询接口返回{}", taskNode.getId(), fetchObject.toJSONString());
@@ -656,8 +656,8 @@ public class StorgeServiceImpl extends SuperCacheServiceImpl<StorgeMapper, Storg
             //三坐标中间放操作
             // 查询三坐标是否允许放
             //todo wang.sq三坐标调用地址释放
-            //String sendStatus = msgUtil.getCcsData("/api/QueryThreeCoordinatesFreePos", params, taskNode);
-            String sendStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
+            String sendStatus = msgUtil.getCcsData("/api/QueryThreeCoordinatesFreePos", params, taskNode);
+            //String sendStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
 
             JSONObject sendObject = JSONObject.parseObject(sendStatus);
             logger.warn("三坐标节点{}放查询接口返回{}", taskNode.getId(), sendObject.toJSONString());

+ 9 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/MsgUtil.java

@@ -321,7 +321,10 @@ public class MsgUtil implements ApplicationContextAware {
                     int measuringResult = returnData.trim().equals("1") ? 0 : 1;
                     //String measuringResultFile = filePath + bomProcedure.getThreeDimensionalPrograme() + "_" + taskNode.getProcedureNo() + "_" + task.getCompleteBatchNo() + "_" + taskNode.getId() +".pdf";
                     String date = DateUtil.dateToString0(new Date(), "yyyy-M-dd");
-                    String measuringResultFile = SmbShareFileUtil.findNewMeasuringFiles(fileIp,userName,password,filePath + date + "/");
+
+                    // todo wang.sq三坐标测量最终报告位置查询
+                    //String measuringResultFile = SmbShareFileUtil.findNewMeasuringFiles(fileIp,userName,password,filePath + date + "/");
+                    String measuringResultFile = "";
                     //List<String> fileContents = new ArrayList<>();
                     logger.warn("获取检测结果文件路径{}", measuringResultFile);
                     OrderQuality orderQuality = new OrderQuality();
@@ -391,12 +394,14 @@ public class MsgUtil implements ApplicationContextAware {
                     }
                 }else if ("5".equals(taskNode.getNodeType())){
                     // 工件坐标系检测
+                    // todo wang.sq三坐标测量偏移量数据添加
                     String nginxRemoteFilePath = "";
                     String findFileName = taskNode.getCompleteBatchNo()+ "_" + task.getProcedureNo();
                     List list = new ArrayList<>();
                     if(StringUtils.isNotBlank(findFileName)){
                         // 远程下载报告文件到本地
-                        String downloadFileName = SmbShareFileUtil.findMeasuringFilesAndDownload(fileIp,userName,password,filePath,findFileName,uploadFolder);
+/*                      String downloadFileName = SmbShareFileUtil.findMeasuringFilesAndDownload(fileIp,userName,password,filePath,findFileName,uploadFolder);
+
 
                         if (StringUtils.isNotBlank(downloadFileName)) {
                             nginxRemoteFilePath = uploadFolder + File.separator + downloadFileName;
@@ -445,8 +450,8 @@ public class MsgUtil implements ApplicationContextAware {
                                     }
                                 }
                             }
-                        }
-                        // TODO 遍历解析测量文件内容并入库保存,根据最终测量报告修改
+                        }*/
+                        // 与数据库比对是否已经有存在的数据,如果有则舍去,没有则新增
                         if (list.size() == 18) {
                             // 读取三坐标工件坐标系每根轴偏移量
                             BigDecimal xOffset = new BigDecimal(list.get(13).toString());