限值代码修改
This commit is contained in:
@@ -3,6 +3,7 @@ package com.njcn.device.biz.utils;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.pojo.po.Dic;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
@@ -260,7 +261,7 @@ public class COverlimitUtil {
|
||||
coefficient = 1.9;
|
||||
}
|
||||
BigDecimal bd = new BigDecimal(iTag * Math.pow((user / supply), (1 / coefficient)));
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP);
|
||||
bd = bd.setScale(6, RoundingMode.HALF_UP);
|
||||
return Double.parseDouble(bd.toString());
|
||||
}
|
||||
|
||||
@@ -286,8 +287,10 @@ public class COverlimitUtil {
|
||||
}else if(voltageLevel>=DicDataEnum.KV330.getValue() && voltageLevel<DicDataEnum.KV500.getValue()){
|
||||
capValue = 3000;
|
||||
}else if(voltageLevel>=DicDataEnum.KV500.getValue() && voltageLevel<DicDataEnum.KV750.getValue()){
|
||||
capValue = 7000;
|
||||
capValue = 4500;
|
||||
}else if(voltageLevel>=DicDataEnum.KV750.getValue() && voltageLevel<DicDataEnum.KV1000.getValue()){
|
||||
capValue = 7000;
|
||||
}else if(voltageLevel>=DicDataEnum.KV1000.getValue()){
|
||||
capValue = 9000;
|
||||
}
|
||||
return capValue;
|
||||
@@ -362,4 +365,12 @@ public class COverlimitUtil {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("sss");
|
||||
float aa = iHarmCalculate(9,500f,10,10,0.002222222222f);
|
||||
|
||||
System.out.println(aa);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user