| | |
| | | wrapper.eq("battgroup_id", battgroupId); |
| | | wrapper.eq("test_type", 3); |
| | | wrapper.eq("test_starttype", 3); |
| | | wrapper.gt("test_starttime",testStartTime); |
| | | wrapper.lt("test_starttime",testEndTime); |
| | | if(testStartTime!=null){ |
| | | wrapper.gt("test_starttime",testStartTime); |
| | | } |
| | | if(testEndTime!=null){ |
| | | wrapper.lt("test_starttime",testEndTime); |
| | | } |
| | | wrapper.last(" and test_timelong >= 7200 ORDER BY test_starttime DESC "); |
| | | wrapper.last("limit 1"); |
| | | BatttestdataInf tinf = mapper.selectOne(wrapper); |
| | |
| | | 3然后找到判断优秀,劣化,损坏的参数,得到结果。 |
| | | 4浮充电压图,需要显示单体+实时数据的单体电压,单体内阻 |
| | | */ |
| | | public Response getMonStatistic(MonStic stic) { |
| | | public Map getMonStatistic(MonStic stic) { |
| | | Map<String,Object> map=new HashMap<>(); |
| | | List<SticMonRes> goodlist=new ArrayList(); |
| | | List<SticMonRes> badlist=new ArrayList(); |
| | |
| | | List<BattInf> binfList=battInfService.getMonStatistic(stic); |
| | | Float realCap=0f; |
| | | if(binfList==null){ |
| | | return new Response().set(1,false,"当前用户未管理满足条件的电池组"); |
| | | return map; |
| | | } |
| | | for (BattInf binf:binfList) { |
| | | BatttestdataInf tinf =getLastStandardTestData(binf.getBattgroupId()); |
| | |
| | | SticMonRes res=new SticMonRes(); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | res.setBattgroupName(binf.getBattgroupName()); |
| | | res.setStationName(binf.getStationName()); |
| | | res.setDevName(binf.getDevName()); |
| | | res.setMonNum(data.getMonNum()); |
| | | //获取单体的实时数据 |
| | | BattRtdata rtdata=rtdataService.getRtdataByNum(binf.getBattgroupId(),data.getMonNum()); |
| | |
| | | map.put("goodlistNum",goodlist.size()); |
| | | map.put("badlistNum",badlist.size()); |
| | | map.put("damagelistNum",damagelist.size()); |
| | | return new Response().setII(1,true,map,"单节数量统计"); |
| | | return map; |
| | | |
| | | } |
| | | //将不满足条件的电池组的所有单体放入damage中 |
| | | private void setDamage(List damagelist, BattInf binf) { |
| | |
| | | SticMonRes res=new SticMonRes(); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | res.setBattgroupName(binf.getBattgroupName()); |
| | | res.setStationName(binf.getStationName()); |
| | | res.setDevName(binf.getDevName()); |
| | | res.setMonNum(i+1); |
| | | res.setMonVol(0f); |
| | | res.setMonRes(0f); |
| | |
| | | SticMonRes res=new SticMonRes(); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | res.setBattgroupName(binf.getBattgroupName()); |
| | | res.setStationName(binf.getStationName()); |
| | | res.setDevName(binf.getDevName()); |
| | | res.setMonNum(rtdata.getMonNum()); |
| | | res.setMonVol(rtdata.getMonVol()); |
| | | res.setMonRes(rtdata.getMonRes()); |
| | |
| | | res.setProduct(binf.getProduct()); |
| | | res.setInuseTime(binf.getInuseTime()); |
| | | res.setMonvolstd(binf.getMonvolstd()); |
| | | res.setStationId(binf.getStationId()); |
| | | res.setPowerId(binf.getPowerId()); |
| | | res.setDevId(binf.getDevId()); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电) |
| | | BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime()); |
| | | if(tinf==null){ |
| | |
| | | res.setInuseTime(binf.getInuseTime()); |
| | | res.setMonvolstd(binf.getMonvolstd()); |
| | | res.setMoncapstd(binf.getMoncapstd()); |
| | | res.setStationId(binf.getStationId()); |
| | | res.setPowerId(binf.getPowerId()); |
| | | res.setDevId(binf.getDevId()); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电) |
| | | BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime()); |
| | | if(tinf==null){ |
| | |
| | | } |
| | | List<SticCompare17Res> reslist=new ArrayList<>(); |
| | | for (BattInf binf:binfList) { |
| | | |
| | | //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电) |
| | | BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime()); |
| | | if(tinf==null){ |
| | |
| | | res.setInuseTime(binf.getInuseTime()); |
| | | res.setMonvolstd(binf.getMonvolstd()); |
| | | res.setMonNum(data.getMonNum()); |
| | | res.setStationId(binf.getStationId()); |
| | | res.setPowerId(binf.getPowerId()); |
| | | res.setDevId(binf.getDevId()); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | Float monrealCap = (float) BattCapFactory.GetMonomerCap(tinf.getTestCap(), hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), data.getMonVol(), tinf.getGroupVol(), BattCapFactory.CapType_Real); |
| | | res.setMonrealCap(monrealCap); |
| | | //保留5位小数 |
| | |
| | | res.setProduct(binf.getProduct()); |
| | | res.setInuseTime(binf.getInuseTime()); |
| | | res.setMonvolstd(binf.getMonvolstd()); |
| | | res.setStationId(binf.getStationId()); |
| | | res.setPowerId(binf.getPowerId()); |
| | | res.setDevId(binf.getDevId()); |
| | | res.setBattgroupId(binf.getBattgroupId()); |
| | | res.setMonNum(i+1); |
| | | res.setMonrealCap(0f); |
| | | res.setMonprecentCap("0"); |
| | |
| | | reslist.add(res); |
| | | } |
| | | } |
| | | reslist.add(res); |
| | | } |
| | | } |
| | | } |