代码修改

This commit is contained in:
2023-03-28 10:32:48 +08:00
parent 2bdd236f53
commit d84337a03a
12 changed files with 185 additions and 164 deletions

View File

@@ -23,8 +23,6 @@ public interface ServerInfo {
String USER = "user-boot"; String USER = "user-boot";
String JOB = "job-admin"; String JOB = "job-admin";
String QUALITY = "quality-boot"; String QUALITY = "quality-boot";
String HARMONIC_PREPARE = "harmonic-prepare";
String EVENT_PREPARE = "event-prepare";
String PROCESS = "process-boot"; String PROCESS = "process-boot";
String PREPARE_BOOT = "prepare-boot"; String PREPARE_BOOT = "prepare-boot";

View File

@@ -43,6 +43,11 @@
<groupId>org.influxdb</groupId> <groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId> <artifactId>influxdb-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -1,30 +1,43 @@
package com.njcn.device.biz.utils; package com.njcn.device.biz.utils;
import com.njcn.system.enums.DicDataEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.RoundingMode;
@Component
public class COverlimit { public class COverlimit {
private static int MAX_SCALE_NO = 9; private static int MAX_SCALE_NO = 9;
private static int MAXOVERLIMITNUM = 55+16;//WW 2017-08-10 overlimit增加电压偏差的下偏差值,原来个数是53 WW2017-11-29 54->53 新增负序电流 间谐波电压含有率 private static int MAXOVERLIMITNUM = 55 + 16;//WW 2017-08-10 overlimit增加电压偏差的下偏差值,原来个数是53 WW2017-11-29 54->53 新增负序电流 间谐波电压含有率
private static float[] fULimit = { private static float[] fULimit = {
2.0f,1.6f,0.8f,10.0f, 2.0f, 1.6f, 0.8f, 10.0f,
// 3.0f,2.4f,1.2f,10.0f, // 3.0f,2.4f,1.2f,10.0f,
3.0f,2.4f,1.2f,10.0f, 3.0f, 2.4f, 1.2f, 10.0f,
4.0f,3.2f,1.6f,7.0f, 4.0f, 3.2f, 1.6f, 7.0f,
4.0f,3.2f,1.6f,7.0f, 4.0f, 3.2f, 1.6f, 7.0f,
5.0f, 4.0f, 2.0f,7.0f, 5.0f, 4.0f, 2.0f, 7.0f,
3.0f,2.4f,1.2f,10.0f, 3.0f, 2.4f, 1.2f, 10.0f,
}; };
private static float[] fUDevL_Limit = {-3, -7, -10}; private static float[] fUDevL_Limit = {-3, -7, -10};
private static float[] fILimit = {
12.0f, 9.6f, 6.0f, 9.6f, 4.0f, 6.8f, 3.0f, 3.2f, 2.4f, 4.3f, 2.0f, 3.7f, 1.7f, 1.9f, 1.5f, 2.8f, 1.3f, 2.5f, 1.2f, 1.4f, 1.1f, 2.1f, 1.0f, 1.9f, private static final double[][] ARR = {
// 16.0f,13.0f,8.1f,13.0f,5.4f,9.3f,4.1f,4.3f,3.3f,5.9f,2.7f,5.0f,2.3f,2.6f,2.0f,3.8f,1.8f,3.4f,1.6f,1.9f,1.5f,2.8f,1.4f,2.6f, {78, 62, 39, 62, 26, 44, 19, 21, 16, 28, 13, 24, 11, 12, 9.7, 18, 8.6, 16, 7.8, 8.9, 7.1, 14, 6.5, 12, 6.0, 6.9, 5.6, 11, 5.2, 10, 4.9, 5.6, 4.6, 8.9, 4.3, 8.4, 4.1, 4.8, 3.9, 7.6, 3.7, 7.2, 3.5, 4.1, 3.4, 6.6, 3.3, 6.3, 3.1},
15.0f, 12.0f, 7.7f, 12.0f, 5.1f, 8.8f, 3.8f, 4.1f, 3.1f, 5.6f, 2.6f, 4.7f, 2.2f, 2.5f, 1.9f, 3.6f, 1.7f, 3.2f, 1.5f, 1.8f, 1.4f, 2.7f, 1.3f, 2.5f, {43, 34, 21, 34, 14, 24, 11, 11, 8.5, 16, 7.1, 13, 6.1, 6.8, 5.3, 10, 4.7, 9, 4.3, 4.9, 3.9, 7.4, 3.6, 6.8, 3.3, 3.8, 3.1, 5.9, 2.9, 5.5, 2.7, 3.1, 2.5, 4.9, 2.4, 4.6, 2.3, 2.6, 2.2, 4.1, 2.0, 4.0, 2.0, 2.3, 1.9, 3.6, 1.8, 3.5, 1.7},
26.0f, 20.0f, 13.0f, 20.0f, 8.5f, 15.0f, 6.4f, 6.8f, 5.1f, 9.3f, 4.3f, 7.9f, 3.7f, 4.1f, 3.2f, 6.0f, 2.8f, 5.4f, 2.6f, 2.9f, 2.3f, 4.5f, 2.1f, 4.1f, {26, 20, 13, 20, 8.5, 15, 6.4, 6.8, 5.1, 9.3, 4.3, 7.9, 3.7, 4.1, 3.2, 6, 2.8, 5.4, 2.6, 2.9, 2.3, 4.5, 2.1, 4.1, 2.0, 2.2, 1.9, 3.4, 1.7, 3.2, 1.6, 1.8, 1.5, 2.9, 1.4, 2.7, 1.4, 1.5, 1.3, 2.4, 1.2, 2.3, 1.2, 1.3, 1.1, 2.1, 1.1, 2.0, 1.0},
43.0f, 34.0f, 21.0f, 34.0f, 14.0f, 24.0f, 11.0f, 11.0f, 8.5f, 16.0f, 7.1f, 13.0f, 6.1f, 6.8f, 5.3f, 10.0f, 4.7f, 9.0f, 4.3f, 4.9f, 3.9f, 7.4f, 3.6f, 6.8f, {15, 12, 7.7, 12, 5.1, 8.8, 3.8, 4.1, 3.1, 5.6, 2.6, 4.7, 2.2, 2.5, 1.9, 3.6, 1.7, 3.2, 1.5, 1.8, 1.4, 2.7, 1.3, 2.5, 1.2, 1.3, 1.1, 2.1, 1.0, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.6, 0.8, 0.9, 0.8, 1.5, 0.7, 1.4, 0.7, 0.8, 0.7, 1.3, 0.6, 1.2, 0.6},
78.0f, 62.0f, 39.0f, 62.0f, 26.0f, 44.0f, 19.0f, 21.0f, 16.0f, 28.0f, 13.0f, 24.0f, 11.0f, 12.0f, 9.7f, 18.0f, 8.6f, 16.0f, 7.8f, 8.9f, 7.1f, 14.0f, 6.5f, 12.0f, {16, 13, 8.1, 13, 5.4, 9.3, 4.1, 4.3, 3.3, 5.9, 2.7, 5, 2.3, 2.6, 2, 3.8, 1.8, 3.4, 1.6, 1.9, 1.5, 2.8, 1.4, 2.6, 1.2, 1.4, 1.1, 2.2, 1.1, 2.1, 1.0, 1.2, 0.9, 1.9, 0.9, 1.8, 0.8, 1.0, 0.8, 1.6, 0.8, 1.5, 0.7, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6},
{12, 9.6, 6, 9.6, 4, 6.8, 3, 3.2, 2.4, 4.3, 2, 3.7, 1.7, 1.9, 1.5, 2.8, 1.3, 2.5, 1.2, 1.4, 1.1, 2.1, 1, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.5, 0.8, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6, 0.7, 0.6, 1.2, 0.6, 1.1, 0.5, 0.6, 0.5, 1.0, 0.5, 1.0, 0.5}
}; };
private static float[] fILimitCoe = { private static float[] fILimitCoe = {
2.0f, 1.1f, 2.0f, 1.2f, 2.0f, 1.4f, 2.0f, 2.0f, 2.0f, 1.8f, 2.0f, 1.9f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f 2.0f, 1.1f, 2.0f, 1.2f, 2.0f, 1.4f, 2.0f, 2.0f, 2.0f, 1.8f, 2.0f, 1.9f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f
}; };
@@ -39,12 +52,10 @@ public class COverlimit {
private static float GetVoltageLimit(int nHarm, int iScaleSelect)//谐波含有率 private static float GetVoltageLimit(int nHarm, int iScaleSelect)//谐波含有率
{ {
if (nHarm < 0) { if (nHarm < 0)
return 0.0f; return 0.0f;
} if (iScaleSelect >= MAX_SCALE_NO)
if (iScaleSelect >= MAX_SCALE_NO) {
return 0.0f; return 0.0f;
}
switch (iScaleSelect) { switch (iScaleSelect) {
case 6: case 6:
iScaleSelect = 4; iScaleSelect = 4;
@@ -56,16 +67,13 @@ public class COverlimit {
iScaleSelect = 0; iScaleSelect = 0;
break; break;
} }
if (iScaleSelect < 2) { if (iScaleSelect < 2)
iScaleSelect = 0; iScaleSelect = 0;
} else
else {
iScaleSelect--; iScaleSelect--;
}
int nSelect = iScaleSelect * 4 + 1; int nSelect = iScaleSelect * 4 + 1;
if (nHarm % 2 == 0) { if (nHarm % 2 == 0)
nSelect = iScaleSelect * 4 + 2; nSelect = iScaleSelect * 4 + 2;
}
return fULimit[nSelect]; return fULimit[nSelect];
} }
@@ -85,21 +93,18 @@ public class COverlimit {
iScaleSelect = 0; iScaleSelect = 0;
break; break;
} }
if (iScaleSelect < 2) { if (iScaleSelect < 2)
iScaleSelect = 0; iScaleSelect = 0;
} else
else {
iScaleSelect--; iScaleSelect--;
}
int nSelect = iScaleSelect * 4; int nSelect = iScaleSelect * 4;
return fULimit[nSelect]; return fULimit[nSelect];
} }
private static float GetVoltageDevationLimit(int iScaleSelect)//电压偏差 private static float GetVoltageDevationLimit(int iScaleSelect)//电压偏差
{ {
if (iScaleSelect >= MAX_SCALE_NO) { if (iScaleSelect >= MAX_SCALE_NO)
return 0.0f; return 0.0f;
}
switch (iScaleSelect) { switch (iScaleSelect) {
case 6: case 6:
iScaleSelect = 4; iScaleSelect = 4;
@@ -111,132 +116,165 @@ public class COverlimit {
iScaleSelect = 0; iScaleSelect = 0;
break; break;
} }
if (iScaleSelect < 2) { if (iScaleSelect < 2)
iScaleSelect = 0; iScaleSelect = 0;
} else
else {
iScaleSelect--; iScaleSelect--;
}
int nSelect = iScaleSelect * 4 + 3; int nSelect = iScaleSelect * 4 + 3;
return fULimit[nSelect]; return fULimit[nSelect];
} }
private static float GetVoltageDevationLimit_L(int iScaleSelect)//电压偏差负数 private static float GetVoltageDevationLimit_L(int iScaleSelect)//电压偏差负数
{ {
if (iScaleSelect >= MAX_SCALE_NO) { if (iScaleSelect >= MAX_SCALE_NO)
return 0.0f; return 0.0f;
}
int nReturn = 0; int nReturn = 0;
if (iScaleSelect == 3 || iScaleSelect == 4 || iScaleSelect == 5 || iScaleSelect == 6) { if (iScaleSelect == 3 || iScaleSelect == 4 || iScaleSelect == 5 || iScaleSelect == 6)
nReturn = 1; nReturn = 1;
} else if (iScaleSelect == -1)
else if (iScaleSelect == -1) {
nReturn = 2; nReturn = 2;
}
return fUDevL_Limit[nReturn]; return fUDevL_Limit[nReturn];
} }
private static float GetCurrentLimit(int nHarm, int iScaleSelect, float fDLRL, float fJZRL, float fXYRL, float fSBRL) { private static float GetCurrentLimit(int nHarm, String voltageLevel, float fDLRL, float fJZRL, float fXYRL, float fSBRL) {
if (nHarm < 0) { Double tag = getHarmTag(nHarm,voltageLevel);
return 0.0f; Double limit = getHarmonicLimit(nHarm,tag,new BigDecimal(String.valueOf(fSBRL)).doubleValue(),new BigDecimal(String.valueOf(fXYRL)).doubleValue());
} BigDecimal bigDecimal = new BigDecimal(limit).setScale(4,RoundingMode.HALF_UP);
if (iScaleSelect >= MAX_SCALE_NO) { return bigDecimal.floatValue();
return 0.0f;
}
switch (iScaleSelect) {
case 6:
iScaleSelect = 4;
break;
case 7:
iScaleSelect = 2;
break;
case 8:
iScaleSelect = 0;
break;
}
if (iScaleSelect < 2) {
iScaleSelect = 0;
}
else {
iScaleSelect--;
}
int nBaseSelect = nHarm + iScaleSelect * 24;
float fRealLimit = fDLRL / fJZRL * fILimit[nBaseSelect];
fRealLimit = fRealLimit * (float) Math.pow(fXYRL / fSBRL, 1.0f / fILimitCoe[nHarm]);
return fRealLimit;
} }
public static float GetFCurrentLimit(String strScale, float fDLRL){
float uL = 0.0f;
switch (strScale) {
case "0.38kV":
uL = 0.4f;
break;
case "6kV":
uL = 6.3f;
break;
case "10kV":
uL = 10.5f;
break;
case "20kV":
uL = 21.0f;
break;
case "35kV":
uL = 36.5f;
break;
case "66kV":
uL = 69.0f;
break;
case "110kV":
uL = 115.0f;
break;
case "220kV":
uL = 230.0f;
break;
case "330kV":
uL = 345.0f;
break;
default:
return 0.0f;
}
return 2.6f/100 * fDLRL * 1000 / ((float)Math.sqrt(3) * uL);
//电流谐波限值
private static Double getHarmTag(Integer iCount, String voltageLevel) {
int x, y;
if (DicDataEnum.KV038.getName().equalsIgnoreCase(voltageLevel) || DicDataEnum.V380.getName().equalsIgnoreCase(voltageLevel) || DicDataEnum.V400.getName().equalsIgnoreCase(voltageLevel) || DicDataEnum.KV04.getName().equalsIgnoreCase(voltageLevel)) {
x = 0;
} else if (DicDataEnum.KV6.getName().equalsIgnoreCase(voltageLevel)) {
x = 1;
} else if (DicDataEnum.KV10.getName().equalsIgnoreCase(voltageLevel) || DicDataEnum.KV20.getName().equalsIgnoreCase(voltageLevel)) {
x = 2;
} else if (DicDataEnum.KV35.getName().equalsIgnoreCase(voltageLevel)) {
x = 3;
} else if (DicDataEnum.KV66.getName().equalsIgnoreCase(voltageLevel)) {
x = 4;
} else {
x = 5;
}
y = iCount - 2;
return ARR[x][y];
} }
public static float GetInHarm(int i, int iScaleSelect){ ;
if(iScaleSelect == 5){
return InharmLimit1[i]; public static Double getHarmonicLimit(Integer times, double iTag, double supply, double user) {
}else{ if (supply == 0) {
return InharmLimit2[i]; return 0.0;
} }
double coefficient = 2.0;
if (times == 3) {
coefficient = 1.1;
} else if (times == 5) {
coefficient = 1.2;
} else if (times == 7) {
coefficient = 1.4;
} else if (times == 11) {
coefficient = 1.8;
} else if (times == 13) {
coefficient = 1.9;
}
BigDecimal bd = new BigDecimal(iTag * Math.pow((user / supply), (1 / coefficient)));
bd = bd.setScale(2, RoundingMode.HALF_UP);
return Double.parseDouble(bd.toString());
}
public static float GetFCurrentLimit(String strScale, float fDLRL) {
float uL = 0.0f;
switch (strScale) {
case "0.38kV":
uL = 0.4f;
break;
case "6kV":
uL = 6.3f;
break;
case "10kV":
uL = 10.5f;
break;
case "20kV":
uL = 21.0f;
break;
case "35kV":
uL = 36.5f;
break;
case "66kV":
uL = 69.0f;
break;
case "110kV":
uL = 115.0f;
break;
case "220kV":
uL = 230.0f;
break;
case "330kV":
uL = 345.0f;
break;
case "500kV":
uL = 520.0f;
break;
case "515kV":
uL = 535.0f;
break;
default:
return 0.0f;
}
return 2.6f / 100 * fDLRL * 1000 / ((float) Math.sqrt(3) * uL);
}
public static float GetInHarm(int i, int iScaleSelect) {
if (iScaleSelect == 5) {
return InharmLimit1[i];
} else {
return InharmLimit2[i];
}
} }
public static int TransStringScaleToInt(String strScale) { public static int TransStringScaleToInt(String strScale) {
if (strScale.equals("110kV")) { if (strScale.equals("110kV"))
return 1; return 1;
} else if (strScale.equals("35kV") || strScale.equals("66kV"))
else if (strScale.equals("35kV") || strScale.equals("66kV")) {
return 2; return 2;
} else if (strScale.equals("10kV"))
else if (strScale.equals("10kV")) {
return 3; return 3;
} else if (strScale.equals("6kV"))
else if (strScale.equals("6kV")) {
return 4; return 4;
} else if (strScale.equals("0.38kV"))
else if (strScale.equals("0.38kV")) {
return 5; return 5;
} else if (strScale.equals("20kV"))
else if (strScale.equals("20kV")) {
return 6; return 6;
} else if (strScale.equals("220kV") || strScale.equals("500kV"))
else if (strScale.equals("220kV")) {
return -1; return -1;
}
return 0; return 0;
} }
/*单独处理闪变的*/
public static float dealFlickerByScale(String strScale) {
if (strScale.equals("110kV") || strScale.equals("35kV") || strScale.equals("66kV") || strScale.equals("10kV") || strScale.equals("6kV") || strScale.equals("0.38kV") || strScale.equals("20kV")) {
return 1.0f;
} else if (strScale.equals("220kV") || strScale.equals("500kV")) {
return 0.8f;
} else {
return 1.0f;
}
}
public static float[] GetOverLimit(String strScale, float fDLRL, float fJZRL, float fXYRL, float fSBRL) { public static float[] GetOverLimit(String strScale, float fDLRL, float fJZRL, float fXYRL, float fSBRL) {
int i = 0; int i = 0;
@@ -250,52 +288,32 @@ public class COverlimit {
//电压不平衡 //电压不平衡
fLimit[2] = 2.0f; fLimit[2] = 2.0f;
//闪变 //闪变
if (nScale < 2) { fLimit[3] = dealFlickerByScale(strScale);
fLimit[3] = 1.0f;
}
else {
fLimit[3] = 0.8f;
}
//畸变率 //畸变率
fLimit[4] = GetVoltageJBLimit(nScale); fLimit[4] = GetVoltageJBLimit(nScale);
//24谐波电压幅值 //24谐波电压幅值
for (i = 0; i < 24; i++) { for (i = 0; i < 24; i++)
fLimit[5 + i] = GetVoltageLimit(i, nScale); fLimit[5 + i] = GetVoltageLimit(i, nScale);
}
//24谐波电流幅值 //24谐波电流幅值
for (i = 0; i < 24; i++) { for (i = 0; i < 24; i++)
fLimit[5 + 24 + i] = GetCurrentLimit(i, nScale, fDLRL, fJZRL, fXYRL, fSBRL); fLimit[5 + 24 + i] = GetCurrentLimit(i+2, strScale, fDLRL, fJZRL, fXYRL, fSBRL);
}
/**************************** /****************************
* Modify by yexb 20181015 * Modify by yexb 20181015
*此项为电压下偏差 *此项为电压下偏差
* 增加则MAXOVERLIMITNUM的值为54 * 增加则MAXOVERLIMITNUM的值为54
* 不增加则MAXOVERLIMITNUM的值为53 * 不增加则MAXOVERLIMITNUM的值为53
***************************/ ***************************/
fLimit[COverlimit.MAXOVERLIMITNUM-2-16] = GetVoltageDevationLimit_L(nScale); fLimit[COverlimit.MAXOVERLIMITNUM - 2 - 16] = GetVoltageDevationLimit_L(nScale);
//负序电流 //负序电流
fLimit[COverlimit.MAXOVERLIMITNUM-1-16] = GetFCurrentLimit(strScale,fDLRL); fLimit[COverlimit.MAXOVERLIMITNUM - 1 - 16] = GetFCurrentLimit(strScale, fDLRL);
//间谐波电压含有率 //间谐波电压含有率
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++)
fLimit[55 + i] = GetInHarm(i, nScale); fLimit[55 + i] = GetInHarm(i, nScale);
}
return fLimit; return fLimit;
} }
/* public void addOverLimit(String lineId, String scaTmp) {
Overlimit overlimit = new Overlimit();
LineDetail tmp = lineDetailMapper.selectById(lineId);
float fDLRL = tmp.getShortCapacity();
float fJZRL = tmp.getStandardCapacity();
float fXYRL = tmp.getDealCapacity();
float fSBRL = tmp.getDevCapacity();
float[] fLimit = COverlimit.GetOverLimit(scaTmp, fDLRL, fJZRL, fXYRL, fSBRL);
overLimitMapper.insert(overlimit);
}*/
} }

View File

@@ -23,4 +23,4 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -690,7 +690,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (Objects.isNull(scaleResult.getData())) { if (Objects.isNull(scaleResult.getData())) {
throw new BusinessException(CommonResponseEnum.DIC_DATA); throw new BusinessException(CommonResponseEnum.DIC_DATA);
} }
Overlimit overlimit = new Overlimit(line.getId(), updateSubVoltageParam.getScale(), lineDetail.getShortCapacity(), lineDetail.getStandardCapacity(), lineDetail.getDealCapacity(), lineDetail.getDevCapacity()); Overlimit overlimit = new Overlimit(line.getId(),scaleResult.getData().getName(), lineDetail.getShortCapacity(), lineDetail.getStandardCapacity(), lineDetail.getDealCapacity(), lineDetail.getDevCapacity());
overlimitMapper.insert(overlimit); overlimitMapper.insert(overlimit);
} }
} }

View File

@@ -130,7 +130,7 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
@Override @Override
public List<RStatEventOrgVO> getRStatEventOrg(UniversalFrontEndParam param) { public List<RStatEventOrgVO> getRStatEventOrg(UniversalFrontEndParam param) {
//获取所有子部门信息 //获取所有子部门信息
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData(); List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
if (CollectionUtil.isEmpty(deptDTOList)) { if (CollectionUtil.isEmpty(deptDTOList)) {
return Collections.emptyList(); return Collections.emptyList();
} }

View File

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @date 2022/10/20 * @date 2022/10/20
*/ */
@FeignClient( @FeignClient(
value = ServerInfo.HARMONIC_PREPARE,//对应模块名 value = ServerInfo.PREPARE_BOOT,//对应模块名
path = "/report",//对应controller请求类 path = "/report",//对应controller请求类
fallbackFactory = CoustomReportFeignClientFallbackFactory.class//服务降级处理类 fallbackFactory = CoustomReportFeignClientFallbackFactory.class//服务降级处理类
) )

View File

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @createTime 2022/11/4 15:58 * @createTime 2022/11/4 15:58
*/ */
@FeignClient( @FeignClient(
value = ServerInfo.HARMONIC_PREPARE, value = ServerInfo.PREPARE_BOOT,
path = "/distortion", path = "/distortion",
fallbackFactory = DistortionRateFeignClientFallbackFactory.class fallbackFactory = DistortionRateFeignClientFallbackFactory.class
) )

View File

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @date 2022/10/20 * @date 2022/10/20
*/ */
@FeignClient( @FeignClient(
value = ServerInfo.HARMONIC_PREPARE,//对应模块名 value = ServerInfo.PREPARE_BOOT,//对应模块名
path = "/normalLimit",//对应controller请求类 path = "/normalLimit",//对应controller请求类
fallbackFactory = NormalFeignClientFallbackFactory.class//服务降级处理类 fallbackFactory = NormalFeignClientFallbackFactory.class//服务降级处理类
) )

View File

@@ -10,12 +10,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/** /**
* 自定义报表 * 污区数据(日,月,年)
* @author qijian * @author qijian
* @date 2022/10/20 * @date 2022/10/20
*/ */
@FeignClient( @FeignClient(
value = ServerInfo.HARMONIC_PREPARE,//对应模块名 value = ServerInfo.PREPARE_BOOT,//对应模块名
path = "/pollution",//对应controller请求类 path = "/pollution",//对应controller请求类
fallbackFactory = PollutionFeignClientFallbackFactory.class//服务降级处理类 fallbackFactory = PollutionFeignClientFallbackFactory.class//服务降级处理类
) )

View File

@@ -1,5 +1,5 @@
FROM openjdk:8-jdk-alpine FROM openjdk:8-jdk-alpine
ADD target/harmonicprepare.jar harmonicprepare.jar ADD target/prepareboot.jar prepareboot.jar
ENTRYPOINT ["java","-jar","/harmonicprepare.jar"] ENTRYPOINT ["java","-jar","/prepareboot.jar"]
EXPOSE 10221 EXPOSE 10221
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone

View File

@@ -162,7 +162,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>harmonicprepare</finalName> <finalName>prepareboot</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>