From a0dc821ac3c77d5be4a8b1d59e36312a5ee7f915 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期四, 12 六月 2025 16:19:09 +0800 Subject: [PATCH] 去除蓄电池组1.2.5,1.2.6右侧图表 --- src/main/java/com/whyc/service/BatttestdataInfService.java | 61 ++++++++++++++++++------------ 1 files changed, 36 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/whyc/service/BatttestdataInfService.java b/src/main/java/com/whyc/service/BatttestdataInfService.java index c6dbf82..1cf2ea5 100644 --- a/src/main/java/com/whyc/service/BatttestdataInfService.java +++ b/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; + if(!groupName.equals("none")){ + BanZu bz= (BanZu) bzmap.get(groupName); + int nochargeNum=bz.getNochargeNum(); + bz.setNochargeNum(nochargeNum+1); + bzmap.put(groupName,bz); } - } 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); } -- Gitblit v1.9.1