whyclxw
2025-06-12 a0dc821ac3c77d5be4a8b1d59e36312a5ee7f915
去除蓄电池组1.2.5,1.2.6右侧图表
4个文件已修改
57 ■■■■■ 已修改文件
src/main/java/com/whyc/dto/Statistic/SticDischarge5Res.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/dto/Statistic/SticDischarge6Res.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BatttestdataInfService.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BatttestdataInfMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/dto/Statistic/SticDischarge5Res.java
@@ -20,4 +20,6 @@
    private String stopReason;      //停止原因
    private String capperformance;     //电池性能
    private Integer disChargeType;     //1.已放电 2.未放电 不传全部
    private Integer testRecordCount;
    private String dischargeName;
}
src/main/java/com/whyc/dto/Statistic/SticDischarge6Res.java
@@ -20,6 +20,7 @@
    private String product;
    private Integer errorNum;
    private List<String> stopList;
    private BatttestdataInf tinf;
    private Integer testRecordCount;
    private String dischargeName;
    private Integer stopReasonType;   //0全部,1符合筛选条件的放电记录
}
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -547,11 +547,11 @@
        List<TestDataDto> List3=new ArrayList<>();
        List<TestDataDto> List4=new ArrayList<>();
        List<TestDataDto> List5=new ArrayList<>();
        map.put("1",List1);   //核容放电
        map.put("2",List2);   //核容充电
        map.put("3",List3);   //监测放电
        map.put("4",List4);   //监测充电
        map.put("5",List5);   //停电放电
        map.put("核容放电",List1);   //核容放电
        map.put("核容充电",List2);   //核容充电
        map.put("监测放电",List3);   //监测放电
        map.put("监测充电",List4);   //监测充电
        map.put("停电放电",List5);   //停电放电
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("battgroup_id",battgroupId);
        wrapper.orderByDesc("test_starttime");
@@ -657,13 +657,6 @@
            //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
            BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime());
            if(tinf==null){
               /* res.setRealCap(0f);
                res.setTestStartTime(ThreadLocalUtil.parse("1972-01-01 00:00:00",1));
                res.setTestTimelong(0);
                res.setTestCap(0f);
                res.setStopReason("");
                res.setCapperformance(Capperformance.getValue(Capperformance.BATTSTATE_4.getStateId()));
                res.setDisChargeType(2);*/
                continue;
            }
            if(!groupName.equals("none")){
@@ -676,6 +669,17 @@
            res.setTestTimelong(tinf.getTestTimelong());
            res.setTestCap(tinf.getTestCap());
            res.setStopReason(StopReasonEnum.getValue(tinf.getTestStoptype()));
            if (tinf.getTestType() == 3) {
                // 测试类型为放电
                if (tinf.getTestStarttype() == 3) {
                    res.setDischargeName("核容放电");
                } else if(tinf.getTestStarttype() == 4){
                    res.setDischargeName("停电放电");
                }else {
                    res.setDischargeName("监测放电");
                }
            }
            res.setTestRecordCount(tinf.getTestRecordCount());
            Float moncapStd=binf.getMoncapstd();
            int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
            Float grouprealCap = (float) BattCapFactory.GetMonomerCap(tinf.getTestCap(), hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
@@ -742,9 +746,6 @@
            res.setProduct(binf.getProduct());
            //获取电池组未放电记录(指定时间段的标准核容放电)
            getNoDischargeData(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime(),stic.getTypeList(),res);
            //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
            BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime());
            res.setTinf(tinf);
            if(stic.getStopReasonType()==0){
                reslist.add(res);
            }else {
@@ -752,16 +753,12 @@
                    reslist.add(res);
                }
            }
            if(tinf==null){
                if(!groupName.equals("none")){
                    BanZu bz= (BanZu) bzmap.get(groupName);
                    int nochargeNum=bz.getNochargeNum();
                    bz.setNochargeNum(nochargeNum+1);
                    bzmap.put(groupName,bz);
                }
                continue;
            }
        }
        PageInfo pageInfo=PageInfoUtils.list2PageInfo(reslist, stic.getPageNum(), stic.getPageSize());
        return new Response().setIII(1,reslist.size()>0,pageInfo,bzmap,"本年度未放电数量统计");
@@ -773,7 +770,21 @@
        if(tinfList!=null&&tinfList.size()>0){
            res.setErrorNum(tinfList.size());
            res.setStopReasonType(1);
            for (BatttestdataInf tinf:tinfList) {
            for (int i=0;i<tinfList.size();i++) {
                BatttestdataInf tinf=tinfList.get(i);
                if(i==0){
                   res.setTestRecordCount(tinf.getTestRecordCount());
                   if (tinf.getTestType() == 3) {
                        // 测试类型为放电
                        if (tinf.getTestStarttype() == 3) {
                            res.setDischargeName("核容放电");
                        } else if(tinf.getTestStarttype() == 4){
                            res.setDischargeName("停电放电");
                        }else {
                            res.setDischargeName("监测放电");
                        }
                   }
                }
                String stopReason=StopReasonEnum.getValue(tinf.getTestStoptype());
                stopList.add(stopReason);
            }
src/main/resources/mapper/BatttestdataInfMapper.xml
@@ -59,5 +59,6 @@
                </foreach>
            </if>
        </where>
        order by test_starttime desc
    </select>
</mapper>