whyclxw
2024-01-16 c1f8b80068acb234ad01873ee7756a1cc29ee0be
src/main/java/com/whyc/service/FileParamService.java
@@ -6,6 +6,7 @@
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.whyc.config.I18nLocaleResolver;
import com.whyc.dto.*;
import com.whyc.mapper.*;
import com.whyc.pojo.*;
@@ -39,6 +40,9 @@
    @Autowired(required = false)
    private BattgroupInfoMapper groupInfoMapper;
    @Autowired
    private I18nLocaleResolver i18nLocaleResolver;
    //解析xml文件(传参一个文件)
    public Response getXmlValue(String filePath) {
@@ -157,6 +161,8 @@
    }
    //按照筛选条件查询数据库信息(内阻评价:内阻越大越差),然后再根据内阻手动分页
    public Response getDataByCondition(Date testTime1, Date testTime2, String battVol,int pageCurr,int pageSize,int flag) {
        Locale local = i18nLocaleResolver.getLocal();
        boolean zhFlag = local.getLanguage().toLowerCase().equals("zh");
        //PageHelper.startPage(pageCurr,pageSize);
        List<FileParam> list=mapper.getDataByCondition(testTime1,testTime2,Float.valueOf(battVol));
        List flagList=new ArrayList();//存放评价结果
@@ -192,7 +198,7 @@
                            binfo.setSdBasebs(MathUtil.getStandardDeviation(listBs));
                            binfo.setSdBasecr(MathUtil.getStandardDeviation(listCr));
                            resFlag=MathUtil.getflag(maxStd,std,testParam);
                            binfo.setBrJudge(MathUtil.getJudge(resFlag));
                            binfo.setBrJudge(MathUtil.getJudge(zhFlag,resFlag));
                        }
                        break;
                    }