| | |
| | | HashMap<String, Object> map = Maps.newHashMap(); |
| | | //总体评价:内阻/电压/连接条/?容量 |
| | | int resGoodCount = 0; |
| | | int serGoodCount = 0; |
| | | int volGoodCount = 0; |
| | | int chainResGoodCount = 0; |
| | | //总体评价:有效的电阻/电压/连接条 数 |
| | | int battVolTestCount = 0; |
| | | int battResTestCount = 0; |
| | | int battSerTestCount = 0; |
| | | int battChainResTestCount = 0; |
| | | FileParam param = info.getFileParam(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | } |
| | | Float resGoodCoeK3 = param2.getResGoodCoeK3(); |
| | | Float resBadCoeK4 = param2.getResBadCoeK4(); |
| | | Float serGoodCoeK6 = param2.getSerGoodCoeK6(); |
| | | Float serBadCoeK7 = param2.getSerBadCoeK7(); |
| | | |
| | | Float chainRes = param.getVersion().toUpperCase().contains("V2.0")?param.getChainRes():param.getConnRes(); |
| | | Float finalVolLowCoeK = volLowCoeK1; |
| | | Float finalVolHighCoeK = volHighCoeK2; |
| | |
| | | //计算电压,内阻,连接条数值是否有效,被测试过 |
| | | float bv = Float.parseFloat(data.getBv()); |
| | | float br = Float.parseFloat(data.getBr()); |
| | | float bs = Float.parseFloat(data.getBs()); |
| | | float cr = Float.parseFloat(data.getCr()); |
| | | //计算容量百分比,并回填到dataList中 |
| | | float preCap = MathUtil.getPreCapTest(br, stdRes); |
| | |
| | | if(br!=0.0){ |
| | | battResTestCount++; |
| | | } |
| | | if(bs!=0.0){ |
| | | battSerTestCount++; |
| | | } |
| | | if (cr!=0.0){ |
| | | battChainResTestCount++; |
| | | } |
| | |
| | | if(br==0.0){ |
| | | data.setResEvaluation("—"); |
| | | } |
| | | /*else if(!data.isHighResFlag1() && !data.isHighResFlag2()){ |
| | | resGoodCount +=1; |
| | | data.setResEvaluation("优"); |
| | | }else if(data.isHighResFlag1()){ |
| | | data.setResEvaluation("良"); |
| | | }else{ |
| | | data.setResEvaluation("差"); |
| | | }*/ |
| | | else if(br >= stdRes*resGoodCoeK3/100){ |
| | | if(br >= stdRes*resBadCoeK4/100){ |
| | | // data.setHighResFlag2(true); |
| | |
| | | data.setResEvaluation("excellent"); |
| | | } |
| | | } |
| | | //System.out.println(" bs:"+bs+" ;stdRes:"+stdRes+";serGoodCoeK6:"+(1.0/stdRes)*serGoodCoeK6/100); |
| | | if(bs!=0.0&&bs>((1.0/stdRes)*serGoodCoeK6/100)){ |
| | | serGoodCount +=1; |
| | | } |
| | | /*if(bv!=0.0 && !data.isLowVolFlag() && !data.isHighVolFlag()){ |
| | | volGoodCount +=1; |
| | | }*/ |
| | |
| | | info.setResGoodCount(resGoodCount); |
| | | info.setVolGoodCount(volGoodCount); |
| | | info.setChainResGoodCount(chainResGoodCount); |
| | | info.setSerGoodCount(serGoodCount); |
| | | |
| | | info.setBattVolTestCount(battVolTestCount); |
| | | info.setBattResTestCount(battResTestCount); |
| | | info.setBattSerTestCount(battSerTestCount); |
| | | info.setBattChainResTestCount(battChainResTestCount); |
| | | |
| | | |
| | | StationInfo stationInfo = info.getStationInfo(); |
| | | if(stationInfo!=null) { |
| | |
| | | map.put("stationInfo",stationInfo); |
| | | //总体评价:内阻/电压/连接条/?容量 |
| | | int resGoodCount = 0; |
| | | int serGoodCount = 0; |
| | | int volGoodCount = 0; |
| | | int chainResGoodCount = 0; |
| | | |
| | | //总体评价:有效的电阻/电压/连接条 数 |
| | | int battVolTestCount = 0; |
| | | int battResTestCount = 0; |
| | | int battSerTestCount = 0; |
| | | int battChainResTestCount = 0; |
| | | |
| | | for(BattgroupData data : dataList2){ |
| | | //计算电压,内阻,连接条数值是否有效,被测试过 |
| | | float bv = Float.parseFloat(data.getBv()); |
| | | float br = Float.parseFloat(data.getBr()); |
| | | float bs = Float.parseFloat(data.getBs()); |
| | | float cr = Float.parseFloat(data.getCr()); |
| | | if (bv!=0.0){ |
| | | battVolTestCount++; |
| | | } |
| | | if(br!=0.0){ |
| | | battResTestCount++; |
| | | } |
| | | if(bs!=0.0){ |
| | | battSerTestCount++; |
| | | } |
| | | if (cr!=0.0){ |
| | | battChainResTestCount++; |
| | |
| | | data.setResEvaluation("bad"); |
| | | } |
| | | } |
| | | if(bs!=0.0&& !data.isHighSerFlag1() && !data.isHighSerFlag2()){ |
| | | serGoodCount +=1; |
| | | } |
| | | if(bv!=0.0 && !data.isLowVolFlag() && !data.isHighVolFlag()){ |
| | | volGoodCount +=1; |
| | | } |
| | |
| | | }; |
| | | map.put("resGoodCount",resGoodCount); |
| | | map.put("volGoodCount",volGoodCount); |
| | | map.put("serGoodCount",serGoodCount); |
| | | map.put("chainResGoodCount",chainResGoodCount); |
| | | |
| | | map.put("battVolTestCount",battVolTestCount); |
| | | map.put("battResTestCount",battResTestCount); |
| | | map.put("battSerTestCount",battSerTestCount); |
| | | map.put("battChainResTestCount",battChainResTestCount); |
| | | |
| | | map.put("dataList",dataList); |