| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.text.NumberFormat; |
| | | import java.text.ParseException; |
| | | import java.text.ParsePosition; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | if(!data.isLowVolFlag() && !data.isHighVolFlag()){ |
| | | volGoodCount +=1; |
| | | } |
| | | if(!data.isHighChainResFlag()){ |
| | | if(!data.isHighChainResFlag1() && !data.isHighChainResFlag2()){ |
| | | chainResGoodCount +=1; |
| | | } |
| | | }; |
| | |
| | | info.setVolGoodCount(volGoodCount); |
| | | info.setChainResGoodCount(chainResGoodCount); |
| | | |
| | | StationInfo stationInfo = info.getStationInfo(); |
| | | if(stationInfo.getStationName2().equals("-")){ |
| | | stationInfo.setStationName(stationInfo.getStationName1()); |
| | | }else{ |
| | | stationInfo.setStationName(stationInfo.getStationName1()+"-"+stationInfo.getStationName2()); |
| | | } |
| | | map.put("dto", info); |
| | | //图片 |
| | | BASE64Decoder decoder = new BASE64Decoder(); |
| | |
| | | List<String> resBalanceRateList = data3.get("resBalanceRate"); |
| | | List<String> volBalanceRateList = data3.get("volBalanceRate"); |
| | | //均一性:chainRes/?容量/bs(电导) |
| | | List<Float> chainResList = dataList2.stream().map(BattgroupData::getCr).collect(Collectors.toList()); |
| | | List<Float> bsList = dataList2.stream().map(BattgroupData::getBs).collect(Collectors.toList()); |
| | | String chainResBalanceRate = MathUtil.getStandardDeviation(chainResList) * 10000 / 100 + "%"; |
| | | String bsBalanceRate = MathUtil.getStandardDeviation(bsList) * 10000 / 100 + "%"; |
| | | NumberFormat percentInstance = NumberFormat.getPercentInstance(); |
| | | percentInstance.setMinimumFractionDigits(2); |
| | | |
| | | List<Float> chainResList = dataList2.stream().map(BattgroupData::getCr).map(Float::parseFloat).collect(Collectors.toList()); |
| | | List<Float> bsList = dataList2.stream().map(BattgroupData::getBs).map(Float::parseFloat).collect(Collectors.toList()); |
| | | String chainResBalanceRate = percentInstance.format(MathUtil.getStandardDeviation(chainResList)); |
| | | String bsBalanceRate = percentInstance.format(MathUtil.getStandardDeviation(bsList)); |
| | | //获取FileParam和StationInfo |
| | | StationInfo stationInfo = stationInfoService.getByFileId(fileId2); |
| | | FileParam param = fileParamService.getByFileId(fileId2); |
| | |
| | | map.put("resImage",resImage); |
| | | } |
| | | |
| | | if(stationInfo.getStationName2().equals("-")){ |
| | | stationInfo.setStationName(stationInfo.getStationName1()); |
| | | }else{ |
| | | stationInfo.setStationName(stationInfo.getStationName1()+"-"+stationInfo.getStationName2()); |
| | | } |
| | | |
| | | map.put("fileParam",param); |
| | | map.put("stationInfo",stationInfo); |
| | | //总体评价:内阻/电压/连接条/?容量 |
| | |
| | | if(!data.isLowVolFlag() && !data.isHighVolFlag()){ |
| | | volGoodCount +=1; |
| | | } |
| | | if(!data.isHighChainResFlag()){ |
| | | if(!data.isHighChainResFlag1() && !data.isHighChainResFlag2()){ |
| | | chainResGoodCount +=1; |
| | | } |
| | | }; |