src/main/java/com/whyc/dto/BattGroupStationInfoWithFileParam.java
@@ -27,11 +27,13 @@ //总体评价 private int resGoodCount; private int serGoodCount; private int volGoodCount; private int chainResGoodCount; private int battVolTestCount; private int battResTestCount; private int battSerTestCount; private int battChainResTestCount; public List<BattgroupData> getDataList() { @@ -169,4 +171,20 @@ public void setChainPic(String chainPic) { this.chainPic = chainPic; } public int getSerGoodCount() { return serGoodCount; } public void setSerGoodCount(int serGoodCount) { this.serGoodCount = serGoodCount; } public int getBattSerTestCount() { return battSerTestCount; } public void setBattSerTestCount(int battSerTestCount) { this.battSerTestCount = battSerTestCount; } } src/main/java/com/whyc/pojo/BattgroupData.java
@@ -68,6 +68,11 @@ @ApiModelProperty("内阻高严重告警") private boolean highResFlag2; @TableField(exist = false) @ApiModelProperty("电导告警标识") private boolean highSerFlag1; @TableField(exist = false) @ApiModelProperty("电导更换标识") private boolean highSerFlag2; @ApiModelProperty("连接条告警标识") private boolean highChainResFlag1; @TableField(exist = false) src/main/java/com/whyc/pojo/TestParam.java
@@ -36,6 +36,11 @@ @ApiModelProperty("启用") private Integer enabled; @TableField(value = "ser_good_coe_k6") private Float serGoodCoeK6; @TableField(value = "ser_bad_coe_k7") private Float serBadCoeK7; public Integer getId() { return id; } @@ -147,4 +152,20 @@ public void setChainResChange(Float chainResChange) { this.chainResChange = chainResChange; } public Float getSerGoodCoeK6() { return serGoodCoeK6; } public void setSerGoodCoeK6(Float serGoodCoeK6) { this.serGoodCoeK6 = serGoodCoeK6; } public Float getSerBadCoeK7() { return serBadCoeK7; } public void setSerBadCoeK7(Float serBadCoeK7) { this.serBadCoeK7 = serBadCoeK7; } } src/main/java/com/whyc/service/BattGroupDataService.java
@@ -87,6 +87,7 @@ dataList.forEach(data->{ //判断处理阈值 Float br = Float.parseFloat(data.getBr()); Float bs = Float.parseFloat(data.getBs()); Float bv = Float.parseFloat(data.getBv()); Float cr = Float.parseFloat(data.getCr()); //连接条阻抗 @@ -104,6 +105,13 @@ } } if(bs <= (1/stdRes)*param2.getSerGoodCoeK6()/100){ if(bs >= chainRes*param2.getSerBadCoeK7()/100) { data.setHighSerFlag1(true); }else { data.setHighSerFlag2(true); } } if(cr >= chainRes*param2.getChainResCoeK5()/100){ if(cr >= chainRes*param2.getChainResChange()/100) { data.setHighChainResFlag2(true); src/main/java/com/whyc/service/DataBaseService.java
@@ -143,6 +143,19 @@ mapper.updateFileParam("tb_test_param","chain_res_change","float not null DEFAULT 160.0"); } //检测字段是否存在 int serGoodCoeK6=mapper.checkfileParm("tb_test_param","ser_good_coe_k6"); if(serGoodCoeK6==0){ //检测没有则添加 mapper.updateFileParam("tb_test_param","ser_good_coe_k6","float not null DEFAULT 60.0"); } //检测字段是否存在 int serBadCoeK7=mapper.checkfileParm("tb_test_param","ser_bad_coe_k7"); if(serBadCoeK7==0){ //检测没有则添加 mapper.updateFileParam("tb_test_param","ser_bad_coe_k7","float not null DEFAULT 20.0"); } } } src/main/java/com/whyc/service/ExcelExportService.java
@@ -258,11 +258,13 @@ 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"); @@ -296,6 +298,9 @@ } 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; @@ -304,6 +309,7 @@ //计算电压,内阻,连接条数值是否有效,被测试过 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); @@ -316,6 +322,9 @@ if(br!=0.0){ battResTestCount++; } if(bs!=0.0){ battSerTestCount++; } if (cr!=0.0){ battChainResTestCount++; } @@ -324,14 +333,6 @@ 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); @@ -356,6 +357,10 @@ 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; }*/ @@ -372,10 +377,13 @@ 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) { @@ -717,24 +725,30 @@ 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++; @@ -764,6 +778,9 @@ data.setResEvaluation("bad"); } } if(bs!=0.0&& !data.isHighSerFlag1() && !data.isHighSerFlag2()){ serGoodCount +=1; } if(bv!=0.0 && !data.isLowVolFlag() && !data.isHighVolFlag()){ volGoodCount +=1; } @@ -773,10 +790,12 @@ }; 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); src/main/resources/excel_templates/res_test_report_compare_template.xlsBinary files differ
src/main/resources/excel_templates/res_test_report_compare_template_cg.xlsBinary files differ
src/main/resources/excel_templates/res_test_report_compare_template_en.xlsBinary files differ
src/main/resources/excel_templates/res_test_report_compare_template_en_cg.xlsBinary files differ
src/main/resources/excel_templates/res_test_report_single_template_cg.xlsBinary files differ
src/main/resources/excel_templates/res_test_report_single_template_en_cg.xlsBinary files differ