lxw
2023-05-31 def9565c19cfe71af37f4ed5bf22a94acf91c17d
首页损坏不要时间筛选
4个文件已修改
50 ■■■■■ 已修改文件
src/main/java/com/whyc/mapper/BatttestdataInfMapper.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BatttestdataInfService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/config/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BatttestdataInfMapper.xml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BatttestdataInfMapper.java
@@ -61,7 +61,7 @@
    //本年已停电放电电池组数testdate_inf中test_type=3,test_startType!=3
    int getJcQuarter(int userId);
    //1.查出符合条件的电池组(核容数据)按照时间倒叙排序
    //1.查出符合条件的电池组(核容数据)按照时间倒叙排序(本年度)
    List<BatttestdataInf> getGroupAnalysis(int userId);
    //1.查出符合条件的电池组(核容数据)按照时间倒叙排序
@@ -73,4 +73,8 @@
                6-组端电压下限到终止*/
    List<BatttestdataInf> getGroupAnalysisZC(int userId);
    //1.查出符合条件的电池组(核容数据)按照时间倒叙排序(不要时间)
    List<BatttestdataInf> getGroupAnalysisQB(int userId);
}
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -410,7 +410,7 @@
                capChange = 0.6f;
            }
            //1.查出符合条件的电池组(核容数据)按照时间倒叙排序
            List<BatttestdataInf> list = mapper.getGroupAnalysis(userId);
            List<BatttestdataInf> list = mapper.getGroupAnalysisQB(userId);
            //2.分组取出每个电池组的最新一笔数据(取电池组放电数据的第一个)
            //Map<String, String> map = new HashedMap();
            //小于capAlarm
src/main/resources/config/application-dev.yml
@@ -20,7 +20,7 @@
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.10.250:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
    url: jdbc:mysql://192.168.10.79:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
#    url: jdbc:mysql://192.168.10.80:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
    #    url: jdbc:mysql://118.89.139.230:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
    username: root
src/main/resources/mapper/BatttestdataInfMapper.xml
@@ -529,4 +529,44 @@
      and db_user.tb_user_inf.uid = #{userId})
    ORDER BY tb_batttestdata_inf.BattGroupId asc, test_starttime desc
  </select>
  <select id="getGroupAnalysisQB" resultMap="GroupAnalysis">
    select tb_batttestdata_inf.BattGroupId
         , test_curr
         , max_monvol
         , min_monvol
         , test_cap
         , test_starttime
         , test_timelong
         , test_stoptype
         , monCapStd
         , monVolStd
         , stationName
         , battGroupName
         , stationId
         , stationName1
         , stationName2
         , stationName3
         , stationName5
         , stationName4
         , FBSDeviceId
    from db_batt_testdata.tb_batttestdata_inf,
         db_battinf.tb_battinf
    where tb_batttestdata_inf.BattGroupId = tb_battinf.BattGroupId
      and test_starttype = 3
      and test_type = 3
      and tb_batttestdata_inf.battgroupid in (
      select distinct db_battinf.tb_battinf.BattGroupId
      from db_battinf.tb_battinf,
           db_user.tb_user_battgroup_baojigroup_battgroup,
           db_user.tb_user_battgroup_baojigroup_usr,
           db_user.tb_user_inf
      where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId =
            db_battinf.tb_battinf.BattGroupId
        and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id =
            db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id
        and db_user.tb_user_inf.uid = db_user.tb_user_battgroup_baojigroup_usr.uid
        and db_user.tb_user_inf.uid = #{userId})
    ORDER BY tb_batttestdata_inf.BattGroupId asc, test_starttime desc
  </select>
</mapper>