whycxzp
2022-04-01 79f617b1e51a602f671c1c84918f29d7c25de2f9
修复sql
1个文件已修改
4 ■■■■ 已修改文件
src/com/fgkj/dao/impl/Battmon_testcapImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/fgkj/dao/impl/Battmon_testcapImpl.java
@@ -168,8 +168,8 @@
    //根据标称电压和测试容量查询出当前测试容量对应标准曲线的单体电压
    public List<Double> searchBattStandardVolList(double monvolstd, double moncapstd, float test_cap, long hourate, String battProducer, String battModel) {
        String mainSql = "select mon_vol from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where battproducer ="+battProducer+" and battmodel ="+battModel+" and test_cap = ";
        String subSql = "select test_cap from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where monvolstd="+monvolstd+" and abs(test_cap)<="+toFixed((Math.abs(test_cap)),1)+" and moncapstd = "+moncapstd+" and battproducer ="+battProducer+" and battmodel ="+battModel+" ORDER BY test_cap ASC  limit 1";
        String mainSql = "select mon_vol from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where battproducer ='"+battProducer+"' and battmodel = '"+battModel+"' and test_cap = ";
        String subSql = "select test_cap from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where monvolstd="+monvolstd+" and abs(test_cap)<="+toFixed((Math.abs(test_cap)),1)+" and moncapstd = "+moncapstd+" and battproducer = '"+battProducer+"' and battmodel = '"+battModel+"' ORDER BY test_cap ASC  limit 1";
        String sql = mainSql+"("+subSql+")";
        List<Double> list = DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
            @Override