whyclxw
2024-10-18 e5a572b61b4ed98c153829f4df1bea7266446ff2
解析程度移除precent
2个文件已修改
12 ■■■■ 已修改文件
src/main/java/com/whyc/service/AnaysiService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/util/AnalysisUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/AnaysiService.java
@@ -362,22 +362,21 @@
    }
    //查询当前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解析数据的程度");
    }
}
src/main/java/com/whyc/util/AnalysisUtil.java
@@ -13,7 +13,6 @@
    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;
@@ -38,7 +37,6 @@
            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) {
@@ -73,9 +71,6 @@
        }
    }
    public static int getPrecent(){
        return precent;
    }
    public static void main(String[] args) {
        analysisXlx(excelSourcePath,voltagePredictExePath,excelOutPutPath);