Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae09cc1996 | |||
| efdb1781da | |||
|
|
46aef0d97f | ||
|
|
5539c8fed5 | ||
|
|
10d93c260c | ||
| 4ee100a72b | |||
|
|
958f1858fc | ||
|
|
791aac26c0 | ||
| 3526926034 | |||
| 3753544e5f | |||
| e6df543f1d | |||
|
|
f86a3c4167 | ||
| 29681d200d | |||
|
|
9ff0f40349 | ||
|
|
24187ca6d9 | ||
| f33986e934 | |||
|
|
cea2b9694a | ||
| 8e4c4383c0 | |||
| cdd1b5075c | |||
| ea54b2b907 | |||
|
|
61c8656fd9 | ||
| 02e5100426 | |||
| 85ae7e7ddb | |||
| 9ae17b14f5 | |||
|
|
f7477ea8ff | ||
| 9c6a74a2d6 | |||
| d346e80a88 | |||
|
|
0227d0731c | ||
|
|
e34721c035 | ||
| 2451df7d8d | |||
| 6e5aab4791 | |||
| adb811e9df | |||
|
|
340ba18f99 | ||
|
|
e320685af1 | ||
|
|
400b9fd9c1 | ||
|
|
ce0b9892c2 | ||
| 2fb11ecaaf | |||
| b7574b2916 | |||
| 43bdcbf623 | |||
| 629ba0746a | |||
| b86c81d70a | |||
| d10240758b | |||
| 995bd8b310 | |||
| 9531e18e93 | |||
| 753a22eb4c | |||
| 814b5757fd | |||
| 9d2b4b97f9 | |||
| ee07f7a5e2 | |||
| 214f297297 | |||
|
|
b908186758 | ||
| 0d1c142885 | |||
| 43b8473976 | |||
| 8c442d8897 | |||
| 066dceaeaf | |||
| 9dca3408ae | |||
| 0d7d1781e3 |
@@ -35,12 +35,6 @@
|
||||
<artifactId>common-microservice</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-warn-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>user-api</artifactId>
|
||||
@@ -59,6 +53,12 @@
|
||||
<artifactId>common-device-biz</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>4.4.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -22,4 +22,13 @@ public interface CsCommTerminalFeignClient {
|
||||
|
||||
@GetMapping("lineUnitDetail")
|
||||
HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineId") String lineId);
|
||||
|
||||
@GetMapping("getDevIdsByUser")
|
||||
HttpResult<List<String>> getDevIdsByUser(@RequestParam("userId") String userId);
|
||||
|
||||
@GetMapping("getLineIdsByUser")
|
||||
HttpResult<List<String>> getLineIdsByUser(@RequestParam("userId") String userId);
|
||||
|
||||
@GetMapping("getPqUserIdsByUser")
|
||||
HttpResult<List<String>> getPqUserIdsByUser(@RequestParam("userId") String userId);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.csdevice.api;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.CsDeviceUserClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.UserDevParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -22,4 +23,10 @@ public interface CsDeviceUserFeignClient {
|
||||
|
||||
@PostMapping("/findUserById")
|
||||
HttpResult<List<String>> findUserById(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/findDevByUserId")
|
||||
HttpResult<List<String>> findDevByUserId(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/channelDevByUserId")
|
||||
HttpResult<List<String>> channelDevByUserId(@RequestBody UserDevParam param);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.api.fallback.CsLedgerFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLedger;
|
||||
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -47,5 +42,15 @@ public interface CsLedgerFeignClient {
|
||||
@PostMapping("/getAllLedger")
|
||||
HttpResult<List<CsLedgerVO>> getAllLedger();
|
||||
|
||||
@PostMapping("/getInfoByIds")
|
||||
HttpResult<List<DevDetailDTO>> getInfoByIds(@RequestBody @Validated List<String> list);
|
||||
|
||||
@PostMapping("/getDevInfoByEngineerIds")
|
||||
@ApiOperation("根据工程获取设备信息")
|
||||
HttpResult<List<DevDetailDTO>> getDevInfoByEngineerIds(@RequestBody @Validated List<String> list);
|
||||
|
||||
@PostMapping("/getEngineeringHaveDevs")
|
||||
@ApiOperation("根据工程信息获取有设备的工程")
|
||||
HttpResult<List<DevDetailDTO>> getEngineeringHaveDevs(@RequestBody @Validated List<String> list);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -44,5 +51,28 @@ public interface CsLineFeignClient {
|
||||
HttpResult<CsLinePO> getById(@RequestParam("lineId") String lineId);
|
||||
|
||||
@PostMapping("/getLinesByDevList")
|
||||
HttpResult<List<CsLinePO>> getLinesByDevList(@RequestParam("ids") List<String> ids);
|
||||
HttpResult<List<CsLinePO>> getLinesByDevList(@RequestBody List<String> ids);
|
||||
|
||||
@PostMapping("/updateLineDataByList")
|
||||
HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id, @RequestParam("setId") String setId);
|
||||
|
||||
@PostMapping("/getLineByName")
|
||||
HttpResult<List<CsLinePO>> getLineByName(@RequestParam("lineName") String lineName);
|
||||
|
||||
@PostMapping("/getAllLine")
|
||||
HttpResult<List<String>> getAllLine();
|
||||
|
||||
@PostMapping("/getOverLimitDataByIds")
|
||||
HttpResult<List<Overlimit>> getOverLimitData(@RequestBody List<String> ids);
|
||||
|
||||
@PostMapping("/getLineBySensitiveUser")
|
||||
@ApiOperation("根据敏感用户查询监测点")
|
||||
HttpResult<List<CsLinePO>> getLineBySensitiveUser(@RequestBody List<String> list);
|
||||
|
||||
@PostMapping("/list")
|
||||
HttpResult<List<CsLinePO>> list(@RequestBody CsLinePO param);
|
||||
|
||||
@PostMapping("/getLineDetailData")
|
||||
HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.CsOverLimitFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 监测点数据完整性
|
||||
* @author cdf
|
||||
* @date 2023/6/7
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT,
|
||||
path = "/overLimit",
|
||||
fallbackFactory = CsOverLimitFallbackFactory.class,contextId = "overLimit")
|
||||
public interface CsOverLimitClient {
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/6/7
|
||||
*/
|
||||
@PostMapping("/getOverLimitByLineIds")
|
||||
HttpResult<List<Overlimit>> getOverLimitByLineIds(@RequestBody List<String> lineIds);
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/6/7
|
||||
*/
|
||||
@PostMapping("/getLimitMapsByLineIds")
|
||||
HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(@RequestBody List<String> lineIds);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.CsTerminalLogsClientFallbackFactory;
|
||||
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.CS_DEVICE_BOOT, path = "/csTerminalLogs", fallbackFactory = CsTerminalLogsClientFallbackFactory.class,contextId = "csTerminalLogs")
|
||||
|
||||
public interface CsTerminalLogsFeignClient {
|
||||
|
||||
@PostMapping("/updateLaterData")
|
||||
HttpResult<String> updateLaterData(@RequestParam("id") String id, @RequestParam("code") String code);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.CsTerminalReplyClientFallbackFactory;
|
||||
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csTerminalReply", fallbackFactory = CsTerminalReplyClientFallbackFactory.class,contextId = "csTerminalReply")
|
||||
|
||||
public interface CsTerminalReplyFeignClient {
|
||||
|
||||
@PostMapping("/updateData")
|
||||
@ApiOperation("更新推送结果")
|
||||
HttpResult<String> updateData(@RequestBody @Validated IcdBzReplyParam param);
|
||||
|
||||
|
||||
@PostMapping("/updateBzData")
|
||||
@ApiOperation("更新补召推送结果")
|
||||
HttpResult<String> updateBzData(@RequestBody @Validated IcdBzReplyParam param);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,17 +1,10 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.api.fallback.DataSetFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||
import com.njcn.csdevice.pojo.vo.LineTargetVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -28,4 +28,7 @@ public interface DevModelRelationFeignClient {
|
||||
@PostMapping("/getModelByType")
|
||||
HttpResult<String> getModelByType(@RequestParam("devId") String devId, @RequestParam("type") Integer type);
|
||||
|
||||
@PostMapping("/updateDataByList")
|
||||
HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id);
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,13 @@ import com.njcn.csdevice.api.fallback.EquipmentFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
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;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -64,4 +67,10 @@ public interface EquipmentFeignClient {
|
||||
|
||||
@PostMapping("/getDevByLineId")
|
||||
HttpResult<CsEquipmentDeliveryPO> getDevByLineId(@RequestParam("lineId") String lineId);
|
||||
|
||||
@PostMapping("/updateCldDevStatus")
|
||||
HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo);
|
||||
|
||||
@PostMapping("/flipCldDevStatus")
|
||||
HttpResult<Boolean> flipCldDevStatus(@RequestParam("devId") String devId, @RequestParam("status") Integer status);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.CsTerminalLogsClientFallbackFactory;
|
||||
import com.njcn.csdevice.api.fallback.IcdFallbackFactory;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/icd", fallbackFactory = IcdFallbackFactory.class,contextId = "icd")
|
||||
|
||||
public interface IcdFeignClient {
|
||||
|
||||
@PostMapping("/bzEvent")
|
||||
@ApiOperation("补召事件")
|
||||
HttpResult<String> bzEvent(@RequestBody @Validated IcdBzParam param);
|
||||
|
||||
@PostMapping("/bzFile")
|
||||
@ApiOperation("补召波形")
|
||||
HttpResult<String> bzFile(@RequestBody @Validated IcdBzParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.fallback.NodeFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/node", fallbackFactory = NodeFallbackFactory.class,contextId = "node")
|
||||
public interface NodeFeignClient {
|
||||
|
||||
@ApiOperation("获取全部前置机")
|
||||
@GetMapping("/nodeAllList")
|
||||
HttpResult<List<Node>> nodeAllList();
|
||||
|
||||
|
||||
}
|
||||
@@ -54,4 +54,7 @@ public interface WlRecordFeignClient {
|
||||
|
||||
@PostMapping("/findDevBaseDataByLineId")
|
||||
HttpResult<List<RecordVo>> findDevBaseDataByLineId(@RequestBody @Validated WlRecordParam.lineRecord param);
|
||||
|
||||
@GetMapping("/getTestRecordById")
|
||||
HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam("testRecordId") @Validated String testRecordId);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@@ -31,6 +33,24 @@ public class CsCommTerminalFeignClientFallbackFactory implements FallbackFactory
|
||||
log.error("{}异常,降级处理,异常为:{}","查询分组",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getDevIdsByUser(String userId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据登录用户id获取用户所有设备id集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getLineIdsByUser(String userId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据登录用户id获取用户所有监测点id集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getPqUserIdsByUser(String userId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据登录用户id获取电能质量用户id集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ 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.csdevice.api.CsDeviceUserFeignClient;
|
||||
import com.njcn.csdevice.pojo.param.UserDevParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -38,6 +39,18 @@ public class CsDeviceUserClientFallbackFactory implements FallbackFactory<CsDevi
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> findDevByUserId(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据用户Id查询设备集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> channelDevByUserId(UserDevParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据用户Id解绑设备集合异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,24 @@ public class CsLedgerFeignClientFallbackFactory implements FallbackFactory<CsLed
|
||||
log.error("{}异常,降级处理,异常为:{}","获取台账树所有数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DevDetailDTO>> getInfoByIds(List<String> list) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据设备集合查询工程,设备信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DevDetailDTO>> getDevInfoByEngineerIds(List<String> list) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据工程获取设备信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DevDetailDTO>> getEngineeringHaveDevs(List<String> list) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据工程获取设备信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,12 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -80,6 +83,47 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置id集合获取监测点id集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> updateDataByList(List<String> list, String id, String setId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置集合修改监测点信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getAllLine() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有监测点id",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<Overlimit>> getOverLimitData(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据监测点id集合获取国标限值异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLinePO>> getLineBySensitiveUser(List<String> list) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据敏感用户查询监测点异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLinePO>> getLineByName(String lineName) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据名称查询监测点异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
@Override
|
||||
public HttpResult<List<CsLinePO>> list(CsLinePO param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询监测点列表异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询监测点详情异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.csdevice.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.csdevice.api.CsOverLimitClient;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 告警管理熔断降级
|
||||
* @author yzh
|
||||
* @date 2022/9/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsOverLimitFallbackFactory implements FallbackFactory<CsOverLimitClient> {
|
||||
@Override
|
||||
public CsOverLimitClient 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 CsOverLimitClient() {
|
||||
@Override
|
||||
public HttpResult<List<Overlimit>> getOverLimitByLineIds(List<String> lineIds) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "监测点限值", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(List<String> lineIds) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点限值map", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.csdevice.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.csdevice.api.CsTerminalLogsFeignClient;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsTerminalLogsClientFallbackFactory implements FallbackFactory<CsTerminalLogsFeignClient> {
|
||||
@Override
|
||||
public CsTerminalLogsFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CsTerminalLogsFeignClient() {
|
||||
@Override
|
||||
public HttpResult<String> updateLaterData(String id, String code) {
|
||||
log.error("{}异常,降级处理,异常为:{}","更新最新一组数据的推送状态",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.csdevice.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.csdevice.api.CsTerminalReplyFeignClient;
|
||||
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsTerminalReplyClientFallbackFactory implements FallbackFactory<CsTerminalReplyFeignClient> {
|
||||
@Override
|
||||
public CsTerminalReplyFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CsTerminalReplyFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<String> updateData(IcdBzReplyParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","更新推送结果异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> updateBzData(IcdBzReplyParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","更新补召推送结果异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,12 @@ public class DevModelRelationFeignClientFallbackFactory implements FallbackFacto
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置类型查询模板",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> updateDataByList(List<String> list, String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置集合修改模板信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,19 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
log.error("{}异常,降级处理,异常为:{}","根据监测点id查询装置信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> updateCldDevStatus(String nodeId, Integer processNo) {
|
||||
log.error("{}异常,降级处理,异常为:{}","云前置心跳丢失切换设备状态",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> flipCldDevStatus(String devId, Integer status) {
|
||||
log.error("{}异常,降级处理,异常为:{}","云前置设备状态翻转",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.njcn.csdevice.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.csdevice.api.IcdFeignClient;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class IcdFallbackFactory implements FallbackFactory<IcdFeignClient> {
|
||||
@Override
|
||||
public IcdFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new IcdFeignClient() {
|
||||
@Override
|
||||
public HttpResult<String> bzEvent(IcdBzParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","定时补召事件异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> bzFile(IcdBzParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","定时补召波形异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.csdevice.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.csdevice.api.NodeFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class NodeFallbackFactory implements FallbackFactory<NodeFeignClient> {
|
||||
@Override
|
||||
public NodeFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new NodeFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<Node>> nodeAllList() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取全部前置机异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,12 @@ public class WlRecordClientFallbackFactory implements FallbackFactory<WlRecordFe
|
||||
log.error("{}异常,降级处理,异常为:{}","根据监测点id查询装置基础数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(String testRecordId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据测试项ID查询测试项信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ public interface DataParam {
|
||||
|
||||
String GOVERNANCE_SYSTEM = "治理系统";
|
||||
|
||||
String cldDev = "在线设备";
|
||||
|
||||
String EvtParamPhase = "Evt_Param_Phase";
|
||||
|
||||
String EvtParamDepth = "Evt_Param_VVaDepth";
|
||||
|
||||
@@ -35,7 +35,6 @@ public enum AlgorithmResponseEnum {
|
||||
CHIRLDREN2_EXIST("A00514","项目下存在设备,不能删除"),
|
||||
CHIRLDREN3_EXIST("A00516","存在设备使用拓扑图,不能删除"),
|
||||
|
||||
|
||||
DATA_ARRAY_MISSING("A00515","详细数据为空"),
|
||||
UNKNOW_ROLE("A00515","角色无权限操作"),
|
||||
DATA_MISSING("A00516","数据缺失"),
|
||||
@@ -48,6 +47,13 @@ public enum AlgorithmResponseEnum {
|
||||
RECORD_FILE_LOST("A00516","record.bin文件缺失,请检查上传文件夹"),
|
||||
LINE_NUM_MISMATCH("A00516","上传文件的监测点序号和选择的监测点不匹配,请检查"),
|
||||
DEV_OFFLINE("A00516","装置未连接MQTT服务器"),
|
||||
OVER_MAX_DEV_COUNT("A00517","前置机超出最大支持装置数"),
|
||||
DEV_OLD_DATA("A00519","进程数修改失败,原进程数下存在装置,请修改装置进程号"),
|
||||
DEV_EXIST_DATA("A00520","删除失败,前置机下存在装置"),
|
||||
|
||||
CLD_MODEL_MISSING("A00521","云前置模板缺失,请检查模板信息"),
|
||||
CLD_MODEL_MORE("A00521","存在多个云前置模板,请检查模板信息"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class IcdBzParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("监测点集合")
|
||||
private List<String> lineList;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class IcdBzReplyParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("guid")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty("设备id")
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty("监测点id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("响应码")
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty("响应消息")
|
||||
private String msg;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import com.njcn.csdevice.pojo.param.AppProjectAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class IcdLedgerParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("工程索引")
|
||||
private String engineeringIndex;
|
||||
|
||||
@ApiModelProperty("项目索引")
|
||||
private String projectIndex;
|
||||
|
||||
@ApiModelProperty("设备id")
|
||||
private String devIndex;
|
||||
|
||||
@ApiModelProperty("设备和mac关系")
|
||||
private Map<String,String> devMacMap;
|
||||
|
||||
@ApiModelProperty("设备mac和设备信息关系")
|
||||
private Map<String, CsEquipmentDeliveryPO> devMap;
|
||||
|
||||
@ApiModelProperty("工程信息")
|
||||
private CsEngineeringAddParm engineering;
|
||||
|
||||
@ApiModelProperty("项目信息")
|
||||
private AppProjectAddParm project;
|
||||
|
||||
@ApiModelProperty("装置信息")
|
||||
private List<CsEquipmentDeliveryAddParm> device;
|
||||
|
||||
@ApiModelProperty("监测点信息")
|
||||
private List<CsLineParam> line;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class IcdNodeParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("设备id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("前置服务器id")
|
||||
private String nodeId;
|
||||
|
||||
@ApiModelProperty("进程号")
|
||||
private Integer processNo;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class IcdParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("前置id,不传时查询所有的终端台账信息")
|
||||
@NotBlank(message = "前置id不可为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("终端运行状态,不传则查询所有的终端信息 (0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||
private List<Integer> runFlag;
|
||||
|
||||
@ApiModelProperty("终端型号(集合为空查询所有icd模型)")
|
||||
private List<String> devType;
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,16 +19,16 @@ import java.util.List;
|
||||
@Data
|
||||
public class AppProjectAddParm {
|
||||
|
||||
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value="项目名称")
|
||||
@NotBlank(message="项目名称不能为空!")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message="工程id不能为空!")
|
||||
//@NotBlank(message="工程id不能为空!")
|
||||
private String engineeringId;
|
||||
|
||||
private String icdEngineeringId;
|
||||
|
||||
/**
|
||||
* 地市Id
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -17,8 +18,7 @@ import javax.validation.constraints.Pattern;
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CsEquipmentDeliveryAddParm{
|
||||
|
||||
public class CsEquipmentDeliveryAddParm implements Serializable {
|
||||
|
||||
/**
|
||||
* 装置名称
|
||||
@@ -39,7 +39,6 @@ public class CsEquipmentDeliveryAddParm{
|
||||
* 装置mac地址
|
||||
*/
|
||||
@ApiModelProperty(value="装置mac地址")
|
||||
// @NotBlank(message="装置mac地址不能为空!")
|
||||
private String mac;
|
||||
|
||||
/**
|
||||
@@ -56,56 +55,12 @@ public class CsEquipmentDeliveryAddParm{
|
||||
@NotBlank(message="装置型号不能为空!")
|
||||
private String devModel;
|
||||
|
||||
// /**
|
||||
// * 装置程序版本
|
||||
// */
|
||||
// @ApiModelProperty(value="装置程序版本")
|
||||
// @NotBlank(message="装置程序版本不能为空!")
|
||||
// private String programVersion;
|
||||
|
||||
// /**
|
||||
// * 调试人员
|
||||
// */
|
||||
// @ApiModelProperty(value="调试人员")
|
||||
// @NotBlank(message="调试人员不能为空!")
|
||||
// private String debugPerson;
|
||||
//
|
||||
// /**
|
||||
// * 出厂日期
|
||||
// */
|
||||
// @ApiModelProperty(value="出厂日期")
|
||||
// @NotNull(message="出厂日期不能为空!")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
// private Date producteTime;
|
||||
//
|
||||
// /**
|
||||
// * 检修日期
|
||||
// */
|
||||
// @ApiModelProperty(value="检修日期")
|
||||
// @NotNull(message="检修日期不能为空!")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
// private Date checkTime;
|
||||
//
|
||||
// /**
|
||||
// * 调试日期
|
||||
// */
|
||||
// @ApiModelProperty(value="调试日期")
|
||||
// @NotNull(message="调试日期不能为空!")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
// private Date debugTime;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ApiModelProperty(value="合同号")
|
||||
private String cntractNo;
|
||||
|
||||
// /**
|
||||
// * 营销经理
|
||||
// */
|
||||
// @ApiModelProperty(value="营销经理")
|
||||
// private String salesManager;
|
||||
|
||||
/**
|
||||
* 装置接入方式
|
||||
*/
|
||||
@@ -127,4 +82,19 @@ public class CsEquipmentDeliveryAddParm{
|
||||
@ApiModelProperty(value="排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value="前置机id")
|
||||
private String nodeId;
|
||||
|
||||
@ApiModelProperty(value="前置机进程号")
|
||||
private Integer nodeProcess;
|
||||
|
||||
@ApiModelProperty(value="模板id")
|
||||
private String modelId;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private String engineeringId;
|
||||
|
||||
@ApiModelProperty(value="项目id")
|
||||
private String projectId;
|
||||
|
||||
}
|
||||
@@ -95,4 +95,10 @@ public class CsEquipmentDeliveryAuditParm {
|
||||
|
||||
@ApiModelProperty(value="排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value="前置机id")
|
||||
private String nodeId;
|
||||
|
||||
@ApiModelProperty(value="前置机进程号")
|
||||
private Integer nodeProcess;
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -18,26 +21,76 @@ public class CsLineParam extends BaseEntity {
|
||||
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private String engineeringId;
|
||||
|
||||
@ApiModelProperty(value="项目id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 装置id
|
||||
*/
|
||||
private String devId;
|
||||
|
||||
/**
|
||||
* 装置mac
|
||||
*/
|
||||
private String devMac;
|
||||
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
private Double volGrade;
|
||||
|
||||
/**
|
||||
* PT变比
|
||||
*/
|
||||
private Double ptRatio;
|
||||
|
||||
/**
|
||||
* CT变比
|
||||
*/
|
||||
private Double ctRatio;
|
||||
|
||||
/**
|
||||
* 接线方式
|
||||
*/
|
||||
private Integer conType;
|
||||
|
||||
/**
|
||||
* PT一次变比
|
||||
*/
|
||||
@Min(value = 1, message = "PT一次变比必须大于等于1")
|
||||
private Double ptRatio;
|
||||
|
||||
/**
|
||||
* PT二次变比
|
||||
*/
|
||||
@Min(value = 1, message = "PT二次变比必须大于等于1")
|
||||
private Double pt2Ratio;
|
||||
|
||||
/**
|
||||
* CT一次变比
|
||||
*/
|
||||
@Min(value = 1, message = "CT一次变比必须大于等于1")
|
||||
private Double ctRatio;
|
||||
|
||||
/**
|
||||
* CT二次变比
|
||||
*/
|
||||
@Min(value = 1, message = "CT二次变比必须大于等于1")
|
||||
private Double ct2Ratio;
|
||||
|
||||
/**
|
||||
* 逻辑子设备id
|
||||
*/
|
||||
private Integer clDid;
|
||||
|
||||
/**
|
||||
* 监测点线路号
|
||||
*/
|
||||
private Integer lineNo;
|
||||
|
||||
/**
|
||||
* 统计间隔
|
||||
*/
|
||||
private Integer lineInterval;
|
||||
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@@ -49,8 +102,44 @@ public class CsLineParam extends BaseEntity {
|
||||
private String dataSetId;
|
||||
|
||||
/**
|
||||
* 统计间隔
|
||||
* 运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)
|
||||
*/
|
||||
private Integer lineInterval;
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 短路容量
|
||||
*/
|
||||
private Double shortCircuitCapacity;
|
||||
|
||||
/**
|
||||
* 设备容量
|
||||
*/
|
||||
private Double devCapacity;
|
||||
|
||||
/**
|
||||
* 基准容量
|
||||
*/
|
||||
private Double basicCapacity;
|
||||
|
||||
/**
|
||||
* 协议容量
|
||||
*/
|
||||
private Double protocolCapacity;
|
||||
|
||||
/**
|
||||
* 监测对象类型
|
||||
*/
|
||||
private String monitorObj;
|
||||
/**
|
||||
* 是否治理(0:未治理 1:已治理)
|
||||
*/
|
||||
private Integer govern;
|
||||
|
||||
/**
|
||||
* 敏感用户ID
|
||||
*/
|
||||
private String monitorUser;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/14
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class NodeParam {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(name = "name",value = "前置服务器名称")
|
||||
@NotBlank(message = "前置机名称不能为空")
|
||||
@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 服务器IP
|
||||
*/
|
||||
@ApiModelProperty(name = "ip",value = "服务器IP")
|
||||
@NotBlank(message = "前置机IP不能为空")
|
||||
@Pattern(regexp = PatternRegex.IP_REGEX, message = ValidMessage.IP_FORMAT_ERROR)
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(name = "remark",value = "描述")
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 状态 前置等级
|
||||
*/
|
||||
@ApiModelProperty(name = "nodeGrade",value = "前置等级")
|
||||
@NotNull(message = "前置机等级不可为空")
|
||||
private Integer nodeGrade;
|
||||
|
||||
/**
|
||||
* 前置机支持最大装置数
|
||||
*/
|
||||
@ApiModelProperty(name = "nodeDevNum",value = "前置机支持最大装置数")
|
||||
@NotNull(message = "前置机支持最大装置数不可为空")
|
||||
@Min(value = 1, message = "装置数不可小于1")
|
||||
@Max(value = 1000, message = "装置数不可大于1000")
|
||||
private Integer nodeDevNum;
|
||||
|
||||
/**
|
||||
* 前置机支持最大进程数量
|
||||
*/
|
||||
@ApiModelProperty(name = "nodeDevNum",value = "前置机支持最大进程数量")
|
||||
@NotNull(message = "前置机支持最大进程数量")
|
||||
@Min(value = 1, message = "最大进程数量不可小于1")
|
||||
@Max(value = 10, message = "最大进程数量不可大于10")
|
||||
private Integer maxProcessNum;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(name = "sort",value = "排序")
|
||||
@NotNull(message = "排序不可为空")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class NodeUpdateParam extends NodeParam {
|
||||
|
||||
/**
|
||||
* 表Id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 前置查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class NodeQueryParam extends BaseParam {
|
||||
@ApiModelProperty("前置等级")
|
||||
private Integer nodeGrade;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserDevParam implements Serializable {
|
||||
|
||||
@ApiModelProperty(value="用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value="设备集合id")
|
||||
private List<String> list;
|
||||
|
||||
}
|
||||
@@ -64,8 +64,6 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
||||
@TableField(value = "dev_access_method")
|
||||
private String devAccessMethod;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@@ -120,4 +118,16 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
||||
@TableField(value = "sort")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 前置服务器IP
|
||||
*/
|
||||
@TableField(value = "node_id")
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 前置进程号
|
||||
*/
|
||||
@TableField(value = "node_process")
|
||||
private Integer nodeProcess;
|
||||
|
||||
}
|
||||
@@ -66,12 +66,24 @@ public class CsLinePO extends BaseEntity {
|
||||
@TableField(value = "pt_ratio")
|
||||
private Double ptRatio;
|
||||
|
||||
/**
|
||||
* PT2次变比
|
||||
*/
|
||||
@TableField(value = "pt2_ratio")
|
||||
private Double pt2Ratio;
|
||||
|
||||
/**
|
||||
* CT变比
|
||||
*/
|
||||
@TableField(value = "ct_ratio")
|
||||
private Double ctRatio;
|
||||
|
||||
/**
|
||||
* CT2变比
|
||||
*/
|
||||
@TableField(value = "ct2_ratio")
|
||||
private Double ct2Ratio;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@@ -86,9 +98,6 @@ public class CsLinePO extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 逻辑子设备id(与模板对应)
|
||||
* 治理监测点 0
|
||||
* 负载监测点 1
|
||||
* 电网监测点 2
|
||||
*/
|
||||
@TableField(value = "clDid")
|
||||
private Integer clDid;
|
||||
@@ -101,4 +110,59 @@ public class CsLinePO extends BaseEntity {
|
||||
*/
|
||||
@TableField(value = "line_interval")
|
||||
private Integer lineInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
@TableField(value = "run_status")
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 监测点线路号
|
||||
*/
|
||||
@TableField(value = "line_no")
|
||||
private Integer lineNo;
|
||||
/**
|
||||
* 监测对象类型
|
||||
*/
|
||||
@TableField(value = "monitor_obj")
|
||||
private String monitorObj;
|
||||
/**
|
||||
* 是否治理(0:未治理 1:已治理)
|
||||
*/
|
||||
@TableField(value = "is_govern")
|
||||
private Integer govern;
|
||||
|
||||
@TableField(value = "monitor_user")
|
||||
private String monitorUser;
|
||||
|
||||
/**
|
||||
* 短路容量
|
||||
*/
|
||||
@TableField(value = "short_circuit_capacity")
|
||||
private Double shortCircuitCapacity;
|
||||
|
||||
/**
|
||||
* 设备容量
|
||||
*/
|
||||
@TableField(value = "dev_capacity")
|
||||
private Double devCapacity;
|
||||
|
||||
/**
|
||||
* 基准容量
|
||||
*/
|
||||
@TableField(value = "basic_capacity")
|
||||
private Double basicCapacity;
|
||||
|
||||
/**
|
||||
* 协议容量
|
||||
*/
|
||||
@TableField(value = "protocol_capacity")
|
||||
private Double protocolCapacity;
|
||||
|
||||
/**
|
||||
* 治理报告文件路径
|
||||
*/
|
||||
@TableField(value = "report_file_path")
|
||||
private String reportFilePath;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_terminal_logs")
|
||||
public class CsTerminalLogs extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 前置服务器id
|
||||
*/
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 进程号
|
||||
*/
|
||||
private Integer nodeProcess;
|
||||
|
||||
/**
|
||||
* 操作类型(0:新增 1:修改 2:删除)
|
||||
*/
|
||||
private Integer operateType;
|
||||
|
||||
/**
|
||||
* 是否推送(0未推送 1已推送)
|
||||
*/
|
||||
private Integer isPush;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-10-09
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("cs_terminal_reply")
|
||||
public class CsTerminalReply extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 消息id
|
||||
*/
|
||||
private String replyId;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 前置id
|
||||
*/
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 进程号
|
||||
*/
|
||||
private Integer processNo;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 是否收到(0:未收到 1:收到)
|
||||
*/
|
||||
private Integer isReceived;
|
||||
|
||||
/**
|
||||
* 接收消息状态码
|
||||
*/
|
||||
private Integer receivedCode;
|
||||
|
||||
/**
|
||||
* 接收消息描述
|
||||
*/
|
||||
private String receivedMsg;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pq_node")
|
||||
public class Node extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 前置序号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 服务器IP
|
||||
*/
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 状态 前置等级
|
||||
*/
|
||||
private Integer nodeGrade;
|
||||
|
||||
/**
|
||||
* 前置机支持最大装置数
|
||||
*/
|
||||
private Integer nodeDevNum;
|
||||
|
||||
|
||||
/**
|
||||
* 前置机支持最大进程数量
|
||||
*/
|
||||
private Integer maxProcessNum;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,953 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.device.biz.utils.COverlimit;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("pq_overlimit")
|
||||
public class Overlimit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点序号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 频率限值
|
||||
*/
|
||||
private Float freqDev;
|
||||
|
||||
/**
|
||||
* 电压波动
|
||||
*/
|
||||
private Float voltageFluctuation;
|
||||
|
||||
/**
|
||||
* 电压上偏差限值
|
||||
*/
|
||||
private Float voltageDev;
|
||||
|
||||
/**
|
||||
* 电压下偏差限值
|
||||
*/
|
||||
private Float uvoltageDev;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度限值
|
||||
*/
|
||||
private Float ubalance;
|
||||
|
||||
/**
|
||||
* 短时电压不平衡度限值
|
||||
*/
|
||||
private Float shortUbalance;
|
||||
|
||||
/**
|
||||
* 闪变限值
|
||||
*/
|
||||
private Float flicker;
|
||||
|
||||
/**
|
||||
* 电压总谐波畸变率限值
|
||||
*/
|
||||
private Float uaberrance;
|
||||
|
||||
/**
|
||||
* 负序电流限值
|
||||
*/
|
||||
private Float iNeg;
|
||||
|
||||
/**
|
||||
* 2次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_2")
|
||||
private Float uharm2;
|
||||
|
||||
/**
|
||||
* 3次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_3")
|
||||
private Float uharm3;
|
||||
|
||||
/**
|
||||
* 4次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_4")
|
||||
private Float uharm4;
|
||||
|
||||
/**
|
||||
* 5次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_5")
|
||||
private Float uharm5;
|
||||
|
||||
/**
|
||||
* 6次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_6")
|
||||
private Float uharm6;
|
||||
|
||||
/**
|
||||
* 7次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_7")
|
||||
private Float uharm7;
|
||||
|
||||
/**
|
||||
* 8次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_8")
|
||||
private Float uharm8;
|
||||
|
||||
/**
|
||||
* 9次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_9")
|
||||
private Float uharm9;
|
||||
|
||||
/**
|
||||
* 10次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_10")
|
||||
private Float uharm10;
|
||||
|
||||
/**
|
||||
* 11次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_11")
|
||||
private Float uharm11;
|
||||
|
||||
/**
|
||||
* 12次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_12")
|
||||
private Float uharm12;
|
||||
|
||||
/**
|
||||
* 13次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_13")
|
||||
private Float uharm13;
|
||||
|
||||
/**
|
||||
* 14次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_14")
|
||||
private Float uharm14;
|
||||
|
||||
/**
|
||||
* 15次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_15")
|
||||
private Float uharm15;
|
||||
|
||||
/**
|
||||
* 16次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_16")
|
||||
private Float uharm16;
|
||||
|
||||
/**
|
||||
* 17次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_17")
|
||||
private Float uharm17;
|
||||
|
||||
/**
|
||||
* 18次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_18")
|
||||
private Float uharm18;
|
||||
|
||||
/**
|
||||
* 19次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_19")
|
||||
private Float uharm19;
|
||||
|
||||
/**
|
||||
* 20次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_20")
|
||||
private Float uharm20;
|
||||
|
||||
/**
|
||||
* 21次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_21")
|
||||
private Float uharm21;
|
||||
|
||||
/**
|
||||
* 22次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_22")
|
||||
private Float uharm22;
|
||||
|
||||
/**
|
||||
* 23次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_23")
|
||||
private Float uharm23;
|
||||
|
||||
/**
|
||||
* 24次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_24")
|
||||
private Float uharm24;
|
||||
|
||||
/**
|
||||
* 25次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_25")
|
||||
private Float uharm25;
|
||||
|
||||
/**
|
||||
* 2次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_26")
|
||||
private Float uharm26;
|
||||
|
||||
/**
|
||||
* 3次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_27")
|
||||
private Float uharm27;
|
||||
|
||||
/**
|
||||
* 4次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_28")
|
||||
private Float uharm28;
|
||||
|
||||
/**
|
||||
* 5次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_29")
|
||||
private Float uharm29;
|
||||
|
||||
/**
|
||||
* 6次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_30")
|
||||
private Float uharm30;
|
||||
|
||||
/**
|
||||
* 7次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_31")
|
||||
private Float uharm31;
|
||||
|
||||
/**
|
||||
* 8次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_32")
|
||||
private Float uharm32;
|
||||
|
||||
/**
|
||||
* 9次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_33")
|
||||
private Float uharm33;
|
||||
|
||||
/**
|
||||
* 10次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_34")
|
||||
private Float uharm34;
|
||||
|
||||
/**
|
||||
* 11次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_35")
|
||||
private Float uharm35;
|
||||
|
||||
/**
|
||||
* 12次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_36")
|
||||
private Float uharm36;
|
||||
|
||||
/**
|
||||
* 13次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_37")
|
||||
private Float uharm37;
|
||||
|
||||
/**
|
||||
* 14次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_38")
|
||||
private Float uharm38;
|
||||
|
||||
/**
|
||||
* 15次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_39")
|
||||
private Float uharm39;
|
||||
|
||||
/**
|
||||
* 16次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_40")
|
||||
private Float uharm40;
|
||||
|
||||
/**
|
||||
* 17次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_41")
|
||||
private Float uharm41;
|
||||
|
||||
/**
|
||||
* 18次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_42")
|
||||
private Float uharm42;
|
||||
|
||||
/**
|
||||
* 19次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_43")
|
||||
private Float uharm43;
|
||||
|
||||
/**
|
||||
* 20次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_44")
|
||||
private Float uharm44;
|
||||
|
||||
/**
|
||||
* 21次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_45")
|
||||
private Float uharm45;
|
||||
|
||||
/**
|
||||
* 22次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_46")
|
||||
private Float uharm46;
|
||||
|
||||
/**
|
||||
* 23次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_47")
|
||||
private Float uharm47;
|
||||
|
||||
/**
|
||||
* 24次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_48")
|
||||
private Float uharm48;
|
||||
|
||||
/**
|
||||
* 25次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_49")
|
||||
private Float uharm49;
|
||||
|
||||
/**
|
||||
* 50次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_50")
|
||||
private Float uharm50;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 2次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_2")
|
||||
private Float iharm2;
|
||||
|
||||
/**
|
||||
* 3次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_3")
|
||||
private Float iharm3;
|
||||
|
||||
/**
|
||||
* 4次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_4")
|
||||
private Float iharm4;
|
||||
|
||||
/**
|
||||
* 5次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_5")
|
||||
private Float iharm5;
|
||||
|
||||
/**
|
||||
* 6次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_6")
|
||||
private Float iharm6;
|
||||
|
||||
/**
|
||||
* 7次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_7")
|
||||
private Float iharm7;
|
||||
|
||||
/**
|
||||
* 8次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_8")
|
||||
private Float iharm8;
|
||||
|
||||
/**
|
||||
* 9次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_9")
|
||||
private Float iharm9;
|
||||
|
||||
/**
|
||||
* 10次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_10")
|
||||
private Float iharm10;
|
||||
|
||||
/**
|
||||
* 11次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_11")
|
||||
private Float iharm11;
|
||||
|
||||
/**
|
||||
* 12次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_12")
|
||||
private Float iharm12;
|
||||
|
||||
/**
|
||||
* 13次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_13")
|
||||
private Float iharm13;
|
||||
|
||||
/**
|
||||
* 14次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_14")
|
||||
private Float iharm14;
|
||||
|
||||
/**
|
||||
* 15次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_15")
|
||||
private Float iharm15;
|
||||
|
||||
/**
|
||||
* 16次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_16")
|
||||
private Float iharm16;
|
||||
|
||||
/**
|
||||
* 17次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_17")
|
||||
private Float iharm17;
|
||||
|
||||
/**
|
||||
* 18次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_18")
|
||||
private Float iharm18;
|
||||
|
||||
/**
|
||||
* 19次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_19")
|
||||
private Float iharm19;
|
||||
|
||||
/**
|
||||
* 20次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_20")
|
||||
private Float iharm20;
|
||||
|
||||
/**
|
||||
* 21次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_21")
|
||||
private Float iharm21;
|
||||
|
||||
/**
|
||||
* 22次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_22")
|
||||
private Float iharm22;
|
||||
|
||||
/**
|
||||
* 23次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_23")
|
||||
private Float iharm23;
|
||||
|
||||
/**
|
||||
* 24次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_24")
|
||||
private Float iharm24;
|
||||
|
||||
/**
|
||||
* 25次谐波电流限值
|
||||
*/
|
||||
@TableField("iharm_25")
|
||||
private Float iharm25;
|
||||
|
||||
/**
|
||||
* 2次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_26")
|
||||
private Float iharm26;
|
||||
|
||||
/**
|
||||
* 3次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_27")
|
||||
private Float iharm27;
|
||||
|
||||
/**
|
||||
* 4次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_28")
|
||||
private Float iharm28;
|
||||
|
||||
/**
|
||||
* 5次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_29")
|
||||
private Float iharm29;
|
||||
|
||||
/**
|
||||
* 6次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_30")
|
||||
private Float iharm30;
|
||||
|
||||
/**
|
||||
* 7次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_31")
|
||||
private Float iharm31;
|
||||
|
||||
/**
|
||||
* 8次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_32")
|
||||
private Float iharm32;
|
||||
|
||||
/**
|
||||
* 9次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_33")
|
||||
private Float iharm33;
|
||||
|
||||
/**
|
||||
* 10次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_34")
|
||||
private Float iharm34;
|
||||
|
||||
/**
|
||||
* 11次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_35")
|
||||
private Float iharm35;
|
||||
|
||||
/**
|
||||
* 12次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_36")
|
||||
private Float iharm36;
|
||||
|
||||
/**
|
||||
* 13次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_37")
|
||||
private Float iharm37;
|
||||
|
||||
/**
|
||||
* 14次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_38")
|
||||
private Float iharm38;
|
||||
|
||||
/**
|
||||
* 15次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_39")
|
||||
private Float iharm39;
|
||||
|
||||
/**
|
||||
* 16次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_40")
|
||||
private Float iharm40;
|
||||
|
||||
/**
|
||||
* 17次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_41")
|
||||
private Float iharm41;
|
||||
|
||||
/**
|
||||
* 18次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_42")
|
||||
private Float iharm42;
|
||||
|
||||
/**
|
||||
* 19次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_43")
|
||||
private Float iharm43;
|
||||
|
||||
/**
|
||||
* 20次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_44")
|
||||
private Float iharm44;
|
||||
|
||||
/**
|
||||
* 21次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_45")
|
||||
private Float iharm45;
|
||||
|
||||
/**
|
||||
* 22次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_46")
|
||||
private Float iharm46;
|
||||
|
||||
/**
|
||||
* 23次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_47")
|
||||
private Float iharm47;
|
||||
|
||||
/**
|
||||
* 24次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_48")
|
||||
private Float iharm48;
|
||||
|
||||
/**
|
||||
* 25次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_49")
|
||||
private Float iharm49;
|
||||
|
||||
/**
|
||||
* 50次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_50")
|
||||
private Float iharm50;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 0.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_1")
|
||||
private Float inuharm1;
|
||||
|
||||
/**
|
||||
* 1.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_2")
|
||||
private Float inuharm2;
|
||||
|
||||
/**
|
||||
* 2.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_3")
|
||||
private Float inuharm3;
|
||||
|
||||
/**
|
||||
* 3.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_4")
|
||||
private Float inuharm4;
|
||||
|
||||
/**
|
||||
* 4.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_5")
|
||||
private Float inuharm5;
|
||||
|
||||
/**
|
||||
* 5.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_6")
|
||||
private Float inuharm6;
|
||||
|
||||
/**
|
||||
* 6.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_7")
|
||||
private Float inuharm7;
|
||||
|
||||
/**
|
||||
* 7.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_8")
|
||||
private Float inuharm8;
|
||||
|
||||
/**
|
||||
* 8.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_9")
|
||||
private Float inuharm9;
|
||||
|
||||
/**
|
||||
* 9.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_10")
|
||||
private Float inuharm10;
|
||||
|
||||
/**
|
||||
* 10.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_11")
|
||||
private Float inuharm11;
|
||||
|
||||
/**
|
||||
* 11.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_12")
|
||||
private Float inuharm12;
|
||||
|
||||
/**
|
||||
* 12.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_13")
|
||||
private Float inuharm13;
|
||||
|
||||
/**
|
||||
* 13.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_14")
|
||||
private Float inuharm14;
|
||||
|
||||
/**
|
||||
* 14.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_15")
|
||||
private Float inuharm15;
|
||||
|
||||
/**
|
||||
* 15.5次间谐波电压限值
|
||||
*/
|
||||
@TableField("inuharm_16")
|
||||
private Float inuharm16;
|
||||
|
||||
public Overlimit(){}
|
||||
|
||||
|
||||
public Overlimit(String lineId, String scaTmp, float fDLRL, float fJZRL, float fXYRL, float fSBRL){
|
||||
float[] fLimit = COverlimit.GetOverLimit(scaTmp, fDLRL, fJZRL, fXYRL, fSBRL);
|
||||
this.id=lineId;
|
||||
this.freqDev=fLimit[0];
|
||||
this.voltageDev=fLimit[1];
|
||||
this.ubalance=fLimit[2];
|
||||
this.flicker=fLimit[3];
|
||||
this.uaberrance=fLimit[4];
|
||||
this.uharm2=fLimit[5];
|
||||
this.uharm3=fLimit[6];
|
||||
this.uharm4=fLimit[7];
|
||||
this.uharm5=fLimit[8];
|
||||
this.uharm6=fLimit[9];
|
||||
this.uharm7=fLimit[10];
|
||||
this.uharm8=fLimit[11];
|
||||
this.uharm9=fLimit[12];
|
||||
this.uharm10=fLimit[13];
|
||||
this.uharm11=fLimit[14];
|
||||
this.uharm12=fLimit[15];
|
||||
this.uharm13=fLimit[16];
|
||||
this.uharm14=fLimit[17];
|
||||
this.uharm15=fLimit[18];
|
||||
this.uharm16=fLimit[19];
|
||||
this.uharm17=fLimit[20];
|
||||
this.uharm18=fLimit[21];
|
||||
this.uharm19=fLimit[22];
|
||||
this.uharm20=fLimit[23];
|
||||
this.uharm21=fLimit[24];
|
||||
this.uharm22=fLimit[25];
|
||||
this.uharm23=fLimit[26];
|
||||
this.uharm24=fLimit[27];
|
||||
this.uharm25=fLimit[28];
|
||||
this.iharm2=fLimit[29];
|
||||
this.iharm3=fLimit[30];
|
||||
this.iharm4=fLimit[31];
|
||||
this.iharm5=fLimit[32];
|
||||
this.iharm6=fLimit[33];
|
||||
this.iharm7=fLimit[34];
|
||||
this.iharm8=fLimit[35];
|
||||
this.iharm9=fLimit[36];
|
||||
this.iharm10=fLimit[37];
|
||||
this.iharm11=fLimit[38];
|
||||
this.iharm12=fLimit[39];
|
||||
this.iharm13=fLimit[40];
|
||||
this.iharm14=fLimit[41];
|
||||
this.iharm15=fLimit[42];
|
||||
this.iharm16=fLimit[43];
|
||||
this.iharm17=fLimit[44];
|
||||
this.iharm18=fLimit[45];
|
||||
this.iharm19=fLimit[46];
|
||||
this.iharm20=fLimit[47];
|
||||
this.iharm21=fLimit[48];
|
||||
this.iharm22=fLimit[49];
|
||||
this.iharm23=fLimit[50];
|
||||
this.iharm24=fLimit[51];
|
||||
this.iharm25=fLimit[52];
|
||||
this.uvoltageDev=fLimit[53];
|
||||
this.iNeg=fLimit[54];
|
||||
this.inuharm1=fLimit[55];
|
||||
this.inuharm2=fLimit[56];
|
||||
this.inuharm3=fLimit[57];
|
||||
this.inuharm4=fLimit[58];
|
||||
this.inuharm5=fLimit[59];
|
||||
this.inuharm6=fLimit[60];
|
||||
this.inuharm7=fLimit[61];
|
||||
this.inuharm8=fLimit[62];
|
||||
this.inuharm9=fLimit[63];
|
||||
this.inuharm10=fLimit[64];
|
||||
this.inuharm11=fLimit[65];
|
||||
this.inuharm12=fLimit[66];
|
||||
this.inuharm13=fLimit[67];
|
||||
this.inuharm14=fLimit[68];
|
||||
this.inuharm15=fLimit[69];
|
||||
this.inuharm16=fLimit[70];
|
||||
}
|
||||
|
||||
public void buildIHarm(Float[] iHarmTem){
|
||||
this.iharm2= iHarmTem[0];
|
||||
this.iharm4= iHarmTem[2];
|
||||
this.iharm6= iHarmTem[4];
|
||||
this.iharm8= iHarmTem[6];
|
||||
this.iharm10= iHarmTem[8];
|
||||
this.iharm12= iHarmTem[10];
|
||||
this.iharm14= iHarmTem[12];
|
||||
this.iharm16= iHarmTem[14];
|
||||
this.iharm18= iHarmTem[16];
|
||||
this.iharm20= iHarmTem[18];
|
||||
this.iharm22= iHarmTem[20];
|
||||
this.iharm24= iHarmTem[22];
|
||||
this.iharm26= iHarmTem[24];
|
||||
this.iharm28= iHarmTem[26];
|
||||
this.iharm30= iHarmTem[28];
|
||||
this.iharm32= iHarmTem[30];
|
||||
this.iharm34= iHarmTem[32];
|
||||
this.iharm36= iHarmTem[34];
|
||||
this.iharm38= iHarmTem[36];
|
||||
this.iharm40= iHarmTem[38];
|
||||
this.iharm42= iHarmTem[40];
|
||||
this.iharm44= iHarmTem[42];
|
||||
this.iharm46= iHarmTem[44];
|
||||
this.iharm48= iHarmTem[46];
|
||||
this.iharm50= iHarmTem[48];
|
||||
|
||||
|
||||
|
||||
this.iharm3= iHarmTem[1];
|
||||
this.iharm5= iHarmTem[3];
|
||||
this.iharm7= iHarmTem[5];
|
||||
this.iharm9= iHarmTem[7];
|
||||
this.iharm11= iHarmTem[9];
|
||||
this.iharm13= iHarmTem[11];
|
||||
this.iharm15= iHarmTem[13];
|
||||
this.iharm17= iHarmTem[15];
|
||||
this.iharm19= iHarmTem[17];
|
||||
this.iharm21= iHarmTem[19];
|
||||
this.iharm23= iHarmTem[21];
|
||||
this.iharm25= iHarmTem[23];
|
||||
this.iharm27= iHarmTem[25];
|
||||
this.iharm29= iHarmTem[27];
|
||||
this.iharm31= iHarmTem[29];
|
||||
this.iharm33= iHarmTem[31];
|
||||
this.iharm35= iHarmTem[33];
|
||||
this.iharm37= iHarmTem[35];
|
||||
this.iharm39= iHarmTem[37];
|
||||
this.iharm41= iHarmTem[39];
|
||||
this.iharm43= iHarmTem[41];
|
||||
this.iharm45= iHarmTem[43];
|
||||
this.iharm47= iHarmTem[45];
|
||||
this.iharm49= iHarmTem[47];
|
||||
}
|
||||
|
||||
public void buildUharm(Float resultEven,Float resultOdd){
|
||||
this.uharm2=resultEven;
|
||||
this.uharm4=resultEven;
|
||||
this.uharm6=resultEven;
|
||||
this.uharm8=resultEven;
|
||||
this.uharm10=resultEven;
|
||||
this.uharm12=resultEven;
|
||||
this.uharm14=resultEven;
|
||||
this.uharm16=resultEven;
|
||||
this.uharm18=resultEven;
|
||||
this.uharm20=resultEven;
|
||||
this.uharm22=resultEven;
|
||||
this.uharm24=resultEven;
|
||||
this.uharm26=resultEven;
|
||||
this.uharm28=resultEven;
|
||||
this.uharm30=resultEven;
|
||||
this.uharm32=resultEven;
|
||||
this.uharm34=resultEven;
|
||||
this.uharm36=resultEven;
|
||||
this.uharm38=resultEven;
|
||||
this.uharm40=resultEven;
|
||||
this.uharm42=resultEven;
|
||||
this.uharm44=resultEven;
|
||||
this.uharm46=resultEven;
|
||||
this.uharm48=resultEven;
|
||||
this.uharm50=resultEven;
|
||||
|
||||
|
||||
this.uharm3=resultOdd;
|
||||
this.uharm5=resultOdd;
|
||||
this.uharm7=resultOdd;
|
||||
this.uharm9=resultOdd;
|
||||
this.uharm11=resultOdd;
|
||||
this.uharm13=resultOdd;
|
||||
this.uharm15=resultOdd;
|
||||
this.uharm17=resultOdd;
|
||||
this.uharm19=resultOdd;
|
||||
this.uharm21=resultOdd;
|
||||
this.uharm23=resultOdd;
|
||||
this.uharm25=resultOdd;
|
||||
this.uharm27=resultOdd;
|
||||
this.uharm29=resultOdd;
|
||||
this.uharm31=resultOdd;
|
||||
this.uharm33=resultOdd;
|
||||
this.uharm35=resultOdd;
|
||||
this.uharm37=resultOdd;
|
||||
this.uharm39=resultOdd;
|
||||
this.uharm41=resultOdd;
|
||||
this.uharm43=resultOdd;
|
||||
this.uharm45=resultOdd;
|
||||
this.uharm47=resultOdd;
|
||||
this.uharm49=resultOdd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/ //台账信息
|
||||
@Data
|
||||
public class CldLedgerVo implements Serializable {
|
||||
|
||||
@ApiModelProperty("工程id")
|
||||
private String engineeringId;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@ApiModelProperty(value = "省")
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty(value = "市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty(value = "工程描述")
|
||||
private String engineeringDescription;
|
||||
|
||||
@ApiModelProperty(value = "项目信息")
|
||||
private List<AppProjectPO> projectInfoList;
|
||||
|
||||
@ApiModelProperty(value = "设备信息")
|
||||
private List<CsEquipmentDeliveryPO> deviceInfoList;
|
||||
|
||||
@ApiModelProperty(value = "监测点信息")
|
||||
private List<CsLinePO> lineInfoList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* 日志信息
|
||||
*/
|
||||
@Data
|
||||
public class CldLogsVo implements Serializable {
|
||||
|
||||
@ApiModelProperty("工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty("补召类型")
|
||||
private String log;
|
||||
|
||||
@ApiModelProperty("补召时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime logTime;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("结果")
|
||||
private String result;
|
||||
|
||||
}
|
||||
@@ -91,4 +91,7 @@ public class CsEquipmentDeliveryVO extends BaseEntity {
|
||||
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value="前置服务器id")
|
||||
private String nodeId ;
|
||||
|
||||
}
|
||||
@@ -23,6 +23,9 @@ public class CsLedgerVO implements Serializable {
|
||||
@ApiModelProperty(name = "pid",value = "父id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(name = "pids",value = "父id集合")
|
||||
private String pids;
|
||||
|
||||
@ApiModelProperty(name = "name",value = "名称")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -60,6 +61,12 @@ public class DataGroupEventVO {
|
||||
@ApiModelProperty("暂降幅值")
|
||||
private Float featureAmplitude;
|
||||
|
||||
@ApiModelProperty("映射数据库暂降幅值")
|
||||
private Double amplitude;
|
||||
|
||||
@ApiModelProperty("严重度")
|
||||
private String severity;
|
||||
|
||||
@ApiModelProperty("波形路径")
|
||||
private String wavePath;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEquipmentAlarmVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
//台账信息
|
||||
@Data
|
||||
public class DeviceInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("终端索引")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("终端mac")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("终端型号")
|
||||
private String devType;
|
||||
|
||||
@ApiModelProperty("终端名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("前置机序号")
|
||||
private Integer node;
|
||||
|
||||
@ApiModelProperty("开启的进程数")
|
||||
private Integer maxProcessNum;
|
||||
|
||||
@ApiModelProperty("对时启动标志")
|
||||
private boolean rightTime;
|
||||
|
||||
@ApiModelProperty("监测点集合")
|
||||
private List<MonitorInfo> monitorData;
|
||||
|
||||
//终端下的监测点信息
|
||||
@Data
|
||||
public static class MonitorInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("监测点索引")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("监测点逻辑号")
|
||||
private String lineNo;
|
||||
|
||||
@ApiModelProperty("监测点电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty("监测点运行状态 0:运行;1:检修;2:停运;3:调试;4:退运")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("监测点接线方式 0-星型 1-角型 2-V型")
|
||||
private String ptType;
|
||||
|
||||
@ApiModelProperty("装置id")
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty("pt1")
|
||||
private Double pt1;
|
||||
|
||||
@ApiModelProperty("pt2")
|
||||
private Double pt2;
|
||||
|
||||
@ApiModelProperty("ct1")
|
||||
private Double ct1;
|
||||
|
||||
@ApiModelProperty("ct2")
|
||||
private Double ct2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/23
|
||||
* 监测点信息
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LineDetailDataVO {
|
||||
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(name = "id",value = "监测点序号")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(name = "lineName",value = "监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty(name = "areaName",value = "工程名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(name = "gdName",value = "单位")
|
||||
private String gdName;
|
||||
|
||||
@ApiModelProperty(name = "bdName",value = "部门")
|
||||
private String bdName;
|
||||
|
||||
@ApiModelProperty(name = "scale",value = "电压等级")
|
||||
private String scale;
|
||||
|
||||
@ApiModelProperty(name = "manufacturer",value = "厂家")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty(name = "devId",value = "终端Id")
|
||||
private String devId;
|
||||
|
||||
@ApiModelProperty(name = "devName",value = "终端名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty(name = "ip",value = "网络参数")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty(name = "runFlag",value = "终端运行状态")
|
||||
private String runFlag;
|
||||
|
||||
@ApiModelProperty(name = "comFlag",value = "通讯状态")
|
||||
private String comFlag;
|
||||
|
||||
@ApiModelProperty(name = "loadType",value = "干扰源类型")
|
||||
private String loadType;
|
||||
|
||||
@ApiModelProperty(name = "businessType",value = "行业类型")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty(name = "objName",value = "监测点对象名称")
|
||||
private String objName;
|
||||
|
||||
@ApiModelProperty(name = "ptType",value = "接线方式")
|
||||
private String ptType;
|
||||
|
||||
@ApiModelProperty(name = "pt",value = "PT变比")
|
||||
private String pt;
|
||||
|
||||
@ApiModelProperty(name = "ct",value = "CT变比")
|
||||
private String ct;
|
||||
|
||||
@ApiModelProperty(name = "standardCapacity",value = "基准容量(MVA)")
|
||||
private Float standardCapacity;
|
||||
|
||||
@ApiModelProperty(name = "shortCapacity",value = "最小短路容量(MVA)")
|
||||
private Float shortCapacity;
|
||||
|
||||
@ApiModelProperty(name = "devCapacity",value = "供电设备容量(MVA)")
|
||||
private Float devCapacity;
|
||||
|
||||
@ApiModelProperty(name = "dealCapacity",value = "用户协议容量(MVA)")
|
||||
private Float dealCapacity;
|
||||
|
||||
@ApiModelProperty(name = "powerFlag",value = "电网标志(0-电网侧;1-非电网侧)")
|
||||
private Integer powerFlag;
|
||||
|
||||
/**
|
||||
* 测量间隔(1-10分钟)
|
||||
*/
|
||||
@ApiModelProperty(name = "timeInterval",value = "测量间隔(1-10分钟)")
|
||||
private Integer timeInterval;
|
||||
|
||||
/**
|
||||
* 监测点拥有者
|
||||
*/
|
||||
@ApiModelProperty(name = "owner",value = "监测点拥有者")
|
||||
private String owner;
|
||||
|
||||
/**
|
||||
* 拥有者职务
|
||||
*/
|
||||
@ApiModelProperty(name = "ownerDuty",value = "拥有者职务")
|
||||
private String ownerDuty;
|
||||
|
||||
/**
|
||||
* 拥有者联系方式
|
||||
*/
|
||||
@ApiModelProperty(name = "ownerTel",value = "拥有者联系方式")
|
||||
private String ownerTel;
|
||||
|
||||
/**
|
||||
* 接线图
|
||||
*/
|
||||
@ApiModelProperty(name = "wiringDiagram",value = "接线图")
|
||||
private String wiringDiagram;
|
||||
@ApiModelProperty(name = "ptPhaseType",value = "监测点接线相别(0,单相,1,三相,默认三相)")
|
||||
private Integer ptPhaseType;
|
||||
|
||||
@ApiModelProperty(name = "投运日期")
|
||||
private LocalDate loginTime;
|
||||
|
||||
@ApiModelProperty(name = "最新数据时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(name = "监测对象信息ID")
|
||||
private String objId;
|
||||
|
||||
@ApiModelProperty(name = "对象类型大类")
|
||||
private String bigObjType;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/23
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LineOverLimitVO {
|
||||
|
||||
@ApiModelProperty(name = "freqDev",value = "频率限值")
|
||||
private Float freqDev;
|
||||
|
||||
@ApiModelProperty(name = "voltageDev",value = "电压上偏差限值")
|
||||
private Float voltageDev;
|
||||
|
||||
@ApiModelProperty(name = "uvoltageDev",value = "电压下偏差限值")
|
||||
private Float uvoltageDev;
|
||||
|
||||
@ApiModelProperty(name = "ubalance",value = "三相电压不平衡度限值")
|
||||
private Float ubalance;
|
||||
|
||||
@ApiModelProperty(name = "iNeg",value = "负序电流")
|
||||
private Float iNeg;
|
||||
|
||||
@ApiModelProperty(name = "flicker",value = "长时闪变限值")
|
||||
private Float flicker;
|
||||
|
||||
@ApiModelProperty(name = "uaberrance",value = "电压总谐波畸变率限值")
|
||||
private Float uaberrance;
|
||||
|
||||
@ApiModelProperty(name = "oddHarm",value = "奇次谐波含有率限值")
|
||||
private Float oddHarm;
|
||||
|
||||
@ApiModelProperty(name = "evenHarm",value = "偶次谐波含有率限值")
|
||||
private Float evenHarm;
|
||||
|
||||
@ApiModelProperty(name = "iharm2",value = "2次谐波电流幅值限值")
|
||||
private Float iharm2;
|
||||
|
||||
@ApiModelProperty(name = "iharm3",value = "3次谐波电流幅值限值")
|
||||
private Float iharm3;
|
||||
|
||||
@ApiModelProperty(name = "iharm4",value = "4次谐波电流幅值限值")
|
||||
private Float iharm4;
|
||||
|
||||
@ApiModelProperty(name = "iharm5",value = "5次谐波电流幅值限值")
|
||||
private Float iharm5;
|
||||
|
||||
@ApiModelProperty(name = "iharm6",value = "6次谐波电流幅值限值")
|
||||
private Float iharm6;
|
||||
|
||||
@ApiModelProperty(name = "iharm7",value = "7次谐波电流幅值限值")
|
||||
private Float iharm7;
|
||||
|
||||
@ApiModelProperty(name = "iharm8",value = "8次谐波电流幅值限值")
|
||||
private Float iharm8;
|
||||
|
||||
@ApiModelProperty(name = "iharm9",value = "9次谐波电流幅值限值")
|
||||
private Float iharm9;
|
||||
|
||||
@ApiModelProperty(name = "iharm10",value = "10次谐波电流幅值限值")
|
||||
private Float iharm10;
|
||||
|
||||
@ApiModelProperty(name = "iharm11",value = "11次谐波电流幅值限值")
|
||||
private Float iharm11;
|
||||
|
||||
@ApiModelProperty(name = "iharm12",value = "12次谐波电流幅值限值")
|
||||
private Float iharm12;
|
||||
|
||||
@ApiModelProperty(name = "iharm13",value = "13次谐波电流幅值限值")
|
||||
private Float iharm13;
|
||||
|
||||
@ApiModelProperty(name = "iharm14",value = "14次谐波电流幅值限值")
|
||||
private Float iharm14;
|
||||
|
||||
@ApiModelProperty(name = "iharm15",value = "15次谐波电流幅值限值")
|
||||
private Float iharm15;
|
||||
|
||||
@ApiModelProperty(name = "iharm16",value = "16次谐波电流幅值限值")
|
||||
private Float iharm16;
|
||||
|
||||
@ApiModelProperty(name = "iharm17",value = "17次谐波电流幅值限值")
|
||||
private Float iharm17;
|
||||
|
||||
@ApiModelProperty(name = "iharm18",value = "18次谐波电流幅值限值")
|
||||
private Float iharm18;
|
||||
|
||||
@ApiModelProperty(name = "iharm19",value = "19次谐波电流幅值限值")
|
||||
private Float iharm19;
|
||||
|
||||
@ApiModelProperty(name = "iharm20",value = "20次谐波电流幅值限值")
|
||||
private Float iharm20;
|
||||
|
||||
@ApiModelProperty(name = "iharm21",value = "21次谐波电流幅值限值")
|
||||
private Float iharm21;
|
||||
|
||||
@ApiModelProperty(name = "iharm22",value = "22次谐波电流幅值限值")
|
||||
private Float iharm22;
|
||||
|
||||
@ApiModelProperty(name = "iharm23",value = "23次谐波电流幅值限值")
|
||||
private Float iharm23;
|
||||
|
||||
@ApiModelProperty(name = "iharm24",value = "24次谐波电流幅值限值")
|
||||
private Float iharm24;
|
||||
|
||||
@ApiModelProperty(name = "iharm25",value = "25次谐波电流幅值限值")
|
||||
private Float iharm25;
|
||||
|
||||
@ApiModelProperty(name = "inUharm",value = "0.5-1.5次间谐波电压幅值限值")
|
||||
private Float inUharm;
|
||||
|
||||
@ApiModelProperty(name = "inUharm16",value = "2.5-15.5次间谐波电压幅值限值")
|
||||
private Float inUharm16;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class NodeProcessDeviceVo implements Serializable {
|
||||
|
||||
private Node node;
|
||||
|
||||
private List<ProcessDevice> processDeviceList;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public static class ProcessDevice implements Serializable{
|
||||
private Integer processNo;
|
||||
private String processState;
|
||||
private List<CsEquipmentDeliveryPO> deviceInfoList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class PqSensitiveUserLineVO {
|
||||
@ApiModelProperty("治理对象")
|
||||
private String sensitiveUser;
|
||||
@ApiModelProperty("监测点ID")
|
||||
private String lineId;
|
||||
@ApiModelProperty("测点名称")
|
||||
private String lineName;
|
||||
@ApiModelProperty("是否治理")
|
||||
private String govern;
|
||||
@ApiModelProperty("电压等级")
|
||||
private double volGrade;
|
||||
@ApiModelProperty("监测类型")
|
||||
private String position;
|
||||
@ApiModelProperty("运行状态")
|
||||
private String runStatus;
|
||||
@ApiModelProperty("报告文件")
|
||||
private String reportFilePath;
|
||||
@ApiModelProperty("最新数据时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime latestTime;
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
package com.njcn.csdevice.utils;
|
||||
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.enums.RunFlagEnum;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 限值计算工具类
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/5/15
|
||||
*/
|
||||
public class COverlimitUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 谐波电流系数
|
||||
*/
|
||||
private static final double[][] ARR = {
|
||||
{78, 62, 39, 62, 26, 44, 19, 21, 16, 28, 13, 24, 11, 12, 9.7, 18, 8.6, 16, 7.8, 8.9, 7.1, 14, 6.5, 12, 6.0, 6.9, 5.6, 11, 5.2, 10, 4.9, 5.6, 4.6, 8.9, 4.3, 8.4, 4.1, 4.8, 3.9, 7.6, 3.7, 7.2, 3.5, 4.1, 3.4, 6.6, 3.3, 6.3, 3.1},
|
||||
{43, 34, 21, 34, 14, 24, 11, 11, 8.5, 16, 7.1, 13, 6.1, 6.8, 5.3, 10, 4.7, 9, 4.3, 4.9, 3.9, 7.4, 3.6, 6.8, 3.3, 3.8, 3.1, 5.9, 2.9, 5.5, 2.7, 3.1, 2.5, 4.9, 2.4, 4.6, 2.3, 2.6, 2.2, 4.1, 2.0, 4.0, 2.0, 2.3, 1.9, 3.6, 1.8, 3.5, 1.7},
|
||||
{26, 20, 13, 20, 8.5, 15, 6.4, 6.8, 5.1, 9.3, 4.3, 7.9, 3.7, 4.1, 3.2, 6, 2.8, 5.4, 2.6, 2.9, 2.3, 4.5, 2.1, 4.1, 2.0, 2.2, 1.9, 3.4, 1.7, 3.2, 1.6, 1.8, 1.5, 2.9, 1.4, 2.7, 1.4, 1.5, 1.3, 2.4, 1.2, 2.3, 1.2, 1.3, 1.1, 2.1, 1.1, 2.0, 1.0},
|
||||
{15, 12, 7.7, 12, 5.1, 8.8, 3.8, 4.1, 3.1, 5.6, 2.6, 4.7, 2.2, 2.5, 1.9, 3.6, 1.7, 3.2, 1.5, 1.8, 1.4, 2.7, 1.3, 2.5, 1.2, 1.3, 1.1, 2.1, 1.0, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.6, 0.8, 0.9, 0.8, 1.5, 0.7, 1.4, 0.7, 0.8, 0.7, 1.3, 0.6, 1.2, 0.6},
|
||||
{16, 13, 8.1, 13, 5.4, 9.3, 4.1, 4.3, 3.3, 5.9, 2.7, 5, 2.3, 2.6, 2, 3.8, 1.8, 3.4, 1.6, 1.9, 1.5, 2.8, 1.4, 2.6, 1.2, 1.4, 1.1, 2.2, 1.1, 2.1, 1.0, 1.2, 0.9, 1.9, 0.9, 1.8, 0.8, 1.0, 0.8, 1.6, 0.8, 1.5, 0.7, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6},
|
||||
{12, 9.6, 6, 9.6, 4, 6.8, 3, 3.2, 2.4, 4.3, 2, 3.7, 1.7, 1.9, 1.5, 2.8, 1.3, 2.5, 1.2, 1.4, 1.1, 2.1, 1, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.5, 0.8, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6, 0.7, 0.6, 1.2, 0.6, 1.1, 0.5, 0.6, 0.5, 1.0, 0.5, 1.0, 0.5}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 计算监测点限值
|
||||
* @param voltageLevel 电压等级(10kV = 10 220kV = 220 )
|
||||
* @param protocolCapacity 协议容量
|
||||
* @param devCapacity 设备容量
|
||||
* @param shortCapacity 短路容量
|
||||
* @param powerFlag 0.用户侧 1.电网侧
|
||||
* @param lineType 0.主网 1.配网 需要注意配网目前没有四种容量,谐波电流幅值限值,负序电流限值无法计算默认-3.14159
|
||||
*/
|
||||
public static Overlimit globalAssemble(Float voltageLevel, Float protocolCapacity, Float devCapacity,
|
||||
Float shortCapacity, Integer powerFlag, Integer lineType) {
|
||||
Overlimit overlimit = new Overlimit();
|
||||
voltageDeviation(overlimit,voltageLevel);
|
||||
frequency(overlimit);
|
||||
voltageFluctuation(overlimit,voltageLevel);
|
||||
voltageFlicker(overlimit,voltageLevel);
|
||||
totalHarmonicDistortion(overlimit,voltageLevel);
|
||||
uHarm(overlimit,voltageLevel);
|
||||
threeVoltageUnbalance(overlimit);
|
||||
interharmonicCurrent(overlimit,voltageLevel);
|
||||
|
||||
if(Objects.equals(lineType, RunFlagEnum.PW_FLAG.getStatus())) {
|
||||
//配网
|
||||
Float[] iHarmTem = new Float[49];
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
|
||||
iHarmTem[i] = -3.14159f;
|
||||
}
|
||||
overlimit.buildIHarm(iHarmTem);
|
||||
overlimit.setINeg(-3.14159f);
|
||||
}else {
|
||||
//主网
|
||||
iHarm(overlimit, voltageLevel, protocolCapacity, devCapacity, shortCapacity);
|
||||
negativeSequenceCurrent(overlimit, voltageLevel, shortCapacity);
|
||||
}
|
||||
return overlimit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电压偏差限值
|
||||
*
|
||||
*/
|
||||
public static void voltageDeviation(Overlimit overlimit,Float voltageLevel) {
|
||||
float voltageDev = 3.14159f,uvoltageDev = 3.14159f;
|
||||
if(voltageLevel <= Float.parseFloat(DicDataEnum.V220.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.V220.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV20.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV35.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV66.getCode())&&voltageLevel<=Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-3.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}
|
||||
overlimit.setVoltageDev(voltageDev);
|
||||
overlimit.setUvoltageDev(uvoltageDev);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 频率偏差
|
||||
* 默认限值:±0.2Hz(即:-0.2 Hz≤限值≤0.2 Hz)
|
||||
*/
|
||||
public static void frequency(Overlimit overlimit) {
|
||||
overlimit.setFreqDev(0.2f);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电压波动
|
||||
* 对LV、MV:0≤限值≤3%;对HV:0≤限值≤2.5%。
|
||||
* LV、MV、HV的定义:
|
||||
* 低压(LV) UN≤1kV
|
||||
* 中压(MV) 1kV<UN≤35kV
|
||||
* 高压(HV) 35kV<UN≤220kV
|
||||
* 超高压(EHV),220kV<UN,参照HV执行
|
||||
*/
|
||||
public static void voltageFluctuation(Overlimit overlimit, Float voltageLevel) {
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV35.getCode())) {
|
||||
overlimit.setVoltageFluctuation(3.0f);
|
||||
} else {
|
||||
overlimit.setVoltageFluctuation(2.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 电压闪变
|
||||
* ≤110kV 1
|
||||
* >110kV 0.8
|
||||
*/
|
||||
public static void voltageFlicker(Overlimit overlimit, Float voltageLevel) {
|
||||
if (voltageLevel <= Float.parseFloat(DicDataEnum.KV110.getCode())) {
|
||||
overlimit.setFlicker(1.0f);
|
||||
} else {
|
||||
overlimit.setFlicker(0.8f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 总谐波电压畸变率
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void totalHarmonicDistortion(Overlimit overlimit, Float voltageLevel) {
|
||||
float result = 3.14159f;
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV6.getCode())) {
|
||||
result = 5.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV6.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
result = 4.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV35.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
result = 3.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV110.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV1000.getCode())){
|
||||
result = 2.0f;
|
||||
}
|
||||
overlimit.setUaberrance(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 谐波电压含有率
|
||||
*/
|
||||
public static void uHarm(Overlimit overlimit, Float voltageLevel) {
|
||||
float resultOdd = 3.14159f,resultEven = 3.14159f;
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV6.getCode())) {
|
||||
resultOdd = 4.0f;
|
||||
resultEven = 2.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV6.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
resultOdd = 3.2f;
|
||||
resultEven = 1.6f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV35.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
resultOdd = 2.4f;
|
||||
resultEven = 1.2f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV110.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV1000.getCode())){
|
||||
resultOdd = 1.6f;
|
||||
resultEven = 0.8f;
|
||||
}
|
||||
overlimit.buildUharm(resultEven,resultOdd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 负序电压不平衡(三相电压不平衡度)
|
||||
*
|
||||
*/
|
||||
public static void threeVoltageUnbalance(Overlimit overlimit) {
|
||||
overlimit.setUbalance(2.0f);
|
||||
overlimit.setShortUbalance(4.0f);
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------谐波电流限值start-----------------------------------*/
|
||||
|
||||
/**
|
||||
* 谐波电流限值
|
||||
*/
|
||||
public static void iHarm(Overlimit overlimit, Float voltageLevel,Float protocolCapacity,Float devCapacity,Float shortCapacity) {
|
||||
float calCap = shortCapacity/getDlCapByVoltageLevel(voltageLevel);
|
||||
//24谐波电流幅值
|
||||
Float[] iHarmTem = new Float[49];
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
float inHarm = iHarmCalculate(i+2,voltageLevel,protocolCapacity,devCapacity,calCap);
|
||||
iHarmTem[i] = inHarm;
|
||||
}
|
||||
overlimit.buildIHarm(iHarmTem);
|
||||
}
|
||||
/**
|
||||
* @Description: iHarmCalculate
|
||||
* @Param: protocolCapacity 协议容量 devCapacity设备容量 calCap 短路容量
|
||||
* @return: float
|
||||
* @Author: clam
|
||||
* @Date: 2024/2/4
|
||||
*/
|
||||
private static float iHarmCalculate(int nHarm, Float voltageLevel,float protocolCapacity, float devCapacity,float calCap) {
|
||||
double tag = calCap*getHarmTag(nHarm,voltageLevel);
|
||||
Double limit = getHarmonicLimit(nHarm,tag,new BigDecimal(String.valueOf(devCapacity)).doubleValue(),new BigDecimal(String.valueOf(protocolCapacity)).doubleValue());
|
||||
BigDecimal bigDecimal = BigDecimal.valueOf(limit).setScale(4,RoundingMode.HALF_UP);
|
||||
return bigDecimal.floatValue();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电流谐波限值
|
||||
*/
|
||||
private static Double getHarmTag(Integer iCount, Float voltageLevel) {
|
||||
int x, y;
|
||||
if (voltageLevel < DicDataEnum.KV6.getValue()) {
|
||||
x = 0;
|
||||
} else if (voltageLevel<DicDataEnum.KV10.getValue()) {
|
||||
x = 1;
|
||||
} else if (voltageLevel<DicDataEnum.KV35.getValue()) {
|
||||
x = 2;
|
||||
} else if (voltageLevel<DicDataEnum.KV66.getValue()) {
|
||||
x = 3;
|
||||
} else if (voltageLevel<DicDataEnum.KV110.getValue()) {
|
||||
x = 4;
|
||||
} else {
|
||||
x = 5;
|
||||
}
|
||||
y = iCount - 2;
|
||||
return ARR[x][y];
|
||||
}
|
||||
|
||||
/**
|
||||
* 相位叠加系数的取值
|
||||
*/
|
||||
public static Double getHarmonicLimit(Integer times, double iTag, double supply, double user) {
|
||||
if (supply == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
double coefficient = 2.0;
|
||||
if (times == 3) {
|
||||
coefficient = 1.1;
|
||||
} else if (times == 5) {
|
||||
coefficient = 1.2;
|
||||
} else if (times == 7) {
|
||||
coefficient = 1.4;
|
||||
} else if (times == 11) {
|
||||
coefficient = 1.8;
|
||||
} else if (times == 13) {
|
||||
coefficient = 1.9;
|
||||
}
|
||||
BigDecimal bd = new BigDecimal(iTag * Math.pow((user / supply), (1 / coefficient)));
|
||||
bd = bd.setScale(6, RoundingMode.HALF_UP);
|
||||
return Double.parseDouble(bd.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据电压等级获取基准短路容量
|
||||
*/
|
||||
public static float getDlCapByVoltageLevel(Float voltageLevel){
|
||||
float capValue;
|
||||
if(voltageLevel< DicDataEnum.KV06.getValue()){
|
||||
capValue = 10;
|
||||
}else if(voltageLevel<DicDataEnum.KV20.getValue()){
|
||||
capValue = 100;
|
||||
}else if(voltageLevel<DicDataEnum.KV35.getValue()){
|
||||
capValue = 200;
|
||||
}else if(voltageLevel<DicDataEnum.KV66.getValue()){
|
||||
capValue = 250;
|
||||
}else if(voltageLevel<DicDataEnum.KV110.getValue()){
|
||||
capValue = 500;
|
||||
}else if(voltageLevel<DicDataEnum.KV220.getValue()){
|
||||
capValue = 750;
|
||||
}else if(voltageLevel<DicDataEnum.KV330.getValue()){
|
||||
capValue = 2000;
|
||||
}else if(voltageLevel<DicDataEnum.KV500.getValue()){
|
||||
capValue = 3000;
|
||||
}else if(voltageLevel<DicDataEnum.KV750.getValue()){
|
||||
capValue = 4500;
|
||||
}else if(voltageLevel<DicDataEnum.KV1000.getValue()){
|
||||
capValue = 7000;
|
||||
}else {
|
||||
capValue = 9000;
|
||||
}
|
||||
return capValue;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------谐波电流限值end-----------------------------------*/
|
||||
|
||||
|
||||
/**
|
||||
* 间谐波电压含有率
|
||||
*/
|
||||
|
||||
public static void interharmonicCurrent(Overlimit overlimit,Float voltageLevel){
|
||||
float aValue,bValue;
|
||||
if(voltageLevel <= DicDataEnum.KV1.getValue()){
|
||||
aValue = 0.2f;bValue = 0.5f;
|
||||
}else {
|
||||
aValue = 0.16f;bValue = 0.4f;
|
||||
}
|
||||
overlimit.setInuharm1(aValue);
|
||||
overlimit.setInuharm2(aValue);
|
||||
|
||||
overlimit.setInuharm3(bValue);
|
||||
overlimit.setInuharm4(bValue);
|
||||
overlimit.setInuharm5(bValue);
|
||||
overlimit.setInuharm6(bValue);
|
||||
overlimit.setInuharm7(bValue);
|
||||
overlimit.setInuharm8(bValue);
|
||||
overlimit.setInuharm9(bValue);
|
||||
overlimit.setInuharm10(bValue);
|
||||
overlimit.setInuharm11(bValue);
|
||||
overlimit.setInuharm12(bValue);
|
||||
overlimit.setInuharm13(bValue);
|
||||
overlimit.setInuharm14(bValue);
|
||||
overlimit.setInuharm15(bValue);
|
||||
overlimit.setInuharm16(bValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 负序电流限值
|
||||
*/
|
||||
public static void negativeSequenceCurrent(Overlimit overlimit,Float voltageLevel,Float shortCapacity){
|
||||
double v = (0.013*shortCapacity*1000)/(getUl(voltageLevel)*Math.sqrt(3));
|
||||
overlimit.setINeg((float) v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取额定线电压
|
||||
*/
|
||||
private static float getUl(Float voltageLevel){
|
||||
float value;
|
||||
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
||||
value = 0.4f;
|
||||
}else if(voltageLevel<DicDataEnum.KV10.getValue()){
|
||||
value = 6.3f;
|
||||
}else if(voltageLevel<DicDataEnum.KV20.getValue()){
|
||||
value = 10.5f;
|
||||
}else if(voltageLevel<DicDataEnum.KV35.getValue()){
|
||||
value = 21.0f;
|
||||
}else if(voltageLevel<DicDataEnum.KV66.getValue()){
|
||||
value = 36.5f;
|
||||
}else if(voltageLevel<DicDataEnum.KV110.getValue()){
|
||||
value = 69.0f;
|
||||
}else if(voltageLevel<DicDataEnum.KV220.getValue()){
|
||||
value = 115.5f;
|
||||
}else if(voltageLevel<DicDataEnum.KV330.getValue()){
|
||||
value = 230.0f;
|
||||
}else {
|
||||
value = 345.0f;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("sss");
|
||||
float aa = iHarmCalculate(9,500f,10,10,0.002222222222f);
|
||||
|
||||
System.out.println(aa);
|
||||
}
|
||||
}
|
||||
@@ -88,11 +88,6 @@
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-warn-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- zxing生成二维码 -->
|
||||
<dependency>
|
||||
@@ -153,6 +148,21 @@
|
||||
<artifactId>access-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-mq</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn.platform</groupId>
|
||||
<artifactId>message-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.njcn.csdevice.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.csdevice.pojo.vo.LineOverLimitVO;
|
||||
import com.njcn.csdevice.service.IOverLimitService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "监测点限值信息查询")
|
||||
public class PQOverlimitController extends BaseController {
|
||||
|
||||
private final IOverLimitService overLimitService;
|
||||
|
||||
// -------- 3个重复的代码!!!! ----------
|
||||
/**
|
||||
* 来源于CommTerminalController的getOverLimitData
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/commTerminal/getOverLimitData")
|
||||
@ApiOperation("根据监测点id获取越限数值")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<Overlimit> getOverLimitDataTerminal(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitData");
|
||||
Overlimit result = overLimitService.getOverLimitDataById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/line/getOverLimitData")
|
||||
@ApiOperation("根据监测点id获取越限数值")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitData");
|
||||
Overlimit result = overLimitService.getOverLimitDataById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/line/getLineOverLimitData")
|
||||
@ApiOperation("根据监测点id获取越限详情")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<LineOverLimitVO> getLineOverLimitData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineOverLimitData");
|
||||
LineOverLimitVO result = overLimitService.getLineOverLimitDataById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/overLimit/getOverLimitByLineIds")
|
||||
@ApiOperation("监测点集合获取限值")
|
||||
@ApiImplicitParam(name = "lineIds", value = "监测点ids", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<List<Overlimit>> getOverLimitByLineIds(@RequestBody List<String> lineIds){
|
||||
String methodDescribe = getMethodDescribe("getOverLimitByLineIds");
|
||||
List<Overlimit> overLimitList= overLimitService.list(new LambdaQueryWrapper<Overlimit>().in(Overlimit::getId,lineIds));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, overLimitList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/commTerminal/getOverLimitDataByIds")
|
||||
@ApiOperation("根据监测点id集合获取越限数值")
|
||||
@ApiImplicitParam(name = "ids", value = "监测点id集合", required = true)
|
||||
public HttpResult<List<Overlimit>> getOverLimitDataByIds(@RequestBody List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitDataByIds");
|
||||
List<Overlimit> result = overLimitService.listByIds(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/overLimit/getLimitMapsByLineIds")
|
||||
@ApiOperation("监测点集合获取限值")
|
||||
@ApiImplicitParam(name = "lineIds", value = "监测点ids", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(@RequestBody List<String> lineIds){
|
||||
String methodDescribe = getMethodDescribe("getLimitMapsByLineIds");
|
||||
List<Map<String, Object>> overLimitList= overLimitService.listMaps(new LambdaQueryWrapper<Overlimit>().in(Overlimit::getId,lineIds));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, overLimitList, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,11 @@ import com.njcn.csdevice.pojo.vo.CsGroupVO;
|
||||
import com.njcn.csdevice.pojo.vo.DataGroupTemplateVO;
|
||||
import com.njcn.csdevice.service.ICsGroupService;
|
||||
import com.njcn.csharmonic.param.CommonStatisticalQueryParam;
|
||||
import com.njcn.csharmonic.param.FittingDataQueryParam;
|
||||
import com.njcn.csharmonic.param.SensitiveUserTrendDataQueryParam;
|
||||
import com.njcn.csharmonic.param.TrendDataQueryParam;
|
||||
import com.njcn.csharmonic.pojo.vo.ThdDataTdVO;
|
||||
import com.njcn.csharmonic.pojo.vo.ThdDataVO;
|
||||
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -21,9 +25,11 @@ import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -143,5 +149,39 @@ public class CsGroupController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/trendData")
|
||||
@ApiOperation("查询指标趋势图数据")
|
||||
@ApiImplicitParam(name = "param",required = true)
|
||||
public HttpResult<List<ThdDataVO>> trendData(@RequestBody @Validated TrendDataQueryParam param){
|
||||
String methodDescribe = getMethodDescribe("trendData");
|
||||
List<ThdDataVO> list = csGroupService.trendData(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/fittingData")
|
||||
@ApiOperation("查询指标拟合图数据")
|
||||
@ApiImplicitParam(name = "param",required = true)
|
||||
public HttpResult<List<ThdDataVO>> fittingData(@RequestBody @Validated FittingDataQueryParam param){
|
||||
String methodDescribe = getMethodDescribe("fittingData");
|
||||
List<ThdDataVO> list = csGroupService.fittingData(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/sensitiveUserTrendData")
|
||||
@ApiOperation("查询监测对象电网侧和负载侧监测点指标趋势对比数据")
|
||||
@ApiImplicitParam(name = "param",required = true)
|
||||
public HttpResult<Map<String,List<ThdDataVO>>> sensitiveUserTrendData(@RequestBody @Validated SensitiveUserTrendDataQueryParam param){
|
||||
String methodDescribe = getMethodDescribe("sensitiveUserTrendData");
|
||||
Map<String,List<ThdDataVO>> result = csGroupService.sensitiveUserTrendData(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DevModelController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/AuditDevModel")
|
||||
@ApiOperation("更新/删除出厂设备")
|
||||
@ApiOperation("更新/删除设备模板参数")
|
||||
@ApiImplicitParam(name = "csDevModelAuditParm", value = "更新/删除设备模板参数", required = true)
|
||||
public HttpResult<Boolean> AuditDevModel(@RequestBody @Validated CsDevModelAuditParm csDevModelAuditParm ){
|
||||
String methodDescribe = getMethodDescribe("AuditDevModel");
|
||||
|
||||
@@ -93,8 +93,8 @@ public class DevModelRelationController extends BaseController {
|
||||
@PostMapping("/getModelByType")
|
||||
@ApiOperation("根据装置类型查询模板")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devId", value = "装置id", required = true),
|
||||
@ApiImplicitParam(name = "type", value = "模板类型", required = true)
|
||||
@ApiImplicitParam(name = "devId", value = "装置id", required = true),
|
||||
@ApiImplicitParam(name = "type", value = "模板类型", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> getModelByType(@RequestParam("devId") String devId, @RequestParam("type") Integer type){
|
||||
@@ -103,4 +103,18 @@ public class DevModelRelationController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, modelId, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateDataByList")
|
||||
@ApiOperation("根据装置集合修改模板信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "list", value = "装置id集合", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "模板id", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("updateDataByList");
|
||||
csDevModelRelationService.updateDataByList(list,id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.enums.DeviceOperate;
|
||||
import com.njcn.csdevice.pojo.param.UserDevParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import com.njcn.csdevice.pojo.vo.DevCountVO;
|
||||
import com.njcn.csdevice.pojo.vo.DevUserVO;
|
||||
@@ -140,4 +141,24 @@ public class DeviceUserController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/findDevByUserId")
|
||||
@ApiOperation("根据用户Id查询设备集合")
|
||||
@ApiImplicitParam(name = "id", value = "用户id", required = true)
|
||||
public HttpResult<List<String>> findDevByUserId(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("findDevByUserId");
|
||||
List<String> list = csDeviceUserPOService.findDevByUserId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/channelDevByUserId")
|
||||
@ApiOperation("根据用户Id解绑设备集合")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<String>> channelDevByUserId(@RequestBody UserDevParam param){
|
||||
String methodDescribe = getMethodDescribe("channelDevByUserId");
|
||||
csDeviceUserPOService.channelDevByUserId(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.csdevice.controller.equipment;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
@@ -45,7 +46,6 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
@@ -60,7 +60,6 @@ import java.util.stream.Stream;
|
||||
@Api(tags = " 出厂设备")
|
||||
@AllArgsConstructor
|
||||
public class EquipmentDeliveryController extends BaseController {
|
||||
|
||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||
private final IMqttUserService mqttUserService;
|
||||
private final CsDevModelRelationService csDevModelRelationService;
|
||||
@@ -85,7 +84,6 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/AuditEquipmentDelivery")
|
||||
@ApiOperation("删除出厂设备")
|
||||
@@ -115,16 +113,13 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEquipmentByndid")
|
||||
@ApiOperation("通过ndid查询出厂设备")
|
||||
@ApiImplicitParam(name = "ndid", value = "网关识别码", required = true)
|
||||
public HttpResult<CsEquipmentDeliveryVO> queryEquipmentByndid(@RequestParam("ndid")String ndid){
|
||||
String methodDescribe = getMethodDescribe("queryEquipmentByndid");
|
||||
|
||||
CsEquipmentDeliveryVO csEquipmentDeliveryVO = csEquipmentDeliveryService.queryEquipmentByndid (ndid);
|
||||
CsEquipmentDeliveryVO csEquipmentDeliveryVO = csEquipmentDeliveryService.queryEquipmentByndid (ndid);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEquipmentDeliveryVO, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -146,17 +141,21 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true)
|
||||
})
|
||||
@DeviceLog(operateType = DeviceOperate.UPDATESTATUSBYNDID)
|
||||
public HttpResult<Boolean> updateStatusBynDid(@RequestParam("nDId") String nDid,@RequestParam("status") Integer status){
|
||||
public HttpResult<Boolean> updateStatusBynDid(@RequestParam("nDId") String nDid,@RequestParam("status") Integer status){
|
||||
String methodDescribe = getMethodDescribe("updateStatusBynDid");
|
||||
csEquipmentDeliveryService.updateStatusBynDid(nDid,status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEquipmentById")
|
||||
@ApiOperation("设备查询通过id获取")
|
||||
@ApiImplicitParam(name = "ids", value = "设备id集合", required = true)
|
||||
public HttpResult<List<CsEquipmentDeliveryDTO>> queryEquipmentById(@RequestParam List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("queryEquipmentById");
|
||||
if (CollectionUtil.isEmpty(ids)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
List<CsEquipmentDeliveryPO> csEquipmentDeliveryPOS = csEquipmentDeliveryService.listByIds(ids);
|
||||
List<CsEquipmentDeliveryDTO> collect = csEquipmentDeliveryPOS.stream().map(temp -> {
|
||||
CsEquipmentDeliveryDTO csEquipmentDeliveryDTO = new CsEquipmentDeliveryDTO();
|
||||
@@ -217,13 +216,11 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("导出设备模板")
|
||||
@GetMapping(value = "getExcelTemplate")
|
||||
public HttpResult<String> getExcelTemplate(HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("getExcelTemplate");
|
||||
|
||||
ExportParams exportParams = new ExportParams("批量导入模板(请严格按照模板标准填入数据)", "终端入网检测录入信息");
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, DeviceExcelTemplete.class, new ArrayList<DeviceExcelTemplete>());
|
||||
@@ -256,10 +253,10 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
mqttUserService.insertMqttUser(temp.getNdid());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("联调完成")
|
||||
@PostMapping(value = "testcompletion")
|
||||
@@ -282,8 +279,8 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/updateSoftInfo")
|
||||
@ApiOperation("更新设备软件信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "nDid", value = "网络设备码", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "软件信息id", required = true)
|
||||
@ApiImplicitParam(name = "nDid", value = "网络设备码", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "软件信息id", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> updateSoftInfo(@RequestParam("nDid") String nDid,@RequestParam("id") String id){
|
||||
@@ -306,7 +303,6 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/rebootDevice")
|
||||
@ApiOperation("重启设备")
|
||||
@@ -348,4 +344,75 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addCldDev")
|
||||
@ApiOperation("新增云前置设备")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.ADD)
|
||||
public HttpResult<CsEquipmentDeliveryPO> addCldDev(@RequestBody @Validated CsEquipmentDeliveryAddParm param){
|
||||
String methodDescribe = getMethodDescribe("addCldDev");
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.saveCld(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/delCldDev")
|
||||
@ApiOperation("删除云前置设备")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.DELETE)
|
||||
public HttpResult<Boolean> delCldDev(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("delCldDev");
|
||||
boolean result = csEquipmentDeliveryService.delCldDev(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateCldDev")
|
||||
@ApiOperation("修改云前置设备")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.UPDATE)
|
||||
public HttpResult<Boolean> updateCldDev(@RequestBody @Validated CsEquipmentDeliveryAuditParm param){
|
||||
String methodDescribe = getMethodDescribe("updateCldDev");
|
||||
boolean result = csEquipmentDeliveryService.updateCldDev(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateCldDevStatus")
|
||||
@ApiOperation("云前置心跳丢失切换设备状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "nodeId", value = "前置服务器id", required = true),
|
||||
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo){
|
||||
String methodDescribe = getMethodDescribe("updateCldDevStatus");
|
||||
csEquipmentDeliveryService.updateCldDevStatus(nodeId,processNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/flipCldDevStatus")
|
||||
@ApiOperation("云前置设备状态翻转")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "status", value = "状态", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<Boolean> flipCldDevStatus(@RequestParam("devId") String devId, @RequestParam("status") Integer status){
|
||||
String methodDescribe = getMethodDescribe("flipCldDevStatus");
|
||||
csEquipmentDeliveryService.flipCldDevStatus(devId,status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRunPortableDev")
|
||||
@ApiOperation("获取用户未绑定的在运的便携式设备")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<CsEquipmentDeliveryPO>> getRunPortableDev(@RequestParam("userId") String userId){
|
||||
String methodDescribe = getMethodDescribe("getRunPortableDev");
|
||||
List<CsEquipmentDeliveryPO> result = csEquipmentDeliveryService.getRunPortableDev(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.njcn.csdevice.controller.icd;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.service.ICsTerminalLogsService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequestMapping("/csTerminalLogs")
|
||||
@RestController
|
||||
@Api(tags = "云前置台账信息日志")
|
||||
@AllArgsConstructor
|
||||
public class CsTerminalLogsController extends BaseController {
|
||||
|
||||
private final ICsTerminalLogsService csTerminalLogsService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/pushCldInfo")
|
||||
@ApiOperation("推送日志台账信息")
|
||||
public HttpResult<String> pushCldInfo(){
|
||||
String methodDescribe = getMethodDescribe("pushCldInfo");
|
||||
String result = csTerminalLogsService.pushCldInfo();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateCldInfo")
|
||||
@ApiOperation("更新日志台账信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "code", value = "流程状态", required = true)
|
||||
})
|
||||
public HttpResult<String> updateCldInfo(@RequestParam String id, @RequestParam Integer code){
|
||||
String methodDescribe = getMethodDescribe("updateCldInfo");
|
||||
csTerminalLogsService.updateLogs(id,code);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateLaterData")
|
||||
@ApiOperation("更新最新一组数据的推送状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "code", value = "流程状态", required = true)
|
||||
})
|
||||
public HttpResult<String> updateLaterData(@RequestParam String id, @RequestParam String code){
|
||||
String methodDescribe = getMethodDescribe("updateLaterData");
|
||||
csTerminalLogsService.updateLaterData(id,code);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.njcn.csdevice.controller.icd;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||
import com.njcn.csdevice.pojo.vo.CldLogsVo;
|
||||
import com.njcn.csdevice.service.ICsTerminalReplyService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-10-09
|
||||
*/
|
||||
@Slf4j
|
||||
@RequestMapping("/csTerminalReply")
|
||||
@RestController
|
||||
@Api(tags = "云前置台账信息响应记录")
|
||||
@AllArgsConstructor
|
||||
|
||||
public class CsTerminalReplyController extends BaseController {
|
||||
|
||||
private final ICsTerminalReplyService csTerminalReplyService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryData")
|
||||
@ApiOperation("查询推送结果")
|
||||
public HttpResult<List<String>> queryData(){
|
||||
String methodDescribe = getMethodDescribe("queryData");
|
||||
List<String> result = csTerminalReplyService.queryReplyData();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateData")
|
||||
@ApiOperation("更新推送结果")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> updateData(@RequestBody @Validated IcdBzReplyParam param){
|
||||
String methodDescribe = getMethodDescribe("updateData");
|
||||
csTerminalReplyService.updateReplyData(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzLogs")
|
||||
@ApiOperation("补召日志")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<Page<CldLogsVo>> bzLogs(@RequestBody @Validated BaseParam param){
|
||||
String methodDescribe = getMethodDescribe("bzLogs");
|
||||
Page<CldLogsVo> list = csTerminalReplyService.getBzLogs(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateBzData")
|
||||
@ApiOperation("更新补召推送结果")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> updateBzData(@RequestBody @Validated IcdBzReplyParam param){
|
||||
String methodDescribe = getMethodDescribe("updateBzData");
|
||||
csTerminalReplyService.updateBzData(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.njcn.csdevice.controller.icd;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.param.IcdLedgerParam;
|
||||
import com.njcn.csdevice.param.IcdParam;
|
||||
import com.njcn.csdevice.pojo.vo.CldLedgerVo;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceInfo;
|
||||
import com.njcn.csdevice.service.IcdService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/icd")
|
||||
@Api(tags = "云前置改造")
|
||||
@AllArgsConstructor
|
||||
public class IcdController extends BaseController {
|
||||
|
||||
private final IcdService icdService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLedgerInfo")
|
||||
@ApiOperation("获取台账信息")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<DeviceInfo>> getLedgerInfo(@RequestBody @Validated IcdParam param){
|
||||
String methodDescribe = getMethodDescribe("getLedgerInfo");
|
||||
List<DeviceInfo> result = icdService.getLedgerInfo(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addLedgerInfo")
|
||||
@ApiOperation("新增台账信息")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<DeviceInfo>> addLedgerInfo(@RequestBody @Validated IcdLedgerParam param){
|
||||
String methodDescribe = getMethodDescribe("addLedgerInfo");
|
||||
icdService.addLedgerInfo(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLedgerById")
|
||||
@ApiOperation("根据Id获取台账信息")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
public HttpResult<CldLedgerVo> getLedgerById(@RequestParam String id){
|
||||
String methodDescribe = getMethodDescribe("getLedgerById");
|
||||
CldLedgerVo vo = icdService.getLedgerById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzFileByEventId")
|
||||
@ApiOperation("指定事件补召波形")
|
||||
@ApiImplicitParam(name = "eventId", value = "事件id", required = true)
|
||||
public HttpResult<String> bzFileByEventId(@RequestParam String eventId){
|
||||
String methodDescribe = getMethodDescribe("bzFileByEventId");
|
||||
icdService.bzFileByEventId(eventId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzEvent")
|
||||
@ApiOperation("补召事件")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> bzEvent(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("bzEvent");
|
||||
icdService.bzEvent(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzFile")
|
||||
@ApiOperation("补召波形")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> bzFile(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("bzFile");
|
||||
icdService.bzFile(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.njcn.csdevice.controller.icd;
|
||||
|
||||
|
||||
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.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.param.IcdNodeParam;
|
||||
import com.njcn.csdevice.pojo.param.NodeParam;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import com.njcn.csdevice.pojo.vo.NodeProcessDeviceVo;
|
||||
import com.njcn.csdevice.service.INodeService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 前置程序控制器
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "前置机管理")
|
||||
@RestController
|
||||
@RequestMapping("node")
|
||||
@RequiredArgsConstructor
|
||||
public class NodeController extends BaseController {
|
||||
|
||||
private final INodeService iNodeService;
|
||||
|
||||
/**
|
||||
* 新增前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@ApiOperation("新增前置机")
|
||||
@ApiImplicitParam(value = "前置机信息",name = "nodeParam",required = true)
|
||||
@PostMapping("addNode")
|
||||
public HttpResult<Boolean> addNode(@Validated @RequestBody NodeParam nodeParam){
|
||||
String methodDescribe = getMethodDescribe("addNode");
|
||||
boolean result = iNodeService.addNode(nodeParam);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("修改前置机")
|
||||
@ApiImplicitParam(value = "前置机信息",name = "updateNodeParam",required = true)
|
||||
@PutMapping("updateNode")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
public HttpResult<Boolean> updateNode(@Validated @RequestBody NodeParam.NodeUpdateParam updateNodeParam){
|
||||
String methodDescribe = getMethodDescribe("updateNode");
|
||||
boolean result = iNodeService.updateNode(updateNodeParam);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除前置
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation(value = "删除前置机")
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||
@PostMapping("delNode")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> delNode(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("delNode");
|
||||
boolean result = iNodeService.delNode(id);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更前置机状态
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation(value = "变更前置机状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true ),
|
||||
@ApiImplicitParam(value = "前置机状态",name = "state",required = true )
|
||||
})
|
||||
@PostMapping("updateNodeState")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
public HttpResult<Boolean> updateNodeState(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id,@NotNull(message = "状态不为空") @RequestParam("state")Integer state){
|
||||
String methodDescribe = getMethodDescribe("updateNodeState");
|
||||
boolean result = iNodeService.updateNodeState(id,state);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部前置机分页
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("获取全部前置机")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@PostMapping("nodeList")
|
||||
public HttpResult<Page<Node>> nodeList(@RequestBody NodeParam.NodeQueryParam nodeQueryParam){
|
||||
String methodDescribe = getMethodDescribe("nodeList");
|
||||
Page<Node> page = iNodeService.nodeList(nodeQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部前置机不分页
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("获取全部前置机")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("/nodeAllList")
|
||||
public HttpResult<List<Node>> nodeAllList(){
|
||||
String methodDescribe = getMethodDescribe("nodeAllList");
|
||||
List<Node> resList = iNodeService.nodeAllList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("根据id获取前置机")
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("/getNodeById")
|
||||
public HttpResult<Node> getNodeById(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("getNodeById");
|
||||
Node node = iNodeService.getNodeById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, node, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据前置机id获取下面的进程和设备
|
||||
* @author xy
|
||||
*/
|
||||
@ApiOperation("根据前置机id获取下面的进程和设备")
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("/getProcessNoAndDeviceById")
|
||||
public HttpResult<NodeProcessDeviceVo> getProcessNoAndDeviceById(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("getProcessNoAndDeviceById");
|
||||
NodeProcessDeviceVo vo = iNodeService.getProcessNoAndDeviceById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/restartProcess")
|
||||
@ApiOperation("重启前置机进程")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "nodeId", value = "前置服务器id", required = true),
|
||||
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||
})
|
||||
public HttpResult<String> restartProcess(@RequestParam String nodeId,@RequestParam Integer processNo){
|
||||
String methodDescribe = getMethodDescribe("restartProcess");
|
||||
iNodeService.restartProcess(nodeId,processNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateDevProcessNo")
|
||||
@ApiOperation("更新设备进程号")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||
})
|
||||
public HttpResult<String> updateDevProcessNo(@RequestParam String id,@RequestParam Integer processNo){
|
||||
String methodDescribe = getMethodDescribe("updateDevProcessNo");
|
||||
String result = iNodeService.updateDevProcessNo(id,processNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateDevNode")
|
||||
@ApiOperation("更新设备前置信息")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> updateDevNode(@RequestBody IcdNodeParam param){
|
||||
String methodDescribe = getMethodDescribe("updateDevNode");
|
||||
String result = iNodeService.updateDevNode(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
package com.njcn.csdevice.controller.ledger;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
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.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.mapper.PqsDeviceUnitMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
||||
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
||||
import com.njcn.csdevice.service.CsLinePOService;
|
||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.constant.UserType;
|
||||
import com.njcn.user.pojo.vo.UserVO;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -17,7 +28,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@@ -34,7 +49,89 @@ public class CsCommTerminalController extends BaseController {
|
||||
|
||||
private final PqsDeviceUnitMapper pqsDeviceUnitMapper;
|
||||
|
||||
private final CsDeviceUserPOService csDeviceUserPOService;
|
||||
|
||||
private final CsLinePOService csLinePOService;
|
||||
private final UserFeignClient userFeignClient;
|
||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||
|
||||
/**
|
||||
* 根据用户获取设备信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getDevIdsByUser")
|
||||
@ApiOperation("根据登录用户id获取用户所有设备id集合")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<String>> getDevIdsByUser(@RequestParam("userId") String userId) {
|
||||
String methodDescribe = getMethodDescribe("getDevIdsByUser");
|
||||
List<String> devIds = commGetDevIds(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devIds, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户获取设备信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getLineIdsByUser")
|
||||
@ApiOperation("根据登录用户id获取用户所有监测点id集合")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<String>> getLineIdsByUser(@RequestParam("userId") String userId) {
|
||||
String methodDescribe = getMethodDescribe("getLineIdsByUser");
|
||||
List<String> devIds = commGetDevIds(userId);
|
||||
if(CollUtil.isNotEmpty(devIds)){
|
||||
List<CsLinePO> poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId).in(CsLinePO::getDeviceId,devIds)
|
||||
.eq(CsLinePO::getStatus,DataStateEnum.ENABLE.getCode()).list();
|
||||
if(CollUtil.isEmpty(poList)){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
||||
}else {
|
||||
List<String> result = poList.stream().map(CsLinePO::getLineId).distinct().collect(Collectors.toList());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户获取设备信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getPqUserIdsByUser")
|
||||
@ApiOperation("根据登录用户id获取电能质量用户id集合")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<String>> getPqUserIdsByUser(@RequestParam("userId") String userId) {
|
||||
String methodDescribe = getMethodDescribe("getPqUserIdsByUser");
|
||||
|
||||
List<String> devIds = commGetDevIds(userId);
|
||||
if(CollUtil.isNotEmpty(devIds)){
|
||||
List<CsLinePO> poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId,CsLinePO::getMonitorUser).in(CsLinePO::getDeviceId,devIds)
|
||||
.eq(CsLinePO::getStatus,DataStateEnum.ENABLE.getCode()).list();
|
||||
if(CollUtil.isEmpty(poList)){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
||||
}else {
|
||||
List<String> result = poList.stream().map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<String> commGetDevIds(String userId){
|
||||
UserVO userVO = userFeignClient.getUserById(userId).getData();
|
||||
List<String> devIds;
|
||||
if(userVO.getType().equals(UserType.SUPER_ADMINISTRATOR ) || userVO.getType().equals(UserType.ADMINISTRATOR )){
|
||||
devIds = csEquipmentDeliveryService.getAll().stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||
}else {
|
||||
List<CsDeviceUserPO> devList = csDeviceUserPOService.lambdaQuery().select(CsDeviceUserPO::getDeviceId)
|
||||
.and(w->w.eq(CsDeviceUserPO::getPrimaryUserId,userId).or().eq(CsDeviceUserPO::getSubUserId,userId))
|
||||
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode()).list();
|
||||
devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
|
||||
}
|
||||
return devIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过监测点获取监测点数据单位
|
||||
|
||||
@@ -156,5 +156,44 @@ public class CsLedgerController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, allList, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/cldTree")
|
||||
@ApiOperation("云前置树")
|
||||
public HttpResult<CsLedgerVO> cldTree(){
|
||||
String methodDescribe = getMethodDescribe("cldTree");
|
||||
CsLedgerVO vo = csLedgerService.cldTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getInfoByIds")
|
||||
@ApiOperation("根据设备集合查询工程,设备信息")
|
||||
@ApiImplicitParam(name = "list", value = "查询条件", required = true)
|
||||
public HttpResult<List<DevDetailDTO>> getInfoByIds(@RequestBody @Validated List<String> list){
|
||||
String methodDescribe = getMethodDescribe("getInfoByIds");
|
||||
List<DevDetailDTO> details = csLedgerService.getInfoByIds(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDevInfoByEngineerIds")
|
||||
@ApiOperation("根据工程获取设备信息")
|
||||
@ApiImplicitParam(name = "list", value = "查询条件", required = true)
|
||||
public HttpResult<List<DevDetailDTO>> getDevInfoByEngineerIds(@RequestBody @Validated List<String> list){
|
||||
String methodDescribe = getMethodDescribe("getDevInfoByEngineerIds");
|
||||
List<DevDetailDTO> details = csLedgerService.getDevInfoByEngineerIds(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEngineeringHaveDevs")
|
||||
@ApiOperation("根据工程信息获取有设备的工程")
|
||||
@ApiImplicitParam(name = "list", value = "查询条件", required = true)
|
||||
public HttpResult<List<DevDetailDTO>> getEngineeringHaveDevs(@RequestBody @Validated List<String> list){
|
||||
String methodDescribe = getMethodDescribe("getEngineeringHaveDevs");
|
||||
List<DevDetailDTO> details = csLedgerService.getEngineeringHaveDevs(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,30 @@
|
||||
package com.njcn.csdevice.controller.line;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.mapper.CsLinePOMapper;
|
||||
import com.njcn.csdevice.mapper.OverlimitMapper;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
||||
import com.njcn.csdevice.service.CsLinePOService;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.utils.COverlimitUtil;
|
||||
import com.njcn.csdevice.utils.COverlimitUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
@@ -41,9 +44,7 @@ import java.util.List;
|
||||
public class CslineController extends BaseController {
|
||||
|
||||
private final CsLinePOService csLinePOService;
|
||||
|
||||
private final OverlimitMapper overlimitMapper;
|
||||
private final CsLinePOMapper csLinePOMapper;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryLineById")
|
||||
@@ -92,16 +93,6 @@ public class CslineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/addLineList")
|
||||
// @ApiOperation("批量新增监测点及绑定关系")
|
||||
// @ApiImplicitParam(name = "list", value = "监测点数据集", required = true)
|
||||
// public HttpResult<String> addLines(@RequestBody List<CsLineParm> list){
|
||||
// String methodDescribe = getMethodDescribe("addLines");
|
||||
// csLinePOService.addLines(list);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
// }
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/findByNdid")
|
||||
@ApiOperation("根据ndid查询监测点")
|
||||
@@ -148,23 +139,178 @@ public class CslineController extends BaseController {
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOverLimitData")
|
||||
@ApiOperation("根据监测点id获取国标限值")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitData");
|
||||
Overlimit result = overlimitMapper.selectById(id);
|
||||
@PostMapping("/getOverLimitDataByIds")
|
||||
@ApiOperation("根据监测点id集合获取国标限值")
|
||||
@ApiImplicitParam(name = "ids", value = "监测点id集合", required = true)
|
||||
public HttpResult<List<Overlimit>> getOverLimitData(@RequestBody List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitDataByIds");
|
||||
List<Overlimit> result = overlimitMapper.selectBatchIds(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/getLinesByDevList")
|
||||
// @ApiOperation("根据装置id集合获取监测点id集合")
|
||||
// @ApiImplicitParam(name = "ids", value = "装置id集合", required = true)
|
||||
// public HttpResult<List<CsLinePO>> getLinesByDevList(@RequestParam("ids") List<String> ids) {
|
||||
// String methodDescribe = getMethodDescribe("getLinesByDevList");
|
||||
// List<CsLinePO> list = csLinePOService.getLinesByDevList(ids);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
// }
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLinesByDevList")
|
||||
@ApiOperation("根据装置id集合获取监测点id集合")
|
||||
@ApiImplicitParam(name = "ids", value = "装置id集合", required = true)
|
||||
public HttpResult<List<CsLinePO>> getLinesByDevList(@RequestParam("ids") List<String> ids) {
|
||||
public HttpResult<List<CsLinePO>> getLinesByDevList(@RequestBody List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getLinesByDevList");
|
||||
List<CsLinePO> list = csLinePOService.getLinesByDevList(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addCldLine")
|
||||
@ApiOperation("新增云前置监测点")
|
||||
@ApiImplicitParam(name = "param", value = "param", required = true)
|
||||
public HttpResult<List<CsLinePO>> addCldLine(@RequestBody @Validated CsLineParam param) {
|
||||
String methodDescribe = getMethodDescribe("addCldLine");
|
||||
csLinePOService.addCldLine(param);
|
||||
//新增监测点限值
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||
overlimit.setId(param.getLineId());
|
||||
overlimitMapper.deleteById(param.getLineId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateCldLine")
|
||||
@ApiOperation("修改云前置监测点")
|
||||
@ApiImplicitParam(name = "param", value = "param", required = true)
|
||||
public HttpResult<List<CsLinePO>> updateCldLine(@RequestBody CsLineParam param) {
|
||||
String methodDescribe = getMethodDescribe("updateCldLine");
|
||||
csLinePOService.updateCldLine(param);
|
||||
//修改监测点限值
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||
overlimit.setId(param.getLineId());
|
||||
overlimitMapper.deleteById(param.getLineId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/delCldLine")
|
||||
@ApiOperation("删除云前置监测点")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<List<CsLinePO>> delCldLine(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("delCldLine");
|
||||
csLinePOService.deleteCldLine(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateLineDataByList")
|
||||
@ApiOperation("根据装置集合修改监测点信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "list", value = "装置id集合", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "模板id", required = true),
|
||||
@ApiImplicitParam(name = "setId", value = "数据集id", required = true),
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id, @RequestParam("setId") String setId){
|
||||
String methodDescribe = getMethodDescribe("updateLineDataByList");
|
||||
csLinePOService.updateLineDataByList(list,id,setId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAllLine")
|
||||
@ApiOperation("获取系统中所有监测点id")
|
||||
public HttpResult<List<String>> getAllLine(){
|
||||
String methodDescribe = getMethodDescribe("getAllLine");
|
||||
List<String> list = csLinePOService.getAllLine();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getSimpleLine")
|
||||
@ApiOperation("查询登录用户拥有的监测点台账")
|
||||
public HttpResult<List<CsLinePO>> getSimpleLine(){
|
||||
String methodDescribe = getMethodDescribe("getSimpleLine");
|
||||
List<CsLinePO> list = csLinePOService.getSimpleLine();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineByName")
|
||||
@ApiOperation("根据名称获取监测点")
|
||||
@ApiImplicitParam(name = "lineName", value = "监测点名称", required = true)
|
||||
public HttpResult<List<CsLinePO>> getLineByName(@RequestParam("lineName") String lineName) {
|
||||
String methodDescribe = getMethodDescribe("getLineByName");
|
||||
List<CsLinePO> list = csLinePOService.getLineByName(lineName);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("查询监测点列表")
|
||||
@ApiImplicitParam(name = "param", value = "param", required = true)
|
||||
public HttpResult<List<CsLinePO>> list(@RequestBody CsLinePO param) {
|
||||
String methodDescribe = getMethodDescribe("list");
|
||||
List<CsLinePO> list = csLinePOService.list(new LambdaQueryWrapper<CsLinePO>()
|
||||
.eq(CsLinePO::getStatus, 1)
|
||||
.eq(StrUtil.isNotBlank(param.getPosition()), CsLinePO::getPosition, param.getPosition())
|
||||
.orderByAsc(CsLinePO::getName));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineBySensitiveUser")
|
||||
@ApiOperation("根据敏感用户查询监测点")
|
||||
public HttpResult<List<CsLinePO>> getLineBySensitiveUser(@RequestBody List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getLineBySensitiveUser");
|
||||
List<CsLinePO> result = csLinePOService.getLineBySensitiveUser(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSensitiveUserLineList")
|
||||
@ApiOperation("获取敏感负荷用户监测点列表")
|
||||
@ApiImplicitParam(name = "param", value = "查询参数", required = true)
|
||||
public HttpResult<Page<PqSensitiveUserLineVO>> getSensitiveUserLineList(@RequestBody BaseParam param) {
|
||||
String methodDescribe = getMethodDescribe("getList");
|
||||
Page<PqSensitiveUserLineVO> page = csLinePOService.getSensitiveUserLineList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/uploadReport")
|
||||
@ApiOperation("上传治理报告")
|
||||
public HttpResult<Boolean> uploadReport(@ApiParam(value = "文件",name="报告文件", required = true) @RequestPart("file") MultipartFile file,@ApiParam(value = "lineId", name="监测点ID", required = true) @RequestParam String lineId) {
|
||||
String methodDescribe = getMethodDescribe("uploadReport");
|
||||
boolean success = csLinePOService.uploadReport(file, lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, success, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getReportUrl")
|
||||
@ApiOperation("获取治理报告链接")
|
||||
public HttpResult<String> getReportUrl(@ApiParam(value = "lineId", name="监测点ID", required = true) @RequestParam String lineId) {
|
||||
String methodDescribe = getMethodDescribe("getReportUrl");
|
||||
String url = csLinePOService.getReportUrl(lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, url, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineDetailData")
|
||||
@ApiOperation("根据监测点id获取监测点详情")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineDetailData");
|
||||
LineDetailDataVO result = csLinePOService.getLineDetailData(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.csdevice.controller.project;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -68,8 +69,8 @@ public class AppProjectController extends BaseController {
|
||||
public HttpResult<Boolean> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
||||
String methodDescribe = getMethodDescribe("addAppProject");
|
||||
|
||||
Boolean flag = appProjectService.addAppProject(appProjectAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
AppProjectPO po = appProjectService.addAppProject(appProjectAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, ObjectUtil.isNotNull(po), methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/auditAppProject")
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.njcn.csdevice.pojo.param.CsEngineeringAuditParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryPageParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.csdevice.pojo.po.CsEngineeringPO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEngineeringVO;
|
||||
import com.njcn.csdevice.service.CsEngineeringService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -20,10 +22,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,10 +41,8 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
public class EngineeringController extends BaseController {
|
||||
|
||||
|
||||
private final CsEngineeringService csEngineeringService;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addEngineering")
|
||||
@ApiOperation("新增工程")
|
||||
@@ -88,4 +85,24 @@ public class EngineeringController extends BaseController {
|
||||
IPage<CsEngineeringVO> page = csEngineeringService.queryEngineeringPage(csEngineeringQueryPageParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEngineeringById")
|
||||
@ApiOperation("工程查询通过id获取")
|
||||
@ApiImplicitParam(name = "id", value = "工程id", required = true)
|
||||
public HttpResult<CsEngineeringPO> queryEngineeringById(@RequestParam String id){
|
||||
String methodDescribe = getMethodDescribe("queryEngineeringById");
|
||||
CsEngineeringPO po = csEngineeringService.queryEngineeringById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getUnlinkedEngineering")
|
||||
@ApiOperation("获取用户未绑定的工程信息")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<CsEngineeringPO>> getUnlinkedEngineering(@RequestParam("userId") String userId){
|
||||
String methodDescribe = getMethodDescribe("getUnlinkedEngineering");
|
||||
List<CsEngineeringPO> result = csEngineeringService.getUnlinkedEngineering(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WlRecordController extends BaseController {
|
||||
@GetMapping("/getTestRecordById")
|
||||
@ApiOperation("根据测试项ID查询测试项信息")
|
||||
@ApiImplicitParam(name = "testRecordId", value = "测试项ID", required = true)
|
||||
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam @Validated String testRecordId) {
|
||||
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam("testRecordId") @Validated String testRecordId) {
|
||||
String methodDescribe = getMethodDescribe("getTestRecordById");
|
||||
LogUtil.njcnDebug(log, "{},测试项id为:{}", methodDescribe, testRecordId);
|
||||
RecordVo.RecordItemVo result = wlRecordService.getTestRecordById(testRecordId);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -21,6 +22,7 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@DS("master")
|
||||
public interface CsEquipmentDeliveryMapper extends BaseMapper<CsEquipmentDeliveryPO> {
|
||||
Page<ProjectEquipmentVO> queryProjectEquipmentVO(Page<ProjectEquipmentVO> returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm,@Param("device")List<String> device);
|
||||
|
||||
@@ -32,4 +34,7 @@ public interface CsEquipmentDeliveryMapper extends BaseMapper<CsEquipmentDeliver
|
||||
//获取符合条件的设备数量
|
||||
int getCounts(@Param("queryParam") CsEquipmentDeliveryQueryParm queryParam);
|
||||
|
||||
int getListByNodeProcess(@Param("nodeId")String nodeId,@Param("process")Integer process);
|
||||
|
||||
List<CsEquipmentDeliveryPO> getDataByNodeIdAndProcessNo(@Param("nodeId")String nodeId,@Param("process")Integer process);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsTerminalLogs;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface CsTerminalLogsMapper extends BaseMapper<CsTerminalLogs> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.csdevice.pojo.po.CsTerminalReply;
|
||||
import com.njcn.user.pojo.vo.RoleVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-10-09
|
||||
*/
|
||||
public interface CsTerminalReplyMapper extends BaseMapper<CsTerminalReply> {
|
||||
|
||||
Page<CsTerminalReply> page(@Param("page")Page<RoleVO> page, @Param("ew") QueryWrapper<CsTerminalReply> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.param.IcdParam;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
@DS("sjzx")
|
||||
public interface NodeMapper extends BaseMapper<Node> {
|
||||
|
||||
List<DeviceInfo> nodeDeviceList(@Param("nodeDeviceParam") IcdParam icdParam);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
from
|
||||
cs_equipment_delivery
|
||||
<where>
|
||||
1=1
|
||||
dev_access_method = 'MQTT'
|
||||
<if test="queryParam.process != null and queryParam.process !=''">
|
||||
and process = #{queryParam.process}
|
||||
</if>
|
||||
@@ -124,4 +124,29 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getListByNodeProcess" resultType="int">
|
||||
select
|
||||
count(1)
|
||||
from
|
||||
cs_equipment_delivery
|
||||
where
|
||||
node_id = #{nodeId} and run_status != 0
|
||||
<if test="process != null and process !=''">
|
||||
and node_process > #{process}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDataByNodeIdAndProcessNo" resultType="com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO">
|
||||
select
|
||||
*
|
||||
from
|
||||
cs_equipment_delivery
|
||||
where
|
||||
node_id = #{nodeId} and run_status != 0
|
||||
<if test="process != null and process !=''">
|
||||
and node_process = #{process}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -32,7 +32,7 @@
|
||||
</resultMap>
|
||||
<select id="getAll" resultType="CsLedgerVO">
|
||||
select
|
||||
id,pid,name,level,sort
|
||||
id,pid,pids,name,level,sort
|
||||
from
|
||||
cs_ledger
|
||||
where
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?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.csdevice.mapper.CsTerminalReplyMapper">
|
||||
|
||||
<!--获取角色分页列表-->
|
||||
<select id="page" resultType="CsTerminalReply">
|
||||
select
|
||||
cs_terminal_reply.*
|
||||
from
|
||||
cs_terminal_reply
|
||||
WHERE ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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.csdevice.mapper.NodeMapper">
|
||||
|
||||
<select id="nodeDeviceList" resultType="com.njcn.csdevice.pojo.vo.DeviceInfo">
|
||||
SELECT
|
||||
pq_device.Id id,
|
||||
pq_device.IP ip,
|
||||
s1.Name devType,
|
||||
pq_device.Port port,
|
||||
pq_line.Name name,
|
||||
sub.Name subName,
|
||||
pq_device.Update_Time updateTime,
|
||||
s2.Name manufacturer,
|
||||
pq_device.Com_Flag status,
|
||||
pq_device.Series series,
|
||||
pq_device_process.process_no processNo,
|
||||
pq_device.Dev_Key devKey,
|
||||
pq_node.max_Process_Num maxProcessNum
|
||||
FROM
|
||||
pq_device
|
||||
LEFT JOIN pq_node ON pq_node.Id = pq_device.Node_Id
|
||||
LEFT JOIN pq_line on pq_device.id = pq_line.id
|
||||
LEFT JOIN pq_line sub on pq_line.pid = sub.id
|
||||
LEFT JOIN pq_device_process on pq_device_process.id = pq_device.id
|
||||
LEFT JOIN pq_dev_type s1 ON pq_device.Dev_Type = s1.id
|
||||
LEFT JOIN sys_dict_data s2 ON pq_device.Manufacturer = s2.id
|
||||
<where>
|
||||
<if test="nodeDeviceParam.ip!=null and nodeDeviceParam.ip != ''">
|
||||
pq_node.ip=#{nodeDeviceParam.ip}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.devId!=null and nodeDeviceParam.devId != ''">
|
||||
pq_device.id=#{nodeDeviceParam.devId}
|
||||
</if>
|
||||
<if test="nodeDeviceParam.runFlag!=null and nodeDeviceParam.runFlag.size()!=0">
|
||||
AND pq_device.Run_Flag in
|
||||
<foreach collection="nodeDeviceParam.runFlag" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.overlimit.mapper.OverlimitMapper">
|
||||
|
||||
<select id="getAllLineOverLimit" resultType="com.njcn.device.biz.pojo.po.Overlimit">
|
||||
select f.* from pq_line a
|
||||
inner join pq_line_detail b on a.id = b.id
|
||||
inner join pq_line c on a.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_device e on d.id = e.id
|
||||
inner join pq_overlimit f on a.id=f.id
|
||||
where e.dev_data_type in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and e.run_flag = 0
|
||||
and e.dev_model = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -27,8 +27,8 @@ public interface AppProjectService extends IService<AppProjectPO> {
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/27
|
||||
*/
|
||||
Boolean addAppProject(AppProjectAddParm appProjectAddOrAuditParm);
|
||||
*/
|
||||
AppProjectPO addAppProject(AppProjectAddParm appProjectAddOrAuditParm);
|
||||
/**
|
||||
* @Description: AuditAppProject
|
||||
* @Param: [appProjectAuditParm]
|
||||
|
||||
@@ -55,5 +55,5 @@ public interface CsDevModelRelationService extends IService<CsDevModelRelationPO
|
||||
|
||||
String getVersionByDevId(String devId);
|
||||
|
||||
|
||||
void updateDataByList(List<String> list, String id);
|
||||
}
|
||||
|
||||
@@ -76,4 +76,10 @@ public interface CsDevModelService extends IService<CsDevModelPO>{
|
||||
*/
|
||||
CsDevModelPO getModelById(String id);
|
||||
|
||||
/**
|
||||
* 获取云前置模板
|
||||
* @return
|
||||
*/
|
||||
CsDevModelPO getCldModel();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.param.UserDevParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import com.njcn.csdevice.pojo.vo.DevCountVO;
|
||||
import com.njcn.csdevice.pojo.vo.DevUserVO;
|
||||
@@ -48,4 +49,8 @@ public interface CsDeviceUserPOService extends IService<CsDeviceUserPO>{
|
||||
* @return
|
||||
*/
|
||||
List<String> findUserById(String devId);
|
||||
|
||||
List<String> findDevByUserId(String userId);
|
||||
|
||||
void channelDevByUserId(UserDevParam param);
|
||||
}
|
||||
|
||||
@@ -55,4 +55,8 @@ public interface CsEngineeringService extends IService<CsEngineeringPO>{
|
||||
* @return
|
||||
*/
|
||||
List<CsEngineeringPO> getEngineerings(List<String> list);
|
||||
|
||||
CsEngineeringPO queryEngineeringById(String id);
|
||||
|
||||
List<CsEngineeringPO> getUnlinkedEngineering(String userId);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
||||
import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -32,30 +33,30 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
|
||||
*/
|
||||
void refreshDeviceDataCache();
|
||||
|
||||
/**
|
||||
* @Description: save
|
||||
* @Param: [csEquipmentDeliveryAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
CsEquipmentDeliveryPO save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm);
|
||||
/**
|
||||
* @Description: AuditEquipmentDelivery
|
||||
* @Param: [id]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
Boolean AuditEquipmentDelivery(String id);
|
||||
/**
|
||||
* @Description: queryEquipmentByndid
|
||||
* @Param: [ndid]
|
||||
* @return: com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
CsEquipmentDeliveryVO queryEquipmentByndid(String ndid);
|
||||
/**
|
||||
* @Description: save
|
||||
* @Param: [csEquipmentDeliveryAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
CsEquipmentDeliveryPO save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm);
|
||||
/**
|
||||
* @Description: AuditEquipmentDelivery
|
||||
* @Param: [id]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
Boolean AuditEquipmentDelivery(String id);
|
||||
/**
|
||||
* @Description: queryEquipmentByndid
|
||||
* @Param: [ndid]
|
||||
* @return: com.njcn.algorithm.pojo.vo.CsEquipmentDeliveryVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
CsEquipmentDeliveryVO queryEquipmentByndid(String ndid);
|
||||
/**
|
||||
* @Description: queryEquipmentByProject
|
||||
* @Param: [projectEquipmentQueryParm]
|
||||
@@ -129,10 +130,69 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
|
||||
*/
|
||||
List<CsEquipmentDeliveryPO> getAll();
|
||||
|
||||
/**
|
||||
* 获取所有装置信息(投运且在线)
|
||||
* @return
|
||||
*/
|
||||
List<CsEquipmentDeliveryPO> getAllOnline();
|
||||
|
||||
/**
|
||||
* 判断设备型号
|
||||
*/
|
||||
boolean judgeDevModel(String nDid);
|
||||
|
||||
CsEquipmentDeliveryPO getDevByLineId(String lineId);
|
||||
|
||||
/**
|
||||
* 新增云前置设备
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
CsEquipmentDeliveryPO saveCld(CsEquipmentDeliveryAddParm param);
|
||||
|
||||
/**
|
||||
* 删除云前置设备
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
Boolean delCldDev(String id);
|
||||
|
||||
/**
|
||||
* 更新云前置设备
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Boolean updateCldDev(CsEquipmentDeliveryAuditParm param);
|
||||
|
||||
/**
|
||||
* 根据前置ip和运行状态获取装置数据
|
||||
* @param id
|
||||
* @param runFlag
|
||||
* @return
|
||||
*/
|
||||
List<CsEquipmentDeliveryPO> getCldDevByIp(String id, List<Integer> runFlag);
|
||||
|
||||
/**
|
||||
* 根据前置id和进程号修改设备状态;同时修改设备下的监测点的状态
|
||||
*/
|
||||
void updateCldDevStatus(String nodeId, Integer processNo);
|
||||
|
||||
/**
|
||||
* 根据设备id和状态来修改设备运行状态;同时修改设备下的监测点的状态
|
||||
* @param devId
|
||||
* @param status
|
||||
*/
|
||||
void flipCldDevStatus(String devId, Integer status);
|
||||
|
||||
/**
|
||||
* 根据项目id获取设备列表
|
||||
*/
|
||||
List<CsEquipmentDeliveryPO> getDevListByProjectId(String projectId);
|
||||
|
||||
List<CsEquipmentDeliveryPO> getDataByNodeIdAndProcessNo(String nodeId, Integer processNo);
|
||||
|
||||
List<CsEquipmentDeliveryPO> getListByIds(List<String> devList);
|
||||
|
||||
List<CsEquipmentDeliveryPO> getRunPortableDev(String userId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/18 14:01【需求编号】
|
||||
*
|
||||
@@ -47,4 +52,43 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
||||
void updateIds(CsLineParam csLineParam);
|
||||
|
||||
List<CsLinePO> getLinesByDevList(List<String> list);
|
||||
|
||||
CsLinePO addCldLine(CsLineParam param);
|
||||
|
||||
void updateCldLine(CsLineParam param);
|
||||
|
||||
void deleteCldLine(String id);
|
||||
|
||||
/**
|
||||
* 修改监测点状态为停运
|
||||
* @param lineList 监测点集合
|
||||
* @param status 运行状态
|
||||
*/
|
||||
void updateCldLineStatus(List<CsLinePO> lineList, Integer status);
|
||||
|
||||
void updateLineDataByList(List<String> list, String id, String setId);
|
||||
|
||||
/**
|
||||
* 根据名称获取监测点
|
||||
* @param lineName
|
||||
* @return
|
||||
*/
|
||||
List<CsLinePO> getLineByName(String lineName);
|
||||
|
||||
List<String> getAllLine();
|
||||
|
||||
List<CsLinePO> getSimpleLine();
|
||||
|
||||
List<CsLinePO> getLineBySensitiveUser(List<String> list);
|
||||
|
||||
Page<PqSensitiveUserLineVO> getSensitiveUserLineList(BaseParam param);
|
||||
boolean uploadReport(MultipartFile file, String lineId);
|
||||
String getReportUrl(String lineId);
|
||||
|
||||
/**
|
||||
* 获取监测点详情
|
||||
* @param id 监测点id
|
||||
* @return 结果
|
||||
*/
|
||||
LineDetailDataVO getLineDetailData(String id);
|
||||
}
|
||||
|
||||
@@ -7,12 +7,15 @@ import com.njcn.csdevice.pojo.po.CsGroup;
|
||||
import com.njcn.csdevice.pojo.vo.CsGroupVO;
|
||||
import com.njcn.csdevice.pojo.vo.DataGroupTemplateVO;
|
||||
import com.njcn.csharmonic.param.CommonStatisticalQueryParam;
|
||||
import com.njcn.csharmonic.param.FittingDataQueryParam;
|
||||
import com.njcn.csharmonic.param.SensitiveUserTrendDataQueryParam;
|
||||
import com.njcn.csharmonic.param.TrendDataQueryParam;
|
||||
import com.njcn.csharmonic.pojo.vo.ThdDataTdVO;
|
||||
import com.njcn.csharmonic.pojo.vo.ThdDataVO;
|
||||
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||
import com.njcn.system.pojo.vo.EleEpdPqdListVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -78,4 +81,25 @@ public interface ICsGroupService extends IService<CsGroup> {
|
||||
*/
|
||||
void deleteGroup(String groupId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询趋势数据
|
||||
* @param trendDataQueryParam
|
||||
* @return
|
||||
*/
|
||||
List<ThdDataVO> trendData(TrendDataQueryParam trendDataQueryParam);
|
||||
/**
|
||||
* 查询指标拟合图数据
|
||||
* @param fittingDataQueryParam
|
||||
* @return
|
||||
*/
|
||||
List<ThdDataVO> fittingData(FittingDataQueryParam fittingDataQueryParam);
|
||||
|
||||
/**
|
||||
* 查询敏感用户趋势数据
|
||||
* @param sensitiveUserTrendDataQueryParam
|
||||
* @return
|
||||
*/
|
||||
Map<String,List<ThdDataVO>> sensitiveUserTrendData(SensitiveUserTrendDataQueryParam sensitiveUserTrendDataQueryParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -76,4 +76,20 @@ public interface ICsLedgerService extends IService<CsLedger> {
|
||||
DevDetailDTO queryDevDetail(String devId);
|
||||
|
||||
List<CsLedgerVO> getztProjectTree();
|
||||
|
||||
/**
|
||||
* 根据设备集合获取项目和工程
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<CsLedgerVO> getProAndEngineer(List<String> id);
|
||||
|
||||
CsLedgerVO cldTree();
|
||||
|
||||
List<DevDetailDTO> getInfoByIds(List<String> list);
|
||||
|
||||
List<DevDetailDTO> getDevInfoByEngineerIds(List<String> list);
|
||||
|
||||
List<DevDetailDTO> getEngineeringHaveDevs(List<String> list);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.po.CsTerminalLogs;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface ICsTerminalLogsService extends IService<CsTerminalLogs> {
|
||||
|
||||
/**
|
||||
* 更新台账操作日志信息
|
||||
*/
|
||||
void updateLogs(String id, Integer code);
|
||||
|
||||
/**
|
||||
* 推送台账操作日志信息
|
||||
*/
|
||||
String pushCldInfo();
|
||||
|
||||
void updateLaterData(String id, String code);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||
import com.njcn.csdevice.pojo.po.CsTerminalReply;
|
||||
import com.njcn.csdevice.pojo.vo.CldLogsVo;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-10-09
|
||||
*/
|
||||
public interface ICsTerminalReplyService extends IService<CsTerminalReply> {
|
||||
|
||||
List<String> queryReplyData();
|
||||
|
||||
void updateReplyData(IcdBzReplyParam param);
|
||||
|
||||
List<CsTerminalReply> getBzReplyData(String lineId);
|
||||
|
||||
Page<CldLogsVo> getBzLogs(BaseParam param);
|
||||
|
||||
void updateBzData(IcdBzReplyParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.param.IcdNodeParam;
|
||||
import com.njcn.csdevice.pojo.param.NodeParam;
|
||||
import com.njcn.csdevice.pojo.po.Node;
|
||||
import com.njcn.csdevice.pojo.vo.NodeProcessDeviceVo;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface INodeService extends IService<Node> {
|
||||
|
||||
|
||||
/**
|
||||
* 新增前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
boolean addNode(NodeParam nodeParam);
|
||||
|
||||
/**
|
||||
* 修改前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
boolean updateNode(NodeParam.NodeUpdateParam nodeParam);
|
||||
|
||||
/**
|
||||
* 删除前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
boolean delNode(String id);
|
||||
|
||||
/**
|
||||
* 修改前置机状态
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
boolean updateNodeState(String id, Integer state);
|
||||
|
||||
/**
|
||||
* 查询前置机列表
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
Page<Node> nodeList(NodeParam.NodeQueryParam nodeQueryParam);
|
||||
|
||||
/**
|
||||
* 查询前置机列表不分页
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
List<Node> nodeAllList();
|
||||
|
||||
/**
|
||||
* 根据前置机id获取前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
Node getNodeById(String id);
|
||||
|
||||
/**
|
||||
* 根据前置机名称获取详细信息
|
||||
* @param nodeName 前置机名称
|
||||
* @return 前置信息
|
||||
*/
|
||||
Node getNodeByNodeName(String nodeName);
|
||||
|
||||
Node getNodeByIp(String ip);
|
||||
|
||||
NodeProcessDeviceVo getProcessNoAndDeviceById(String id);
|
||||
|
||||
void restartProcess(String nodeId, Integer processNo);
|
||||
|
||||
String updateDevProcessNo(String id, Integer processNo);
|
||||
|
||||
String updateDevNode(IcdNodeParam param);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.csdevice.pojo.vo.LineOverLimitVO;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 越限表实体
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2023-03-28
|
||||
*/
|
||||
public interface IOverLimitService extends IService<Overlimit> {
|
||||
|
||||
|
||||
Overlimit getOverLimitDataById(String id);
|
||||
|
||||
/**
|
||||
* 获取监测点越限详情
|
||||
* @param id 监测点id
|
||||
* @return 结果
|
||||
*/
|
||||
LineOverLimitVO getLineOverLimitDataById(String id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.param.IcdLedgerParam;
|
||||
import com.njcn.csdevice.param.IcdParam;
|
||||
import com.njcn.csdevice.pojo.vo.CldLedgerVo;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IcdService {
|
||||
|
||||
List<DeviceInfo> getLedgerInfo(IcdParam param);
|
||||
|
||||
void addLedgerInfo(IcdLedgerParam param);
|
||||
|
||||
CldLedgerVo getLedgerById(String id);
|
||||
|
||||
void bzFileByEventId(String eventId);
|
||||
|
||||
void bzEvent(IcdBzParam param);
|
||||
|
||||
void bzFile(IcdBzParam param);
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.csdevice.mapper.OverlimitMapper;
|
||||
import com.njcn.csdevice.service.impl.OverlimitService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/10/22 14:14【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@DS("sjzx")
|
||||
public class OverlimitServiceImpl extends ServiceImpl<OverlimitMapper, Overlimit> implements OverlimitService{
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.csdevice.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.stream.CollectorUtil;
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
@@ -55,7 +56,7 @@ class AppProjectServiceImpl extends ServiceImpl<AppProjectMapper, AppProjectPO>
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean addAppProject(AppProjectAddParm appProjectAddOrAuditParm) {
|
||||
public AppProjectPO addAppProject(AppProjectAddParm appProjectAddOrAuditParm) {
|
||||
AppProjectPO appProjectPO = new AppProjectPO ( );
|
||||
// Boolean result = checkName (appProjectAddOrAuditParm.getUserId ( ), appProjectAddOrAuditParm.getName ( ));
|
||||
// if (result) {
|
||||
@@ -109,19 +110,33 @@ class AppProjectServiceImpl extends ServiceImpl<AppProjectMapper, AppProjectPO>
|
||||
}
|
||||
}
|
||||
|
||||
CsLedger csLedger = csLedgerMapper.selectById(appProjectAddOrAuditParm.getEngineeringId());
|
||||
Optional.ofNullable(csLedger).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.ENGINEERING_DATA_ERROR));
|
||||
CsLedger csLedger1 = new CsLedger();
|
||||
csLedger1.setId(appProjectPO.getId());
|
||||
csLedger1.setPid(appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setPids(csLedger.getPids()+ ","+appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setLevel(1);
|
||||
csLedger1.setName(appProjectPO.getName());
|
||||
csLedger1.setState(1);
|
||||
csLedger1.setSort(0);
|
||||
csLedgerMapper.insert(csLedger1);
|
||||
|
||||
return save;
|
||||
//云协议工程
|
||||
if (Objects.nonNull(appProjectAddOrAuditParm.getIcdEngineeringId())){
|
||||
CsLedger csLedger1 = new CsLedger();
|
||||
csLedger1.setId(appProjectPO.getId());
|
||||
csLedger1.setPid(appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setPids("0,"+appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setLevel(1);
|
||||
csLedger1.setName(appProjectPO.getName());
|
||||
csLedger1.setState(1);
|
||||
csLedger1.setSort(0);
|
||||
csLedgerMapper.insert(csLedger1);
|
||||
}
|
||||
//其他工程
|
||||
else {
|
||||
CsLedger csLedger = csLedgerMapper.selectById(appProjectAddOrAuditParm.getEngineeringId());
|
||||
Optional.ofNullable(csLedger).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.ENGINEERING_DATA_ERROR));
|
||||
CsLedger csLedger1 = new CsLedger();
|
||||
csLedger1.setId(appProjectPO.getId());
|
||||
csLedger1.setPid(appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setPids(csLedger.getPids()+ ","+appProjectAddOrAuditParm.getEngineeringId());
|
||||
csLedger1.setLevel(1);
|
||||
csLedger1.setName(appProjectPO.getName());
|
||||
csLedger1.setState(1);
|
||||
csLedger1.setSort(0);
|
||||
csLedgerMapper.insert(csLedger1);
|
||||
}
|
||||
return appProjectPO;
|
||||
}
|
||||
|
||||
private Boolean checkName( String name,String id,String engineeringId) {
|
||||
@@ -342,10 +357,14 @@ class AppProjectServiceImpl extends ServiceImpl<AppProjectMapper, AppProjectPO>
|
||||
|
||||
@Override
|
||||
public List<AppProjectPO> getProjectByEngineering(List<String> list) {
|
||||
List<AppProjectPO> result = new ArrayList<>();
|
||||
QueryWrapper<CsLedger> csLedgerQueryWrapper = new QueryWrapper();
|
||||
csLedgerQueryWrapper.lambda().in(CsLedger::getPid, list).eq(CsLedger::getState,1);
|
||||
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);
|
||||
List<String> collect = csLedgers.stream().map(CsLedger::getId).collect(Collectors.toList());
|
||||
return this.lambdaQuery().in(AppProjectPO::getId,collect).list();
|
||||
if (CollectionUtil.isNotEmpty(csLedgers)) {
|
||||
List<String> collect = csLedgers.stream().map(CsLedger::getId).collect(Collectors.toList());
|
||||
result = this.lambdaQuery().in(AppProjectPO::getId,collect).list();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user