whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -145,7 +145,15 @@
                } else if (fbsDeviceId / 100000 == 4815) {
                    //FBO4815设备放电停止原因
                    tinf.setTestStoptypeReason(BattTestData.getStopType_4815(tinf.getTestStoptype()));
                } else {
                }  else if (fbsDeviceId / 100000 == 6001) {
                    //6001设备放电停止原因
                    tinf.setTestStoptypeReason(BattTestData.getStopType_6001(tinf.getTestStoptype()));
                }else if ((fbsDeviceId / 10000 == 61853)||(fbsDeviceId / 100000 == 6186)||(fbsDeviceId / 100000 == 6286)) {
                    //61853设备放电停止原因
                    tinf.setTestStoptypeReason(BattTestData.getStopType_61853(tinf.getTestStoptype()));
                }else if((fbsDeviceId / 100000 == 6183)||(fbsDeviceId / 100000 == 6184)){
                    tinf.setTestStoptypeReason(BattTestData.getStopType_6183_4(tinf.getTestStoptype()));
                }else {
                    tinf.setTestStoptypeReason(BattTestData.getStopType(tinf.getTestStarttype(), tinf.getTestStoptype()));
                }
            });
@@ -199,12 +207,20 @@
            } else if (devId / 100000 == 4815) {
                //FBO4815设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_4815(tinf.getTestStoptype()));
            } else if (devId / 100000 == 6001) {
                //6001设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_6001(tinf.getTestStoptype()));
            } else if ((devId / 10000 == 61853)|| (devId / 100000 == 6186)|| (devId / 100000 == 6286)) {
                //61853设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_61853(tinf.getTestStoptype()));
            } else if (devId / 100000 == 9149) {
                //FBO9149设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_9149(tinf.getTestStoptype()));
            }else if (devId / 100000 == 9150) {
                //山东定制9150设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_9150(tinf.getTestStoptype()));
            }else if((devId / 100000 == 6183)||(devId / 100000 == 6184)){
                tinf.setTestStoptypeReason(BattTestData.getStopType_6183_4(tinf.getTestStoptype()));
            }else {
                tinf.setTestStoptypeReason(BattTestData.getStopType(tinf.getTestStarttype(), tinf.getTestStoptype()));
            }
@@ -258,6 +274,12 @@
            } else if (devId / 100000 == 4815) {
                //FBO4815设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_4815(tinf.getTestStoptype()));
            } else if (devId / 100000 == 6001) {
                //6001设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_6001(tinf.getTestStoptype()));
            } else if ((devId / 10000 == 61853)|| (devId / 100000 == 6186)|| (devId / 100000 == 6286)) {
                //61853设备放电停止原因和6186
                tinf.setTestStoptypeReason(BattTestData.getStopType_61853(tinf.getTestStoptype()));
            } else if (devId / 100000 == 9149) {
                //FBO9149设备放电停止原因
                tinf.setTestStoptypeReason(BattTestData.getStopType_9149(tinf.getTestStoptype()));
@@ -583,6 +605,13 @@
        int hrQuarter = mapper.getHrQuarterZC(userId);
        return hrQuarter;
    }
    //山西晋源特定接口
    public int getHrQuarterZCJY() {
        int hrQuarter = mapper.getHrQuarterZCJY();
        return hrQuarter;
    }
    //蓄电池组优劣分析(用蓄电池组组后评估的统计)
    public Response getGroupAnalysis(int userId) {
@@ -1182,6 +1211,12 @@
                        } else if (inf.getFBSDeviceId() / 100000 == 4815) {
                            //FBO4815设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_4815(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 6001) {
                            //6001设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_6001(inf.getTestStoptype()));
                        } else if ((inf.getFBSDeviceId() / 10000 == 61853)||(inf.getFBSDeviceId() / 100000 == 6186)||(inf.getFBSDeviceId() / 100000 == 6286)) {
                            //61853设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_61853(inf.getTestStoptype()));
                        } else if (inf.getFBSDeviceId() / 100000 == 9149) {
                            //FBO4815设备放电停止原因
                            inf.setTestStoptypeReason(BattTestData.getStopType_9149(inf.getTestStoptype()));
@@ -1319,4 +1354,17 @@
        }
        return new Response().setIII(1, true, sCountMap,sCapMap, "能效统计");
    }
    //1.获取当前最大的放电信息testRecordCount
    public BatttestdataInf getMaxRecord(int battGroupId) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("battGroupId",battGroupId);
        wrapper.last("limit 1");
        wrapper.orderByDesc("test_record_count");
        BatttestdataInf tinf=mapper.selectOne(wrapper);
        return tinf;
    }
    //3.将tinf补齐
    public void insertTinf(BatttestdataInf tinf) {
        mapper.insert(tinf);
    }
}