lxw
2023-05-30 c107eff55d05d35e7816ec3e2b70a126ba7e2c7c
获取本年已核容放电电池组最新一次数据详情(正常停止:2.3.4.6)
3个文件已修改
75 ■■■■■ 已修改文件
src/main/java/com/whyc/pojo/BatttestdataInf.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BatttestdataInfService.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BatttestdataInfMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/BatttestdataInf.java
@@ -136,4 +136,20 @@
    @TableField(exist = false)
    private String stationName;
    @TableField(exist = false)
    private String stationName1;
    @TableField(exist = false)
    private String stationName2;
    @TableField(exist = false)
    private String stationName3;
    @TableField(exist = false)
    private String stationName4;
    @TableField(exist = false)
    private String stationName5;
    @TableField(exist = false)
    private String battGroupName;
    @TableField(exist = false)
    private String stationId;
    @TableField(exist = false)
    private int fBSDeviceId;
}
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -494,6 +494,7 @@
    //获取本年已核容放电电池组最新一次数据详情(正常)
    public Response getHrYeardisBattInfoZC() {
        int userId = Integer.parseInt(ActionUtil.getUser().getUId().toString());
        String lang = ActionUtil.getLang();
        try {
            //0.查询劣化(告警)和损坏(更换)的阈值
            QueryWrapper<AlarmParam> alarmWrapper = new QueryWrapper();
@@ -522,6 +523,37 @@
                        int hourRate = BattCapFactory.GetHourRate(inf.getMonCapStd(), inf.getTestCurr());
                        float cap = (float) BattCapFactory.GetMonomerCap(inf.getMonCapStd(), hourRate, inf.getTestCap(), inf.getMaxMonvol(), inf.getMinMonvol(), inf.getMonVolStd(), BattCapFactory.CapType_Real);
                        inf.setRealCap(cap);
                        //放电终止原因
                        if (inf.getFBSDeviceId() / 100000 == 6185) {
                            //61850设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_6185(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 4016) {
                            //6度设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_4016(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 9110) {
                            //假负载设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_9110(inf.getTestStoptype()));
                        } else if ((inf.getFBSDeviceId() / 100000 == 9120) || (inf.getFBSDeviceId() / 100000 == 9140)) {
                            // 逆变设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_9120(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 8059) {
                            //一体机设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_8059(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 6087) {
                            //电操核容设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_6087(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 4830) {
                            //FBO4830设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_4830(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 4831) {
                            //FBO4831设备放电停止原因
                            inf.setTestStoptypeReason(MessageUtils.getMessageSocket(BattTestData.getStopType_4831(inf.getTestStoptype()), lang));
                        } else if (inf.getFBSDeviceId() / 100000 == 4815) {
                            //FBO4815设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_4815(inf.getTestStoptype()));
                        } else {
                            inf.setTestStoptypeReason(BattTestData.getStopType(inf.getTestStarttype(), inf.getTestStoptype()));
                        }
                        infoList.add(inf);
                        battGroupId = inf.getBattGroupId().toString();
                    }
src/main/resources/mapper/BatttestdataInfMapper.xml
@@ -435,6 +435,15 @@
    <result column="MonVolStd" jdbcType="FLOAT" property="monVolStd"/>
    <result column="stationName" jdbcType="FLOAT" property="stationName"/>
    <result column="test_timelong" jdbcType="INTEGER" property="testTimelong"/>
    <result column="test_stoptype" jdbcType="INTEGER" property="testStoptype"/>
    <result column="battGroupName" jdbcType="INTEGER" property="battGroupName"/>
    <result column="stationId" jdbcType="VARCHAR" property="stationId"/>
    <result column="stationName1" jdbcType="VARCHAR" property="stationName1"/>
    <result column="stationName2" jdbcType="VARCHAR" property="stationName2"/>
    <result column="stationName3" jdbcType="VARCHAR" property="stationName3"/>
    <result column="stationName5" jdbcType="VARCHAR" property="stationName5"/>
    <result column="stationName4" jdbcType="VARCHAR" property="stationName4"/>
    <result column="FBSDeviceId" jdbcType="INTEGER" property="fBSDeviceId"/>
  </resultMap>
  <select id="getGroupAnalysis" resultMap="GroupAnalysis">
    select tb_batttestdata_inf.BattGroupId
@@ -444,9 +453,18 @@
         , 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
@@ -477,9 +495,18 @@
         , 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