更改故障测试的bug

master
WeiRan 2024-09-25 21:14:33 +08:00
parent c66b84bc6c
commit 6727b1896a
3 changed files with 47 additions and 47 deletions

View File

@ -44,171 +44,171 @@ public class CarFaultRule {
/** /**
* *
*/ */
private long TM; private Long tm;
/** /**
* *
*/ */
private double TV; private double tv;
/** /**
* *
*/ */
private double CC; private double cc;
/** /**
* *
*/ */
private double IR; private double ir;
/** /**
* *
*/ */
private String GP; private String gp;
/** /**
* *
*/ */
private double APTV; private double aptv;
/** /**
* *
*/ */
private double BPTV; private double bptv;
/** /**
* *
*/ */
private double SFC; private double sfc;
/** /**
* *
*/ */
private double MCT; private double mct;
/** /**
* *
*/ */
private int MS; private int ms;
/** /**
* *
*/ */
private double MTO; private double mto;
/** /**
* *
*/ */
private double MTE; private double mte;
/** /**
* *
*/ */
private double MV; private double mv;
/** /**
* *
*/ */
private double MC; private double mc;
/** /**
* SOCSOCSOC * SOCSOCSOC
*/ */
private double PBRSOC; private double pbrsoc;
/** /**
* *
*/ */
private double MACSFP; private double macsfp;
/** /**
* *
*/ */
private double CSATMDP; private double csatmdp;
/** /**
* BMSBMSBMS * BMSBMSBMS
*/ */
private int BMS; private int bms;
/** /**
* *
*/ */
private double CADC; private double cadc;
/** /**
* V3V3V3 * V3V3V3
*/ */
private double PBLETVV3; private double pbletvv3;
/** /**
* *
*/ */
private double SMV; private double smv;
/** /**
* *
*/ */
private double MVOAB; private double mvoab;
/** /**
* *
*/ */
private double MAXBT; private double maxbt;
/** /**
* *
*/ */
private double MINBT; private double minbt;
/** /**
* *
*/ */
private double PBAC; private double pbac;
/** /**
* *
*/ */
private String VS; private String vs;
/** /**
* *
*/ */
private String CS; private String cs;
/** /**
* *
*/ */
private String RS; private String rs;
/** /**
* SOCSOCSOC * SOCSOCSOC
*/ */
private double SOC; private double soc;
/** /**
* *
*/ */
private String RESDWC; private String resdwc;
/** /**
* EASEASEAS * EASEASEAS
*/ */
private String EAS; private String eas;
/** /**
* PTCPTCPTC * PTCPTCPTC
*/ */
private String PTC; private String ptc;
/** /**
* EPSEPSEPS * EPSEPSEPS
*/ */
private String EPS; private String eps;
/** /**
* ABSABSABS * ABSABSABS
*/ */
private String ABS; private String abs;
/** /**
* MCUMCUMCU * MCUMCUMCU
*/ */
private String MCU; private String mcu;
/** /**
* *
*/ */
private String PBHS; private String pbhs;
/** /**
* *
*/ */
private String PBCS; private String pbcs;
/** /**
* *
*/ */
private String PBIS; private String pbis;
/** /**
* DCDCDCDCDCDC * DCDCDCDCDCDC
*/ */
private String DCDC; private String dcdc;
/** /**
* CHGCHGCHG * CHGCHGCHG
*/ */
private String CHG; private String chg;
/** /**
* *
*/ */
private byte CHB; private byte chb;
/** /**
* *
*/ */
private byte CUB; private byte cub;
} }

View File

@ -65,7 +65,7 @@ public class FaultRuleServiceImpl extends ServiceImpl<FaultRuleMapper, CarFaultR
bigDecimalValue = BigDecimal.valueOf(numberValue.doubleValue()); bigDecimalValue = BigDecimal.valueOf(numberValue.doubleValue());
} }
} }
//判断条件选择 //判断条件选择
if (faultconditionIdentification.equals(">") || faultconditionIdentification.equals("&gt;") ){ if (faultconditionIdentification.equals(">") || faultconditionIdentification.equals("&gt;") ){
if (bigDecimalValue.compareTo(faultconditionParameter)>0){ if (bigDecimalValue.compareTo(faultconditionParameter)>0){
vehicles.add(new Vehicle(carFaultRule.getVin(),declaredField.getName()+"超出规定范围")); vehicles.add(new Vehicle(carFaultRule.getVin(),declaredField.getName()+"超出规定范围"));

View File

@ -30,19 +30,19 @@ public class PureElectricCarFaultDetectionStrategy implements FaultDetectionStra
return new FaultReport("纯电车","车速不在正常范围内,请注意"); return new FaultReport("纯电车","车速不在正常范围内,请注意");
} }
//检测总里程数是否超过正常数 //检测总里程数是否超过正常数
if (carFaultRule.getTM()>5000000){ if (carFaultRule.getTm()>5000000){
return new FaultReport("纯电车","总里程数已超标,请注意"); return new FaultReport("纯电车","总里程数已超标,请注意");
} }
//检测总电压是否正常 //检测总电压是否正常
if (carFaultRule.getTV()>650){ if (carFaultRule.getTv()>650){
return new FaultReport("纯电车","总电压过高,请注意"); return new FaultReport("纯电车","总电压过高,请注意");
} }
//检测电流是否超标 //检测电流是否超标
if (carFaultRule.getCC()>50){ if (carFaultRule.getCc()>50){
return new FaultReport("纯电车","电流过高,请注意"); return new FaultReport("纯电车","电流过高,请注意");
} }
//检测绝缘电阻 //检测绝缘电阻
if (carFaultRule.getIR()>100000){ if (carFaultRule.getIr()>100000){
return new FaultReport("纯电车","绝缘电阻过高,请注意"); return new FaultReport("纯电车","绝缘电阻过高,请注意");
} }
// //检测加速踏板行程值 // //检测加速踏板行程值