| | |
| | | } |
| | | //查询当前Ai解析数据的程度 |
| | | public Response getAnalysisSocket(AnalysisDto dto) { |
| | | int precent=AnalysisUtil.getPrecent(); |
| | | //1.检测是否存在数据 |
| | | int sum=subService.getAnaysisIdByTestRecordCount(dto.getBattGroupId(),dto.getTestRecordCount()); |
| | | if(sum==0){ |
| | | return new Response().setIII(1,true,-1,precent,"查询当前Ai解析数据的程度"); |
| | | return new Response().setIII(1,true,-1,0,"查询当前Ai解析数据的程度"); |
| | | } |
| | | //检测书否存在补充的数据 |
| | | int supple=subService.getAnaysisSupplement(dto.getBattGroupId(),dto.getTestRecordCount()); |
| | | if(supple==0){ |
| | | return new Response().setIII(1,true,0,precent,"查询当前Ai解析数据的程度"); |
| | | return new Response().setIII(1,true,0,0,"查询当前Ai解析数据的程度"); |
| | | } |
| | | String root = FileDirPath.getFileDirName(); |
| | | |
| | | //检测书否存在解析的数据 |
| | | int anaNum=subService.getAnaysisNum(dto.getBattGroupId(),dto.getTestRecordCount()); |
| | | return new Response().setIII(1,true,anaNum,precent,"查询当前Ai解析数据的程度"); |
| | | return new Response().setIII(1,true,anaNum,0,"查询当前Ai解析数据的程度"); |
| | | } |
| | | |
| | | } |
| | |
| | | public static String excelOutPutPath="E:\\GitWorkSpace\\fg_v2.0\\target\\outPath"; |
| | | public static String excelSourcePath="E:\\GitWorkSpace\\fg_v2.0\\target\\测试数据.xlsx"; |
| | | |
| | | public static int precent=0; |
| | | |
| | | public static void analysisXlx(String excelSourcePath, String voltagePredictExePath, String excelOutPutPath){ |
| | | Process mProcess; |
| | |
| | | while ((s = successResult.readLine()) != null) { |
| | | if ((s.length() > 0) && !"\n".equals(s)) { |
| | | System.out.println(String.format("SuccessMsg:%s", s)); |
| | | precent++; |
| | | } |
| | | } |
| | | while ((s = errorResult.readLine()) != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | public static int getPrecent(){ |
| | | return precent; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | analysisXlx(excelSourcePath,voltagePredictExePath,excelOutPutPath); |