Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f54ce5ae3c | |||
|
|
3a589962a5 | ||
|
|
e54df08dca | ||
| 055c762415 | |||
|
|
cdbb4fe428 | ||
|
|
d972bbef80 | ||
| 1d664fee19 | |||
| eb10a16799 | |||
| 6e85a72b7d | |||
| 59b56a39dc | |||
| da387cc39d | |||
|
|
9d4215afb5 | ||
| 35e3d098a9 | |||
| 61bbbed153 | |||
| 0fe103d01e | |||
| d64b15a8e6 | |||
| 3ed732affd | |||
| 128925a5d6 | |||
| 311b2844ba | |||
| 7dc2cde6ed | |||
|
|
8b1074c172 | ||
|
|
67ad03ddbe | ||
| 24e937e331 | |||
| 89ece63f2e | |||
| 1e79bbdcb0 | |||
| ec051827ac | |||
| 6fa63a7f3e | |||
| a9aa0785da | |||
| 23e7288609 | |||
|
|
a573c17886 | ||
| be8edfd4cf | |||
| 30b4f03f6b | |||
|
|
ee41b0a554 | ||
| 458b2347ed | |||
|
|
c1bfc2347f | ||
| eba02ffcf3 | |||
| 2921145336 | |||
|
|
9de6981cd5 | ||
| fb58b13c91 | |||
|
|
e12e5d90c8 | ||
|
|
075205d4b9 | ||
| 1af8fcc72f | |||
|
|
6ec0ef54e9 | ||
| fd23719a41 | |||
| 306200791a | |||
| e6a1874abf | |||
|
|
8502421b91 | ||
|
|
50cd5d3895 | ||
| 5ca027513f | |||
|
|
87c60206f0 | ||
| dbee4ca31d | |||
|
|
f26ec7003e | ||
| 467906b686 | |||
|
|
b146da4867 | ||
|
|
80dceeb0be | ||
| 8d6ba4afe3 | |||
| ae2207bd97 | |||
| 16e90de9eb | |||
| 5c36e2e4f4 | |||
| df72e7c338 | |||
|
|
234f0be465 | ||
| 0677320a06 | |||
|
|
0e548887a4 | ||
| e1c5a07f14 | |||
| 7a745fea9e | |||
|
|
8db6ddaeb5 | ||
|
|
e140ba4fe3 | ||
| ec9f32d0ad | |||
|
|
0e1a10a860 | ||
|
|
4ad60cbe96 | ||
|
|
731f6f2d12 | ||
|
|
7abce7651d | ||
|
|
d3af5bd9e4 | ||
|
|
dd6c3db9b2 | ||
| 6316389a68 | |||
| c994ada5e7 | |||
|
|
197d3df0fb | ||
| b501b91bc4 |
12
pom.xml
12
pom.xml
@@ -20,7 +20,6 @@
|
|||||||
<module>pqs-advance</module>
|
<module>pqs-advance</module>
|
||||||
<module>pqs-prepare</module>
|
<module>pqs-prepare</module>
|
||||||
<module>pqs-process</module>
|
<module>pqs-process</module>
|
||||||
<module>pqs-influx</module>
|
|
||||||
<module>pqs-bpm</module>
|
<module>pqs-bpm</module>
|
||||||
<module>pqs-supervision</module>
|
<module>pqs-supervision</module>
|
||||||
|
|
||||||
@@ -44,15 +43,20 @@
|
|||||||
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
|
||||||
<middle.server.url>192.168.1.22</middle.server.url>
|
<middle.server.url>192.168.1.22</middle.server.url>
|
||||||
<!--微服务模块发布地址-->
|
<!--微服务模块发布地址-->
|
||||||
<service.server.url>127.0.0.1</service.server.url>
|
<service.server.url>192.168.1.127</service.server.url>
|
||||||
<!--docker仓库地址-->
|
<!--docker仓库地址-->
|
||||||
<docker.server.url>192.168.1.22</docker.server.url>
|
<docker.server.url>192.168.1.22</docker.server.url>
|
||||||
<!--nacos的ip:port-->
|
<!--nacos的ip:port-->
|
||||||
<nacos.url>${middle.server.url}:18848</nacos.url>
|
<nacos.url>${middle.server.url}:18848</nacos.url>
|
||||||
|
<!--nacos开启鉴权后的用户名-->
|
||||||
|
<nacos.username>nacos</nacos.username>
|
||||||
|
<!--nacos的ip:port-->
|
||||||
|
<nacos.password>nacos</nacos.password>
|
||||||
<!--服务器发布内容为空-->
|
<!--服务器发布内容为空-->
|
||||||
<!-- <nacos.namespace></nacos.namespace>-->
|
<!-- <nacos.namespace></nacos.namespace>-->
|
||||||
<!-- <nacos.namespace>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
<!-- <nacos.namespace>1dd11af6-e668-41fd-a663-02a05705304d</nacos.namespace>-->
|
||||||
<nacos.namespace>6d75b5c3-cff9-4c4a-8e8b-ca2363753ecb</nacos.namespace>
|
<!-- <nacos.namespace>fd74182b-1fce-4dba-afa7-2623b0376205</nacos.namespace>-->
|
||||||
|
<nacos.namespace>ddcae5af-ac35-4fc4-9804-962de94dfc61</nacos.namespace>
|
||||||
<!-- sentinel:port-->
|
<!-- sentinel:port-->
|
||||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||||
<!--网关地址,主要用于配置swagger中认证token-->
|
<!--网关地址,主要用于配置swagger中认证token-->
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.njcn.advance.mapper.carrycapacity.CarryCapacityUserPOMapper;
|
|||||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityUserParam;
|
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityUserParam;
|
||||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityUserPO;
|
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityUserPO;
|
||||||
import com.njcn.advance.service.carrycapacity.CarryCapacityUserPOService;
|
import com.njcn.advance.service.carrycapacity.CarryCapacityUserPOService;
|
||||||
|
import com.njcn.common.pojo.constant.LogInfo;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.pojo.vo.UserVO;
|
import com.njcn.user.pojo.vo.UserVO;
|
||||||
@@ -77,7 +78,7 @@ public class CarryCapacityUserPOServiceImpl extends ServiceImpl<CarryCapacityUse
|
|||||||
page.getRecords().stream().forEach(temp->{
|
page.getRecords().stream().forEach(temp->{
|
||||||
UserVO user = userFeignClient.getUserById(temp.getCreateBy()).getData();
|
UserVO user = userFeignClient.getUserById(temp.getCreateBy()).getData();
|
||||||
|
|
||||||
temp.setCreateBy(user.getName());
|
temp.setCreateBy(Objects.isNull(user)? LogInfo.UNKNOWN_USER:user.getName());
|
||||||
});
|
});
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
|||||||
import com.njcn.influx.imapper.DataHarmPowerPMapper;
|
import com.njcn.influx.imapper.DataHarmPowerPMapper;
|
||||||
import com.njcn.influx.imapper.DataHarmPowerQMapper;
|
import com.njcn.influx.imapper.DataHarmPowerQMapper;
|
||||||
import com.njcn.influx.imapper.DataVMapper;
|
import com.njcn.influx.imapper.DataVMapper;
|
||||||
import com.njcn.influx.imapper.IDataIMapper;
|
import com.njcn.influx.imapper.DataIMapper;
|
||||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
||||||
import com.njcn.influx.pojo.po.DataI;
|
import com.njcn.influx.pojo.po.DataI;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
@@ -74,14 +74,14 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
private final DataHarmPowerQMapper dataHarmPowerQMapper;
|
private final DataHarmPowerQMapper dataHarmPowerQMapper;
|
||||||
private final DataHarmPowerPMapper dataHarmPowerPMapper;
|
private final DataHarmPowerPMapper dataHarmPowerPMapper;
|
||||||
private final DataVMapper dataVMapper;
|
private final DataVMapper dataVMapper;
|
||||||
private final IDataIMapper dataIMapper;
|
private final DataIMapper dataIMapper;
|
||||||
|
|
||||||
private final CarryCapacityStrategyPOService carryCapacityStrategyPOService;
|
private final CarryCapacityStrategyPOService carryCapacityStrategyPOService;
|
||||||
private final CarryCapacityDataPOService carryCapacityDataPOService;
|
private final CarryCapacityDataPOService carryCapacityDataPOService;
|
||||||
private final RedisUtil redisUtil;
|
private final RedisUtil redisUtil;
|
||||||
private final CarryCapacityResultPOService carryCapacityResultPOService;
|
private final CarryCapacityResultPOService carryCapacityResultPOService;
|
||||||
private final CarryCapacityUserPOService carryCapacityUserPOService;
|
private final CarryCapacityUserPOService carryCapacityUserPOService;
|
||||||
private static final double DEFAULTVALUE=3141.5926;
|
private static final double DEFAULTVALUE=3.1415926;
|
||||||
|
|
||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
缺失布置3.1415926,后边更具3.1415926个数来判断数据完整性,及进行数据补充*/
|
缺失布置3.1415926,后边更具3.1415926个数来判断数据完整性,及进行数据补充*/
|
||||||
//有功功率
|
//有功功率
|
||||||
String SqlP1 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlP1 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerPList = dataHarmPowerPMapper.getSqlResult(SqlP1);
|
dataHarmPowerPList = dataHarmPowerPMapper.getSqlResult(SqlP1);
|
||||||
|
|
||||||
//数据校验
|
//数据校验
|
||||||
@@ -172,7 +172,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
|
|
||||||
//无功功率
|
//无功功率
|
||||||
String SqlQ1 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlQ1 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerQList = dataHarmPowerQMapper.getSqlResult(SqlQ1);
|
dataHarmPowerQList = dataHarmPowerQMapper.getSqlResult(SqlQ1);
|
||||||
//数据缺失填补
|
//数据缺失填补
|
||||||
//数据校验
|
//数据校验
|
||||||
@@ -201,7 +201,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
, formatter) + " 23:59:00";
|
, formatter) + " 23:59:00";
|
||||||
|
|
||||||
String SqlP2 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlP2 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerP2List = dataHarmPowerPMapper.getSqlResult(SqlP2);
|
dataHarmPowerP2List = dataHarmPowerPMapper.getSqlResult(SqlP2);
|
||||||
//数据校验
|
//数据校验
|
||||||
if(CollectionUtil.isEmpty(dataHarmPowerP2List)){
|
if(CollectionUtil.isEmpty(dataHarmPowerP2List)){
|
||||||
@@ -220,7 +220,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
|
|
||||||
//无功功率
|
//无功功率
|
||||||
String SqlQ2 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlQ2 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerQ2List = dataHarmPowerQMapper.getSqlResult(SqlQ2);
|
dataHarmPowerQ2List = dataHarmPowerQMapper.getSqlResult(SqlQ2);
|
||||||
//数据校验
|
//数据校验
|
||||||
//数据校验
|
//数据校验
|
||||||
@@ -240,7 +240,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
|
|
||||||
//电压
|
//电压
|
||||||
String SqlU2 = "select mean(rms)*1000 as value from data_v where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlU2 = "select mean(rms)*1000 as value from data_v where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerU2List = dataVMapper.getSqlResult(SqlU2);
|
dataHarmPowerU2List = dataVMapper.getSqlResult(SqlU2);
|
||||||
//数据校验
|
//数据校验
|
||||||
//数据校验
|
//数据校验
|
||||||
@@ -325,7 +325,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
if(CollectionUtil.isEmpty(dataHarmPowerQList)){
|
if(CollectionUtil.isEmpty(dataHarmPowerQList)){
|
||||||
//无功功率
|
//无功功率
|
||||||
String SqlQ1 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlQ1 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + startTime + "'and time <= '" +endTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerQList = dataHarmPowerQMapper.getSqlResult(SqlQ1);
|
dataHarmPowerQList = dataHarmPowerQMapper.getSqlResult(SqlQ1);
|
||||||
if(CollectionUtil.isEmpty(dataHarmPowerQList)){
|
if(CollectionUtil.isEmpty(dataHarmPowerQList)){
|
||||||
throw new BusinessException(AdvanceResponseEnum.DATA_NOT_FOUND);
|
throw new BusinessException(AdvanceResponseEnum.DATA_NOT_FOUND);
|
||||||
@@ -796,7 +796,7 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
, formatter) + " 23:59:00";
|
, formatter) + " 23:59:00";
|
||||||
|
|
||||||
String SqlP2 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlP2 = "select mean(p)*1000 as value from data_harmpower_p where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerP2List = dataHarmPowerPMapper.getSqlResult(SqlP2);
|
dataHarmPowerP2List = dataHarmPowerPMapper.getSqlResult(SqlP2);
|
||||||
//数据校验
|
//数据校验
|
||||||
if(CollectionUtil.isEmpty(dataHarmPowerP2List)){
|
if(CollectionUtil.isEmpty(dataHarmPowerP2List)){
|
||||||
@@ -818,14 +818,14 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
|
|
||||||
//无功功率
|
//无功功率
|
||||||
String SqlQ2 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlQ2 = "select mean(q)*1000 as value from data_harmpower_q where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerQ2List = dataHarmPowerQMapper.getSqlResult(SqlQ2);
|
dataHarmPowerQ2List = dataHarmPowerQMapper.getSqlResult(SqlQ2);
|
||||||
//数据校验
|
//数据校验
|
||||||
//数据缺失填补
|
//数据缺失填补
|
||||||
linearInterpolation(dataHarmPowerQ2List);
|
linearInterpolation(dataHarmPowerQ2List);
|
||||||
//电压
|
//电压
|
||||||
String SqlU2 = "select mean(rms)*1000 as value from data_v where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
String SqlU2 = "select mean(rms)*1000 as value from data_v where value_type='CP95' and phasic_type!='T' and line_id='"+lineId+
|
||||||
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(3.1415926)"+InfluxDBPublicParam.TIME_ZONE;
|
"' and time >= '" + forwardStartTime + "'and time <= '" +forwardEndTime + "'"+"group by time("+timeInterval+"m) ,* fill(0.0031415926)"+InfluxDBPublicParam.TIME_ZONE;
|
||||||
dataHarmPowerU2List = dataVMapper.getSqlResult(SqlU2);
|
dataHarmPowerU2List = dataVMapper.getSqlResult(SqlU2);
|
||||||
//数据校验
|
//数据校验
|
||||||
|
|
||||||
@@ -1163,24 +1163,31 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
*/
|
*/
|
||||||
public static void linearInterpolation(List<CarryCapcityData> data) {
|
public static void linearInterpolation(List<CarryCapcityData> data) {
|
||||||
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
|
||||||
if (data.get(i).getValue() == DEFAULTVALUE ||Objects.isNull(data.get(i).getValue())) {
|
|
||||||
int prevIndex = i - 1;
|
data.stream().collect(Collectors.groupingBy(CarryCapcityData::getPhaseType)).forEach((k,v)->{
|
||||||
int nextIndex = i + 1;
|
|
||||||
while (prevIndex >= 0 && (data.get(prevIndex).getValue() == DEFAULTVALUE|| Objects.isNull(data.get(prevIndex).getValue()))) {
|
for (int i = 0; i < v.size(); i++) {
|
||||||
prevIndex--;
|
if (v.get(i).getValue() == DEFAULTVALUE ||Objects.isNull(v.get(i).getValue())) {
|
||||||
}
|
int prevIndex = i - 1;
|
||||||
while (nextIndex < data.size() && (data.get(nextIndex).getValue() == DEFAULTVALUE|| Objects.isNull(data.get(nextIndex).getValue()))) {
|
int nextIndex = i + 1;
|
||||||
nextIndex++;
|
while (prevIndex >= 0 && (v.get(prevIndex).getValue() == DEFAULTVALUE|| Objects.isNull(v.get(prevIndex).getValue()))) {
|
||||||
}
|
prevIndex--;
|
||||||
if (prevIndex >= 0 && nextIndex < data.size()) {
|
}
|
||||||
double slope = (data.get(nextIndex).getValue() - data.get(prevIndex).getValue()) / (nextIndex - prevIndex);
|
while (nextIndex < v.size() && (v.get(nextIndex).getValue() == DEFAULTVALUE|| Objects.isNull(v.get(nextIndex).getValue()))) {
|
||||||
data.get(i).setValue(data.get(prevIndex).getValue() + slope * (i - prevIndex));
|
nextIndex++;
|
||||||
} else {
|
}
|
||||||
data.get(i).setValue(DEFAULTVALUE);
|
if (prevIndex >= 0 && nextIndex < v.size()) {
|
||||||
|
double slope = (v.get(nextIndex).getValue() - v.get(prevIndex).getValue()) / (nextIndex - prevIndex);
|
||||||
|
v.get(i).setValue(v.get(prevIndex).getValue() + slope * (i - prevIndex));
|
||||||
|
} else {
|
||||||
|
v.get(i).setValue(DEFAULTVALUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -1192,72 +1199,76 @@ public class CarryCapcityServiceImpl implements CarryCapcityService {
|
|||||||
*/
|
*/
|
||||||
public static void linearInterpolationI(List<DataI> data) {
|
public static void linearInterpolationI(List<DataI> data) {
|
||||||
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
data.stream().collect(Collectors.groupingBy(DataI::getPhaseType)).forEach((k,v)->{
|
||||||
if (data.get(i).getI2() == DEFAULTVALUE||Objects.isNull(data.get(i).getI2())) {
|
for (int i = 0; i < v.size(); i++) {
|
||||||
int prevIndex = i - 1;
|
if (v.get(i).getI2() == DEFAULTVALUE||Objects.isNull(v.get(i).getI2())) {
|
||||||
int nextIndex = i + 1;
|
int prevIndex = i - 1;
|
||||||
while (prevIndex >= 0 && (data.get(prevIndex).getI2() == DEFAULTVALUE||Objects.isNull(data.get(prevIndex).getI2()))) {
|
int nextIndex = i + 1;
|
||||||
prevIndex--;
|
while (prevIndex >= 0 && (v.get(prevIndex).getI2() == DEFAULTVALUE||Objects.isNull(v.get(prevIndex).getI2()))) {
|
||||||
}
|
prevIndex--;
|
||||||
while (nextIndex < data.size() && (data.get(nextIndex).getI2() == DEFAULTVALUE||Objects.isNull(data.get(nextIndex).getI2()))) {
|
}
|
||||||
nextIndex++;
|
while (nextIndex < v.size() && (v.get(nextIndex).getI2() == DEFAULTVALUE||Objects.isNull(v.get(nextIndex).getI2()))) {
|
||||||
}
|
nextIndex++;
|
||||||
if (prevIndex >= 0 && nextIndex < data.size()) {
|
}
|
||||||
double slope = (data.get(nextIndex).getI2() - data.get(prevIndex).getI2()) / (nextIndex - prevIndex);
|
if (prevIndex >= 0 && nextIndex < v.size()) {
|
||||||
data.get(i).setI2(data.get(prevIndex).getI2() + slope * (i - prevIndex));
|
double slope = (v.get(nextIndex).getI2() - v.get(prevIndex).getI2()) / (nextIndex - prevIndex);
|
||||||
data.get(i).setI3(data.get(prevIndex).getI3() + slope * (i - prevIndex));
|
v.get(i).setI2(v.get(prevIndex).getI2() + slope * (i - prevIndex));
|
||||||
data.get(i).setI4(data.get(prevIndex).getI4() + slope * (i - prevIndex));
|
v.get(i).setI3(v.get(prevIndex).getI3() + slope * (i - prevIndex));
|
||||||
data.get(i).setI5(data.get(prevIndex).getI5() + slope * (i - prevIndex));
|
v.get(i).setI4(v.get(prevIndex).getI4() + slope * (i - prevIndex));
|
||||||
data.get(i).setI6(data.get(prevIndex).getI6() + slope * (i - prevIndex));
|
v.get(i).setI5(v.get(prevIndex).getI5() + slope * (i - prevIndex));
|
||||||
data.get(i).setI7(data.get(prevIndex).getI7() + slope * (i - prevIndex));
|
v.get(i).setI6(v.get(prevIndex).getI6() + slope * (i - prevIndex));
|
||||||
data.get(i).setI8(data.get(prevIndex).getI8() + slope * (i - prevIndex));
|
v.get(i).setI7(v.get(prevIndex).getI7() + slope * (i - prevIndex));
|
||||||
data.get(i).setI9(data.get(prevIndex).getI9() + slope * (i - prevIndex));
|
v.get(i).setI8(v.get(prevIndex).getI8() + slope * (i - prevIndex));
|
||||||
data.get(i).setI10(data.get(prevIndex).getI10() + slope * (i - prevIndex));
|
v.get(i).setI9(v.get(prevIndex).getI9() + slope * (i - prevIndex));
|
||||||
data.get(i).setI11(data.get(prevIndex).getI11() + slope * (i - prevIndex));
|
v.get(i).setI10(v.get(prevIndex).getI10() + slope * (i - prevIndex));
|
||||||
data.get(i).setI12(data.get(prevIndex).getI12() + slope * (i - prevIndex));
|
v.get(i).setI11(v.get(prevIndex).getI11() + slope * (i - prevIndex));
|
||||||
data.get(i).setI13(data.get(prevIndex).getI13() + slope * (i - prevIndex));
|
v.get(i).setI12(v.get(prevIndex).getI12() + slope * (i - prevIndex));
|
||||||
data.get(i).setI14(data.get(prevIndex).getI14() + slope * (i - prevIndex));
|
v.get(i).setI13(v.get(prevIndex).getI13() + slope * (i - prevIndex));
|
||||||
data.get(i).setI15(data.get(prevIndex).getI15() + slope * (i - prevIndex));
|
v.get(i).setI14(v.get(prevIndex).getI14() + slope * (i - prevIndex));
|
||||||
data.get(i).setI16(data.get(prevIndex).getI16() + slope * (i - prevIndex));
|
v.get(i).setI15(v.get(prevIndex).getI15() + slope * (i - prevIndex));
|
||||||
data.get(i).setI17(data.get(prevIndex).getI17() + slope * (i - prevIndex));
|
v.get(i).setI16(v.get(prevIndex).getI16() + slope * (i - prevIndex));
|
||||||
data.get(i).setI18(data.get(prevIndex).getI18() + slope * (i - prevIndex));
|
v.get(i).setI17(v.get(prevIndex).getI17() + slope * (i - prevIndex));
|
||||||
data.get(i).setI19(data.get(prevIndex).getI19() + slope * (i - prevIndex));
|
v.get(i).setI18(v.get(prevIndex).getI18() + slope * (i - prevIndex));
|
||||||
data.get(i).setI20(data.get(prevIndex).getI20() + slope * (i - prevIndex));
|
v.get(i).setI19(v.get(prevIndex).getI19() + slope * (i - prevIndex));
|
||||||
data.get(i).setI21(data.get(prevIndex).getI21() + slope * (i - prevIndex));
|
v.get(i).setI20(v.get(prevIndex).getI20() + slope * (i - prevIndex));
|
||||||
data.get(i).setI22(data.get(prevIndex).getI22() + slope * (i - prevIndex));
|
v.get(i).setI21(v.get(prevIndex).getI21() + slope * (i - prevIndex));
|
||||||
data.get(i).setI23(data.get(prevIndex).getI23() + slope * (i - prevIndex));
|
v.get(i).setI22(v.get(prevIndex).getI22() + slope * (i - prevIndex));
|
||||||
data.get(i).setI24(data.get(prevIndex).getI24() + slope * (i - prevIndex));
|
v.get(i).setI23(v.get(prevIndex).getI23() + slope * (i - prevIndex));
|
||||||
data.get(i).setI25(data.get(prevIndex).getI25() + slope * (i - prevIndex));
|
v.get(i).setI24(v.get(prevIndex).getI24() + slope * (i - prevIndex));
|
||||||
|
v.get(i).setI25(v.get(prevIndex).getI25() + slope * (i - prevIndex));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
data.get(i).setI2(DEFAULTVALUE);
|
v.get(i).setI2(DEFAULTVALUE);
|
||||||
data.get(i).setI3(DEFAULTVALUE);
|
v.get(i).setI3(DEFAULTVALUE);
|
||||||
data.get(i).setI4(DEFAULTVALUE);
|
v.get(i).setI4(DEFAULTVALUE);
|
||||||
data.get(i).setI5(DEFAULTVALUE);
|
v.get(i).setI5(DEFAULTVALUE);
|
||||||
data.get(i).setI6(DEFAULTVALUE);
|
v.get(i).setI6(DEFAULTVALUE);
|
||||||
data.get(i).setI7(DEFAULTVALUE);
|
v.get(i).setI7(DEFAULTVALUE);
|
||||||
data.get(i).setI8(DEFAULTVALUE);
|
v.get(i).setI8(DEFAULTVALUE);
|
||||||
data.get(i).setI9(DEFAULTVALUE);
|
v.get(i).setI9(DEFAULTVALUE);
|
||||||
data.get(i).setI10(DEFAULTVALUE);
|
v.get(i).setI10(DEFAULTVALUE);
|
||||||
data.get(i).setI11(DEFAULTVALUE);
|
v.get(i).setI11(DEFAULTVALUE);
|
||||||
data.get(i).setI12(DEFAULTVALUE);
|
v.get(i).setI12(DEFAULTVALUE);
|
||||||
data.get(i).setI13(DEFAULTVALUE);
|
v.get(i).setI13(DEFAULTVALUE);
|
||||||
data.get(i).setI14(DEFAULTVALUE);
|
v.get(i).setI14(DEFAULTVALUE);
|
||||||
data.get(i).setI15(DEFAULTVALUE);
|
v.get(i).setI15(DEFAULTVALUE);
|
||||||
data.get(i).setI16(DEFAULTVALUE);
|
v.get(i).setI16(DEFAULTVALUE);
|
||||||
data.get(i).setI17(DEFAULTVALUE);
|
v.get(i).setI17(DEFAULTVALUE);
|
||||||
data.get(i).setI18(DEFAULTVALUE);
|
v.get(i).setI18(DEFAULTVALUE);
|
||||||
data.get(i).setI19(DEFAULTVALUE);
|
v.get(i).setI19(DEFAULTVALUE);
|
||||||
data.get(i).setI20(DEFAULTVALUE);
|
v.get(i).setI20(DEFAULTVALUE);
|
||||||
data.get(i).setI21(DEFAULTVALUE);
|
v.get(i).setI21(DEFAULTVALUE);
|
||||||
data.get(i).setI22(DEFAULTVALUE);
|
v.get(i).setI22(DEFAULTVALUE);
|
||||||
data.get(i).setI23(DEFAULTVALUE);
|
v.get(i).setI23(DEFAULTVALUE);
|
||||||
data.get(i).setI24(DEFAULTVALUE);
|
v.get(i).setI24(DEFAULTVALUE);
|
||||||
data.get(i).setI25(DEFAULTVALUE);
|
v.get(i).setI25(DEFAULTVALUE);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public class ResponsibilityAlgorithm {
|
|||||||
//EK计算,用于后续计算FK(不含背景的用户责任指标)、HK(包含背景的用户责任指标)
|
//EK计算,用于后续计算FK(不含背景的用户责任指标)、HK(包含背景的用户责任指标)
|
||||||
//float **EKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
//float **EKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
||||||
//for (int i = 0; i < TL; i++)
|
//for (int i = 0; i < TL; i++)
|
||||||
//EKarr[i] = (float *)malloc(TL * sizeof(float));
|
//EKarr[i] = (float *)malloc(TL * Float.SIZE / Byte.SIZE);
|
||||||
|
|
||||||
float[][] EKarr;
|
float[][] EKarr;
|
||||||
EKarr = dyEKCom(simCor, Pdata, width, P, TL);
|
EKarr = dyEKCom(simCor, Pdata, width, P, TL);
|
||||||
@@ -303,7 +303,7 @@ public class ResponsibilityAlgorithm {
|
|||||||
//不含背景的用户谐波责任指标
|
//不含背景的用户谐波责任指标
|
||||||
//float **FKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
//float **FKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
||||||
//for (int i = 0; i < TL; i++)
|
//for (int i = 0; i < TL; i++)
|
||||||
//FKarr[i] = (float *)malloc(TL * sizeof(float));
|
//FKarr[i] = (float *)malloc(TL * Float.SIZE / Byte.SIZE);
|
||||||
float[][] FKarr;
|
float[][] FKarr;
|
||||||
FKarr = DyFKCom(EKdata, width, P, TL);
|
FKarr = DyFKCom(EKdata, width, P, TL);
|
||||||
RealMatrix FKdata = MatrixUtils.createRealMatrix(slcorlength, P);
|
RealMatrix FKdata = MatrixUtils.createRealMatrix(slcorlength, P);
|
||||||
@@ -316,7 +316,7 @@ public class ResponsibilityAlgorithm {
|
|||||||
//包含背景的谐波责任指标
|
//包含背景的谐波责任指标
|
||||||
//float **HKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
//float **HKarr = (float **)malloc(TL * sizeof(float *));//先申请P个指针型字节的空间
|
||||||
//for (int i = 0; i < TL; i++)
|
//for (int i = 0; i < TL; i++)
|
||||||
//HKarr[i] = (float *)malloc(TL * sizeof(float));
|
//HKarr[i] = (float *)malloc(TL * Float.SIZE / Byte.SIZE);
|
||||||
float[][] HKarr;
|
float[][] HKarr;
|
||||||
HKarr = DyHKCom(bjCore, EKdata, width, P, TL);
|
HKarr = DyHKCom(bjCore, EKdata, width, P, TL);
|
||||||
RealMatrix HKdata = MatrixUtils.createRealMatrix(slcorlength, (P + 1));
|
RealMatrix HKdata = MatrixUtils.createRealMatrix(slcorlength, (P + 1));
|
||||||
|
|||||||
@@ -1,20 +1,27 @@
|
|||||||
package com.njcn.auth.controller;
|
package com.njcn.auth.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.nimbusds.jose.jwk.JWKSet;
|
import com.nimbusds.jose.jwk.JWKSet;
|
||||||
import com.nimbusds.jose.jwk.RSAKey;
|
import com.nimbusds.jose.jwk.RSAKey;
|
||||||
import com.njcn.auth.service.UserTokenService;
|
import com.njcn.auth.service.UserTokenService;
|
||||||
|
import com.njcn.auth.utils.AuthPubUtil;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
import com.njcn.common.pojo.constant.SecurityConstants;
|
import com.njcn.common.pojo.constant.SecurityConstants;
|
||||||
import com.njcn.common.pojo.dto.UserTokenInfo;
|
import com.njcn.common.pojo.dto.UserTokenInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.common.utils.sm.DesUtils;
|
import com.njcn.common.utils.sm.DesUtils;
|
||||||
import com.njcn.redis.utils.RedisUtil;
|
import com.njcn.redis.utils.RedisUtil;
|
||||||
|
import com.njcn.user.api.PassWordRuleFeugnClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
|
import com.njcn.user.enums.UserResponseEnum;
|
||||||
|
import com.njcn.user.pojo.po.UserStrategy;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import com.njcn.web.utils.RestTemplateUtil;
|
import com.njcn.web.utils.RestTemplateUtil;
|
||||||
@@ -39,6 +46,7 @@ import java.security.interfaces.RSAPublicKey;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -59,11 +67,13 @@ public class AuthController extends BaseController {
|
|||||||
|
|
||||||
private final UserFeignClient userFeignClient;
|
private final UserFeignClient userFeignClient;
|
||||||
|
|
||||||
|
private final PassWordRuleFeugnClient passWordRuleFeugnClient;
|
||||||
|
|
||||||
private final UserTokenService userTokenService;
|
private final UserTokenService userTokenService;
|
||||||
|
|
||||||
|
|
||||||
@ApiIgnore
|
@ApiIgnore
|
||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.AUTHENTICATE)
|
@OperateInfo(info = LogEnum.SYSTEM_SERIOUS, operateType = OperateType.AUTHENTICATE)
|
||||||
@ApiOperation("登录认证")
|
@ApiOperation("登录认证")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = SecurityConstants.GRANT_TYPE, defaultValue = "password", value = "授权模式", required = true),
|
@ApiImplicitParam(name = SecurityConstants.GRANT_TYPE, defaultValue = "password", value = "授权模式", required = true),
|
||||||
@@ -80,6 +90,8 @@ public class AuthController extends BaseController {
|
|||||||
public Object postAccessToken(@ApiIgnore Principal principal, @RequestParam @ApiIgnore Map<String, String> parameters) throws HttpRequestMethodNotSupportedException {
|
public Object postAccessToken(@ApiIgnore Principal principal, @RequestParam @ApiIgnore Map<String, String> parameters) throws HttpRequestMethodNotSupportedException {
|
||||||
String methodDescribe = getMethodDescribe("postAccessToken");
|
String methodDescribe = getMethodDescribe("postAccessToken");
|
||||||
String username = parameters.get(SecurityConstants.USERNAME);
|
String username = parameters.get(SecurityConstants.USERNAME);
|
||||||
|
|
||||||
|
|
||||||
String grantType = parameters.get(SecurityConstants.GRANT_TYPE);
|
String grantType = parameters.get(SecurityConstants.GRANT_TYPE);
|
||||||
if (grantType.equalsIgnoreCase(SecurityConstants.GRANT_CAPTCHA) || grantType.equalsIgnoreCase(SecurityConstants.REFRESH_TOKEN_KEY)) {
|
if (grantType.equalsIgnoreCase(SecurityConstants.GRANT_CAPTCHA) || grantType.equalsIgnoreCase(SecurityConstants.REFRESH_TOKEN_KEY)) {
|
||||||
username = DesUtils.aesDecrypt(username);
|
username = DesUtils.aesDecrypt(username);
|
||||||
@@ -87,6 +99,28 @@ public class AuthController extends BaseController {
|
|||||||
//短信方式登录,将手机号赋值为用户名
|
//短信方式登录,将手机号赋值为用户名
|
||||||
username = parameters.get(SecurityConstants.PHONE);
|
username = parameters.get(SecurityConstants.PHONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//判断当前登录是否超过最大并发数
|
||||||
|
UserStrategy data = passWordRuleFeugnClient.getUserStrategy().getData();
|
||||||
|
String onlineUserKey = SecurityConstants.TOKEN_ONLINE_PREFIX;
|
||||||
|
List<UserTokenInfo> onLineUser = (List<UserTokenInfo>) redisUtil.getLikeListAllValues(onlineUserKey);
|
||||||
|
if(CollectionUtil.isNotEmpty(onLineUser)){
|
||||||
|
String finalUsername = username;
|
||||||
|
onLineUser = onLineUser.stream().filter(item->{
|
||||||
|
JSONObject jsonObject = AuthPubUtil.getLoginByToken(item.getRefreshToken());
|
||||||
|
String login = jsonObject.getStr(SecurityConstants.USER_NAME_KEY);
|
||||||
|
long exp = Long.parseLong(jsonObject.getStr(SecurityConstants.JWT_EXP));
|
||||||
|
long now = Calendar.getInstance().getTimeInMillis()/1000;
|
||||||
|
return (exp > now) && !login.equals(finalUsername);
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer maxNum = data.getMaxNum();
|
||||||
|
if((CollectionUtil.isNotEmpty(onLineUser)?onLineUser.size():0)>=maxNum){
|
||||||
|
throw new BusinessException(UserResponseEnum.LOGIN_USER_OVERLIMIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (grantType.equalsIgnoreCase(SecurityConstants.REFRESH_TOKEN_KEY)) {
|
if (grantType.equalsIgnoreCase(SecurityConstants.REFRESH_TOKEN_KEY)) {
|
||||||
//如果是刷新token,需要去黑名单校验
|
//如果是刷新token,需要去黑名单校验
|
||||||
userTokenService.judgeRefreshToken(parameters.get(SecurityConstants.REFRESH_TOKEN_KEY));
|
userTokenService.judgeRefreshToken(parameters.get(SecurityConstants.REFRESH_TOKEN_KEY));
|
||||||
@@ -106,6 +140,7 @@ public class AuthController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_SERIOUS, operateType = OperateType.LOGOUT)
|
||||||
@ApiOperation("用户登出系统")
|
@ApiOperation("用户登出系统")
|
||||||
@DeleteMapping("/logout")
|
@DeleteMapping("/logout")
|
||||||
public HttpResult<Object> logout() {
|
public HttpResult<Object> logout() {
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ public class UserTokenService {
|
|||||||
redisUtil.saveByKeyWithExpire(onlineUserKey, userTokenInfo, refreshLifeTime.plusMinutes(5L).toEpochSecond(ZoneOffset.of("+8")) - LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")));
|
redisUtil.saveByKeyWithExpire(onlineUserKey, userTokenInfo, refreshLifeTime.plusMinutes(5L).toEpochSecond(ZoneOffset.of("+8")) - LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")));
|
||||||
|
|
||||||
//记录成功登录后的信息
|
//记录成功登录后的信息
|
||||||
LogInfoDTO logInfoDTO = new LogInfoDTO(loginName, nickName, ip, "登录认证", OperateType.AUTHENTICATE, 1, "", 0, 1, generalInfo.getMicroServiceName(), userIndex,LocalDateTime.now());
|
//LogInfoDTO logInfoDTO = new LogInfoDTO(loginName, nickName, ip, "登录认证", OperateType.AUTHENTICATE, 1, "", 0, 1, generalInfo.getMicroServiceName(), userIndex,LocalDateTime.now());
|
||||||
publisher.send("/userLog", PubUtils.obj2json(logInfoDTO), 2, false);
|
//publisher.send("/userLog", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.njcn.auth.utils;
|
package com.njcn.auth.utils;
|
||||||
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import okhttp3.*;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.nimbusds.jose.JWSObject;
|
||||||
|
import com.njcn.common.pojo.constant.SecurityConstants;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -28,4 +31,13 @@ public class AuthPubUtil {
|
|||||||
return String.join("", textList);
|
return String.join("", textList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
public static JSONObject getLoginByToken(String token){
|
||||||
|
JWSObject jwsObject = JWSObject.parse(token);
|
||||||
|
String payload = jwsObject.getPayload().toString();
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(payload);
|
||||||
|
return jsonObject;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 不通过流程任务的 Request VO")
|
@Schema(description = "管理后台 - 不通过流程任务的 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -21,4 +22,9 @@ public class BpmTaskRejectParam {
|
|||||||
@NotBlank(message = "审批意见不能为空")
|
@NotBlank(message = "审批意见不能为空")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
|
@ApiModelProperty("抄送的用户编号数组")
|
||||||
|
private Collection<String> copyUserIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("变量实例(动态表单)")
|
||||||
|
private Map<String, Object> variables;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.bpm.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统筹流程实例的公共方案
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2024年06月12日 18:14
|
||||||
|
*/
|
||||||
|
public interface IBpmReasonService<T> extends IService<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据业务id实时更新当前业务流程状态
|
||||||
|
* @param businessId 实际业务id
|
||||||
|
* @param status 流程实例当前状态,具体参考BpmTaskStatusEnum枚举
|
||||||
|
*/
|
||||||
|
void updateProcessStatus(String businessId,String reason, Integer status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据业务id获取历史审批id以及该任务的重要信息
|
||||||
|
* @param businessId 业务流程id
|
||||||
|
*/
|
||||||
|
BpmInstanceInfo getInstanceInfo(String businessId);
|
||||||
|
}
|
||||||
@@ -109,7 +109,7 @@ public class BpmModelController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新建模型")
|
@ApiOperation("新建模型")
|
||||||
@ApiImplicitParam(name = "createRetVO", value = "模型数据", required = true)
|
@ApiImplicitParam(name = "bpmModelParam", value = "模型数据", required = true)
|
||||||
public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) {
|
public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) {
|
||||||
String methodDescribe = getMethodDescribe("createModel");
|
String methodDescribe = getMethodDescribe("createModel");
|
||||||
String modelId = modelService.createModel(bpmModelParam, null);
|
String modelId = modelService.createModel(bpmModelParam, null);
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ public class BpmProcessInstanceStatusEvent extends ApplicationEvent {
|
|||||||
*/
|
*/
|
||||||
private String businessKey;
|
private String businessKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核消息
|
||||||
|
* 例如说,请假
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
|
||||||
public BpmProcessInstanceStatusEvent(Object source) {
|
public BpmProcessInstanceStatusEvent(Object source) {
|
||||||
super(source);
|
super(source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class BpmSupervisionStatusListener implements ApplicationListener<BpmPro
|
|||||||
* @param event 事件
|
* @param event 事件
|
||||||
*/
|
*/
|
||||||
protected void onEvent(BpmProcessInstanceStatusEvent event) {
|
protected void onEvent(BpmProcessInstanceStatusEvent event) {
|
||||||
businessCommonFeignClient.updateProcessStatus(event.getProcessDefinitionKey(),event.getBusinessKey(), event.getStatus());
|
businessCommonFeignClient.updateProcessStatus(event.getProcessDefinitionKey(),event.getBusinessKey(),event.getReason(), event.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
|||||||
import com.njcn.bpm.pojo.dto.PageResult;
|
import com.njcn.bpm.pojo.dto.PageResult;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstancePageParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstancePageParam;
|
||||||
|
import com.njcn.bpm.pojo.param.task.BpmTaskRejectParam;
|
||||||
|
import org.flowable.engine.TaskService;
|
||||||
import org.flowable.engine.delegate.event.FlowableCancelledEvent;
|
import org.flowable.engine.delegate.event.FlowableCancelledEvent;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
@@ -146,6 +148,13 @@ public interface IBpmProcessInstanceService {
|
|||||||
*/
|
*/
|
||||||
void updateProcessInstanceReject(String id, String reason);
|
void updateProcessInstanceReject(String id, String reason);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新 ProcessInstance 拓展记录为不通过
|
||||||
|
*
|
||||||
|
* @param id 流程编号
|
||||||
|
* @param reason 理由。例如说,审批不通过时,需要传递该值
|
||||||
|
*/
|
||||||
|
void updateProcessInstanceFromReject(String id, String reason, TaskService taskService, BpmTaskRejectParam bpmTaskRejectParam);
|
||||||
/**
|
/**
|
||||||
* 用于测试过程删除流程,正式环境慎用
|
* 用于测试过程删除流程,正式环境慎用
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.bpm.service.task.impl;
|
package com.njcn.bpm.service.task.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -13,6 +14,7 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
|||||||
import com.njcn.bpm.pojo.dto.PageResult;
|
import com.njcn.bpm.pojo.dto.PageResult;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstancePageParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstancePageParam;
|
||||||
|
import com.njcn.bpm.pojo.param.task.BpmTaskRejectParam;
|
||||||
import com.njcn.bpm.service.IBpmProcessDefinitionService;
|
import com.njcn.bpm.service.IBpmProcessDefinitionService;
|
||||||
import com.njcn.bpm.service.task.IBpmProcessInstanceService;
|
import com.njcn.bpm.service.task.IBpmProcessInstanceService;
|
||||||
import com.njcn.bpm.strategy.BpmTaskCandidateStartUserSelectStrategy;
|
import com.njcn.bpm.strategy.BpmTaskCandidateStartUserSelectStrategy;
|
||||||
@@ -30,6 +32,7 @@ import org.flowable.bpmn.model.UserTask;
|
|||||||
import org.flowable.common.engine.impl.identity.Authentication;
|
import org.flowable.common.engine.impl.identity.Authentication;
|
||||||
import org.flowable.engine.HistoryService;
|
import org.flowable.engine.HistoryService;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
|
import org.flowable.engine.TaskService;
|
||||||
import org.flowable.engine.delegate.event.FlowableCancelledEvent;
|
import org.flowable.engine.delegate.event.FlowableCancelledEvent;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
import org.flowable.engine.repository.ProcessDefinition;
|
import org.flowable.engine.repository.ProcessDefinition;
|
||||||
@@ -72,7 +75,7 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
@Resource
|
@Resource
|
||||||
private IBpmProcessDefinitionService processDefinitionService;
|
private IBpmProcessDefinitionService processDefinitionService;
|
||||||
|
|
||||||
// @Resource
|
// @Resource
|
||||||
// private BpmMessageService messageService;
|
// private BpmMessageService messageService;
|
||||||
//
|
//
|
||||||
@Resource
|
@Resource
|
||||||
@@ -90,7 +93,6 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProcessInstance> getProcessInstances(Set<String> ids) {
|
public List<ProcessInstance> getProcessInstances(Set<String> ids) {
|
||||||
return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list();
|
return runtimeService.createProcessInstanceQuery().processInstanceIds(ids).list();
|
||||||
@@ -115,7 +117,7 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
.orderByProcessInstanceStartTime().desc();
|
.orderByProcessInstanceStartTime().desc();
|
||||||
if (userId != null) { // 【我的流程】菜单时,需要传递该字段
|
if (userId != null) { // 【我的流程】菜单时,需要传递该字段
|
||||||
processInstanceQuery.startedBy(userId);
|
processInstanceQuery.startedBy(userId);
|
||||||
} else if (bpmProcessInstancePageParam.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段
|
} else if (bpmProcessInstancePageParam.getStartUserId() != null) { // 【管理流程】菜单时,才会传递该字段
|
||||||
processInstanceQuery.startedBy(bpmProcessInstancePageParam.getStartUserId());
|
processInstanceQuery.startedBy(bpmProcessInstancePageParam.getStartUserId());
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(bpmProcessInstancePageParam.getName())) {
|
if (StrUtil.isNotEmpty(bpmProcessInstancePageParam.getName())) {
|
||||||
@@ -144,7 +146,7 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
}
|
}
|
||||||
// 查询列表
|
// 查询列表
|
||||||
int offset = PageFactory.getPageSize(bpmProcessInstancePageParam) * (PageFactory.getPageNum(bpmProcessInstancePageParam) - 1);
|
int offset = PageFactory.getPageSize(bpmProcessInstancePageParam) * (PageFactory.getPageNum(bpmProcessInstancePageParam) - 1);
|
||||||
List<HistoricProcessInstance> processInstanceList = processInstanceQuery.listPage(offset, PageFactory.getPageSize(bpmProcessInstancePageParam));
|
List<HistoricProcessInstance> processInstanceList = processInstanceQuery.listPage(offset, PageFactory.getPageSize(bpmProcessInstancePageParam));
|
||||||
return new PageResult<>(processInstanceList, processInstanceCount);
|
return new PageResult<>(processInstanceList, processInstanceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +228,7 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancelProcessInstanceByStartUser(String userId, BpmProcessInstanceCancelParam cancelReqVO) {
|
public void cancelProcessInstanceByStartUser(String userId, BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
// 1.1 校验流程实例存在
|
// 1.1 校验流程实例存在
|
||||||
ProcessInstance instance = getProcessInstance(cancelReqVO.getProcessInstanceId());
|
ProcessInstance instance = getProcessInstance(cancelReqVO.getProcessInstanceId());
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
@@ -285,18 +287,30 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProcessInstanceWhenApprove(ProcessInstance instance) {
|
public void updateProcessInstanceWhenApprove(ProcessInstance instance) {
|
||||||
|
//判断传入参数是否是,不通过信息不通过则需要更新流程信息为不通过
|
||||||
|
Integer processInstanceStatus = BpmProcessInstanceStatusEnum.APPROVE.getStatus();
|
||||||
|
Map<String, Object> processVariables = instance.getProcessVariables();
|
||||||
|
if (processVariables.containsKey(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS)) {
|
||||||
|
Integer stata =Integer.valueOf(processVariables.get(BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS).toString());
|
||||||
|
if (BpmProcessInstanceStatusEnum.REJECT.getStatus()==stata) {
|
||||||
|
processInstanceStatus = BpmProcessInstanceStatusEnum.REJECT.getStatus();
|
||||||
|
}
|
||||||
|
}
|
||||||
// 1. 更新流程实例 status
|
// 1. 更新流程实例 status
|
||||||
runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS,
|
runtimeService.setVariable(instance.getId(), BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS,
|
||||||
BpmProcessInstanceStatusEnum.APPROVE.getStatus());
|
processInstanceStatus);
|
||||||
|
|
||||||
// 2. 发送流程被【通过】的消息
|
// 2. 发送流程被【通过】的消息
|
||||||
// messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance));
|
// messageService.sendMessageWhenProcessInstanceApprove(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceApproveMessage(instance));
|
||||||
|
|
||||||
// 3. 发送流程实例的状态事件
|
// 3. 发送流程实例的状态事件
|
||||||
// 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance
|
// 注意:此时如果去查询 ProcessInstance 的话,字段是不全的,所以去查询了 HistoricProcessInstance
|
||||||
HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId());
|
// 在审核不通过时,会触该信息,设置在审核通过时,才发送
|
||||||
processInstanceEventPublisher.sendProcessInstanceResultEvent(
|
if(BpmProcessInstanceStatusEnum.APPROVE.getStatus()==processInstanceStatus){
|
||||||
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.APPROVE.getStatus()));
|
HistoricProcessInstance processInstance = getHistoricProcessInstance(instance.getId());
|
||||||
|
processInstanceEventPublisher.sendProcessInstanceResultEvent(
|
||||||
|
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, processInstanceStatus));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -314,7 +328,31 @@ public class BpmProcessInstanceServiceImpl implements IBpmProcessInstanceService
|
|||||||
|
|
||||||
// 4. 发送流程实例的状态事件
|
// 4. 发送流程实例的状态事件
|
||||||
processInstanceEventPublisher.sendProcessInstanceResultEvent(
|
processInstanceEventPublisher.sendProcessInstanceResultEvent(
|
||||||
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, BpmProcessInstanceStatusEnum.REJECT.getStatus()));
|
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, reason, BpmProcessInstanceStatusEnum.REJECT.getStatus()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void updateProcessInstanceFromReject(String id, String reason, TaskService taskService, BpmTaskRejectParam bpmTaskRejectParam) {
|
||||||
|
// 1. 更新流程实例 status
|
||||||
|
runtimeService.setVariable(id, BpmConstants.PROCESS_INSTANCE_VARIABLE_STATUS, BpmProcessInstanceStatusEnum.REJECT.getStatus());
|
||||||
|
|
||||||
|
// 2. 删除流程实例,以实现驳回任务时,取消整个审批流程
|
||||||
|
ProcessInstance processInstance = getProcessInstance(id);
|
||||||
|
// 3.3 调用 BPM complete 去完成任务
|
||||||
|
// 其中,variables 是存储动态表单到 local 任务级别。过滤一下,避免 ProcessInstance 系统级的变量被占用
|
||||||
|
if (CollectionUtil.isNotEmpty(bpmTaskRejectParam.getVariables())) {
|
||||||
|
Map<String, Object> variables = FlowableUtils.filterTaskFormVariable(bpmTaskRejectParam.getVariables());
|
||||||
|
taskService.complete(bpmTaskRejectParam.getId(), variables, true);
|
||||||
|
} else {
|
||||||
|
taskService.complete(bpmTaskRejectParam.getId());
|
||||||
|
}
|
||||||
|
//这是删除所有信息,
|
||||||
|
// deleteProcessInstance(id, StrUtil.format(BpmDeleteReasonEnum.REJECT_TASK.format(reason)));
|
||||||
|
// 4. 发送流程实例的状态事件
|
||||||
|
processInstanceEventPublisher.sendProcessInstanceResultEvent(
|
||||||
|
BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceStatusEvent(this, processInstance, reason, BpmProcessInstanceStatusEnum.REJECT.getStatus()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteProcessInstance(String id, String reason) {
|
public void deleteProcessInstance(String id, String reason) {
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ public class BpmTaskServiceImpl implements IBpmTaskService {
|
|||||||
BpmCommentTypeEnum.REJECT.formatComment(bpmTaskRejectParam.getReason()));
|
BpmCommentTypeEnum.REJECT.formatComment(bpmTaskRejectParam.getReason()));
|
||||||
|
|
||||||
// 3. 更新流程实例,审批不通过!
|
// 3. 更新流程实例,审批不通过!
|
||||||
processInstanceService.updateProcessInstanceReject(instance.getProcessInstanceId(), bpmTaskRejectParam.getReason());
|
processInstanceService.updateProcessInstanceFromReject(instance.getProcessInstanceId(), bpmTaskRejectParam.getReason(), taskService, bpmTaskRejectParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -105,12 +105,13 @@ public interface BpmProcessInstanceConvert {
|
|||||||
return bpmProcessInstanceStatusEvent;
|
return bpmProcessInstanceStatusEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance, Integer status) {
|
default BpmProcessInstanceStatusEvent buildProcessInstanceStatusEvent(Object source, ProcessInstance instance,String reason, Integer status) {
|
||||||
BpmProcessInstanceStatusEvent bpmProcessInstanceStatusEvent = new BpmProcessInstanceStatusEvent(source);
|
BpmProcessInstanceStatusEvent bpmProcessInstanceStatusEvent = new BpmProcessInstanceStatusEvent(source);
|
||||||
bpmProcessInstanceStatusEvent.setId(instance.getId());
|
bpmProcessInstanceStatusEvent.setId(instance.getId());
|
||||||
bpmProcessInstanceStatusEvent.setStatus(status);
|
bpmProcessInstanceStatusEvent.setStatus(status);
|
||||||
bpmProcessInstanceStatusEvent.setProcessDefinitionKey(instance.getProcessDefinitionKey());
|
bpmProcessInstanceStatusEvent.setProcessDefinitionKey(instance.getProcessDefinitionKey());
|
||||||
bpmProcessInstanceStatusEvent.setBusinessKey(instance.getBusinessKey());
|
bpmProcessInstanceStatusEvent.setBusinessKey(instance.getBusinessKey());
|
||||||
|
bpmProcessInstanceStatusEvent.setReason(reason);
|
||||||
return bpmProcessInstanceStatusEvent;
|
return bpmProcessInstanceStatusEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,18 +21,17 @@ public class GenerateCode {
|
|||||||
|
|
||||||
private static final String TARGET_DIR = "D://code";
|
private static final String TARGET_DIR = "D://code";
|
||||||
|
|
||||||
private static final String DB_URL = "jdbc:mysql://192.168.1.24:13306/pqsinfo_jb";
|
private static final String DB_URL = "jdbc:mysql://127.0.0.1:3306/pqsinfo";
|
||||||
// private static final String DB_URL = "jdbc:oracle:thin:@192.168.1.170:1521:pqsbase";
|
// private static final String DB_URL = "jdbc:oracle:thin:@192.168.1.170:1521:pqsbase";
|
||||||
|
|
||||||
private static final String USERNAME = "root";
|
private static final String USERNAME = "root";
|
||||||
|
|
||||||
private static final String PASSWORD = "njcnpqs";
|
private static final String PASSWORD = "123456";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
List<Module> modules = Stream.of(
|
List<Module> modules = Stream.of(
|
||||||
new Module("hongawen", "com.njcn.supervision", "survey", Stream.of(
|
new Module("xy", "com.njcn.supervision", "survey", Stream.of(
|
||||||
"supervision_survey_plan",
|
"supervision_line_warning"
|
||||||
"supervision_survey_test"
|
|
||||||
).collect(Collectors.toList()), "supervision_")
|
).collect(Collectors.toList()), "supervision_")
|
||||||
).collect(Collectors.toList());
|
).collect(Collectors.toList());
|
||||||
generateJavaFile(modules);
|
generateJavaFile(modules);
|
||||||
|
|||||||
@@ -103,12 +103,18 @@ public enum CommonResponseEnum {
|
|||||||
|
|
||||||
ADVANCE_RESPONSE_ENUM("A00105", "终端响应枚举类型"),
|
ADVANCE_RESPONSE_ENUM("A00105", "终端响应枚举类型"),
|
||||||
|
|
||||||
|
DYNAMIC_RESPONSE_ENUM("A00002", "动态枚举内容"),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|
||||||
private final String message;
|
private String message;
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
CommonResponseEnum(String code, String message) {
|
CommonResponseEnum(String code, String message) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
|
|||||||
@@ -323,6 +323,24 @@ public class PubUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//监测点运行状态(0:投运;1:检修;2:停运;3:调试;4:退运)
|
||||||
|
public static String lineRunFlag(Integer runFlag) {
|
||||||
|
switch (runFlag) {
|
||||||
|
case 0:
|
||||||
|
return "投运";
|
||||||
|
case 1:
|
||||||
|
return "检修";
|
||||||
|
case 2:
|
||||||
|
return "停运";
|
||||||
|
case 3:
|
||||||
|
return "调试";
|
||||||
|
case 4:
|
||||||
|
return "退运";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Integer getRunFlag(String runFlag) {
|
public static Integer getRunFlag(String runFlag) {
|
||||||
switch (runFlag) {
|
switch (runFlag) {
|
||||||
case "投运":
|
case "投运":
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class DataTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
InfluxDbUtils influxDBUtil = new InfluxDbUtils("admin", "123456", "http://192.168.1.18:8086", "pqsbase_sjzx", "");
|
InfluxDbUtils influxDBUtil = new InfluxDbUtils("root", "123456", "http://127.0.0.1:8086", "pqsadmin_jb", "");
|
||||||
|
|
||||||
insert(influxDBUtil);
|
insert(influxDBUtil);
|
||||||
}
|
}
|
||||||
@@ -72,16 +72,88 @@ public class DataTest {
|
|||||||
|
|
||||||
//单条数据插入
|
//单条数据插入
|
||||||
public static void insert(InfluxDbUtils influxDBUtil) {
|
public static void insert(InfluxDbUtils influxDBUtil) {
|
||||||
|
|
||||||
|
// Map<String, String> tags = new HashMap<>();
|
||||||
|
// long time = Long.parseLong("1719921600000");
|
||||||
|
// tags.put("line_id", "82a9bad93e784c37135db4589794e6b0");
|
||||||
|
// tags.put("phasic_type", "A");
|
||||||
|
// tags.put("value_type","CP95");
|
||||||
|
// tags.put("quality_flag","0");
|
||||||
|
//
|
||||||
|
// Map<String, Object> fields = new HashMap<>();
|
||||||
|
// fields.put("i_2",0);
|
||||||
|
// fields.put("i_3",0);
|
||||||
|
// fields.put("i_4",0);
|
||||||
|
// fields.put("i_5",6.02);
|
||||||
|
// fields.put("i_6",0);
|
||||||
|
// fields.put("i_7",0);
|
||||||
|
// fields.put("i_8",0);
|
||||||
|
// fields.put("i_9",0);
|
||||||
|
// fields.put("i_10",0);
|
||||||
|
// fields.put("i_11",0);
|
||||||
|
// fields.put("i_12",0);
|
||||||
|
// fields.put("i_13",0);
|
||||||
|
// fields.put("i_14",0);
|
||||||
|
// fields.put("i_15",3.25);
|
||||||
|
// fields.put("i_16",0);
|
||||||
|
// fields.put("i_17",0);
|
||||||
|
// fields.put("i_18",0);
|
||||||
|
// fields.put("i_19",0);
|
||||||
|
// fields.put("i_20",0);
|
||||||
|
// fields.put("i_21",0);
|
||||||
|
// fields.put("i_22",0);
|
||||||
|
// fields.put("i_23",0);
|
||||||
|
// fields.put("i_24",3.52);
|
||||||
|
// fields.put("i_25",0);
|
||||||
|
// influxDBUtil.insert("data_i", tags, fields, time, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
Map<String, String> tags = new HashMap<>();
|
Map<String, String> tags = new HashMap<>();
|
||||||
long time = Long.parseLong("1675958400000");
|
long time = Long.parseLong("1719842400000");
|
||||||
tags.put("dev_id", "57d121d45a26f3cc1d7b6ba541f895c0");
|
tags.put("line_id", "ebdf6cbc275c5d7ed8104fcb3792fb0a");
|
||||||
|
tags.put("phasic_type", "A");
|
||||||
|
tags.put("value_type","CP95");
|
||||||
|
tags.put("quality_flag","0");
|
||||||
|
|
||||||
Map<String, Object> fields = new HashMap<>();
|
Map<String, Object> fields = new HashMap<>();
|
||||||
|
fields.put("v_1",10.0);
|
||||||
|
fields.put("v_2",0);
|
||||||
|
fields.put("v_3",0);
|
||||||
|
fields.put("v_4",0);
|
||||||
|
fields.put("v_5",6.02);
|
||||||
|
fields.put("v_6",0);
|
||||||
|
fields.put("v_7",0);
|
||||||
|
fields.put("v_8",0);
|
||||||
|
fields.put("v_9",0);
|
||||||
|
fields.put("v_10",0);
|
||||||
|
fields.put("v_11",0);
|
||||||
|
fields.put("v_12",0);
|
||||||
|
fields.put("v_13",0);
|
||||||
|
fields.put("v_14",0);
|
||||||
|
fields.put("v_15",3.25);
|
||||||
|
fields.put("v_16",0);
|
||||||
|
fields.put("v_17",0);
|
||||||
|
fields.put("v_18",0);
|
||||||
|
fields.put("v_19",0);
|
||||||
|
fields.put("v_20",0);
|
||||||
|
fields.put("v_21",0);
|
||||||
|
fields.put("v_22",0);
|
||||||
|
fields.put("v_23",0);
|
||||||
|
fields.put("v_24",3.52);
|
||||||
|
fields.put("v_25",0);
|
||||||
|
influxDBUtil.insert("data_inharm_v", tags, fields, time, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Map<String, String> tags = new HashMap<>();
|
||||||
|
// long time = Long.parseLong("1675958400000");
|
||||||
|
// tags.put("dev_id", "57d121d45a26f3cc1d7b6ba541f895c0");
|
||||||
|
// Map<String, Object> fields = new HashMap<>();
|
||||||
// fields.put("due",1440);
|
// fields.put("due",1440);
|
||||||
// fields.put("real",1200);
|
// fields.put("real",1200);
|
||||||
fields.put("online_min", 0);
|
// fields.put("online_min", 0);
|
||||||
fields.put("offline_min", 1440);
|
// fields.put("offline_min", 1440);
|
||||||
fields.put("online_rate", 0.0000);
|
// fields.put("online_rate", 0.0000);
|
||||||
influxDBUtil.insert("pqs_onlinerate", tags, fields, time, TimeUnit.MILLISECONDS);
|
// influxDBUtil.insert("pqs_onlinerate", tags, fields, time, TimeUnit.MILLISECONDS);
|
||||||
// long time = Long.parseLong("1655135328135");
|
// long time = Long.parseLong("1655135328135");
|
||||||
// Map<String, String> tags = new HashMap<>();
|
// Map<String, String> tags = new HashMap<>();
|
||||||
// // tags.put("line_id", "127fad1dcb0077ac2979141b8473a5e4");
|
// // tags.put("line_id", "127fad1dcb0077ac2979141b8473a5e4");
|
||||||
|
|||||||
@@ -131,4 +131,9 @@ public interface OssPath {
|
|||||||
*/
|
*/
|
||||||
String THEME="theme/";
|
String THEME="theme/";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线监测预告警单
|
||||||
|
*/
|
||||||
|
String ONLINE_REPORT="onlineReport/";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,13 @@ public class FeignConfig {
|
|||||||
//对结果进行转换
|
//对结果进行转换
|
||||||
HttpResult<Object> result = PubUtils.json2obj(bodyStr, type);
|
HttpResult<Object> result = PubUtils.json2obj(bodyStr, type);
|
||||||
//如果返回错误,且为内部错误,则直接抛出异常
|
//如果返回错误,且为内部错误,则直接抛出异常
|
||||||
CommonResponseEnum commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
|
CommonResponseEnum commonResponseEnum;
|
||||||
|
if(result.getCode().equals(CommonResponseEnum.DYNAMIC_RESPONSE_ENUM.getCode())){
|
||||||
|
commonResponseEnum = CommonResponseEnum.DYNAMIC_RESPONSE_ENUM;
|
||||||
|
commonResponseEnum.setMessage(result.getMessage());
|
||||||
|
}else{
|
||||||
|
commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
|
||||||
|
}
|
||||||
switch (commonResponseEnum) {
|
switch (commonResponseEnum) {
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public enum GWSendEnum {
|
|||||||
|
|
||||||
//调用总部下发工单的反馈单接口
|
//调用总部下发工单的反馈单接口
|
||||||
WORK_ORDER_FEEDBACK("workOrderFeedBack", "/pms-ghq-powerquality-start/powerQuality/workOrder/receiveFeedbackInfo"),
|
WORK_ORDER_FEEDBACK("workOrderFeedBack", "/pms-ghq-powerquality-start/powerQuality/workOrder/receiveFeedbackInfo"),
|
||||||
|
|
||||||
|
PARK_AND_STATION("parkAndStation", "/pms-ghq-powerquality-start/powerQuality/park/create"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,10 +84,12 @@ public class LogServiceImpl implements ILogService {
|
|||||||
publisher.send("/userLog", PubUtils.obj2json(logInfoDTO), 2, false);
|
publisher.send("/userLog", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
//推送审计消息功能
|
//推送审计消息功能
|
||||||
if(severity!=0){
|
if(severity!=0){
|
||||||
publisher.send("/userLogPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
if(!logInfoDTO.getLoginName().equals(LogInfo.UNKNOWN_USER)){
|
||||||
//发送邮箱功能
|
publisher.send("/userLogPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
if(severity==2&&logInfoDTO.getResult()==0){
|
//发送邮箱功能
|
||||||
publisher.send("/userLogEmailPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
if(severity==2&&logInfoDTO.getResult()==0){
|
||||||
|
//publisher.send("/userLogEmailPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//如果存在设备日志注解,则记录设备日志
|
//如果存在设备日志注解,则记录设备日志
|
||||||
@@ -167,10 +169,12 @@ public class LogServiceImpl implements ILogService {
|
|||||||
private void auditPush(Integer severity, LogInfoDTO logInfoDTO) {
|
private void auditPush(Integer severity, LogInfoDTO logInfoDTO) {
|
||||||
//推送审计消息功能
|
//推送审计消息功能
|
||||||
if(severity !=0){
|
if(severity !=0){
|
||||||
publisher.send("/userLogPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
if(!logInfoDTO.getLoginName().equals(LogInfo.UNKNOWN_USER)) {
|
||||||
//发送邮箱功能
|
publisher.send("/userLogPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
if(severity ==2&& logInfoDTO.getResult()==0){
|
//发送邮箱功能
|
||||||
publisher.send("/userLogEmailPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
if (severity == 2 && logInfoDTO.getResult() == 0) {
|
||||||
|
//publisher.send("/userLogEmailPush", PubUtils.obj2json(logInfoDTO), 2, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.biz.pojo.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,6 +31,16 @@ public class SubGetBase implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String voltageLevel;
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门
|
* 部门
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.math.RoundingMode;
|
|||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@Deprecated
|
||||||
public class COverlimit {
|
public class COverlimit {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ public class COverlimitUtil {
|
|||||||
* 获取额定线电压
|
* 获取额定线电压
|
||||||
*/
|
*/
|
||||||
private static float getUl(Float voltageLevel){
|
private static float getUl(Float voltageLevel){
|
||||||
float value = 3.14159f;
|
float value;
|
||||||
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
||||||
value = 0.4f;
|
value = 0.4f;
|
||||||
}else if(voltageLevel<DicDataEnum.KV10.getValue()){
|
}else if(voltageLevel<DicDataEnum.KV10.getValue()){
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<artifactId>pq-device-boot</artifactId>
|
<artifactId>pq-device-boot</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>com.njcn</groupId>
|
<!-- <groupId>com.njcn</groupId>-->
|
||||||
<artifactId>pms-device-boot</artifactId>
|
<!-- <artifactId>pms-device-boot</artifactId>-->
|
||||||
<version>${project.version}</version>
|
<!-- <version>${project.version}</version>-->
|
||||||
</dependency>-->
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.device.pms.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/21
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum PmsEnum {
|
||||||
|
|
||||||
|
|
||||||
|
NO_UPLOAD("未上送","0"),
|
||||||
|
HAS_UPLOAD("以上送","1"),
|
||||||
|
WAIT_RETURN_UPLOAD("待重新上送","2"),
|
||||||
|
DELETE_UPLOAD("已删除","3"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
PmsEnum(String name, String code) {
|
||||||
|
this.name = name;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.njcn.device.pms.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MajorMonitorDTO {
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
private String provinceOrg;
|
||||||
|
private String provinceOrgName;
|
||||||
|
private String cityOrg;
|
||||||
|
private String cityOrgName;
|
||||||
|
private String maintOrg;
|
||||||
|
private String maintOrgName;
|
||||||
|
private String monitorName;
|
||||||
|
private String monitorVoltageLevel;
|
||||||
|
private String monitorId;
|
||||||
|
private String monitorStatus;
|
||||||
|
private Date monitorOperateDate;
|
||||||
|
private Date monitorStopDate;
|
||||||
|
private String substationId;
|
||||||
|
private String substationName;
|
||||||
|
private String busId;
|
||||||
|
private String busName;
|
||||||
|
private String outLineIntervalId;
|
||||||
|
private String outLineIntervalName;
|
||||||
|
private String monitorObjTypeBig;
|
||||||
|
private String monitorObjTypeSmall;
|
||||||
|
private String monitorTag;
|
||||||
|
private String monitorObjName;
|
||||||
|
private String monitorObjId;
|
||||||
|
private String isLine;
|
||||||
|
private BigDecimal minShortCapacity;
|
||||||
|
private BigDecimal supplyEquipCapacity;
|
||||||
|
private BigDecimal userProtocolCapacity;
|
||||||
|
private String terminalCode;
|
||||||
|
private String terminalManufacturer;
|
||||||
|
private String terminalModel;
|
||||||
|
private String terminalManufactureNum;
|
||||||
|
private String terminalConnect;
|
||||||
|
private String neutralGround;
|
||||||
|
private String evtType;
|
||||||
|
private String statisticalType;
|
||||||
|
private String statisticalDate;
|
||||||
|
private String isMonitorOnline;
|
||||||
|
private String isTerminalOnline;
|
||||||
|
private Integer onlineMonitorNum;
|
||||||
|
private Integer runMonitorNum;
|
||||||
|
private BigDecimal onlineMonitorRate;
|
||||||
|
private Long expectCollectNum;
|
||||||
|
private Long actualCollectNum;
|
||||||
|
private BigDecimal dataFullRate;
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.njcn.device.pms.pojo.dto;
|
||||||
|
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/6/24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ParkDto {
|
||||||
|
|
||||||
|
private List<PmsParkPO> parkVoListt;
|
||||||
|
|
||||||
|
|
||||||
|
private List<ParkSubstationRelVo> parkSubstationRelVoList;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class ParkSubstationRelVo{
|
||||||
|
private String objId;
|
||||||
|
private String parkId;
|
||||||
|
private String substationId;
|
||||||
|
private String substationProvinceOrg;
|
||||||
|
private String substationProvinceOrgName;
|
||||||
|
private String substationCityOrg;
|
||||||
|
private String substationCityOrgName;
|
||||||
|
private String substationMaintOrg;
|
||||||
|
private String substationMaintOrgName;
|
||||||
|
private String substationName;
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
private String substationRunStatus;
|
||||||
|
private String substationOperateDate;
|
||||||
|
private String createTime;
|
||||||
|
private String updateTime;
|
||||||
|
private String isDelete;
|
||||||
|
private String deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.njcn.device.pms.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class PmsParkParam {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位
|
||||||
|
*/
|
||||||
|
private String provinceOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位
|
||||||
|
*/
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位名称
|
||||||
|
*/
|
||||||
|
private String cityOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位
|
||||||
|
*/
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String maintOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区名称
|
||||||
|
*/
|
||||||
|
private String parkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区性质
|
||||||
|
*/
|
||||||
|
private String parkNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区级别
|
||||||
|
*/
|
||||||
|
private String parkLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区状态
|
||||||
|
*/
|
||||||
|
private String parkStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.删除 1.正常
|
||||||
|
*/
|
||||||
|
private LocalDateTime deleteTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class UpdatePmsParkParam extends PmsParkParam{
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class PmsParkQuery extends BaseParam {
|
||||||
|
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.device.pms.pojo.po;
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
@@ -28,6 +29,7 @@ public class PmsMidLedger extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* Id
|
* Id
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import lombok.Setter;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author wr
|
* @author wr
|
||||||
@@ -54,7 +54,7 @@ public class PmsNewEnergy extends BaseEntity {
|
|||||||
private String voltageLevel;
|
private String voltageLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级
|
* 电站名称
|
||||||
*/
|
*/
|
||||||
@TableField("Powerr_Name")
|
@TableField("Powerr_Name")
|
||||||
private String powerrName;
|
private String powerrName;
|
||||||
@@ -66,11 +66,16 @@ public class PmsNewEnergy extends BaseEntity {
|
|||||||
private String objType;
|
private String objType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级
|
* 场站状态 01.在运站 02.新(改,扩)站
|
||||||
*/
|
*/
|
||||||
@TableField("station_status")
|
@TableField("station_status")
|
||||||
private String stationStatus;
|
private String stationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场站状态
|
||||||
|
*/
|
||||||
|
private Double ratedCapacity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-删除 1-正常
|
* 状态:0-删除 1-正常
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pms_park")
|
||||||
|
public class PmsParkPO extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uuid
|
||||||
|
*/
|
||||||
|
@TableId(value = "obj_id",type = IdType.ASSIGN_UUID)
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位
|
||||||
|
*/
|
||||||
|
private String provinceOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省单位名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位
|
||||||
|
*/
|
||||||
|
private String cityOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市单位名称
|
||||||
|
*/
|
||||||
|
private String cityOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位
|
||||||
|
*/
|
||||||
|
private String maintOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
private String maintOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区名称
|
||||||
|
*/
|
||||||
|
private String parkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区性质
|
||||||
|
*/
|
||||||
|
private String parkNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区级别
|
||||||
|
*/
|
||||||
|
private String parkLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区状态
|
||||||
|
*/
|
||||||
|
private String parkStatus;
|
||||||
|
|
||||||
|
|
||||||
|
private String isDelete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.删除 1.正常
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime deleteTime;
|
||||||
|
|
||||||
|
private String uploadStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pms_park_station_ass")
|
||||||
|
public class PmsParkStationAss {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
@NotBlank(message = "园区id不可为空")
|
||||||
|
private String parkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区所有电站id关联pms_mid_ledger
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "电站不可为空")
|
||||||
|
private String midStationId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package com.njcn.device.pms.controller.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkService;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pmsPark")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsParkController extends BaseController {
|
||||||
|
|
||||||
|
private final IPmsParkService iPmsParkService;
|
||||||
|
|
||||||
|
private final IPmsParkStationAssService iPmsParkStationAssService;
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/addPark")
|
||||||
|
@ApiOperation("新增园区")
|
||||||
|
public HttpResult<Object> addPark(@RequestBody PmsParkParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("addPark");
|
||||||
|
Boolean result = iPmsParkService.addPark(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
@PostMapping("/updatePark")
|
||||||
|
@ApiOperation("修改园区台账")
|
||||||
|
public HttpResult<Object> updatePark(@RequestBody PmsParkParam.UpdatePmsParkParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("updatePark");
|
||||||
|
Boolean result = iPmsParkService.updatePark(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/delPark")
|
||||||
|
@ApiOperation("修改园区台账")
|
||||||
|
public HttpResult<Object> delPark(@RequestBody List<String> ids) {
|
||||||
|
String methodDescribe = getMethodDescribe("delPark");
|
||||||
|
Boolean result = iPmsParkService.removeByIds(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pageList")
|
||||||
|
@ApiOperation("分页查询园区台账")
|
||||||
|
public HttpResult<Page<PmsParkPO>> pageList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("pageList");
|
||||||
|
Page<PmsParkPO> result = iPmsParkService.pageList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/uploadParkGw")
|
||||||
|
@ApiOperation("上送园区到国网")
|
||||||
|
public HttpResult<Boolean> uploadParkGw(@RequestBody List<String> objIds) {
|
||||||
|
String methodDescribe = getMethodDescribe("uploadParkGw");
|
||||||
|
Boolean result = iPmsParkService.uploadParkGw(objIds);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pageStationList")
|
||||||
|
@ApiOperation("分页查询园区下面的电站")
|
||||||
|
public HttpResult<Page<PmsMidLedger>> pageStationList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("pageStationList");
|
||||||
|
Page<PmsMidLedger> result = iPmsParkService.pageStationList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/stationList")
|
||||||
|
@ApiOperation("根据运行单位获取下面的电站")
|
||||||
|
public HttpResult<List<PmsMidLedger>> stationList(@RequestBody PmsParkParam.PmsParkQuery param) {
|
||||||
|
String methodDescribe = getMethodDescribe("stationList");
|
||||||
|
List<PmsMidLedger> result = iPmsParkService.stationList(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/addParkStationAss")
|
||||||
|
@ApiOperation("新增园区电站")
|
||||||
|
public HttpResult<Object> addParkStationAss(@RequestBody PmsParkStationAss param) {
|
||||||
|
String methodDescribe = getMethodDescribe("addParkStationAss");
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PmsParkStationAss> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsParkStationAss::getParkId,param.getParkId()).eq(PmsParkStationAss::getMidStationId,param.getMidStationId());
|
||||||
|
long count = iPmsParkStationAssService.count(lambdaQueryWrapper);
|
||||||
|
if(count>0){
|
||||||
|
throw new BusinessException(CommonResponseEnum.FAIL,"园区已经存在该电站");
|
||||||
|
}
|
||||||
|
PmsParkStationAss pmsParkStationAss = new PmsParkStationAss();
|
||||||
|
BeanUtil.copyProperties(param,pmsParkStationAss);
|
||||||
|
Boolean result = iPmsParkStationAssService.save(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
@PostMapping("/delParkStationAss")
|
||||||
|
@ApiOperation("删除园区电站")
|
||||||
|
public HttpResult<Object> delParkStationAss(@RequestBody @Validated PmsParkStationAss param) {
|
||||||
|
String methodDescribe = getMethodDescribe("delParkStationAss");
|
||||||
|
LambdaQueryWrapper<PmsParkStationAss> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(PmsParkStationAss::getParkId,param.getParkId()).eq(PmsParkStationAss::getMidStationId,param.getMidStationId());
|
||||||
|
Boolean result = iPmsParkStationAssService.remove(lambdaQueryWrapper);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.dto.ParkDto;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface PmsParkMapper extends BaseMapper<PmsParkPO> {
|
||||||
|
|
||||||
|
|
||||||
|
List<ParkDto.ParkSubstationRelVo> getParkStationAss(@Param("parkIds")List<String> parkIds);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface PmsParkStationAssMapper extends BaseMapper<PmsParkStationAss> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.PmsParkMapper">
|
||||||
|
|
||||||
|
<select id="getParkStationAss" resultType="com.njcn.device.pms.pojo.dto.ParkDto$ParkSubstationRelVo">
|
||||||
|
select
|
||||||
|
ass.obj_Id,
|
||||||
|
park.obj_id parkId,
|
||||||
|
mid.id substationId,
|
||||||
|
park.province_Org substationProvinceOrg,
|
||||||
|
park.province_Name substationProvinceOrgName,
|
||||||
|
mid.cityOrg substationCityOrg,
|
||||||
|
mid.cityOrgName substationCityOrgName,
|
||||||
|
mid.Operation_Id substationMaintOrg,
|
||||||
|
mid.Operation_Name substationMaintOrgName,
|
||||||
|
mid.name substationName,
|
||||||
|
LPAD(dic.Algo_Describe,2,0) substationVoltageLevel,
|
||||||
|
dicRun.value substationRunStatus,
|
||||||
|
mid.Operation_Date substationOperateDate
|
||||||
|
|
||||||
|
from pms_park park
|
||||||
|
inner join pms_park_station_ass ass on park.obj_id = ass.park_id
|
||||||
|
inner join pms_mid_ledger mid on ass.mid_station_id = mid.id
|
||||||
|
left join sys_dict_data dic on mid.voltage_Level = dic.id
|
||||||
|
left join sys_dict_data dicRun on mid.Run_Status = dicRun.id
|
||||||
|
where park.obj_id in
|
||||||
|
<foreach collection="parkIds" open="(" separator="," close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface IPmsParkService extends IService<PmsParkPO> {
|
||||||
|
|
||||||
|
|
||||||
|
Boolean addPark(PmsParkParam param);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Boolean updatePark(PmsParkParam.UpdatePmsParkParam updatePmsParkParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Page<PmsParkPO> pageList(PmsParkParam.PmsParkQuery parkQuery);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Boolean uploadParkGw(@RequestBody List<String> objIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Page<PmsMidLedger> pageStationList(PmsParkParam.PmsParkQuery param);
|
||||||
|
|
||||||
|
List<PmsMidLedger> stationList(PmsParkParam.PmsParkQuery param);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
public interface IPmsParkStationAssService extends IService<PmsParkStationAss> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pms.enums.PmsEnum;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsMidLedgerMapper;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsParkMapper;
|
||||||
|
import com.njcn.device.pms.pojo.dto.ParkDto;
|
||||||
|
import com.njcn.device.pms.pojo.param.PmsParkParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkPO;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkService;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||||
|
import com.njcn.web.enums.GWSendEnum;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import com.njcn.web.pojo.param.SendParam;
|
||||||
|
import com.njcn.web.utils.GwSendUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 园区表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PmsParkServiceImpl extends ServiceImpl<PmsParkMapper, PmsParkPO> implements IPmsParkService {
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final IPmsParkStationAssService iPmsParkStationAssService;
|
||||||
|
|
||||||
|
private final PmsMidLedgerMapper pmsMidLedgerMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addPark(PmsParkParam param) {
|
||||||
|
PmsParkPO pmsParkPO = new PmsParkPO();
|
||||||
|
BeanUtil.copyProperties(param, pmsParkPO);
|
||||||
|
pmsParkPO.setIsDelete(DataStateEnum.ENABLE.getCode().toString());
|
||||||
|
pmsParkPO.setUploadStatus(PmsEnum.NO_UPLOAD.getCode());
|
||||||
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
|
getOrgCode(dept,pmsParkPO);
|
||||||
|
return this.save(pmsParkPO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean updatePark(PmsParkParam.UpdatePmsParkParam updatePmsParkParam) {
|
||||||
|
PmsParkPO result = this.getById(updatePmsParkParam.getObjId());
|
||||||
|
PmsParkPO pmsParkPO = new PmsParkPO();
|
||||||
|
BeanUtil.copyProperties(updatePmsParkParam, pmsParkPO);
|
||||||
|
if(result.getUploadStatus().equals(PmsEnum.HAS_UPLOAD.getCode())){
|
||||||
|
pmsParkPO.setUploadStatus(PmsEnum.WAIT_RETURN_UPLOAD.getCode());
|
||||||
|
}
|
||||||
|
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||||
|
getOrgCode(dept,pmsParkPO);
|
||||||
|
return this.updateById(pmsParkPO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<PmsParkPO> pageList(PmsParkParam.PmsParkQuery parkQuery) {
|
||||||
|
List<String> deptCodes = deptFeignClient.getDepSonSelfCodetByDeptId(parkQuery.getMaintOrg()).getData();
|
||||||
|
LambdaQueryWrapper<PmsParkPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsParkPO::getMaintOrg, deptCodes);
|
||||||
|
return this.page(new Page<>(PageFactory.getPageNum(parkQuery), PageFactory.getPageSize(parkQuery)), lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean uploadParkGw(List<String> objIds) {
|
||||||
|
List<PmsParkPO> pmsParkPOList;
|
||||||
|
if(CollUtil.isEmpty(objIds)){
|
||||||
|
LambdaQueryWrapper<PmsParkPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsParkPO::getUploadStatus, Stream.of(PmsEnum.NO_UPLOAD.getCode(),PmsEnum.WAIT_RETURN_UPLOAD.getCode()).collect(Collectors.toList()));
|
||||||
|
pmsParkPOList = this.list(lambdaQueryWrapper);
|
||||||
|
}else {
|
||||||
|
pmsParkPOList = this.listByIds(objIds);
|
||||||
|
}
|
||||||
|
List<String> ids = pmsParkPOList.stream().map(PmsParkPO::getObjId).collect(Collectors.toList());
|
||||||
|
List<ParkDto.ParkSubstationRelVo> stationList = this.baseMapper.getParkStationAss(ids);
|
||||||
|
|
||||||
|
List<ParkDto> dtoList = new ArrayList<>();
|
||||||
|
ParkDto parkDto = new ParkDto();
|
||||||
|
parkDto.setParkVoListt(pmsParkPOList);
|
||||||
|
if(CollUtil.isNotEmpty(stationList)){
|
||||||
|
parkDto.setParkSubstationRelVoList(stationList);
|
||||||
|
}
|
||||||
|
dtoList.add(parkDto);
|
||||||
|
|
||||||
|
SendParam sendParam = new SendParam();
|
||||||
|
sendParam.setStats(dtoList);
|
||||||
|
Map<String,String> map = GwSendUtil.send(sendParam, GWSendEnum.PARK_AND_STATION);
|
||||||
|
GwSendUtil.returnInfoMsg(objIds,map);
|
||||||
|
|
||||||
|
LambdaUpdateWrapper<PmsParkPO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.set(PmsParkPO::getUploadStatus,PmsEnum.HAS_UPLOAD).eq(PmsParkPO::getObjId,objIds);
|
||||||
|
this.update(updateWrapper);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<PmsMidLedger> pageStationList(PmsParkParam.PmsParkQuery param) {
|
||||||
|
Page<PmsMidLedger> result = new Page<>(param.getPageNum(),param.getPageSize());
|
||||||
|
List<PmsParkStationAss> pmsParkStationAssList = iPmsParkStationAssService.list(new LambdaQueryWrapper<PmsParkStationAss>().eq(PmsParkStationAss::getParkId,param.getObjId()));
|
||||||
|
List<String> ids = pmsParkStationAssList.stream().map(PmsParkStationAss::getMidStationId).collect(Collectors.toList());
|
||||||
|
if(CollUtil.isEmpty(ids)){
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<PmsMidLedger> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PmsMidLedger::getId,ids);
|
||||||
|
result = pmsMidLedgerMapper.selectPage(new Page<>(PageFactory.getPageNum(param),PageFactory.getPageSize(param)),lambdaQueryWrapper);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PmsMidLedger> stationList(PmsParkParam.PmsParkQuery param) {
|
||||||
|
List<String> ids = deptFeignClient.getDepSonSelfCodetByCode(param.getCityOrg()).getData();
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PmsMidLedger> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.select(PmsMidLedger::getName,PmsMidLedger::getOperationName,PmsMidLedger::getId).in(PmsMidLedger::getOperationId,ids).eq(PmsMidLedger::getLevel,0);
|
||||||
|
List<PmsMidLedger> pmsMidLedgerList = pmsMidLedgerMapper.selectList(lambdaQueryWrapper);
|
||||||
|
return pmsMidLedgerList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void getOrgCode(List<PvTerminalTreeVO> dept,PmsParkPO pmsParkPO){
|
||||||
|
PvTerminalTreeVO pvTerminalTreeVO = dept.stream().filter(it->it.getCode().equals(pmsParkPO.getMaintOrg())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(pvTerminalTreeVO)){
|
||||||
|
if(pvTerminalTreeVO.getLevel() == 1 || pvTerminalTreeVO.getLevel() == 2){
|
||||||
|
throw new BusinessException("请选择省级以下单位");
|
||||||
|
}else if(pvTerminalTreeVO.getLevel() == 3){
|
||||||
|
PvTerminalTreeVO province = dept.stream().filter(it->it.getId().equals(pvTerminalTreeVO.getPid())).findFirst().orElse(null);
|
||||||
|
pmsParkPO.setCityOrg(pvTerminalTreeVO.getCode());
|
||||||
|
pmsParkPO.setCityOrgName(pvTerminalTreeVO.getName());
|
||||||
|
|
||||||
|
if(Objects.nonNull(province)){
|
||||||
|
pmsParkPO.setProvinceOrg(province.getCode());
|
||||||
|
pmsParkPO.setProvinceName(province.getName());
|
||||||
|
}
|
||||||
|
} else if(pvTerminalTreeVO.getLevel() == 4){
|
||||||
|
PvTerminalTreeVO city = dept.stream().filter(it->it.getId().equals(pvTerminalTreeVO.getPid())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(city)){
|
||||||
|
pmsParkPO.setCityOrg(city.getCode());
|
||||||
|
pmsParkPO.setCityOrgName(city.getName());
|
||||||
|
|
||||||
|
PvTerminalTreeVO province = dept.stream().filter(it->it.getId().equals(city.getPid())).findFirst().orElse(null);
|
||||||
|
if(Objects.nonNull(province)){
|
||||||
|
pmsParkPO.setProvinceOrg(province.getCode());
|
||||||
|
pmsParkPO.setProvinceName(province.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.device.pms.service.ledgerManger.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.pms.mapper.majornetwork.PmsParkStationAssMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.PmsParkStationAss;
|
||||||
|
import com.njcn.device.pms.service.ledgerManger.IPmsParkStationAssService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-06-19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PmsParkStationAssServiceImpl extends ServiceImpl<PmsParkStationAssMapper, PmsParkStationAss> implements IPmsParkStationAssService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,6 +22,11 @@
|
|||||||
<artifactId>common-device-biz</artifactId>
|
<artifactId>common-device-biz</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>pqs-influx</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -47,4 +47,7 @@ public interface DeptLineFeignClient {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/getLineNodeByDeptId")
|
@PostMapping("/getLineNodeByDeptId")
|
||||||
HttpResult<List<String>> getLineNodeByDeptId(@RequestParam("id") String id);
|
HttpResult<List<String>> getLineNodeByDeptId(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
@PostMapping("/getAllData")
|
||||||
|
HttpResult<List<DeptLine>> getAllData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.pq.api.fallback.DeviceFeignClientFallbackFactory;
|
||||||
|
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(
|
||||||
|
value = ServerInfo.DEVICE,
|
||||||
|
path = "/dev",
|
||||||
|
fallbackFactory = DeviceFeignClientFallbackFactory.class,
|
||||||
|
contextId = "dev")
|
||||||
|
public interface DeviceFeignClient {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术监督修改装置定检时间
|
||||||
|
*
|
||||||
|
* @param devId 监测点id
|
||||||
|
* @param thisTimeCheck 起始时间
|
||||||
|
* @param nextTimeCheck 结束时间
|
||||||
|
* @return 终端状态信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateDevCheckTime")
|
||||||
|
@ApiOperation("技术监督修改装置定检时间")
|
||||||
|
HttpResult<String> updateDevCheckTime(@RequestParam("devId") String devId,
|
||||||
|
@RequestParam("thisTimeCheck") String thisTimeCheck,
|
||||||
|
@RequestParam("nextTimeCheck") String nextTimeCheck);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.njcn.device.pq.api;
|
package com.njcn.device.pq.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||||
import com.njcn.device.pq.pojo.dto.*;
|
import com.njcn.device.pq.pojo.dto.*;
|
||||||
import com.njcn.device.pq.pojo.param.DataParam;
|
import com.njcn.device.pq.pojo.param.DataParam;
|
||||||
@@ -343,4 +347,18 @@ public interface LineFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/getDeptDeviceDetailData")
|
@PostMapping("/getDeptDeviceDetailData")
|
||||||
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param);
|
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param);
|
||||||
|
|
||||||
|
@PostMapping("/getNoDataLine")
|
||||||
|
HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine();
|
||||||
|
|
||||||
|
@PostMapping("/getReportLineInfo")
|
||||||
|
HttpResult<List<ReportLineInfoVo>> getReportLineInfo(@RequestBody List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据监测点名称和电网侧变电站名称模糊搜索
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/getByName")
|
||||||
|
HttpResult<List<LineDetail>> getByName(@RequestParam("name") String name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ import com.njcn.device.pq.pojo.param.SyncTerminalParam;
|
|||||||
import com.njcn.device.pq.pojo.po.Line;
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -31,11 +33,23 @@ public interface TerminalBaseClient {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/getSubstationById")
|
@PostMapping("/getSubstationById")
|
||||||
HttpResult<List<Line>> getSubstationById(@RequestBody List<String> list);
|
HttpResult<List<Line>> getSubstationById(@RequestBody List<String> list);
|
||||||
/*
|
|
||||||
冀北技术监督台账同步
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冀北技术监督台账同步
|
||||||
|
*/
|
||||||
@ApiOperation("终端/母线/监测点同步操作")
|
@ApiOperation("终端/母线/监测点同步操作")
|
||||||
@PostMapping("terminalSync")
|
@PostMapping("terminalSync")
|
||||||
HttpResult<String> terminalSync( @RequestBody SyncTerminalParam syncTerminalParam);
|
HttpResult<String> terminalSync( @RequestBody SyncTerminalParam syncTerminalParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点和装置同步成运行状态
|
||||||
|
*/
|
||||||
|
@GetMapping("/terminalSyncRunFly")
|
||||||
|
HttpResult<Boolean> terminalSyncRunFly(@RequestParam("lineId") String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点信息删除
|
||||||
|
*/
|
||||||
|
@GetMapping("/terminalSyncDeleteFly")
|
||||||
|
HttpResult<Boolean> terminalSyncDeleteFly(@RequestParam("lineId") String lineId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ public class DeptLineFeignClientFallbackFactory implements FallbackFactory<DeptL
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "根据部门信息id查询监测点id集合", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "根据部门信息id查询监测点id集合", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DeptLine>> getAllData() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取部门监测点表所有数据", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.njcn.device.pq.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
|
import com.njcn.device.pq.api.DeviceFeignClient;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class DeviceFeignClientFallbackFactory implements FallbackFactory<DeviceFeignClient> {
|
||||||
|
@Override
|
||||||
|
public DeviceFeignClient create(Throwable throwable) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (throwable.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||||
|
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new DeviceFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "技术监督修改装置定检时间", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -269,6 +269,24 @@ public class LineFeignClientFallbackFactory implements FallbackFactory<LineFeign
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "更新监测点运行状态: ", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "更新监测点运行状态: ", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取当日无数据的监测点: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<ReportLineInfoVo>> getReportLineInfo(List<String> ids) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据监测点id获取预告警单基础信息: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<LineDetail>> getByName(String name) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据监测点名称和电网侧变电站名称模糊搜索: ", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,18 @@ public class TerminalBaseClientFallbackFactory implements FallbackFactory<Termin
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> terminalSyncRunFly(String lineId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "监测点和装置同步成运行状态", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> terminalSyncDeleteFly(String lineId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "监测点信息删除", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,15 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class LineDataQualityDTO {
|
public class LineDataQualityDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线率
|
* 在线率
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class DevDetail {
|
|||||||
private Integer comFlag;
|
private Integer comFlag;
|
||||||
|
|
||||||
@ApiModelProperty("定检时间")
|
@ApiModelProperty("定检时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate nextTimeCheck;
|
private LocalDate nextTimeCheck;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,4 +93,17 @@ public class LineDetailVO implements Serializable {
|
|||||||
@ApiModelProperty("已用流量占比")
|
@ApiModelProperty("已用流量占比")
|
||||||
private Float flowProportion;
|
private Float flowProportion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class noDataLineInfo extends LineDetailVO implements Serializable{
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点Id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端id")
|
||||||
|
private String devId;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ReportLineInfoVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("供电公司名称")
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点电压等级")
|
||||||
|
private String lineVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属电站")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测对象名称")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
@ApiModelProperty("电网侧变电站")
|
||||||
|
private String subVName;
|
||||||
|
|
||||||
|
@ApiModelProperty("最新数据时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测装置网络参数")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小短路容量")
|
||||||
|
private Double shortCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("供电设备容量")
|
||||||
|
private Double devCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("协议容量")
|
||||||
|
private Double dealCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("超标天数")
|
||||||
|
private Integer overDays;
|
||||||
|
|
||||||
|
@ApiModelProperty("电网标志(0-电网侧;1-非电网侧)")
|
||||||
|
private Integer powerFlag;
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
|
import com.njcn.device.pq.mapper.DeptLineMapper;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
@@ -37,6 +38,7 @@ import java.util.Map;
|
|||||||
public class DeptLineController extends BaseController {
|
public class DeptLineController extends BaseController {
|
||||||
|
|
||||||
private final DeptLineService deptLineService;
|
private final DeptLineService deptLineService;
|
||||||
|
private final DeptLineMapper deptLineMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门绑定监测点
|
* 部门绑定监测点
|
||||||
@@ -146,4 +148,13 @@ public class DeptLineController extends BaseController {
|
|||||||
List<String> list = deptLineService.getLineNodeByDeptId(id);
|
List<String> list = deptLineService.getLineNodeByDeptId(id);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/getAllData")
|
||||||
|
@ApiOperation("获取部门监测点表所有数据")
|
||||||
|
public HttpResult<List<DeptLine>> getAllData() {
|
||||||
|
String methodDescribe = getMethodDescribe("getAllData");
|
||||||
|
List<DeptLine> list = deptLineMapper.selectList(null);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,4 +167,13 @@ public class DeviceController extends BaseController {
|
|||||||
Console.log("string payload : {}", payload);
|
Console.log("string payload : {}", payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/updateDevCheckTime")
|
||||||
|
@ApiOperation("技术监督修改装置定检时间")
|
||||||
|
public HttpResult<String> updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateDevCheckTime");
|
||||||
|
iDeviceService.updateDevCheckTime(devId,thisTimeCheck,nextTimeCheck);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "success", methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -509,11 +509,37 @@ public class LineController extends BaseController {
|
|||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("根据装置部门和模糊搜索获取装置详情")
|
@ApiOperation("根据装置部门和模糊搜索获取装置详情")
|
||||||
@ApiImplicitParam(name = "id", value = "装置id", required = true)
|
|
||||||
@PostMapping("/getDeptDeviceDetailData")
|
@PostMapping("/getDeptDeviceDetailData")
|
||||||
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param){
|
HttpResult<List<LineDetailVO.Detail>> getDeptDeviceDetailData(@RequestBody DataParam param){
|
||||||
String methodDescribe = getMethodDescribe("getDeptDeviceDetailData");
|
String methodDescribe = getMethodDescribe("getDeptDeviceDetailData");
|
||||||
List<LineDetailVO.Detail> deptDeviceDetailData = lineService.getDeptDeviceDetailData(param);
|
List<LineDetailVO.Detail> deptDeviceDetailData = lineService.getDeptDeviceDetailData(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceDetailData, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceDetailData, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("获取当日无数据的监测点")
|
||||||
|
@PostMapping("/getNoDataLine")
|
||||||
|
HttpResult<List<LineDetailVO.noDataLineInfo>> getNoDataLine(){
|
||||||
|
String methodDescribe = getMethodDescribe("getNoDataLine");
|
||||||
|
List<LineDetailVO.noDataLineInfo> result = lineService.getNoDataLine();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("根据监测点id获取预告警单基础信息")
|
||||||
|
@PostMapping("/getReportLineInfo")
|
||||||
|
HttpResult<List<ReportLineInfoVo>> getReportLineInfo(@RequestBody List<String> ids){
|
||||||
|
String methodDescribe = getMethodDescribe("getReportLineInfo");
|
||||||
|
List<ReportLineInfoVo> result = lineService.getReportLineInfo(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("根据监测点名称和电网侧变电站名称模糊搜索")
|
||||||
|
@PostMapping("/getByName")
|
||||||
|
HttpResult<List<LineDetail>> getByName(@RequestParam("name") String name){
|
||||||
|
String methodDescribe = getMethodDescribe("getByName");
|
||||||
|
List<LineDetail> list = lineService.getByName(name);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
import com.njcn.device.pq.mapper.LineDetailMapper;
|
|
||||||
import com.njcn.device.pq.mapper.LineMapper;
|
|
||||||
import com.njcn.device.pq.mapper.OverlimitMapper;
|
|
||||||
import com.njcn.device.pq.mapper.VoltageMapper;
|
|
||||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
@@ -27,7 +23,6 @@ import com.njcn.device.pq.pojo.vo.TerminalVO;
|
|||||||
import com.njcn.device.pq.service.TerminalBaseService;
|
import com.njcn.device.pq.service.TerminalBaseService;
|
||||||
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
import com.njcn.device.pq.service.impl.GeneralDeviceService;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
import com.njcn.system.api.DicDataFeignClient;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -60,23 +55,6 @@ import java.util.stream.Stream;
|
|||||||
public class TerminalBaseController extends BaseController {
|
public class TerminalBaseController extends BaseController {
|
||||||
|
|
||||||
private final TerminalBaseService terminalBaseService;
|
private final TerminalBaseService terminalBaseService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final LineDetailMapper lineDetailMapper;
|
|
||||||
|
|
||||||
|
|
||||||
private final OverlimitMapper overlimitMapper;
|
|
||||||
|
|
||||||
|
|
||||||
private final DicDataFeignClient dicDataFeignClient;
|
|
||||||
|
|
||||||
|
|
||||||
private final LineMapper lineMapper;
|
|
||||||
|
|
||||||
|
|
||||||
private final VoltageMapper voltageMapper;
|
|
||||||
|
|
||||||
private final GeneralDeviceService generalDeviceService;
|
private final GeneralDeviceService generalDeviceService;
|
||||||
|
|
||||||
|
|
||||||
@@ -143,17 +121,34 @@ public class TerminalBaseController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("终端/母线/监测点同步操作")
|
@ApiOperation("变电站/终端/母线/监测点同步操作")
|
||||||
@OperateInfo(operateType = OperateType.ADD, info = LogEnum.BUSINESS_MEDIUM)
|
@OperateInfo(operateType = OperateType.ADD, info = LogEnum.BUSINESS_MEDIUM)
|
||||||
@PostMapping("terminalSync")
|
@PostMapping("terminalSync")
|
||||||
public HttpResult<String> terminalSync(@Valid @RequestBody SyncTerminalParam syncTerminalParam) {
|
public HttpResult<String> terminalSync(@Valid @RequestBody SyncTerminalParam syncTerminalParam) {
|
||||||
String methodDescribe = getMethodDescribe("terminalSync");
|
String methodDescribe = getMethodDescribe("terminalSync");
|
||||||
|
String substation = terminalBaseService.terminalSync(syncTerminalParam);
|
||||||
String subtation = terminalBaseService.terminalSync(syncTerminalParam);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, substation, methodDescribe);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subtation, methodDescribe);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("监测点和装置同步成运行状态")
|
||||||
|
@OperateInfo(operateType = OperateType.ADD, info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@GetMapping("/terminalSyncRunFly")
|
||||||
|
public HttpResult<Boolean> terminalSyncRunFly(@RequestParam("lineId") String lineId) {
|
||||||
|
String methodDescribe = getMethodDescribe("terminalSyncRunFly");
|
||||||
|
Boolean b = terminalBaseService.terminalSyncRunFly(lineId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("监测点信息删除")
|
||||||
|
@OperateInfo(operateType = OperateType.ADD, info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@GetMapping("/terminalSyncDeleteFly")
|
||||||
|
public HttpResult<Boolean> terminalSyncDeleteFly(@RequestParam("lineId") String lineId) {
|
||||||
|
String methodDescribe = getMethodDescribe("terminalSyncDeleteFly");
|
||||||
|
Boolean b = terminalBaseService.terminalSyncDeleteFly(lineId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端修改操作
|
* 终端修改操作
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -551,4 +551,13 @@ public interface LineMapper extends BaseMapper<Line> {
|
|||||||
@Param("type")Integer type);
|
@Param("type")Integer type);
|
||||||
|
|
||||||
LineDetailVO getLineInfoVO(@Param("id")String id);
|
LineDetailVO getLineInfoVO(@Param("id")String id);
|
||||||
|
|
||||||
|
List<LineDetailVO.noDataLineInfo> getNoDataLine(@Param("time")String time);
|
||||||
|
|
||||||
|
List<ReportLineInfoVo> getReportLineInfo(@Param("ids")List<String> ids);
|
||||||
|
|
||||||
|
List<Line> getSubByCondition(@Param("subIds") List<String> subIds, @Param("scale") List<SimpleDTO> scale);
|
||||||
|
|
||||||
|
List<LineDetail> selectByName(@Param("name") String name);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
device.com_flag comFlag,
|
device.com_flag comFlag,
|
||||||
1 as lineType,
|
1 as lineType,
|
||||||
0 as type,
|
0 as type,
|
||||||
lineDetail.monitor_flag as isUpToGrid
|
lineDetail.monitor_flag as isUpToGrid,
|
||||||
|
point.name pointName
|
||||||
</if>
|
</if>
|
||||||
<!--母线-->
|
<!--母线-->
|
||||||
<if test="type == 2">
|
<if test="type == 2">
|
||||||
@@ -97,11 +98,11 @@
|
|||||||
<select id="orgSubStationInfoGet" resultType="com.njcn.device.biz.pojo.dto.TerminalGetBase$Extend">
|
<select id="orgSubStationInfoGet" resultType="com.njcn.device.biz.pojo.dto.TerminalGetBase$Extend">
|
||||||
select
|
select
|
||||||
DISTINCT
|
DISTINCT
|
||||||
|
point.id lineId,
|
||||||
pq_dept_line.id unitId,
|
pq_dept_line.id unitId,
|
||||||
substation.id ledgerId,
|
substation.id ledgerId,
|
||||||
substation.name subName,
|
substation.name subName,
|
||||||
sub.Scale voltageLevel,
|
sub.Scale voltageLevel,
|
||||||
point.id lineId,
|
|
||||||
lineDetail.Monitor_Flag as monitorFlag
|
lineDetail.Monitor_Flag as monitorFlag
|
||||||
from pq_dept_line pq_dept_line
|
from pq_dept_line pq_dept_line
|
||||||
inner join pq_line point on pq_dept_line.line_id = point.id
|
inner join pq_line point on pq_dept_line.line_id = point.id
|
||||||
@@ -155,7 +156,9 @@
|
|||||||
substation.id id,
|
substation.id id,
|
||||||
substation.name name,
|
substation.name name,
|
||||||
pq_dept_line.id orgId,
|
pq_dept_line.id orgId,
|
||||||
sub.Scale voltageLevel
|
sub.Scale voltageLevel,
|
||||||
|
sub.lng lng,
|
||||||
|
sub.lat lat
|
||||||
from pq_dept_line pq_dept_line
|
from pq_dept_line pq_dept_line
|
||||||
inner join pq_line point on pq_dept_line.line_id = point.id
|
inner join pq_line point on pq_dept_line.line_id = point.id
|
||||||
inner join pq_line_detail lineDetail on point.id = lineDetail.id
|
inner join pq_line_detail lineDetail on point.id = lineDetail.id
|
||||||
|
|||||||
@@ -268,7 +268,8 @@
|
|||||||
pq_line t1 ,
|
pq_line t1 ,
|
||||||
pq_line_detail t2
|
pq_line_detail t2
|
||||||
where
|
where
|
||||||
t1.id = t2.id
|
t1.state = 1
|
||||||
|
and t1.id = t2.id
|
||||||
and
|
and
|
||||||
t1.id in
|
t1.id in
|
||||||
<foreach collection="ids" separator="," open="(" close=")" item="item">
|
<foreach collection="ids" separator="," open="(" close=")" item="item">
|
||||||
@@ -1646,7 +1647,6 @@
|
|||||||
AND device.id = deviceDetail.id
|
AND device.id = deviceDetail.id
|
||||||
AND line.id = lineDetail.id
|
AND line.id = lineDetail.id
|
||||||
AND vg.Id = voltage.id
|
AND vg.Id = voltage.id
|
||||||
|
|
||||||
<if test="ids!=null and ids.size() > 0">
|
<if test="ids!=null and ids.size() > 0">
|
||||||
AND line.id IN
|
AND line.id IN
|
||||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
@@ -1655,17 +1655,107 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="searchValue!=null and searchValue!='' and type==2">
|
<if test="searchValue!=null and searchValue!='' and type==2">
|
||||||
and (
|
and (
|
||||||
lineName like CONCAT('%', #{searchValue}, '%')
|
line.NAME like CONCAT('%',SUBSTRING_INDEX(#{searchValue}, '_', -1), '%')
|
||||||
or subName like CONCAT('%', #{searchValue}, '%')
|
or voltage.NAME like CONCAT('%', SUBSTRING_INDEX(#{searchValue}, '_', 1), '%')
|
||||||
|
or substation.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="searchValue!=null and searchValue!='' and type==1">
|
||||||
|
and (
|
||||||
|
device.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
|
or substation.NAME like CONCAT('%', #{searchValue}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="searchValue!=null and searchValue!='' and type==1">
|
|
||||||
and (
|
|
||||||
devName like CONCAT('%', #{searchValue}, '%')
|
|
||||||
or subName like CONCAT('%', #{searchValue}, '%')
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getNoDataLine" resultType="com.njcn.device.pq.pojo.vo.LineDetailVO$noDataLineInfo">
|
||||||
|
select
|
||||||
|
pl3.Id lineId,
|
||||||
|
pl3.Name lineName,
|
||||||
|
pd.Id devId,
|
||||||
|
pl1.name devName,
|
||||||
|
pd.Update_Time
|
||||||
|
from
|
||||||
|
pq_device pd
|
||||||
|
left join pq_line pl1 on pd.Id = pl1.Id
|
||||||
|
left join pq_line pl2 on pl1.Id = pl2.pId
|
||||||
|
left join pq_line pl3 on pl2.Id = pl3.pId
|
||||||
|
where
|
||||||
|
pd.Dev_Model = 1
|
||||||
|
and pd.Run_Flag = 0
|
||||||
|
and pl1.state = 1
|
||||||
|
and pl3.Id is not null
|
||||||
|
and pd.Update_Time < #{time}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getReportLineInfo" resultType="com.njcn.device.pq.pojo.vo.ReportLineInfoVo">
|
||||||
|
select
|
||||||
|
pl5.Name gdName,
|
||||||
|
sdd.Name lineVoltage,
|
||||||
|
pl.id lineId,
|
||||||
|
pl.name lineName,
|
||||||
|
pl4.Name subName,
|
||||||
|
pld.Obj_Name objName,
|
||||||
|
pl4.name subVName,
|
||||||
|
pd.Update_Time updateTime,
|
||||||
|
pd.IP ip,
|
||||||
|
pld.Short_Capacity shortCapacity,
|
||||||
|
pld.Dev_Capacity devCapacity,
|
||||||
|
pld.Deal_Capacity dealCapacity,
|
||||||
|
pld.Power_Flag powerFlag
|
||||||
|
from
|
||||||
|
pq_line pl
|
||||||
|
left join pq_line_detail pld on pl.Id = pld.Id
|
||||||
|
left join pq_line pl2 on pl.pId = pl2.Id
|
||||||
|
left join pq_line pl3 on pl2.pId = pl3.Id
|
||||||
|
left join pq_line pl4 on pl3.pId = pl4.Id
|
||||||
|
left join pq_line pl5 on pl4.pId = pl5.Id
|
||||||
|
left join pq_line pl6 on pl5.pId = pl6.Id
|
||||||
|
left join pq_voltage pv on pv.Id = pl2.Id
|
||||||
|
left join pq_device pd on pl3.Id = pd.Id
|
||||||
|
left join sys_dict_data sdd on pv.`Scale` = sdd.Id
|
||||||
|
<where>
|
||||||
|
<if test="ids!=null and ids.size() > 0">
|
||||||
|
pl.Id IN
|
||||||
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getSubByCondition" resultType="com.njcn.device.pq.pojo.po.Line">
|
||||||
|
select
|
||||||
|
t1.*
|
||||||
|
from
|
||||||
|
pq_line t1 ,
|
||||||
|
pq_substation t2
|
||||||
|
where
|
||||||
|
t1.id = t2.id
|
||||||
|
and
|
||||||
|
t1.id in
|
||||||
|
<foreach collection="subIds" separator="," open="(" close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
<if test="scale!=null and scale.size()!=0">
|
||||||
|
AND t2.scale in
|
||||||
|
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
||||||
|
#{item.id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByName" resultType="com.njcn.device.pq.pojo.po.LineDetail">
|
||||||
|
select
|
||||||
|
t2.*
|
||||||
|
from
|
||||||
|
pq_line t1 ,
|
||||||
|
pq_line_detail t2
|
||||||
|
<where>
|
||||||
|
t1.id = t2.id
|
||||||
|
<if test="name!=null and name!=''">
|
||||||
|
AND (t1.name like CONCAT('%', #{name}, '%') or t2.Power_Substation_Name like CONCAT('%', #{name}, '%'))
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -125,4 +125,12 @@ public interface IDeviceService extends IService<Device> {
|
|||||||
* @Date: 2023/8/17 9:24
|
* @Date: 2023/8/17 9:24
|
||||||
*/
|
*/
|
||||||
String restartDev(List<String> devList);
|
String restartDev(List<String> devList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param devId 装置id
|
||||||
|
* @param thisTimeCheck 本次定检时间
|
||||||
|
* @param nextTimeCheck 下次定检时间
|
||||||
|
* @Description: 技术监督修改装置定检时间
|
||||||
|
*/
|
||||||
|
void updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.njcn.device.pq.pojo.param.PqsParam;
|
|||||||
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
||||||
import com.njcn.device.pq.pojo.po.Line;
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
|
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
@@ -220,4 +221,10 @@ public interface LineService extends IService<Line> {
|
|||||||
List<LineALLInfoDTO> getLineAllDetailList(List<String> ids);
|
List<LineALLInfoDTO> getLineAllDetailList(List<String> ids);
|
||||||
|
|
||||||
List<LineDetailVO.Detail> getDeptDeviceDetailData(DataParam param);
|
List<LineDetailVO.Detail> getDeptDeviceDetailData(DataParam param);
|
||||||
|
|
||||||
|
List<LineDetailVO.noDataLineInfo> getNoDataLine();
|
||||||
|
|
||||||
|
List<ReportLineInfoVo> getReportLineInfo(List<String> ids);
|
||||||
|
|
||||||
|
List<LineDetail> getByName(String name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,14 @@ public interface TerminalBaseService {
|
|||||||
*/
|
*/
|
||||||
List<Line> getVoltageByCondition(List<String> voltageIds, List<SimpleDTO> scale);
|
List<Line> getVoltageByCondition(List<String> voltageIds, List<SimpleDTO> scale);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询变电站信息
|
||||||
|
*
|
||||||
|
* @param subIds 变电站索引
|
||||||
|
* @param scale 电压等级
|
||||||
|
*/
|
||||||
|
List<Line> getSubByCondition(List<String> subIds, List<SimpleDTO> scale);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据指定电压等级查询母线id
|
* 根据指定电压等级查询母线id
|
||||||
*
|
*
|
||||||
@@ -243,4 +251,18 @@ public interface TerminalBaseService {
|
|||||||
* @Date: 2024/5/29
|
* @Date: 2024/5/29
|
||||||
*/
|
*/
|
||||||
String terminalSync(SyncTerminalParam syncTerminalParam);
|
String terminalSync(SyncTerminalParam syncTerminalParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点和装置同步成运行状态
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean terminalSyncRunFly(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测数据删除
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean terminalSyncDeleteFly(String lineId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.device.pq.mapper.DevVersionMapper;
|
import com.njcn.device.pq.mapper.DevVersionMapper;
|
||||||
import com.njcn.device.pq.mapper.DeviceMapper;
|
import com.njcn.device.pq.mapper.DeviceMapper;
|
||||||
@@ -397,5 +398,14 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
|||||||
return "命令发送成功";
|
return "命令发送成功";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateDevCheckTime(String devId, String thisTimeCheck, String nextTimeCheck) {
|
||||||
|
LambdaUpdateWrapper<Device> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.eq(Device::getId, devId)
|
||||||
|
.set(Device::getThisTimeCheck, thisTimeCheck)
|
||||||
|
.set(Device::getNextTimeCheck, nextTimeCheck);
|
||||||
|
this.update(updateWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -417,25 +417,22 @@ public class GeneralDeviceService {
|
|||||||
return generalDeviceDTO;
|
return generalDeviceDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
//筛选出终端id,理论上监测点的pids中第五个id为终端id
|
//1.筛选出母线id,理论上监测点的pids中第六个id为母线id 联查: pq_line t1 ,pq_voltage t2
|
||||||
List<String> devIds = lines.stream().map(line -> {
|
List<String> voltageIds=lines.stream().map(Line::getPid).collect(Collectors.toList());
|
||||||
String[] idsArray = line.getPids().split(",");
|
|
||||||
return idsArray[4];
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
// 再根据终端条件筛选合法终端信息 联查:pq_line t1,pq_device t2
|
|
||||||
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds,
|
|
||||||
deviceType,
|
|
||||||
deviceInfoParam.getManufacturer());
|
|
||||||
//筛选出母线id,理论上监测点的pids中第六个id为母线id 联查: pq_line t1 ,pq_voltage t2
|
|
||||||
List<String> voltageIds = lines.stream().map(line -> {
|
|
||||||
String[] idsArray = line.getPids().split(",");
|
|
||||||
return idsArray[5];
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
//再根据电压等级筛选合法母线信息
|
//再根据电压等级筛选合法母线信息
|
||||||
List<Line> voltages = terminalBaseService.getVoltageByCondition(voltageIds,
|
List<Line> voltages = terminalBaseService.getVoltageByCondition(voltageIds, deviceInfoParam.getScale());
|
||||||
deviceInfoParam.getScale());
|
|
||||||
|
//2.筛选出终端id,理论上监测点的pids中第五个id为终端id
|
||||||
|
List<String> devIds=voltages.stream().map(Line::getPid).collect(Collectors.toList());
|
||||||
|
// 再根据终端条件筛选合法终端信息 联查:pq_line t1,pq_device t2
|
||||||
|
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds, deviceType, deviceInfoParam.getManufacturer());
|
||||||
|
|
||||||
|
//3.筛选出变电站id,理论上监测点的pids中第四个id为变电站id 联查: pq_line t1 ,pq_substation t2
|
||||||
|
List<String> subIds=devices.stream().map(Line::getPid).collect(Collectors.toList());
|
||||||
|
List<Line> sub = terminalBaseService.getSubByCondition(subIds, deviceInfoParam.getScale());
|
||||||
|
|
||||||
//筛选最终的数据
|
//筛选最终的数据
|
||||||
dealDeviceData(generalDeviceDTO, lines, devices, voltages);
|
dealDeviceData(generalDeviceDTO, lines, devices, voltages, sub);
|
||||||
return generalDeviceDTO;
|
return generalDeviceDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,15 +444,18 @@ public class GeneralDeviceService {
|
|||||||
* @param devices 筛选后的终端信息
|
* @param devices 筛选后的终端信息
|
||||||
* @param voltages 筛选后的母线信息
|
* @param voltages 筛选后的母线信息
|
||||||
*/
|
*/
|
||||||
private void dealDeviceData(GeneralDeviceDTO generalDeviceDTO, List<Line> lines, List<Line> devices, List<Line> voltages) {
|
private void dealDeviceData(GeneralDeviceDTO generalDeviceDTO, List<Line> lines, List<Line> devices, List<Line> voltages, List<Line> sub) {
|
||||||
List<String> gdIndexes = new ArrayList<>(), subIndexes = new ArrayList<>(), deviceIndexes = new ArrayList<>(), voltageIndexes = new ArrayList<>(), lineIndexes = new ArrayList<>();
|
List<String> gdIndexes = new ArrayList<>(), subIndexes = new ArrayList<>(), deviceIndexes = new ArrayList<>(), voltageIndexes = new ArrayList<>(), lineIndexes = new ArrayList<>();
|
||||||
List<String> devIds = devices.stream().map(Line::getId).distinct().collect(Collectors.toList());
|
List<String> devIds = devices.stream().map(Line::getId).distinct().collect(Collectors.toList());
|
||||||
List<String> volIds = voltages.stream().map(Line::getId).distinct().collect(Collectors.toList());
|
List<String> volIds = voltages.stream().map(Line::getId).distinct().collect(Collectors.toList());
|
||||||
|
List<String> subIds = sub.stream().map(Line::getId).distinct().collect(Collectors.toList());
|
||||||
for (Line line : lines) {
|
for (Line line : lines) {
|
||||||
String[] idsArray = line.getPids().split(",");
|
String[] idsArray = line.getPids().split(",");
|
||||||
//监测点同时满足条件筛选后的终端、母线信息,才是最终的结果
|
//监测点同时满足条件筛选后的终端、母线信息,才是最终的结果
|
||||||
if (devIds.contains(idsArray[LineBaseEnum.DEVICE_LEVEL.getCode()]) &&
|
if (devIds.contains(idsArray[LineBaseEnum.DEVICE_LEVEL.getCode()]) &&
|
||||||
volIds.contains(idsArray[LineBaseEnum.SUB_V_LEVEL.getCode()])) {
|
volIds.contains(idsArray[LineBaseEnum.SUB_V_LEVEL.getCode()])&&
|
||||||
|
subIds.contains(idsArray[LineBaseEnum.SUB_LEVEL.getCode()])
|
||||||
|
) {
|
||||||
gdIndexes.add(idsArray[LineBaseEnum.GD_LEVEL.getCode()]);
|
gdIndexes.add(idsArray[LineBaseEnum.GD_LEVEL.getCode()]);
|
||||||
subIndexes.add(idsArray[LineBaseEnum.SUB_LEVEL.getCode()]);
|
subIndexes.add(idsArray[LineBaseEnum.SUB_LEVEL.getCode()]);
|
||||||
deviceIndexes.add(idsArray[LineBaseEnum.DEVICE_LEVEL.getCode()]);
|
deviceIndexes.add(idsArray[LineBaseEnum.DEVICE_LEVEL.getCode()]);
|
||||||
|
|||||||
@@ -296,12 +296,14 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
//根据步进单位获取起始日期时间和结束日期时间的时间区间集合
|
//根据步进单位获取起始日期时间和结束日期时间的时间区间集合
|
||||||
List<DateTime> dateTimes = DateUtil.rangeToList(parse, DateUtil.parse(param.getSearchEndTime()), dateField);
|
List<DateTime> dateTimes = DateUtil.rangeToList(parse, DateUtil.parse(param.getSearchEndTime()), dateField);
|
||||||
List<Date> times;
|
List<Date> times;
|
||||||
|
//终端分布趋势
|
||||||
if (4 == type) {
|
if (4 == type) {
|
||||||
List<String> devIDs = generalDeviceDTOList.stream().flatMap(x -> x.getDeviceIndexes().stream()).distinct().collect(Collectors.toList());
|
List<String> devIDs = generalDeviceDTOList.stream().flatMap(x -> x.getDeviceIndexes().stream()).distinct().collect(Collectors.toList());
|
||||||
List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>().select(Device::getLoginTime).in(CollUtil.isNotEmpty(devIDs), Device::getId, devIDs).eq(Device::getRunFlag, 0));
|
List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>().select(Device::getLoginTime).in(CollUtil.isNotEmpty(devIDs), Device::getId, devIDs).eq(Device::getRunFlag, 0));
|
||||||
times = list.stream().map(x -> Date.from(x.getLoginTime().atStartOfDay(ZoneId.systemDefault()).toInstant())).collect(Collectors.toList());
|
times = list.stream().map(x -> Date.from(x.getLoginTime().atStartOfDay(ZoneId.systemDefault()).toInstant())).collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
List<String> ids;
|
List<String> ids;
|
||||||
|
//监测点分布趋势
|
||||||
if (type == 3) {
|
if (type == 3) {
|
||||||
ids = generalDeviceDTOList.stream().flatMap(x -> x.getSubIndexes().stream()).distinct().collect(Collectors.toList());
|
ids = generalDeviceDTOList.stream().flatMap(x -> x.getSubIndexes().stream()).distinct().collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
@@ -386,11 +388,14 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
.filter(x -> finalI == x.getRunFlag())
|
.filter(x -> finalI == x.getRunFlag())
|
||||||
.map(Device::getId).distinct().collect(Collectors.toList());
|
.map(Device::getId).distinct().collect(Collectors.toList());
|
||||||
list.add(String.valueOf(devices.size()));
|
list.add(String.valueOf(devices.size()));
|
||||||
|
//当终端信息是0标识需要进行在线率查询,并进行赋值
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
onlineRateParam.setIds(devices);
|
if(CollUtil.isNotEmpty(devices)) {
|
||||||
list.add(String.valueOf(onLineRateDMapper.getTotalOnlineRates(onlineRateParam)));
|
onlineRateParam.setIds(devices);
|
||||||
} else {
|
list.add(String.valueOf(onLineRateDMapper.getTotalOnlineRates(onlineRateParam)));
|
||||||
list.add(String.valueOf(3.14159));
|
}else {
|
||||||
|
list.add("0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = new GridDiagramVO.DevData();
|
data = new GridDiagramVO.DevData();
|
||||||
@@ -398,7 +403,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
data.setOrgName(dto.getName());
|
data.setOrgName(dto.getName());
|
||||||
data.setRunNum(Long.valueOf(list.get(0)));
|
data.setRunNum(Long.valueOf(list.get(0)));
|
||||||
data.setOverhaulNum(Long.valueOf(list.get(2)));
|
data.setOverhaulNum(Long.valueOf(list.get(2)));
|
||||||
data.setRefundNum(Long.valueOf(list.get(4)));
|
data.setRefundNum(Long.valueOf(list.get(3)));
|
||||||
data.setOnLineRate(Float.valueOf(list.get(1)));
|
data.setOnLineRate(Float.valueOf(list.get(1)));
|
||||||
info.add(data);
|
info.add(data);
|
||||||
}
|
}
|
||||||
@@ -456,7 +461,11 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
details.setOnLineNum(onIds.size());
|
details.setOnLineNum(onIds.size());
|
||||||
details.setOnLineNumList(onIds);
|
details.setOnLineNumList(onIds);
|
||||||
baseQueryParam.setLineIds(ids);
|
baseQueryParam.setLineIds(ids);
|
||||||
details.setIntegrityRate(integrityDMapper.selectTotalIntegrityByLineIds(baseQueryParam));
|
if(CollUtil.isNotEmpty(ids)){
|
||||||
|
details.setIntegrityRate(integrityDMapper.selectTotalIntegrityByLineIds(baseQueryParam));
|
||||||
|
}else{
|
||||||
|
details.setIntegrityRate(0.0f);
|
||||||
|
}
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -16,10 +17,11 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.common.utils.EnumUtils;
|
import com.njcn.common.utils.EnumUtils;
|
||||||
import com.njcn.common.utils.PubUtils;
|
import com.njcn.common.utils.PubUtils;
|
||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
|
||||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||||
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||||
|
import com.njcn.device.pq.mapper.*;
|
||||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
||||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||||
@@ -30,7 +32,6 @@ import com.njcn.device.pq.pojo.param.PqsParam;
|
|||||||
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
import com.njcn.device.pq.pojo.param.TerminalMainQueryParam;
|
||||||
import com.njcn.device.pq.pojo.po.*;
|
import com.njcn.device.pq.pojo.po.*;
|
||||||
import com.njcn.device.pq.pojo.vo.*;
|
import com.njcn.device.pq.pojo.vo.*;
|
||||||
import com.njcn.device.pq.mapper.*;
|
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
import com.njcn.device.pq.service.LineService;
|
import com.njcn.device.pq.service.LineService;
|
||||||
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
import com.njcn.influx.constant.InfluxDbSqlConstant;
|
||||||
@@ -44,7 +45,6 @@ import com.njcn.system.pojo.po.Area;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import com.njcn.web.pojo.vo.LineDataVO;
|
import com.njcn.web.pojo.vo.LineDataVO;
|
||||||
import com.njcn.web.utils.GeneralUtil;
|
import com.njcn.web.utils.GeneralUtil;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
@@ -52,11 +52,13 @@ import com.njcn.web.utils.WebUtil;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -100,67 +102,72 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
private final DeptLineService deptLineService;
|
private final DeptLineService deptLineService;
|
||||||
@Override
|
@Override
|
||||||
public LineDetailDataVO getLineDetailData(String id) {
|
public LineDetailDataVO getLineDetailData(String id) {
|
||||||
//根据id查询当前信息的pids
|
if(StringUtils.isEmpty(id)){
|
||||||
List<String> pids = Arrays.asList(this.baseMapper.selectById(id).getPids().split(","));
|
return new LineDetailDataVO();
|
||||||
List<String> list = new ArrayList(pids);
|
}else {
|
||||||
list.add(id);
|
//根据id查询当前信息的pids
|
||||||
List<LineDataVO> lineDataVOList = this.baseMapper.getLineDetail(list);
|
List<String> pids = Arrays.asList(this.baseMapper.selectById(id).getPids().split(","));
|
||||||
LineDetailDataVO lineDetailDataVO = new LineDetailDataVO();
|
List<String> list = new ArrayList(pids);
|
||||||
String areaId = "", devId = "", voId = "";
|
list.add(id);
|
||||||
for (LineDataVO lineDataVO : lineDataVOList) {
|
List<LineDataVO> lineDataVOList = this.baseMapper.getLineDetail(list);
|
||||||
switch (lineDataVO.getLevel()) {
|
LineDetailDataVO lineDetailDataVO = new LineDetailDataVO();
|
||||||
case 1:
|
String areaId = "", devId = "", voId = "";
|
||||||
areaId = lineDataVO.getName();
|
for (LineDataVO lineDataVO : lineDataVOList) {
|
||||||
break;
|
switch (lineDataVO.getLevel()) {
|
||||||
case 2:
|
case 1:
|
||||||
lineDetailDataVO.setGdName(lineDataVO.getName());
|
areaId = lineDataVO.getName();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 2:
|
||||||
lineDetailDataVO.setBdName(lineDataVO.getName());
|
lineDetailDataVO.setGdName(lineDataVO.getName());
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 3:
|
||||||
devId = lineDataVO.getId();
|
lineDetailDataVO.setBdName(lineDataVO.getName());
|
||||||
lineDetailDataVO.setDevName(lineDataVO.getName());
|
break;
|
||||||
break;
|
case 4:
|
||||||
case 5:
|
devId = lineDataVO.getId();
|
||||||
voId = lineDataVO.getId();
|
lineDetailDataVO.setDevName(lineDataVO.getName());
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 5:
|
||||||
lineDetailDataVO.setLineName(lineDataVO.getName());
|
voId = lineDataVO.getId();
|
||||||
break;
|
break;
|
||||||
default:
|
case 6:
|
||||||
break;
|
lineDetailDataVO.setLineName(lineDataVO.getName());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
lineDetailDataVO.setAreaName(areaFeignClient.selectIdArea(areaId).getData().getName());
|
||||||
|
lineDetailDataVO.setScale(dicDataFeignClient.getDicDataById(voltageMapper.selectById(voId).getScale()).getData().getName());
|
||||||
|
LineDetail lineDetail = lineDetailMapper.selectById(id);
|
||||||
|
Device device = deviceMapper.selectById(devId);
|
||||||
|
lineDetailDataVO.setManufacturer(dicDataFeignClient.getDicDataById(device.getManufacturer()).getData().getName());
|
||||||
|
lineDetailDataVO.setComFlag(PubUtils.comFlag(device.getComFlag()));
|
||||||
|
lineDetailDataVO.setRunFlag(PubUtils.lineRunFlag(lineDetail.getRunFlag()));
|
||||||
|
lineDetailDataVO.setIp(device.getIp());
|
||||||
|
lineDetailDataVO.setLoginTime(device.getLoginTime());
|
||||||
|
lineDetailDataVO.setDevId(device.getId());
|
||||||
|
lineDetailDataVO.setBusinessType(dicDataFeignClient.getDicDataById(lineDetail.getBusinessType()).getData().getName());
|
||||||
|
lineDetailDataVO.setLoadType(dicDataFeignClient.getDicDataById(lineDetail.getLoadType()).getData().getName());
|
||||||
|
lineDetailDataVO.setObjName(lineDetail.getObjName());
|
||||||
|
lineDetailDataVO.setId(lineDetail.getNum());
|
||||||
|
lineDetailDataVO.setPtType(PubUtils.ptType(lineDetail.getPtType()));
|
||||||
|
lineDetailDataVO.setPt(lineDetail.getPt1() + "/" + lineDetail.getPt2());
|
||||||
|
lineDetailDataVO.setCt(lineDetail.getCt1() + "/" + lineDetail.getCt2());
|
||||||
|
lineDetailDataVO.setDealCapacity(lineDetail.getDealCapacity());
|
||||||
|
lineDetailDataVO.setDevCapacity(lineDetail.getDevCapacity());
|
||||||
|
lineDetailDataVO.setShortCapacity(lineDetail.getShortCapacity());
|
||||||
|
lineDetailDataVO.setStandardCapacity(lineDetail.getStandardCapacity());
|
||||||
|
lineDetailDataVO.setTimeInterval (lineDetail.getTimeInterval ());
|
||||||
|
lineDetailDataVO.setOwner(lineDetail.getOwner());
|
||||||
|
lineDetailDataVO.setOwnerDuty(lineDetail.getOwnerDuty());
|
||||||
|
lineDetailDataVO.setOwnerTel(lineDetail.getOwnerTel());
|
||||||
|
lineDetailDataVO.setWiringDiagram(lineDetail.getWiringDiagram());
|
||||||
|
lineDetailDataVO.setPtPhaseType(lineDetail.getPtPhaseType());
|
||||||
|
lineDetailDataVO.setUpdateTime(device.getUpdateTime());
|
||||||
|
return lineDetailDataVO;
|
||||||
}
|
}
|
||||||
lineDetailDataVO.setAreaName(areaFeignClient.selectIdArea(areaId).getData().getName());
|
|
||||||
lineDetailDataVO.setScale(dicDataFeignClient.getDicDataById(voltageMapper.selectById(voId).getScale()).getData().getName());
|
|
||||||
LineDetail lineDetail = lineDetailMapper.selectById(id);
|
|
||||||
Device device = deviceMapper.selectById(devId);
|
|
||||||
lineDetailDataVO.setManufacturer(dicDataFeignClient.getDicDataById(device.getManufacturer()).getData().getName());
|
|
||||||
lineDetailDataVO.setComFlag(PubUtils.comFlag(device.getComFlag()));
|
|
||||||
lineDetailDataVO.setRunFlag(PubUtils.runFlag(device.getRunFlag()));
|
|
||||||
lineDetailDataVO.setIp(device.getIp());
|
|
||||||
lineDetailDataVO.setLoginTime(device.getLoginTime());
|
|
||||||
lineDetailDataVO.setDevId(device.getId());
|
|
||||||
lineDetailDataVO.setBusinessType(dicDataFeignClient.getDicDataById(lineDetail.getBusinessType()).getData().getName());
|
|
||||||
lineDetailDataVO.setLoadType(dicDataFeignClient.getDicDataById(lineDetail.getLoadType()).getData().getName());
|
|
||||||
lineDetailDataVO.setObjName(lineDetail.getObjName());
|
|
||||||
lineDetailDataVO.setId(lineDetail.getNum());
|
|
||||||
lineDetailDataVO.setPtType(PubUtils.ptType(lineDetail.getPtType()));
|
|
||||||
lineDetailDataVO.setPt(lineDetail.getPt1() + "/" + lineDetail.getPt2());
|
|
||||||
lineDetailDataVO.setCt(lineDetail.getCt1() + "/" + lineDetail.getCt2());
|
|
||||||
lineDetailDataVO.setDealCapacity(lineDetail.getDealCapacity());
|
|
||||||
lineDetailDataVO.setDevCapacity(lineDetail.getDevCapacity());
|
|
||||||
lineDetailDataVO.setShortCapacity(lineDetail.getShortCapacity());
|
|
||||||
lineDetailDataVO.setStandardCapacity(lineDetail.getStandardCapacity());
|
|
||||||
lineDetailDataVO.setTimeInterval (lineDetail.getTimeInterval ());
|
|
||||||
lineDetailDataVO.setOwner(lineDetail.getOwner());
|
|
||||||
lineDetailDataVO.setOwnerDuty(lineDetail.getOwnerDuty());
|
|
||||||
lineDetailDataVO.setOwnerTel(lineDetail.getOwnerTel());
|
|
||||||
lineDetailDataVO.setWiringDiagram(lineDetail.getWiringDiagram());
|
|
||||||
lineDetailDataVO.setPtPhaseType(lineDetail.getPtPhaseType());
|
|
||||||
lineDetailDataVO.setUpdateTime(device.getUpdateTime());
|
|
||||||
return lineDetailDataVO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -676,6 +683,22 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LineDetailVO.noDataLineInfo> getNoDataLine() {
|
||||||
|
String time = DateUtil.format(LocalDateTime.now(), DatePattern.NORM_DATE_PATTERN);
|
||||||
|
return this.baseMapper.getNoDataLine(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ReportLineInfoVo> getReportLineInfo(List<String> ids) {
|
||||||
|
return this.baseMapper.getReportLineInfo(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LineDetail> getByName(String name) {
|
||||||
|
return this.baseMapper.selectByName(name);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class RStatIntegrityDServiceImpl extends ServiceImpl<RStatIntegrityDMappe
|
|||||||
for(Line item : lineList){
|
for(Line item : lineList){
|
||||||
LineDataQualityDTO lineDataQualityDTO = new LineDataQualityDTO();
|
LineDataQualityDTO lineDataQualityDTO = new LineDataQualityDTO();
|
||||||
lineDataQualityDTO.setLineId(item.getId());
|
lineDataQualityDTO.setLineId(item.getId());
|
||||||
|
lineDataQualityDTO.setLineName(item.getName());
|
||||||
if(onlineMap.containsKey(item.getPid())){
|
if(onlineMap.containsKey(item.getPid())){
|
||||||
lineDataQualityDTO.setOnlineRate(Double.valueOf(onlineMap.get(item.getPid()).getOnlineRate()));
|
lineDataQualityDTO.setOnlineRate(Double.valueOf(onlineMap.get(item.getPid()).getOnlineRate()));
|
||||||
}else {
|
}else {
|
||||||
@@ -95,6 +96,7 @@ public class RStatIntegrityDServiceImpl extends ServiceImpl<RStatIntegrityDMappe
|
|||||||
}else {
|
}else {
|
||||||
lineDataQualityDTO.setIntegrityRate(0.00);
|
lineDataQualityDTO.setIntegrityRate(0.00);
|
||||||
}
|
}
|
||||||
|
result.add(lineDataQualityDTO);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1,2).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1,2).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||||
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
|
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
||||||
@@ -116,6 +117,7 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
public Page<RunTimeVO> getDeviceLedger(RunManageParam runManageParam) {
|
public Page<RunTimeVO> getDeviceLedger(RunManageParam runManageParam) {
|
||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
||||||
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
||||||
throw new BusinessException("当前部门没有装置台账");
|
throw new BusinessException("当前部门没有装置台账");
|
||||||
|
|||||||
@@ -5,12 +5,15 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
|||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.text.StrBuilder;
|
import cn.hutool.core.text.StrBuilder;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.config.GeneralInfo;
|
import com.njcn.common.config.GeneralInfo;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
@@ -21,6 +24,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.common.utils.PubUtils;
|
import com.njcn.common.utils.PubUtils;
|
||||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||||
|
import com.njcn.device.biz.enums.RunFlagEnum;
|
||||||
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import com.njcn.device.biz.pojo.po.DeviceBak;
|
import com.njcn.device.biz.pojo.po.DeviceBak;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.biz.utils.COverlimitUtil;
|
import com.njcn.device.biz.utils.COverlimitUtil;
|
||||||
@@ -108,9 +113,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
private final GeneralInfo generalInfo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端新增操作
|
* 终端新增操作
|
||||||
*
|
*
|
||||||
@@ -1489,6 +1491,11 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
return this.baseMapper.getVoltageByCondition(voltageIds, scale);
|
return this.baseMapper.getVoltageByCondition(voltageIds, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Line> getSubByCondition(List<String> subIds, List<SimpleDTO> scale) {
|
||||||
|
return this.baseMapper.getSubByCondition(subIds, scale);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getVoltageIdByScale(List<String> voltageIds, String scale) {
|
public List<String> getVoltageIdByScale(List<String> voltageIds, String scale) {
|
||||||
return this.baseMapper.getVoltageIdByScale(voltageIds, scale);
|
return this.baseMapper.getVoltageIdByScale(voltageIds, scale);
|
||||||
@@ -1882,13 +1889,13 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
Device deviceDetail = new Device();
|
Device deviceDetail = new Device();
|
||||||
BeanUtils.copyProperties(deviceParam, deviceDetail);
|
BeanUtils.copyProperties(deviceParam, deviceDetail);
|
||||||
deviceDetail.setId(device.getId());
|
deviceDetail.setId(device.getId());
|
||||||
deviceDetail.setRunFlag(0);
|
deviceDetail.setRunFlag(3);
|
||||||
deviceDetail.setCallFlag(0);
|
deviceDetail.setCallFlag(0);
|
||||||
deviceDetail.setComFlag(0);
|
deviceDetail.setComFlag(0);
|
||||||
deviceDetail.setCheckFlag(1);
|
deviceDetail.setCheckFlag(1);
|
||||||
deviceDetail.setThisTimeCheck(PubUtils.localDateFormat(deviceParam.getThisTimeCheck()));
|
deviceDetail.setThisTimeCheck(PubUtils.localDateFormat(deviceParam.getThisTimeCheck()));
|
||||||
deviceDetail.setNextTimeCheck(PubUtils.localDateFormat(deviceParam.getNextTimeCheck()));
|
deviceDetail.setNextTimeCheck(PubUtils.localDateFormat(deviceParam.getNextTimeCheck()));
|
||||||
deviceDetail.setLoginTime(PubUtils.localDateFormat(deviceParam.getNextTimeCheck()));
|
deviceDetail.setLoginTime(PubUtils.localDateFormat(deviceParam.getLoginTime()));
|
||||||
deviceDetail.setUpdateTime(LocalDateTime.now());
|
deviceDetail.setUpdateTime(LocalDateTime.now());
|
||||||
|
|
||||||
//处理装置识别码秘钥
|
//处理装置识别码秘钥
|
||||||
@@ -1947,7 +1954,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
LineDetail lineDetail = new LineDetail();
|
LineDetail lineDetail = new LineDetail();
|
||||||
BeanUtils.copyProperties(lineParam, lineDetail);
|
BeanUtils.copyProperties(lineParam, lineDetail);
|
||||||
lineDetail.setId(line.getId());
|
lineDetail.setId(line.getId());
|
||||||
lineDetail.setRunFlag(0);
|
lineDetail.setRunFlag(3);
|
||||||
//判断国网监测点id
|
//判断国网监测点id
|
||||||
if (StrUtil.isNotBlank(lineDetail.getMonitorId())) {
|
if (StrUtil.isNotBlank(lineDetail.getMonitorId())) {
|
||||||
lineDetail.setMonitorFlag(1);
|
lineDetail.setMonitorFlag(1);
|
||||||
@@ -1987,6 +1994,40 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
return subIndex;
|
return subIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean terminalSyncRunFly(String lineId) {
|
||||||
|
LineDTO lineDTO = this.baseMapper.selectLineDetail(lineId);
|
||||||
|
if(ObjectUtil.isNotNull(lineDTO)){
|
||||||
|
lineDetailMapper.update(null,new LambdaUpdateWrapper<LineDetail>()
|
||||||
|
.set(LineDetail::getRunFlag, 0)
|
||||||
|
.eq(LineDetail::getId, lineDTO.getLineId())
|
||||||
|
);
|
||||||
|
|
||||||
|
deviceMapper.update(null,new LambdaUpdateWrapper<Device>()
|
||||||
|
.set(Device::getRunFlag, 0)
|
||||||
|
.eq(Device::getId, lineDTO.getDevId())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean terminalSyncDeleteFly(String lineId) {
|
||||||
|
LineDTO lineDTO = this.baseMapper.selectLineDetail(lineId);
|
||||||
|
if(ObjectUtil.isNotNull(lineDTO)){
|
||||||
|
//删除监测点详细信息
|
||||||
|
lineDetailMapper.updateLineRunFlag(lineDTO.getLineId(), RunFlagEnum.QUIT.getStatus());
|
||||||
|
//todo 删除监测点信息
|
||||||
|
this.removeById(lineDTO.getLineId());
|
||||||
|
//todo 删除部门监测点关系
|
||||||
|
deptLineMapper.delete(new LambdaQueryWrapper<DeptLine>()
|
||||||
|
.eq(DeptLine::getLineId, lineDTO.getLineId()));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String saveTerminalInfo(List<OracleTerminalExcel> oracleTerminalExcels, List<OverLimitExcel> overLimitExcels) {
|
private String saveTerminalInfo(List<OracleTerminalExcel> oracleTerminalExcels, List<OverLimitExcel> overLimitExcels) {
|
||||||
List<OracleTerminalExcel.OracleTerminalExcelMsg> oracleTerminalExcelMsg = new ArrayList<>();
|
List<OracleTerminalExcel.OracleTerminalExcelMsg> oracleTerminalExcelMsg = new ArrayList<>();
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public class TerminalTreeServiceImpl implements TerminalTreeService {
|
|||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
deviceInfoParam.setDeptIndex(RequestUtil.getDeptIndex());
|
deviceInfoParam.setDeptIndex(RequestUtil.getDeptIndex());
|
||||||
deviceInfoParam.setServerName(ServerEnum.HARMONIC.getName());
|
deviceInfoParam.setServerName(ServerEnum.HARMONIC.getName());
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0,1).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||||
|
|
||||||
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
||||||
if (CollectionUtil.isEmpty(generalDeviceDTO.getLineIndexes())) {
|
if (CollectionUtil.isEmpty(generalDeviceDTO.getLineIndexes())) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.energy.pojo.api;
|
|||||||
|
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.energy.pojo.api.fallback.EleAirStrategyFallbackFactory;
|
||||||
import com.njcn.energy.pojo.api.fallback.EleOnlineRateFallbackFactory;
|
import com.njcn.energy.pojo.api.fallback.EleOnlineRateFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -14,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
* @author cdf
|
* @author cdf
|
||||||
* @date 2022/4/22
|
* @date 2022/4/22
|
||||||
*/
|
*/
|
||||||
@FeignClient(value = ServerInfo.ENERGY,path = "/air",fallbackFactory = EleOnlineRateFallbackFactory.class)
|
@FeignClient(value = ServerInfo.ENERGY,path = "/air",fallbackFactory = EleAirStrategyFallbackFactory.class)
|
||||||
public interface EleAirStrategyFeignClient {
|
public interface EleAirStrategyFeignClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,6 +24,6 @@ public interface EleAirStrategyFeignClient {
|
|||||||
* @date 2022/4/22
|
* @date 2022/4/22
|
||||||
*/
|
*/
|
||||||
@GetMapping("dealAirStrategyId")
|
@GetMapping("dealAirStrategyId")
|
||||||
HttpResult<Boolean> dealAirStrategyId(@RequestParam("id") String id,@RequestParam("operation") String operation);
|
HttpResult<Boolean> dealAirStrategyId(@RequestParam("operation") String operation);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.njcn.energy.pojo.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.energy.pojo.api.fallback.EleOnlineRateFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/4/22
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.ENERGY,path = "/energyJob",fallbackFactory = EleOnlineRateFallbackFactory.class)
|
||||||
|
public interface EnergyStatisticFeignClient {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取策略下的监测点
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/4/22
|
||||||
|
*/
|
||||||
|
@GetMapping("electricCalJob")
|
||||||
|
HttpResult<Boolean> electricCalJob();
|
||||||
|
|
||||||
|
@GetMapping("eleOnlineRateJob")
|
||||||
|
HttpResult<Boolean> eleOnlineRateJobHandler();
|
||||||
|
|
||||||
|
@GetMapping("eleIntegrityJob")
|
||||||
|
HttpResult<Boolean> eleIntegrityJobHandler();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -33,7 +33,7 @@ public class EleAirStrategyFallbackFactory implements FallbackFactory<EleAirStra
|
|||||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
return new EleAirStrategyFeignClient() {
|
return new EleAirStrategyFeignClient() {
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<Boolean> dealAirStrategyId(String id,String operation) {
|
public HttpResult<Boolean> dealAirStrategyId(String operation) {
|
||||||
log.error("{}异常,降级处理,异常为:{}","空调控制策略数据",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","空调控制策略数据",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.njcn.energy.pojo.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
|
||||||
|
import com.njcn.energy.pojo.api.EnergyStatisticFeignClient;
|
||||||
|
import com.njcn.energy.pojo.utils.EnergyEnumUtil;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/4/20 15:09
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class EnergyStatisticFallbackFactory implements FallbackFactory<EnergyStatisticFeignClient> {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnergyStatisticFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if(cause.getCause() instanceof BusinessException){
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
exceptionEnum = EnergyEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new EnergyStatisticFeignClient() {
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> electricCalJob() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","调度统计电量增量",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> eleOnlineRateJobHandler() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","用能终端在线率数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> eleIntegrityJobHandler() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","用能数据完整性数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package com.njcn.energy.pojo.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Timestamp;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.energy.pojo.dto;
|
package com.njcn.energy.pojo.dto;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;;
|
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user