Compare commits
73 Commits
5539c8fed5
...
2026-04
| Author | SHA1 | Date | |
|---|---|---|---|
| 57cb6a2900 | |||
| 3990ad2b9a | |||
| a054a20e8a | |||
| db2821347d | |||
|
|
058229e8c4 | ||
| 13b9981c72 | |||
| e364ca1cae | |||
| 8b183d84e9 | |||
|
|
895755b7e1 | ||
|
|
87b91382a8 | ||
|
|
3df7d91e4c | ||
| 6bb9d932b8 | |||
|
|
ae220ceeea | ||
| 8841000989 | |||
| 8559d7548a | |||
| d8b292d447 | |||
| fed766bca4 | |||
|
|
00ccff18c0 | ||
| 353a4cc83b | |||
| 9caaf9bea2 | |||
| e77108ebf5 | |||
| 460a10f3b5 | |||
| f242e45c2f | |||
| 45fd613e47 | |||
| 445f27143b | |||
| 622d977d62 | |||
| e7ba886b94 | |||
| c0cccc3479 | |||
| dbe09d70f4 | |||
| 33da822317 | |||
| 720afd42df | |||
| fc7694a1db | |||
| 349ee472d9 | |||
| 844f30965e | |||
| 6e0a36fd80 | |||
| bd1fb82532 | |||
| 3727b5777e | |||
| c3cb9a5f85 | |||
| 05ef7028c4 | |||
| 736b0a6e60 | |||
| cc63cead04 | |||
| 30bc3c7448 | |||
| 51a16c5701 | |||
| 4497699178 | |||
| 0ac51648f4 | |||
| fb515cca9b | |||
| 14d77725aa | |||
| ee87ffb0d4 | |||
| 5ff8c946aa | |||
| cccc73f211 | |||
| 4882151ccd | |||
| b774b7ce91 | |||
| 6b0feb1320 | |||
| e92326c55d | |||
| 7abbfd500b | |||
| 77360ef468 | |||
| b38d3bad1b | |||
| 27aebf2ca4 | |||
| 9981b04ed6 | |||
| f8c9828369 | |||
| 0d652b9f4d | |||
| 3ea67da152 | |||
| c7dce89d36 | |||
| e7dbee2df5 | |||
| 29168bbd9f | |||
| 56d88939c4 | |||
| bc6f3dca80 | |||
| 2957188466 | |||
| 2894a4780b | |||
| 240ec304b0 | |||
| ae09cc1996 | |||
| efdb1781da | |||
|
|
46aef0d97f |
@@ -4,18 +4,14 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.njcn.cloud.enums.app.UserCodeEnum;
|
||||
import com.njcn.cloud.pojo.vo.AdminStatistic.Integrity;
|
||||
import com.njcn.cloud.pojo.vo.AdminStatistic.StaticInfo;
|
||||
import com.njcn.cloud.service.AdminStatistic.DataIntegrityService;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -10,12 +10,14 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -54,7 +56,7 @@ public class StaticServiceImpl implements StaticService {
|
||||
//获取终端信息
|
||||
List<DevDetail> devDetails = generalDeviceInfoClient.getDevInfoByIds(new ArrayList<>()).getData();
|
||||
//获取终端在线率
|
||||
List<RStatOnlinerateVO> onlineRates = generalDeviceInfoClient.getOnlineRateByDevIds(param).getData();
|
||||
List<RStatOnlineRateVO> onlineRates = generalDeviceInfoClient.getOnlineRateByDevIds(param).getData();
|
||||
//异常终端数据
|
||||
long count = devDetails.stream().filter(x -> 0==x.getComFlag()).count();
|
||||
StaticInfo info=new StaticInfo();
|
||||
@@ -63,14 +65,14 @@ public class StaticServiceImpl implements StaticService {
|
||||
info.setOnlineRatez(data);
|
||||
info.setComError(count);
|
||||
List<StaticInfo.DevStatic> list=new ArrayList<>();
|
||||
Map<String, Float> onlineRateMap = onlineRates.stream().collect(Collectors.toMap(RStatOnlinerateVO::getDevIndex, RStatOnlinerateVO::getOnlineRate));
|
||||
Map<String, BigDecimal> onlineRateMap = onlineRates.stream().collect(Collectors.toMap(RStatOnlineRateVO::getDevIndex, RStatOnlineRateVO::getOnlineRate));
|
||||
StaticInfo.DevStatic devStatic;
|
||||
for (DevDetail devDetail : devDetails) {
|
||||
devStatic=new StaticInfo.DevStatic();
|
||||
devStatic.setDevIndex(devDetail.getDevIndex());
|
||||
devStatic.setDevName(devDetail.getDevName());
|
||||
devStatic.setIp(devDetail.getIp());
|
||||
devStatic.setOnlineRate(onlineRateMap.get(devDetail.getDevIndex()));
|
||||
devStatic.setOnlineRate(onlineRateMap.get(devDetail.getDevIndex()).setScale(3, RoundingMode.HALF_UP).floatValue());
|
||||
devStatic.setGdName(devDetail.getGdName());
|
||||
devStatic.setSubName(devDetail.getBdzName());
|
||||
devStatic.setTimeId(devDetail.getTimeID());
|
||||
@@ -80,4 +82,4 @@ public class StaticServiceImpl implements StaticService {
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,11 @@
|
||||
<version>4.4.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>1.2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -3,9 +3,12 @@ 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.AppProjectClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.AppProjectAddParm;
|
||||
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -19,4 +22,11 @@ public interface AppProjectFeignClient {
|
||||
|
||||
@PostMapping("/queryProjectById")
|
||||
HttpResult<List<AppProjectPO>> queryProjectById(@RequestParam("ids") List<String> ids);
|
||||
|
||||
@PostMapping("/getProjectByName")
|
||||
HttpResult<AppProjectPO> getProjectByName(@RequestParam("name") String name);
|
||||
|
||||
@PostMapping("/addPortableProject")
|
||||
HttpResult<AppProjectPO> addPortableProject(@Validated @RequestBody AppProjectAddParm appProjectAddParm);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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 com.njcn.csdevice.pojo.vo.DevUserVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -29,4 +30,13 @@ public interface CsDeviceUserFeignClient {
|
||||
|
||||
@PostMapping("/channelDevByUserId")
|
||||
HttpResult<List<String>> channelDevByUserId(@RequestBody UserDevParam param);
|
||||
|
||||
@PostMapping("/queryUserById")
|
||||
HttpResult<DevUserVO> queryUserById(@RequestParam("devId") String devId);
|
||||
|
||||
@PostMapping("/getList")
|
||||
HttpResult<List<CsDeviceUserPO>> getList(@RequestBody UserDevParam param);
|
||||
|
||||
@PostMapping("/getIdList")
|
||||
HttpResult<List<String>> getIdList(@RequestParam("param") String param);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.njcn.csdevice.api.fallback.CsEdDataFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.CsEdDataPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEdDataVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@@ -14,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/edData", fallbackFactory = CsEdDataFeignClientFallbackFactory.class,contextId = "edData")
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/edData", fallbackFactory = CsEdDataFeignClientFallbackFactory.class, contextId = "edData")
|
||||
public interface CsEdDataFeignClient {
|
||||
|
||||
@PostMapping("/findByDevTypeId")
|
||||
@@ -22,4 +24,7 @@ public interface CsEdDataFeignClient {
|
||||
|
||||
@PostMapping("/getAll")
|
||||
HttpResult<List<CsEdDataPO>> getAll(@RequestParam("devType") String devType);
|
||||
|
||||
@GetMapping("/getById")
|
||||
HttpResult<CsEdDataPO> getById(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ public interface CsLedgerFeignClient {
|
||||
@PostMapping("/queryDevDetail")
|
||||
HttpResult<DevDetailDTO> queryDevDetail(@RequestParam("devId") String devId);
|
||||
|
||||
@PostMapping("/lineTree")
|
||||
@ApiOperation("五层设备树(监测点层,根节点为治理设备和便携式设备)")
|
||||
HttpResult<List<CsLedgerVO>> lineTree();
|
||||
|
||||
@PostMapping("/deviceTree")
|
||||
@ApiOperation("三层设备树(装置层)")
|
||||
HttpResult<List<CsLedgerVO>> getDeviceTree();
|
||||
|
||||
@@ -7,6 +7,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.api.fallback.CsLineClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.dto.CsLineDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
@@ -14,11 +15,13 @@ 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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
@@ -38,6 +41,10 @@ public interface CsLineFeignClient {
|
||||
@PostMapping("/findByNdid")
|
||||
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
||||
|
||||
|
||||
@GetMapping("/getCustomDetailByLineId")
|
||||
HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/getPositionById")
|
||||
HttpResult<String> getPositionById(@RequestParam("id") String id);
|
||||
|
||||
@@ -62,6 +69,9 @@ public interface CsLineFeignClient {
|
||||
@PostMapping("/getAllLine")
|
||||
HttpResult<List<String>> getAllLine();
|
||||
|
||||
@PostMapping("/getAllLineDetail")
|
||||
HttpResult<List<CsLineDTO>> getAllLineDetail();
|
||||
|
||||
@PostMapping("/getOverLimitDataByIds")
|
||||
HttpResult<List<Overlimit>> getOverLimitData(@RequestBody List<String> ids);
|
||||
|
||||
@@ -75,4 +85,7 @@ public interface CsLineFeignClient {
|
||||
@PostMapping("/getLineDetailData")
|
||||
HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id);
|
||||
|
||||
@GetMapping("/getSimpleLine")
|
||||
HttpResult<List<CsLinePO>> getSimpleLine();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
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.CsMarketDataClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.vo.CsMarketDataVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csMarketData", fallbackFactory = CsMarketDataClientFallbackFactory.class,contextId = "csMarketData")
|
||||
public interface CsMarketDataFeignClient {
|
||||
|
||||
@PostMapping("/insert")
|
||||
HttpResult<Boolean> insertData(@RequestParam("userId")String userId, @RequestParam("engineeringId")String engineeringId);
|
||||
|
||||
@PostMapping("/queryByUseId")
|
||||
HttpResult<List<CsMarketDataVO>> queryByUseId(@RequestParam("userId")String userId);
|
||||
|
||||
}
|
||||
@@ -3,7 +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.CsOverLimitFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
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.CsUpgradeLogsClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.CsUpgradeLogs;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-23
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csUpgradeLogs", fallbackFactory = CsUpgradeLogsClientFallbackFactory.class,contextId = "csSoftInfo")
|
||||
public interface CsUpgradeLogsFeignClient {
|
||||
@PostMapping("/add")
|
||||
HttpResult add(@RequestBody CsUpgradeLogs csUpgradeLogs);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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.ProcessFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.po.CsUserPins;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csUserPins", fallbackFactory = ProcessFeignClientFallbackFactory.class,contextId = "csUserPins")
|
||||
|
||||
public interface CsUserPinsFeignClient {
|
||||
|
||||
@PostMapping("/getPinToTopList")
|
||||
HttpResult<List<CsUserPins>> getPinToTopList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
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.DeviceMessageClientFallbackFactory;
|
||||
import com.njcn.csdevice.param.DeviceMessageParam;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/deviceMessage", fallbackFactory = DeviceMessageClientFallbackFactory.class,contextId = "deviceMessage")
|
||||
public interface DeviceMessageFeignClient {
|
||||
|
||||
@PostMapping("/getEventUserByDeviceId")
|
||||
@ApiOperation("根据设备获取需要推送的用户id")
|
||||
HttpResult<List<String>> getEventUserByDeviceId(@RequestParam("devId") String devId, @RequestParam("isAdmin") Boolean isAdmin);
|
||||
|
||||
@PostMapping("/getSendUserByType")
|
||||
@ApiOperation("根据事件类型和用户id查询打开推送的用户信息")
|
||||
HttpResult<List<User>> getSendUserByType(@RequestBody DeviceMessageParam param);
|
||||
|
||||
@PostMapping("/getLineInfo")
|
||||
@ApiOperation("获取监测点信息")
|
||||
HttpResult<String> getLineInfo(@RequestParam("id") String id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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.AppProjectClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.csdevice.pojo.po.CsEngineeringPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEngineeringVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/engineering", fallbackFactory = AppProjectClientFallbackFactory.class,contextId = "engineering")
|
||||
public interface EngineeringFeignClient {
|
||||
|
||||
@PostMapping("/queryEngineering")
|
||||
HttpResult<List<CsEngineeringVO>> queryEngineering(@Validated @RequestBody CsEngineeringQueryParm csEngineeringQueryParm);
|
||||
|
||||
@PostMapping("/getEngineeringByName")
|
||||
HttpResult<CsEngineeringPO> getEngineeringByName(@RequestParam("name") String name);
|
||||
|
||||
@PostMapping("/addEngineering")
|
||||
HttpResult<CsEngineeringPO> addEngineering(@Validated @RequestBody CsEngineeringAddParm csEngineeringAddParm);
|
||||
}
|
||||
@@ -1,22 +1,14 @@
|
||||
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.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;
|
||||
|
||||
@@ -72,5 +64,5 @@ public interface EquipmentFeignClient {
|
||||
HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo);
|
||||
|
||||
@PostMapping("/flipCldDevStatus")
|
||||
HttpResult<Boolean> flipCldDevStatus(@RequestParam("devId") String devId, @RequestParam("status") Integer status);
|
||||
HttpResult<Boolean> flipCldDevStatus(@RequestParam("date") String date, @RequestParam("devId") String devId, @RequestParam("status") Integer status);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,12 @@ 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.IntegrityClientFallbackFactory;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.pojo.po.RStatIntegrityD;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,6 +19,6 @@ import java.util.List;
|
||||
public interface IntegrityFeignClient {
|
||||
|
||||
@PostMapping("/list")
|
||||
HttpResult<List<RStatIntegrityD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
|
||||
HttpResult<List<RStatIntegrityD>> list(@RequestBody @Validated IcdBzParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,12 @@ 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.onlineRateClientFallbackFactory;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.pojo.po.RStatOnlineRateD;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,6 +19,6 @@ import java.util.List;
|
||||
public interface OnlineRateFeignClient {
|
||||
|
||||
@PostMapping("/list")
|
||||
HttpResult<List<RStatOnlineRateD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
|
||||
HttpResult<List<RStatOnlineRateD>> list(@RequestBody @Validated IcdBzParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
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.SmsSendClientFallbackFactory;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/sms", fallbackFactory = SmsSendClientFallbackFactory.class,contextId = "sms")
|
||||
public interface SmsSendFeignClient {
|
||||
|
||||
@PostMapping("/send/simple")
|
||||
@ApiOperation("发送短信(简化参数)")
|
||||
HttpResult<String> sendSmsSimple(@RequestParam("receiver") String receiver
|
||||
, @RequestParam("content") String content
|
||||
, @RequestParam("messageType") String messageType);
|
||||
|
||||
}
|
||||
@@ -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.AppProjectFeignClient;
|
||||
import com.njcn.csdevice.pojo.param.AppProjectAddParm;
|
||||
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -32,6 +33,18 @@ public class AppProjectClientFallbackFactory implements FallbackFactory<AppProje
|
||||
log.error("{}异常,降级处理,异常为:{}","获取项目详情接口异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<AppProjectPO> getProjectByName(String name) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据项目名称获取项目信息异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<AppProjectPO> addPortableProject(AppProjectAddParm appProjectAddParm) {
|
||||
log.error("{}异常,降级处理,异常为:{}","新增便携式项目",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ 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 com.njcn.csdevice.pojo.vo.DevUserVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -51,6 +52,24 @@ public class CsDeviceUserClientFallbackFactory implements FallbackFactory<CsDevi
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<DevUserVO> queryUserById(String devId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取设备主/子用户数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsDeviceUserPO>> getList(UserDevParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据设备集合获取数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getIdList(String param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取事件id集合数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@ public class CsEdDataFeignClientFallbackFactory implements FallbackFactory<CsEdD
|
||||
log.error("{}异常,降级处理,异常为:{}","根据装置型号获取装置类型",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<CsEdDataPO> getById(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据id获取装置类型",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,12 @@ public class CsLedgerFeignClientFallbackFactory implements FallbackFactory<CsLed
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLedgerVO>> lineTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询监测点数数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLedgerVO>> getDeviceTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询设备树",cause.toString());
|
||||
|
||||
@@ -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.CsLineFeignClient;
|
||||
import com.njcn.csdevice.pojo.dto.CsLineDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
@@ -54,6 +56,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据id查询监测点",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> getPositionById(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","通过id查询监测点位置",cause.toString());
|
||||
@@ -96,6 +104,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLineDTO>> getAllLineDetail() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取系统中所有监测点id详情异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<Overlimit>> getOverLimitData(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据监测点id集合获取国标限值异常",cause.toString());
|
||||
@@ -124,6 +138,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
||||
log.error("{}异常,降级处理,异常为:{}","查询监测点详情异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsLinePO>> getSimpleLine() {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询登录用户拥有的监测点台账",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
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.CsMarketDataFeignClient;
|
||||
import com.njcn.csdevice.pojo.vo.CsMarketDataVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsMarketDataClientFallbackFactory implements FallbackFactory<CsMarketDataFeignClient> {
|
||||
@Override
|
||||
public CsMarketDataFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CsMarketDataFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> insertData(String userId, String engineeringId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据用户、工程新增数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsMarketDataVO>> queryByUseId(String userId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询营销,工程数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -4,7 +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.CsOverLimitClient;
|
||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
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.CsUpgradeLogsFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.CsUpgradeLogs;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-23
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsUpgradeLogsClientFallbackFactory implements FallbackFactory<CsUpgradeLogsFeignClient> {
|
||||
@Override
|
||||
public CsUpgradeLogsFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
return new CsUpgradeLogsFeignClient() {
|
||||
@Override
|
||||
public HttpResult add(CsUpgradeLogs csUpgradeLogs) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "新增升级日志异常", cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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.CsUserPinsFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.CsUserPins;
|
||||
import com.njcn.csdevice.utils.CsDeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/4/10 20:09
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CsUserPinsFeignClientFallbackFactory implements FallbackFactory<CsUserPinsFeignClient> {
|
||||
@Override
|
||||
public CsUserPinsFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
exceptionEnum = CsDeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CsUserPinsFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsUserPins>> getPinToTopList() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取用户置顶设备(工程)数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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.DeviceMessageFeignClient;
|
||||
import com.njcn.csdevice.param.DeviceMessageParam;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DeviceMessageClientFallbackFactory implements FallbackFactory<DeviceMessageFeignClient> {
|
||||
@Override
|
||||
public DeviceMessageFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new DeviceMessageFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getEventUserByDeviceId(String devId, Boolean isAdmin) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据设备获取需要推送的用户id数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<User>> getSendUserByType(DeviceMessageParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据事件类型和用户id查询打开推送的用户信息数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> getLineInfo(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取监测点信息数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
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.EngineeringFeignClient;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryParm;
|
||||
import com.njcn.csdevice.pojo.po.CsEngineeringPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEngineeringVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class EngineeringClientFallbackFactory implements FallbackFactory<EngineeringFeignClient> {
|
||||
@Override
|
||||
public EngineeringFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new EngineeringFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<CsEngineeringVO>> queryEngineering(CsEngineeringQueryParm csEngineeringQueryParm) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询工程列表接口异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<CsEngineeringPO> getEngineeringByName(String name) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据工程名称获取工程信息异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<CsEngineeringPO> addEngineering(CsEngineeringAddParm csEngineeringAddParm) {
|
||||
log.error("{}异常,降级处理,异常为:{}","新增工程异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> flipCldDevStatus(String devId, Integer status) {
|
||||
public HttpResult<Boolean> flipCldDevStatus(String date, String devId, Integer status) {
|
||||
log.error("{}异常,降级处理,异常为:{}","云前置设备状态翻转",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.IntegrityFeignClient;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.pojo.po.RStatIntegrityD;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -26,9 +27,8 @@ public class IntegrityClientFallbackFactory implements FallbackFactory<Integrity
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new IntegrityFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<RStatIntegrityD>> list(List<String> list, String startTime, String endTime) {
|
||||
public HttpResult<List<RStatIntegrityD>> list(IcdBzParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
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.SmsSendFeignClient;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SmsSendClientFallbackFactory implements FallbackFactory<SmsSendFeignClient> {
|
||||
@Override
|
||||
public SmsSendFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (cause.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new SmsSendFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<String> sendSmsSimple(String receiver, String content, String messageType) {
|
||||
log.error("{}异常,降级处理,异常为:{}","发送短信(简化参数)数据异常",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.OnlineRateFeignClient;
|
||||
import com.njcn.csdevice.param.IcdBzParam;
|
||||
import com.njcn.csdevice.pojo.po.RStatOnlineRateD;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -28,7 +29,7 @@ public class onlineRateClientFallbackFactory implements FallbackFactory<OnlineRa
|
||||
return new OnlineRateFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<RStatOnlineRateD>> list(List<String> list, String startTime, String endTime) {
|
||||
public HttpResult<List<RStatOnlineRateD>> list(IcdBzParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询数据异常",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface DataParam {
|
||||
|
||||
String GOVERNANCE_SYSTEM = "治理系统";
|
||||
|
||||
String cldDev = "在线设备";
|
||||
String cldDev = "监测设备";
|
||||
|
||||
String EvtParamPhase = "Evt_Param_Phase";
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class CsUserPinsParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
@NotBlank(message = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("目标类型:1-设备,2-工程")
|
||||
@NotNull(message = "目标类型:1-设备,2-工程")
|
||||
private Integer targetType;
|
||||
|
||||
@ApiModelProperty("目标ID(设备ID或工程ID)")
|
||||
@NotBlank(message = "目标ID(设备ID或工程ID)不能为空")
|
||||
private String targetId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.csdevice.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DeviceMessageParam {
|
||||
|
||||
@ApiModelProperty("用户id集合")
|
||||
private List<String> userList;
|
||||
|
||||
@ApiModelProperty("事件类型 0:暂态 1:稳态 2:运行 3:告警")
|
||||
private Integer eventType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.csdevice.pojo.dto;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-03-31
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统凭证请求 DTO
|
||||
*
|
||||
* @author msgpush
|
||||
*/
|
||||
@Data
|
||||
public class CredentialReqDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 上游系统名称
|
||||
*/
|
||||
@NotEmpty(message = "上游系统名称不能为空")
|
||||
private String systemName;
|
||||
|
||||
/**
|
||||
* 密钥(用于生成凭证)
|
||||
*/
|
||||
@NotEmpty(message = "密钥不能为空")
|
||||
private String secretKey;
|
||||
|
||||
}
|
||||
@@ -100,4 +100,24 @@ public class CsEquipmentDeliveryDTO {
|
||||
|
||||
private Integer moduleNumber;
|
||||
private Integer process;
|
||||
|
||||
/**
|
||||
* 前置服务器IP
|
||||
*/
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 前置进程号
|
||||
*/
|
||||
private Integer nodeProcess;
|
||||
|
||||
/**
|
||||
* 日志等级(NORMAL、DEBUG、WARN、ERROR)
|
||||
*/
|
||||
private String devLogLevel;
|
||||
|
||||
/**
|
||||
* 设备软件信息id
|
||||
*/
|
||||
private String softinfoId;
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.njcn.csdevice.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class CsLineDTO implements Serializable {
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 装置id
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 装置id
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 字典表:安装位置(负载侧,电网侧, 输出侧)
|
||||
*/
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 数据集id
|
||||
*/
|
||||
private String dataSetId;
|
||||
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private String dataModelId;
|
||||
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
private Double volGrade;
|
||||
|
||||
/**
|
||||
* PT变比
|
||||
*/
|
||||
private Double ptRatio;
|
||||
|
||||
/**
|
||||
* PT2次变比
|
||||
*/
|
||||
private Double pt2Ratio;
|
||||
|
||||
/**
|
||||
* CT变比
|
||||
*/
|
||||
private Double ctRatio;
|
||||
|
||||
/**
|
||||
* CT2变比
|
||||
*/
|
||||
private Double ct2Ratio;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 接线方式(0-星型 1-角型 2-V型)
|
||||
*/
|
||||
private Integer conType;
|
||||
|
||||
/**
|
||||
* 逻辑子设备id(与模板对应)
|
||||
*/
|
||||
private Integer clDid;
|
||||
|
||||
|
||||
/**
|
||||
* 监测点统计间隔
|
||||
*/
|
||||
private Integer lineInterval;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 监测点线路号
|
||||
*/
|
||||
private Integer lineNo;
|
||||
/**
|
||||
* 监测对象类型
|
||||
*/
|
||||
private String monitorObj;
|
||||
/**
|
||||
* 是否治理(0:未治理 1:已治理)
|
||||
*/
|
||||
private Integer govern;
|
||||
|
||||
private String monitorUser;
|
||||
|
||||
/**
|
||||
* 短路容量
|
||||
*/
|
||||
private Double shortCircuitCapacity;
|
||||
|
||||
/**
|
||||
* 设备容量
|
||||
*/
|
||||
private Double devCapacity;
|
||||
|
||||
/**
|
||||
* 基准容量
|
||||
*/
|
||||
private Double basicCapacity;
|
||||
|
||||
/**
|
||||
* 协议容量
|
||||
*/
|
||||
private Double protocolCapacity;
|
||||
|
||||
/**
|
||||
* 治理报告文件路径
|
||||
*/
|
||||
private String reportFilePath;
|
||||
|
||||
/**
|
||||
* 日志等级(NORMAL、DEBUG、WARN、ERROR)
|
||||
*/
|
||||
private String lineLogLevel;
|
||||
|
||||
/**
|
||||
* 是否是主要监测点(0: 不是 1:是)
|
||||
*/
|
||||
|
||||
private Integer isImportant;
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.njcn.csdevice.pojo.dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/9/6 13:59【需求编号】
|
||||
@@ -31,4 +33,13 @@ public class DevDetailDTO {
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
@ApiModelProperty(value = "设备通讯状态")
|
||||
private Integer runStatus;
|
||||
|
||||
@ApiModelProperty(value = "设备MAC地址")
|
||||
private String devMac;
|
||||
|
||||
@ApiModelProperty(value = "监测点id集合")
|
||||
private List<String> lineList;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.njcn.csdevice.pojo.dto;
|
||||
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/8/1 15:25【需求编号】
|
||||
@@ -11,7 +15,7 @@ import lombok.Data;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class LineParamDTO {
|
||||
public class LineParamDTO extends BaseParam implements Serializable {
|
||||
@ApiModelProperty(value = "工程id")
|
||||
private String engineerId;
|
||||
|
||||
@@ -26,4 +30,29 @@ public class LineParamDTO {
|
||||
|
||||
@ApiModelProperty(value = "监测点id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(value = "时间类型 0:日报 1:月报")
|
||||
private Integer timeType;
|
||||
|
||||
@ApiModelProperty(value = "时间")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty(value = "起始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "集合")
|
||||
private List<String> list;
|
||||
|
||||
@Data
|
||||
public static class DevParamDTO {
|
||||
|
||||
@ApiModelProperty(value = "时间")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty(value = "设备id集合")
|
||||
private List<String> devList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.csdevice.pojo.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class SendResult implements Serializable {
|
||||
|
||||
private final boolean success;
|
||||
private final String messageId;
|
||||
private final String failReason;
|
||||
private final boolean isTimeOut;
|
||||
private final boolean unauthorized;
|
||||
|
||||
}
|
||||
@@ -55,4 +55,7 @@ public class AppProjectAddParm {
|
||||
@ApiModelProperty(value="拓扑图模版id集合")
|
||||
private List<String> topoIds;
|
||||
|
||||
@ApiModelProperty(value="排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -44,4 +44,7 @@ public class AppProjectAuditParm {
|
||||
private List<String> topoIds;
|
||||
|
||||
private List<String> newTopoIds;
|
||||
|
||||
@ApiModelProperty(value="排序")
|
||||
private Integer sort;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class CsEdDataAuditParm {
|
||||
private String versionType;
|
||||
|
||||
@ApiModelProperty(value = "crc信息")
|
||||
private String crcInfo;
|
||||
private String crc;
|
||||
@ApiModelProperty(value="0:删除 1:正常")
|
||||
private String status;
|
||||
@ApiModelProperty(value = ".bin文件")
|
||||
|
||||
@@ -53,6 +53,10 @@ public class CsEngineeringAddParm {
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -54,6 +54,7 @@ public class CsEngineeringAuditParm {
|
||||
@ApiModelProperty(value="0:删除 1:正常")
|
||||
private String status;
|
||||
|
||||
|
||||
@ApiModelProperty(value="排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -97,4 +97,18 @@ public class CsEquipmentDeliveryAddParm implements Serializable {
|
||||
@ApiModelProperty(value="项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty(value="日志等级(NORMAL、DEBUG、WARN、ERROR)")
|
||||
private String devLogLevel;
|
||||
|
||||
@ApiModelProperty(value="所属工程")
|
||||
private String associatedEngineering;
|
||||
|
||||
@ApiModelProperty(value="所属项目")
|
||||
private String associatedProject;
|
||||
|
||||
@ApiModelProperty(value="icd")
|
||||
private String icd;
|
||||
|
||||
@ApiModelProperty(value="是否支持升级(0:否 1:是)")
|
||||
private Integer upgrade;
|
||||
}
|
||||
@@ -101,4 +101,19 @@ public class CsEquipmentDeliveryAuditParm {
|
||||
|
||||
@ApiModelProperty(value="前置机进程号")
|
||||
private Integer nodeProcess;
|
||||
|
||||
@ApiModelProperty(value="日志等级(NORMAL、DEBUG、WARN、ERROR)")
|
||||
private String devLogLevel;
|
||||
|
||||
@ApiModelProperty(value="所属工程")
|
||||
private String associatedEngineering;
|
||||
|
||||
@ApiModelProperty(value="所属项目")
|
||||
private String associatedProject;
|
||||
|
||||
@ApiModelProperty(value="icd")
|
||||
private String icd;
|
||||
|
||||
@ApiModelProperty(value="是否支持升级(0:否 1:是)")
|
||||
private Integer upgrade;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -40,4 +41,9 @@ public class CsEquipmentDeliveryQueryParm extends BaseParam {
|
||||
@ApiModelProperty("物联通讯状态 0:未连接 1:已连接")
|
||||
private Integer connectStatus;
|
||||
|
||||
@ApiModelProperty("ICD")
|
||||
private String icd;
|
||||
|
||||
@ApiModelProperty("是否支持升级(0:否 1:是)")
|
||||
private Integer upgrade;
|
||||
}
|
||||
@@ -56,6 +56,8 @@ public class CsLedgerParam extends BaseEntity {
|
||||
@NotBlank(message = "台账表Id不能为空")
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
|
||||
private String pids;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -140,6 +140,19 @@ public class CsLineParam extends BaseEntity {
|
||||
*/
|
||||
private String monitorUser;
|
||||
|
||||
/**
|
||||
* 监测位置
|
||||
*/
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 日志等级(NORMAL、DEBUG、WARN、ERROR)
|
||||
*/
|
||||
private String lineLogLevel;
|
||||
|
||||
/**
|
||||
* 是否是主要监测点(0: 不是 1:是)
|
||||
*/
|
||||
private Integer isImportant;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.csdevice.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-07
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class DevVersionParam extends BaseParam {
|
||||
private String keyword;
|
||||
}
|
||||
@@ -23,31 +23,31 @@ public class DeviceExcelTemplete implements Serializable {
|
||||
/**
|
||||
* 装置名称
|
||||
*/
|
||||
@Excel(name = "装置名称", width = 15)
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 网关识别码
|
||||
*/
|
||||
@Excel(name = "网关识别码", width = 15)
|
||||
@Excel(name = "网络设备ID", width = 15)
|
||||
private String ndid;
|
||||
|
||||
/**
|
||||
* 装置类型(直连设备、网关设备、装置)
|
||||
*/
|
||||
@Excel(name = "装置类型(直连设备,网关设备)", width = 30)
|
||||
@Excel(name = "设备类型(直连设备,网关设备、便携式设备)", width = 30)
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 装置型号(pqs588、pqs680...)
|
||||
*/
|
||||
@Excel(name = "装置型号", width = 15)
|
||||
@Excel(name = "设备型号", width = 15)
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置接入方式(mqtt、cloud)
|
||||
*/
|
||||
@Excel(name = "装置接入方式(mqtt、cloud)", width = 25)
|
||||
@Excel(name = "通讯协议(MQTT、CLD)", width = 25)
|
||||
private String devAccessMethod;
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,26 +28,18 @@ public class AppProjectPO extends BaseEntity {
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
// @TableField(value = "engineering_id")
|
||||
// private String engineeringId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 地市Id
|
||||
*/
|
||||
@TableField(value = "area")
|
||||
private String area;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 0:删除 1:正常
|
||||
*/
|
||||
@@ -57,5 +49,8 @@ public class AppProjectPO extends BaseEntity {
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
@TableField(value = "sort")
|
||||
private Integer sort;
|
||||
|
||||
|
||||
}
|
||||
@@ -7,10 +7,9 @@ import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/7 11:29【需求编号】
|
||||
@@ -62,7 +61,7 @@ public class CsEdDataPO extends BaseEntity {
|
||||
* 版本日期
|
||||
*/
|
||||
@TableField(value = "version_date")
|
||||
private Date versionDate;
|
||||
private LocalDateTime versionDate;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
@@ -88,6 +87,11 @@ public class CsEdDataPO extends BaseEntity {
|
||||
@TableField(value = "file_path")
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* crc文件校验码
|
||||
*/
|
||||
@TableField(value = "crc")
|
||||
private String crc;
|
||||
|
||||
|
||||
}
|
||||
@@ -64,5 +64,10 @@ public class CsEngineeringPO extends BaseEntity {
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "sort")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -130,4 +130,32 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
||||
@TableField(value = "node_process")
|
||||
private Integer nodeProcess;
|
||||
|
||||
/**
|
||||
* 日志等级(NORMAL、DEBUG、WARN、ERROR)
|
||||
*/
|
||||
@TableField(value = "dev_log_level")
|
||||
private String devLogLevel;
|
||||
|
||||
/**
|
||||
* 所属工程
|
||||
*/
|
||||
@TableField(value = "associated_engineering")
|
||||
private String associatedEngineering;
|
||||
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
@TableField(value = "associated_project")
|
||||
private String associatedProject;
|
||||
|
||||
/**
|
||||
* icd模型
|
||||
*/
|
||||
@TableField(value = "icd")
|
||||
private String icd;
|
||||
|
||||
/**
|
||||
* 是否支持升级(0:否 1:是)
|
||||
*/
|
||||
private Integer upgrade;
|
||||
}
|
||||
@@ -165,4 +165,16 @@ public class CsLinePO extends BaseEntity {
|
||||
*/
|
||||
@TableField(value = "report_file_path")
|
||||
private String reportFilePath;
|
||||
|
||||
/**
|
||||
* 日志等级(NORMAL、DEBUG、WARN、ERROR)
|
||||
*/
|
||||
@TableField(value = "line_log_level")
|
||||
private String lineLogLevel;
|
||||
|
||||
/**
|
||||
* 是否是主要监测点(0: 不是 1:是)
|
||||
*/
|
||||
@TableField(value = "is_important")
|
||||
private Integer isImportant;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_sms_send_record")
|
||||
public class CsSmsSendRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
private String receiver;
|
||||
|
||||
private String content;
|
||||
|
||||
private String messageType;
|
||||
|
||||
private String credentialToken;
|
||||
|
||||
private Integer sendStatus;
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String failReason;
|
||||
|
||||
private Integer retryCount;
|
||||
|
||||
private Integer maxRetry;
|
||||
|
||||
private Long responseTime;
|
||||
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-23
|
||||
* @description 设备升级日志
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_upgrade_logs")
|
||||
public class CsUpgradeLogs {
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@TableField(value = "dev_id")
|
||||
private String devId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField(value = "version_no")
|
||||
private String versionNo;
|
||||
|
||||
/**
|
||||
* 升级结果(0:失败 1:成功)
|
||||
*/
|
||||
private Integer result;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@TableField(value = "user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 登录名称
|
||||
*/
|
||||
@TableField(value = "login_name")
|
||||
private String loginName;
|
||||
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.IGNORED)
|
||||
private String createBy;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.IGNORED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE, insertStrategy = FieldStrategy.IGNORED)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE, insertStrategy = FieldStrategy.IGNORED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.csdevice.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户置顶表
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2026-03-04
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("cs_user_pins")
|
||||
public class CsUserPins extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 目标类型:1-设备,2-工程
|
||||
*/
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 目标ID(设备ID或工程ID)
|
||||
*/
|
||||
private String targetId;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ public class CldLedgerVo implements Serializable {
|
||||
private String engineeringDescription;
|
||||
|
||||
@ApiModelProperty(value = "项目信息")
|
||||
private List<AppProjectPO> projectInfoList;
|
||||
private List<ProjectVO> projectInfoList;
|
||||
|
||||
@ApiModelProperty(value = "设备信息")
|
||||
private List<CsEquipmentDeliveryPO> deviceInfoList;
|
||||
@@ -39,4 +39,7 @@ public class CldLedgerVo implements Serializable {
|
||||
@ApiModelProperty(value = "监测点信息")
|
||||
private List<CsLinePO> lineInfoList;
|
||||
|
||||
@ApiModelProperty("工程排序")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -70,12 +70,11 @@ public class CsEdDataVO extends BaseEntity {
|
||||
@ApiModelProperty(value = "版本类型")
|
||||
private String versionType;
|
||||
|
||||
@ApiModelProperty(value = "crc信息")
|
||||
private String crcInfo;
|
||||
|
||||
@ApiModelProperty(value = ".bin文件")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty(value = "CRC校验")
|
||||
private String crc;
|
||||
|
||||
|
||||
}
|
||||
@@ -67,5 +67,6 @@ public class CsEngineeringVO extends BaseEntity {
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -94,4 +94,16 @@ public class CsEquipmentDeliveryVO extends BaseEntity {
|
||||
@ApiModelProperty(value="前置服务器id")
|
||||
private String nodeId ;
|
||||
|
||||
@ApiModelProperty(value="所属工程id")
|
||||
private String associatedEngineering;
|
||||
|
||||
@ApiModelProperty(value="所属工程名称")
|
||||
private String associatedEngineeringName;
|
||||
|
||||
@ApiModelProperty(value="所属项目id")
|
||||
private String associatedProject;
|
||||
|
||||
@ApiModelProperty(value="所属项目名称")
|
||||
private String associatedProjectName;
|
||||
|
||||
}
|
||||
@@ -69,6 +69,12 @@ public class CsLedgerVO implements Serializable {
|
||||
@ApiModelProperty(name = "process",value = "流程状态")
|
||||
private Integer process;
|
||||
|
||||
@ApiModelProperty(name = "isTop",value = "是否置顶,默认不置顶")
|
||||
private Integer isTop = 0;
|
||||
|
||||
@ApiModelProperty(name = "devConType",value = "设备连接方式 MQTT || CLD")
|
||||
private String devConType;
|
||||
|
||||
@ApiModelProperty(name = "children",value = "子节点")
|
||||
private List<CsLedgerVO> children = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,54 +16,59 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DevCountVO {
|
||||
//
|
||||
@ApiModelProperty(value = "设备在线总数")
|
||||
private Integer onLineDevCount;
|
||||
public class DevCountVO implements Serializable {
|
||||
|
||||
/** 所有工程相关数据 **/
|
||||
@ApiModelProperty(value = "所有工程设备在线总数")
|
||||
private Integer onLineDevCount = 0;
|
||||
private List<CsEquipmentDeliveryPO> onLineDevs;
|
||||
|
||||
@ApiModelProperty(value = "设备离线总数")
|
||||
private Integer offLineDevCount;
|
||||
@ApiModelProperty(value = "所有工程设备离线总数")
|
||||
private Integer offLineDevCount = 0;
|
||||
private List<CsEquipmentDeliveryPO> offLineDevs;
|
||||
@ApiModelProperty(value = "警告数")
|
||||
private Integer alarmCount;
|
||||
@ApiModelProperty(value = "事件数")
|
||||
private Integer eventCount;
|
||||
|
||||
@ApiModelProperty(value = "所有工程暂态事件数量(未读)")
|
||||
private Integer eventCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "所有工程稳态事件数量(未读)")
|
||||
private Integer harmonicCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "所有工程运行告警数量(未读)")
|
||||
private Integer alarmCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "所有工程运行事件数量(未读)")
|
||||
private Integer runCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "工程个数")
|
||||
private Integer eningerCount;
|
||||
|
||||
@ApiModelProperty(value = "运行事件数")
|
||||
private Integer runCount;
|
||||
@ApiModelProperty(value = "稳态件数")
|
||||
private Integer harmonicCount;
|
||||
private Integer eningerCount = 0;
|
||||
|
||||
/** 当前工程相关数据 **/
|
||||
@ApiModelProperty(value = "当前工程id")
|
||||
private String currentId;
|
||||
|
||||
@ApiModelProperty(value = "当前工程设备在线总数")
|
||||
private Integer currentOnLineDevCount;
|
||||
private Integer currentOnLineDevCount = 0;
|
||||
private List<CsEquipmentDeliveryPO> currentOnLineDevs;
|
||||
|
||||
@ApiModelProperty(value = "当前工程设备离线总数")
|
||||
private Integer currentOffLineDevCount;
|
||||
private Integer currentOffLineDevCount = 0;
|
||||
private List<CsEquipmentDeliveryPO> currentOffLineDevs;
|
||||
|
||||
@ApiModelProperty(value = "设备警告数")
|
||||
private Integer currentAlarmCount;
|
||||
@ApiModelProperty(value = "暂态事件数")
|
||||
private Integer currentEventCount;
|
||||
@ApiModelProperty(value = "运行事件数")
|
||||
private Integer currentRunCount;
|
||||
@ApiModelProperty(value = "稳态件数")
|
||||
private Integer currentHarmonicCount;
|
||||
@ApiModelProperty(value = "当前工程暂态事件数量(未读)")
|
||||
private Integer currentEventCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "当前工程稳态事件数量(未读)")
|
||||
private Integer currentHarmonicCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "当前工程运行告警数量(未读)")
|
||||
private Integer currentAlarmCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "当前工程运行事件数量(未读)")
|
||||
private Integer currentRunCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "当前项目数")
|
||||
private Integer currentProjectCount;
|
||||
private Integer currentProjectCount = 0;
|
||||
|
||||
@ApiModelProperty(value = "反馈数")
|
||||
private Integer feedBackCount;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer feedBackCount = 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-07
|
||||
*/
|
||||
@Data
|
||||
public class DevVersionVO {
|
||||
/**
|
||||
* 设备Id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 协议版本号
|
||||
*/
|
||||
private String protocolVersion;
|
||||
|
||||
/**
|
||||
* 版本日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime versionDate;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 设备类型名称
|
||||
*/
|
||||
private String devModelName;
|
||||
|
||||
/**
|
||||
* icd型号
|
||||
*/
|
||||
private String icd;
|
||||
|
||||
|
||||
/**
|
||||
* 所属工程
|
||||
*/
|
||||
private String associatedEngineering;
|
||||
|
||||
/**
|
||||
* 所属项目
|
||||
*/
|
||||
private String associatedProject;
|
||||
|
||||
/**
|
||||
* 装置启用状态(0:停用 1:启用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 修改人员
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
*/
|
||||
private String updateByName;
|
||||
|
||||
/**
|
||||
* 设备运行状态(0:删除 1:离线 2:在线)
|
||||
*/
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 是否支持升级(0:否 1:是)
|
||||
*/
|
||||
private Integer upgrade;
|
||||
|
||||
/**
|
||||
* 设备与MQTT服务器连接状态 (0:未连接 1:已连接)
|
||||
*/
|
||||
private Integer connectStatus;
|
||||
}
|
||||
@@ -6,7 +6,9 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
//台账信息
|
||||
/**
|
||||
* @author xy
|
||||
*/ //台账信息
|
||||
@Data
|
||||
public class DeviceInfo implements Serializable {
|
||||
|
||||
@@ -31,6 +33,9 @@ public class DeviceInfo implements Serializable {
|
||||
@ApiModelProperty("对时启动标志")
|
||||
private boolean rightTime;
|
||||
|
||||
@ApiModelProperty("终端日志等级")
|
||||
private String devLogLevel;
|
||||
|
||||
@ApiModelProperty("监测点集合")
|
||||
private List<MonitorInfo> monitorData;
|
||||
|
||||
@@ -70,6 +75,9 @@ public class DeviceInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("ct2")
|
||||
private Double ct2;
|
||||
|
||||
@ApiModelProperty("监测点日志等级")
|
||||
private String lineLogLevel;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2026/3/5
|
||||
*/
|
||||
@Data
|
||||
public class EngineeringHomePageVO implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "engineeringId",value = "工程id")
|
||||
private String engineeringId;
|
||||
|
||||
@ApiModelProperty(name = "engineeringName",value = "工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@ApiModelProperty(name = "devTotal",value = "设备总数")
|
||||
private Integer devTotal = 0;
|
||||
|
||||
@ApiModelProperty(name = "onlineDevTotal",value = "在线设备数")
|
||||
private Integer onlineDevTotal = 0;
|
||||
|
||||
@ApiModelProperty(name = "offlineDevTotal",value = "离线设备数")
|
||||
private Integer offlineDevTotal = 0;
|
||||
|
||||
@ApiModelProperty(name = "alarmTotal",value = "告警数量(未读)")
|
||||
private Integer alarmTotal = 0;
|
||||
|
||||
@ApiModelProperty(name = "isTop",value = "是否置顶 0:未置顶 1:已置顶")
|
||||
private Integer isTop = 0;
|
||||
|
||||
@ApiModelProperty(name = "sort",value = "排序")
|
||||
private Integer sort;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* 日志信息
|
||||
*/
|
||||
@Data
|
||||
public class EngineeringProjectRelationVo implements Serializable {
|
||||
|
||||
//工程信息
|
||||
@ApiModelProperty("工程id")
|
||||
private String engineeringId;
|
||||
|
||||
@ApiModelProperty("工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@ApiModelProperty("省ID")
|
||||
private String provinceId;
|
||||
|
||||
@ApiModelProperty("市ID")
|
||||
private String cityId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String engineeringAreaName;
|
||||
|
||||
@ApiModelProperty("工程备注")
|
||||
private String engineeringRemark;
|
||||
|
||||
@ApiModelProperty("工程排序")
|
||||
private Integer engineeringSort;
|
||||
|
||||
@ApiModelProperty("项目信息")
|
||||
private List<ProjectInfo> projectInfoList;
|
||||
|
||||
//项目信息
|
||||
@Data
|
||||
public static class ProjectInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("项目地址")
|
||||
private String projectArea;
|
||||
|
||||
@ApiModelProperty("项目备注")
|
||||
private String projectRemark;
|
||||
|
||||
@ApiModelProperty("项目排序")
|
||||
private Integer projectSort;
|
||||
|
||||
@ApiModelProperty("拓扑图id")
|
||||
private String topologyInfoId;
|
||||
|
||||
@ApiModelProperty("拓扑图信息")
|
||||
private String topologyInfo;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -132,4 +132,7 @@ public class LineDetailDataVO {
|
||||
|
||||
@ApiModelProperty(name = "对象类型大类")
|
||||
private String bigObjType;
|
||||
|
||||
@ApiModelProperty(name = "监测点数据类型 一次值:Primary 二次值:Secondary")
|
||||
private String dataLevel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import cn.hutool.core.lang.RegexPool;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-02-27
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "管理后台 - 消息记录发送 Request VO")
|
||||
public class MessageRecordReqVO {
|
||||
|
||||
private String channel;
|
||||
|
||||
@Schema(description = "消息类型", example = "verify_code/order_notify/marketing/system_notify")
|
||||
@NotBlank(message = "消息类型不能为空")
|
||||
private String messageType;
|
||||
|
||||
@Schema(description = "接收者")
|
||||
@NotBlank(message = "接收者不能为空")
|
||||
@Pattern(regexp = RegexPool.EMAIL + "|" + RegexPool.MOBILE, message = "必须是有效的邮箱或手机号格式")
|
||||
private String receiver;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "消息内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
private String templateCode;
|
||||
|
||||
@Schema(description = "模板参数")
|
||||
private String templateParams;
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -54,4 +57,19 @@ public class ProjectEquipmentVO {
|
||||
@ApiModelProperty(value = "设备nDid")
|
||||
private String nDid;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否置顶(0:未置顶 1:置顶),默认是0")
|
||||
private Integer isTop = 0;
|
||||
|
||||
@ApiModelProperty(value = "设备类型(监测设备:DEV_CLD 治理设备:Direct_Connected_Device)")
|
||||
private String devType;
|
||||
|
||||
@ApiModelProperty(value = "是否存在告警(告警通过查询当日的未读的暂态事件判断)")
|
||||
private Boolean isAlarm;
|
||||
|
||||
@ApiModelProperty(value = "监测点集合")
|
||||
private List<CsLinePO> lineList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.csdevice.pojo.vo;
|
||||
|
||||
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ProjectVO extends AppProjectPO {
|
||||
|
||||
private String topoId;
|
||||
}
|
||||
@@ -1,383 +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);
|
||||
}
|
||||
}
|
||||
//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);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
package com.njcn.csdevice.utils;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/8/2 13:41【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public class MqttTest {
|
||||
private static final String MQTT_BROKER = "tcp://192.168.1.13:1883";
|
||||
private static final String MQTT_TOPIC = "file/upload";
|
||||
private static final String FILE_PATH = "C:\\Users\\无名\\Desktop\\111.json"; // Replace with the path to your file
|
||||
|
||||
public static void main(String[] args) {
|
||||
MqttClient mqttClient = null;
|
||||
try {
|
||||
// Connect to the MQTT broker
|
||||
mqttClient = new MqttClient(MQTT_BROKER, MqttClient.generateClientId());
|
||||
MqttConnectOptions connOpts = new MqttConnectOptions();
|
||||
connOpts.setUserName("t_user");
|
||||
connOpts.setPassword("njcnpqs".toCharArray());
|
||||
|
||||
mqttClient.connect(connOpts);
|
||||
|
||||
// Read the file
|
||||
File file = new File(FILE_PATH);
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
byte[] fileContent = new byte[(int) file.length()];
|
||||
fis.read(fileContent);
|
||||
fis.close();
|
||||
|
||||
// Create a new MQTT message
|
||||
MqttMessage message = new MqttMessage(fileContent);
|
||||
|
||||
// Set QoS level and retain flag as per your requirement
|
||||
message.setQos(1);
|
||||
// message.setRetained(false);
|
||||
|
||||
// Record the start time
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
// Publish the message to the MQTT topic
|
||||
mqttClient.publish(MQTT_TOPIC, message);
|
||||
|
||||
// Record the end time
|
||||
long endTime = System.currentTimeMillis();
|
||||
|
||||
System.out.println("File published successfully!");
|
||||
System.out.println("Time taken: " + (endTime - startTime) + " ms");
|
||||
} catch (MqttException | IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
// Disconnect from the MQTT broker
|
||||
if (mqttClient != null && mqttClient.isConnected()) {
|
||||
try {
|
||||
mqttClient.disconnect();
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//package com.njcn.csdevice.utils;
|
||||
//
|
||||
//import org.eclipse.paho.client.mqttv3.*;
|
||||
//
|
||||
//import java.io.File;
|
||||
//import java.io.FileInputStream;
|
||||
//import java.io.FileOutputStream;
|
||||
//import java.io.IOException;
|
||||
//import java.nio.file.Files;
|
||||
//import java.nio.file.Paths;
|
||||
//
|
||||
///**
|
||||
// * Description:
|
||||
// * Date: 2023/8/2 13:41【需求编号】
|
||||
// *
|
||||
// * @author clam
|
||||
// * @version V1.0.0
|
||||
// */
|
||||
//public class MqttTest {
|
||||
// private static final String MQTT_BROKER = "tcp://192.168.1.13:1883";
|
||||
// private static final String MQTT_TOPIC = "file/upload";
|
||||
// private static final String FILE_PATH = "C:\\Users\\无名\\Desktop\\111.json"; // Replace with the path to your file
|
||||
//
|
||||
// public static void main(String[] args) {
|
||||
// MqttClient mqttClient = null;
|
||||
// try {
|
||||
// // Connect to the MQTT broker
|
||||
// mqttClient = new MqttClient(MQTT_BROKER, MqttClient.generateClientId());
|
||||
// MqttConnectOptions connOpts = new MqttConnectOptions();
|
||||
// connOpts.setUserName("t_user");
|
||||
// connOpts.setPassword("njcnpqs".toCharArray());
|
||||
//
|
||||
// mqttClient.connect(connOpts);
|
||||
//
|
||||
// // Read the file
|
||||
// File file = new File(FILE_PATH);
|
||||
// FileInputStream fis = new FileInputStream(file);
|
||||
// byte[] fileContent = new byte[(int) file.length()];
|
||||
// fis.read(fileContent);
|
||||
// fis.close();
|
||||
//
|
||||
// // Create a new MQTT message
|
||||
// MqttMessage message = new MqttMessage(fileContent);
|
||||
//
|
||||
// // Set QoS level and retain flag as per your requirement
|
||||
// message.setQos(1);
|
||||
//// message.setRetained(false);
|
||||
//
|
||||
// // Record the start time
|
||||
// long startTime = System.currentTimeMillis();
|
||||
//
|
||||
// // Publish the message to the MQTT topic
|
||||
// mqttClient.publish(MQTT_TOPIC, message);
|
||||
//
|
||||
// // Record the end time
|
||||
// long endTime = System.currentTimeMillis();
|
||||
//
|
||||
// System.out.println("File published successfully!");
|
||||
// System.out.println("Time taken: " + (endTime - startTime) + " ms");
|
||||
// } catch (MqttException | IOException e) {
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// // Disconnect from the MQTT broker
|
||||
// if (mqttClient != null && mqttClient.isConnected()) {
|
||||
// try {
|
||||
// mqttClient.disconnect();
|
||||
// } catch (MqttException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.tocrhz</groupId>
|
||||
<artifactId>mqtt-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
|
||||
@@ -6,9 +6,9 @@ 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.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
||||
@@ -6,6 +6,7 @@ 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.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.csdevice.service.IRStatIntegrityDService;
|
||||
import com.njcn.csharmonic.pojo.param.StatisticsDataParam;
|
||||
@@ -50,9 +51,9 @@ public class RStatIntegrityDController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("获取数据")
|
||||
public HttpResult<List<RStatIntegrityD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime){
|
||||
public HttpResult<List<RStatIntegrityD>> list(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("list");
|
||||
List<RStatIntegrityD> result = irStatIntegrityDService.getData(list,startTime,endTime);
|
||||
List<RStatIntegrityD> result = irStatIntegrityDService.getData(param.getLineList(),param.getStartTime(),param.getEndTime());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ 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.pojo.po.RStatOnlineRateD;
|
||||
import com.njcn.csdevice.service.IRStatOnlineRateDService;
|
||||
import com.njcn.csharmonic.pojo.param.StatisticsDataParam;
|
||||
@@ -16,7 +17,10 @@ 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 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 java.util.List;
|
||||
|
||||
@@ -50,9 +54,9 @@ public class RStatOnlineRateDController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("获取数据")
|
||||
public HttpResult<List<RStatOnlineRateD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime){
|
||||
public HttpResult<List<RStatOnlineRateD>> list(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("list");
|
||||
List<RStatOnlineRateD> result = rStatOnlineRateDService.getData(list,startTime,endTime);
|
||||
List<RStatOnlineRateD> result = rStatOnlineRateDService.getData(param.getLineList(),param.getStartTime(),param.getEndTime());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,5 @@ public class CsSoftInfoController extends BaseController {
|
||||
csSoftInfoService.removeById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.njcn.csdevice.controller.equipment;
|
||||
|
||||
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.pojo.po.CsUpgradeLogs;
|
||||
import com.njcn.csdevice.service.CsUpgradeLogsService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
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 caozehui
|
||||
* @data 2026-04-23
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/csUpgradeLogs")
|
||||
@Api(tags = "装置升级日志")
|
||||
@AllArgsConstructor
|
||||
@Validated
|
||||
public class CsUpgradeLogsController extends BaseController {
|
||||
private final CsUpgradeLogsService csUpgradeLogsService;
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增升级日志")
|
||||
@ApiImplicitParam(name = "csUpgradeLogs", value = "日志参数", required = true)
|
||||
public HttpResult add(@RequestBody CsUpgradeLogs csUpgradeLogs) {
|
||||
csUpgradeLogs.setUserName(RequestUtil.getUsername());
|
||||
csUpgradeLogs.setLoginName(RequestUtil.getLoginName());
|
||||
String methodDescribe = getMethodDescribe("add");
|
||||
return HttpResultUtil.assembleCommonResponseResult(csUpgradeLogsService.save(csUpgradeLogs) ? CommonResponseEnum.SUCCESS : CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
|
||||
@GetMapping("/getByDevId")
|
||||
@ApiOperation("查询指定devId的所有升级日志")
|
||||
@ApiImplicitParam(name = "devId", value = "装置Id", required = true)
|
||||
public HttpResult<List<CsUpgradeLogs>> getByDevId(@RequestBody String devId) {
|
||||
String methodDescribe = getMethodDescribe("getByDevId");
|
||||
List<CsUpgradeLogs> result = csUpgradeLogsService.lambdaQuery().eq(CsUpgradeLogs::getDevId, devId).list();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
@@ -45,9 +47,9 @@ public class DevModelController extends BaseController {
|
||||
@ApiOperation("新增设备模板")
|
||||
@ApiImplicitParam(name = "csDevModelAddParm", value = "新增设备模板参数", required = true)
|
||||
@Deprecated
|
||||
public HttpResult<CsDevModelPO> addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm){
|
||||
public HttpResult<CsDevModelPO> addDevModel(@RequestBody @Validated CsDevModelAddParm csDevModelAddParm) {
|
||||
String methodDescribe = getMethodDescribe("addDevModel");
|
||||
CsDevModelPO flag = csDevModelService.addDevModel (csDevModelAddParm);
|
||||
CsDevModelPO flag = csDevModelService.addDevModel(csDevModelAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ public class DevModelController extends BaseController {
|
||||
@PostMapping("/AuditDevModel")
|
||||
@ApiOperation("更新/删除设备模板参数")
|
||||
@ApiImplicitParam(name = "csDevModelAuditParm", value = "更新/删除设备模板参数", required = true)
|
||||
public HttpResult<Boolean> AuditDevModel(@RequestBody @Validated CsDevModelAuditParm csDevModelAuditParm ){
|
||||
public HttpResult<Boolean> AuditDevModel(@RequestBody @Validated CsDevModelAuditParm csDevModelAuditParm) {
|
||||
String methodDescribe = getMethodDescribe("AuditDevModel");
|
||||
|
||||
Boolean flag = csDevModelService.AuditDevModel(csDevModelAuditParm);
|
||||
@@ -64,15 +66,14 @@ public class DevModelController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryDevModelPage")
|
||||
@ApiOperation("设备模板分页查询")
|
||||
@ApiImplicitParam(name = "csDevModelQueryParm", value = "设备模板查询参数", required = true)
|
||||
public HttpResult<IPage<CsDevModelPageVO>> queryDevModelPage(@RequestBody @Validated CsDevModelQueryParm csDevModelQueryParm ){
|
||||
public HttpResult<IPage<CsDevModelPageVO>> queryDevModelPage(@RequestBody @Validated CsDevModelQueryParm csDevModelQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryDevModelPage");
|
||||
|
||||
IPage<CsDevModelPageVO> page = csDevModelService.queryPage (csDevModelQueryParm);
|
||||
IPage<CsDevModelPageVO> page = csDevModelService.queryPage(csDevModelQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -80,10 +81,10 @@ public class DevModelController extends BaseController {
|
||||
@PostMapping("/queryDevModelOne")
|
||||
@ApiOperation("设备模板查询")
|
||||
@ApiImplicitParam(name = "csDevModelQueryListParm", value = "设备模板信息", required = true)
|
||||
public HttpResult<CsDevModelPageVO> queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){
|
||||
public HttpResult<CsDevModelPageVO> queryDevModelOne(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm) {
|
||||
String methodDescribe = getMethodDescribe("queryDevModelOne");
|
||||
|
||||
CsDevModelPageVO csDevModelPageVO = csDevModelService.queryDevModelOne(csDevModelQueryListParm);
|
||||
CsDevModelPageVO csDevModelPageVO = csDevModelService.queryDevModelOne(csDevModelQueryListParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csDevModelPageVO, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -91,13 +92,13 @@ public class DevModelController extends BaseController {
|
||||
@PostMapping("/findModel")
|
||||
@ApiOperation("根据条件查询模板")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devType", value = "装置类型", required = true),
|
||||
@ApiImplicitParam(name = "version", value = "版本", required = true),
|
||||
@ApiImplicitParam(name = "time", value = "时间", required = true)
|
||||
@ApiImplicitParam(name = "devType", value = "装置类型", required = true),
|
||||
@ApiImplicitParam(name = "version", value = "版本", required = true),
|
||||
@ApiImplicitParam(name = "time", value = "时间", required = true)
|
||||
})
|
||||
public HttpResult<CsDevModelPO> findModel(@RequestParam("devType") String devType,@RequestParam("version") String version,@RequestParam("time") String time){
|
||||
public HttpResult<CsDevModelPO> findModel(@RequestParam("devType") String devType, @RequestParam("version") String version, @RequestParam("time") String time) {
|
||||
String methodDescribe = getMethodDescribe("findModel");
|
||||
CsDevModelPO csDevModelPo = csDevModelService.findModel(devType,version,time);
|
||||
CsDevModelPO csDevModelPo = csDevModelService.findModel(devType, version, time);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csDevModelPo, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -105,10 +106,9 @@ public class DevModelController extends BaseController {
|
||||
@PostMapping("/getModelById")
|
||||
@ApiOperation("根据模板Id获取模板数据")
|
||||
@ApiImplicitParam(name = "id", value = "模板id", required = true)
|
||||
public HttpResult<CsDevModelPO> getModelById(@RequestParam("id") String id){
|
||||
public HttpResult<CsDevModelPO> getModelById(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getModelById");
|
||||
CsDevModelPO po = csDevModelService.getModelById(id);
|
||||
CsDevModelPO po = csDevModelService.getModelById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,16 +11,22 @@ import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||
import com.njcn.csdevice.pojo.vo.DevCountVO;
|
||||
import com.njcn.csdevice.pojo.vo.DevUserVO;
|
||||
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
||||
import com.njcn.csharmonic.api.EventUserFeignClient;
|
||||
import com.njcn.csharmonic.param.CsEventUserQueryParam;
|
||||
import com.njcn.web.advice.DeviceLog;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
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.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,6 +42,8 @@ import java.util.List;
|
||||
public class DeviceUserController extends BaseController {
|
||||
|
||||
private final CsDeviceUserPOService csDeviceUserPOService;
|
||||
private final EventUserFeignClient eventUserFeignClient;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增设备扫码设备用户绑定")
|
||||
@@ -77,11 +85,13 @@ public class DeviceUserController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/devCount")
|
||||
@ApiOperation("设备统计")
|
||||
@ApiImplicitParam(name = "id", value = "工程id", required = true)
|
||||
public HttpResult<DevCountVO> devCount(@RequestParam("id") String id){
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "工程id"),
|
||||
@ApiImplicitParam(name = "time", value = "时间")
|
||||
})
|
||||
public HttpResult<DevCountVO> devCount(@RequestParam("id") String id,@RequestParam("time") String time){
|
||||
String methodDescribe = getMethodDescribe("devCount");
|
||||
|
||||
DevCountVO result = csDeviceUserPOService.devCount (id);
|
||||
DevCountVO result = csDeviceUserPOService.devCount(id,time);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -161,4 +171,35 @@ public class DeviceUserController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getList")
|
||||
@ApiOperation("根据设备集合获取数据")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<CsDeviceUserPO>> getList(@RequestBody UserDevParam param){
|
||||
String methodDescribe = getMethodDescribe("getList");
|
||||
List<CsDeviceUserPO> list = csDeviceUserPOService.getList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getIdList")
|
||||
@ApiOperation("获取事件id集合")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<List<String>> getIdList(@RequestParam("param") String param){
|
||||
String methodDescribe = getMethodDescribe("getIdList");
|
||||
List<String> list = new ArrayList<>();
|
||||
CsEventUserQueryParam param1 = new CsEventUserQueryParam();
|
||||
param1.setUserId(RequestUtil.getUserIndex());
|
||||
param1.setStartTime(null);
|
||||
param1.setEndTime(null);
|
||||
param1.setEventIds(null);
|
||||
|
||||
if (Objects.equals(param, "1")) {
|
||||
list = eventUserFeignClient.queryTempHarmonic(param1).getData();
|
||||
} else if (Objects.equals(param, "3")) {
|
||||
list = eventUserFeignClient.queryAlarmEvent(param1).getData();
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ import com.njcn.csdevice.enums.DeviceOperate;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.param.*;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import com.njcn.csdevice.pojo.vo.DevVersionVO;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
||||
import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO;
|
||||
import com.njcn.csdevice.service.CsDevModelRelationService;
|
||||
@@ -28,6 +30,7 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||
import com.njcn.web.advice.DeviceLog;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -46,6 +49,7 @@ 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
|
||||
@@ -63,20 +67,20 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||
private final IMqttUserService mqttUserService;
|
||||
private final CsDevModelRelationService csDevModelRelationService;
|
||||
private final DictTreeFeignClient dictTreeFeignClient;
|
||||
private final DictTreeFeignClient dictTreeFeignClient;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addEquipmentDelivery")
|
||||
@ApiOperation("新增出厂设备")
|
||||
@ApiImplicitParam(name = "csEquipmentDeliveryAddParm", value = "新增项目参数", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.ADD)
|
||||
public HttpResult<CsEquipmentDeliveryPO> addEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm){
|
||||
public HttpResult<CsEquipmentDeliveryPO> addEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) {
|
||||
String methodDescribe = getMethodDescribe("addEquipmentDelivery");
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.save(csEquipmentDeliveryAddParm);
|
||||
if (Objects.nonNull(po)){
|
||||
if (Objects.nonNull(po)) {
|
||||
//查询mqtt用户名和密码是否存在
|
||||
boolean result = mqttUserService.findMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
||||
if (result){
|
||||
if (result) {
|
||||
//初始化装置mqtt连接信息(使用sha256加密)
|
||||
mqttUserService.insertMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
||||
}
|
||||
@@ -88,7 +92,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/AuditEquipmentDelivery")
|
||||
@ApiOperation("删除出厂设备")
|
||||
@DeviceLog(operateType = DeviceOperate.DELETE)
|
||||
public HttpResult<Boolean> AuditEquipmentDelivery(@RequestParam("id")String id ){
|
||||
public HttpResult<Boolean> AuditEquipmentDelivery(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("AuditEquipmentDelivery");
|
||||
Boolean flag = csEquipmentDeliveryService.AuditEquipmentDelivery(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
@@ -99,13 +103,13 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiOperation("修改出厂设备")
|
||||
@DeviceLog(operateType = DeviceOperate.UPDATE)
|
||||
@ApiImplicitParam(name = "csEquipmentDeliveryAuditParm", value = "新增项目参数", required = true)
|
||||
public HttpResult<Boolean> updateEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAuditParm csEquipmentDeliveryAuditParm ){
|
||||
public HttpResult<Boolean> updateEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAuditParm csEquipmentDeliveryAuditParm) {
|
||||
String methodDescribe = getMethodDescribe("updateEquipmentDelivery");
|
||||
Boolean flag = csEquipmentDeliveryService.updateEquipmentDelivery(csEquipmentDeliveryAuditParm);
|
||||
if (flag){
|
||||
if (flag) {
|
||||
//查询mqtt用户名和密码是否存在
|
||||
boolean result = mqttUserService.findMqttUser(csEquipmentDeliveryAuditParm.getNdid());
|
||||
if (result){
|
||||
if (result) {
|
||||
//初始化装置mqtt连接信息(使用sha256加密)
|
||||
mqttUserService.insertMqttUser(csEquipmentDeliveryAuditParm.getNdid());
|
||||
}
|
||||
@@ -117,9 +121,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/queryEquipmentByndid")
|
||||
@ApiOperation("通过ndid查询出厂设备")
|
||||
@ApiImplicitParam(name = "ndid", value = "网关识别码", required = true)
|
||||
public HttpResult<CsEquipmentDeliveryVO> queryEquipmentByndid(@RequestParam("ndid")String ndid){
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -127,9 +131,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/queryEquipmentByProject")
|
||||
@ApiOperation("通过项目查询出厂设备")
|
||||
@ApiImplicitParam(name = "projectEquipmentQueryParm", value = "项目信息", required = true)
|
||||
public HttpResult<IPage<ProjectEquipmentVO>> queryEquipmentByProject(@RequestBody ProjectEquipmentQueryParm projectEquipmentQueryParm){
|
||||
public HttpResult<IPage<ProjectEquipmentVO>> queryEquipmentByProject(@RequestBody ProjectEquipmentQueryParm projectEquipmentQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryEquipmentByProject");
|
||||
IPage<ProjectEquipmentVO> projectEquipmentVos = csEquipmentDeliveryService.queryEquipmentByProject(projectEquipmentQueryParm);
|
||||
IPage<ProjectEquipmentVO> projectEquipmentVos = csEquipmentDeliveryService.queryEquipmentByProject(projectEquipmentQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, projectEquipmentVos, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -141,9 +145,9 @@ 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);
|
||||
csEquipmentDeliveryService.updateStatusBynDid(nDid, status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -151,7 +155,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/queryEquipmentById")
|
||||
@ApiOperation("设备查询通过id获取")
|
||||
@ApiImplicitParam(name = "ids", value = "设备id集合", required = true)
|
||||
public HttpResult<List<CsEquipmentDeliveryDTO>> queryEquipmentById(@RequestParam List<String> ids){
|
||||
public HttpResult<List<CsEquipmentDeliveryDTO>> queryEquipmentById(@RequestParam List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("queryEquipmentById");
|
||||
if (CollectionUtil.isEmpty(ids)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
@@ -171,7 +175,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("出厂设备列表")
|
||||
@ApiImplicitParam(name = "param", value = "查询参数", required = true)
|
||||
public HttpResult<Page<CsEquipmentDeliveryVO>> list(@RequestBody CsEquipmentDeliveryQueryParm param){
|
||||
public HttpResult<Page<CsEquipmentDeliveryVO>> list(@RequestBody CsEquipmentDeliveryQueryParm param) {
|
||||
String methodDescribe = getMethodDescribe("list");
|
||||
Page<CsEquipmentDeliveryVO> page = csEquipmentDeliveryService.list(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
@@ -185,9 +189,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "type", value = "类型", required = true),
|
||||
@ApiImplicitParam(name = "lineId", value = "监测点id", required = false)
|
||||
})
|
||||
public HttpResult<DeviceManagerVO> getDeviceData(@RequestParam String deviceId,@RequestParam String type,@RequestParam String lineId){
|
||||
public HttpResult<DeviceManagerVO> getDeviceData(@RequestParam String deviceId, @RequestParam String type, @RequestParam String lineId) {
|
||||
String methodDescribe = getMethodDescribe("getDeviceData");
|
||||
DeviceManagerVO vo = csEquipmentDeliveryService.getDeviceData(deviceId,type,lineId);
|
||||
DeviceManagerVO vo = csEquipmentDeliveryService.getDeviceData(deviceId, type, lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -200,9 +204,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "module", value = "模块个数", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid,@RequestParam("id") String id,@RequestParam("module") Integer module){
|
||||
public HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid, @RequestParam("id") String id, @RequestParam("module") Integer module) {
|
||||
String methodDescribe = getMethodDescribe("updateSoftInfoBynDid");
|
||||
csEquipmentDeliveryService.updateSoftInfoBynDid(nDid,id,module);
|
||||
csEquipmentDeliveryService.updateSoftInfoBynDid(nDid, id, module);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -210,9 +214,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/findDevByNDid")
|
||||
@ApiOperation("通过nDid查询设备信息")
|
||||
@ApiImplicitParam(name = "nDid", value = "网关识别码", required = true)
|
||||
public HttpResult<CsEquipmentDeliveryPO> findDevByNDid(@RequestParam("nDid")String nDid){
|
||||
public HttpResult<CsEquipmentDeliveryPO> findDevByNDid(@RequestParam("nDid") String nDid) {
|
||||
String methodDescribe = getMethodDescribe("findDevByNDid");
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.findDevByNDid(nDid);
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.findDevByNDid(nDid);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -225,13 +229,13 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, DeviceExcelTemplete.class, new ArrayList<DeviceExcelTemplete>());
|
||||
List<SysDicTreePO> deviceType = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.DEVICE_TYPE.getCode()).getData();
|
||||
if(!CollectionUtils.isEmpty(deviceType)){
|
||||
if (!CollectionUtils.isEmpty(deviceType)) {
|
||||
List<String> collect = deviceType.get(0).getChildren().stream().map(SysDicTreePO::getName).collect(Collectors.toList());
|
||||
ExcelUtil.selectList(workbook, 2, 2, collect.toArray(new String[]{}));
|
||||
List<String> collect2 = deviceType.get(0).getChildren().stream().map(SysDicTreePO::getChildren).flatMap(Collection::stream).map(SysDicTreePO::getName).collect(Collectors.toList());
|
||||
ExcelUtil.selectList(workbook, 3, 3, collect2.toArray(new String[]{}));
|
||||
}
|
||||
ExcelUtil.selectList(workbook, 4, 4, Stream.of("MQTT","CLD").collect(Collectors.toList()).toArray(new String[]{}));
|
||||
ExcelUtil.selectList(workbook, 4, 4, Stream.of("MQTT", "CLD").collect(Collectors.toList()).toArray(new String[]{}));
|
||||
String fileName = "设备模板.xlsx";
|
||||
ExportParams exportExcel = new ExportParams("设备模板", "设备模板");
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
@@ -244,11 +248,11 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
public HttpResult<String> importEquipment(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("importEquipment");
|
||||
List<CsEquipmentDeliveryPO> csEquipmentDeliveryPOS = csEquipmentDeliveryService.importEquipment(file, response);
|
||||
if (!CollectionUtils.isEmpty(csEquipmentDeliveryPOS)){
|
||||
csEquipmentDeliveryPOS.forEach(temp->{
|
||||
if (!CollectionUtils.isEmpty(csEquipmentDeliveryPOS)) {
|
||||
csEquipmentDeliveryPOS.forEach(temp -> {
|
||||
//查询mqtt用户名和密码是否存在
|
||||
boolean result = mqttUserService.findMqttUser(temp.getNdid());
|
||||
if (result){
|
||||
if (result) {
|
||||
//初始化装置mqtt连接信息(使用sha256加密)
|
||||
mqttUserService.insertMqttUser(temp.getNdid());
|
||||
}
|
||||
@@ -260,18 +264,18 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ResponseBody
|
||||
@ApiOperation("联调完成")
|
||||
@PostMapping(value = "testcompletion")
|
||||
public HttpResult<String> testCompletion(@RequestParam("deviceId") String deviceId,@RequestParam("type") Integer type,@RequestParam("remark") String remark){
|
||||
public HttpResult<String> testCompletion(@RequestParam("deviceId") String deviceId, @RequestParam("type") Integer type, @RequestParam("remark") String remark) {
|
||||
String methodDescribe = getMethodDescribe("testCompletion");
|
||||
csEquipmentDeliveryService.testCompletion(deviceId,type, remark);
|
||||
csEquipmentDeliveryService.testCompletion(deviceId, type, remark);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("取消联调")
|
||||
@PostMapping(value = "deleteTest")
|
||||
public HttpResult<String> deleteTest(@RequestParam("deviceId") String deviceId,@RequestParam("type") Integer type,@RequestParam("remark") String remark){
|
||||
public HttpResult<String> deleteTest(@RequestParam("deviceId") String deviceId, @RequestParam("type") Integer type, @RequestParam("remark") String remark) {
|
||||
String methodDescribe = getMethodDescribe("deleteTest");
|
||||
csEquipmentDeliveryService.deleteTest(deviceId,type, remark);
|
||||
csEquipmentDeliveryService.deleteTest(deviceId, type, remark);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -283,9 +287,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "id", value = "软件信息id", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> updateSoftInfo(@RequestParam("nDid") String nDid,@RequestParam("id") String id){
|
||||
public HttpResult<String> updateSoftInfo(@RequestParam("nDid") String nDid, @RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("updateSoftInfo");
|
||||
csEquipmentDeliveryService.updateSoftInfo(nDid,id);
|
||||
csEquipmentDeliveryService.updateSoftInfo(nDid, id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -297,9 +301,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "number", value = "模块个数", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<String> updateModuleNumber(@RequestParam("nDid") String nDid,@RequestParam("number") Integer number){
|
||||
public HttpResult<String> updateModuleNumber(@RequestParam("nDid") String nDid, @RequestParam("number") Integer number) {
|
||||
String methodDescribe = getMethodDescribe("updateModuleNumber");
|
||||
csEquipmentDeliveryService.updateModuleNumber(nDid,number);
|
||||
csEquipmentDeliveryService.updateModuleNumber(nDid, number);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -307,7 +311,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/rebootDevice")
|
||||
@ApiOperation("重启设备")
|
||||
@ApiImplicitParam(name = "nDid", value = "nDid", required = true)
|
||||
public HttpResult<String> rebootDevice(@RequestParam("nDid") String nDid){
|
||||
public HttpResult<String> rebootDevice(@RequestParam("nDid") String nDid) {
|
||||
String methodDescribe = getMethodDescribe("rebootDevice");
|
||||
boolean result = csEquipmentDeliveryService.rebootDevice(nDid);
|
||||
if (result) {
|
||||
@@ -320,7 +324,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAll")
|
||||
@ApiOperation("获取所有装置")
|
||||
public HttpResult<List<CsEquipmentDeliveryPO>> getAll(){
|
||||
public HttpResult<List<CsEquipmentDeliveryPO>> getAll() {
|
||||
String methodDescribe = getMethodDescribe("getAll");
|
||||
List<CsEquipmentDeliveryPO> result = csEquipmentDeliveryService.getAll();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
@@ -329,7 +333,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/judgeDevModel")
|
||||
@ApiOperation("判断设备型号")
|
||||
public HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid){
|
||||
public HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid) {
|
||||
String methodDescribe = getMethodDescribe("judgeDevModel");
|
||||
boolean result = csEquipmentDeliveryService.judgeDevModel(nDid);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
@@ -338,7 +342,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDevByLineId")
|
||||
@ApiOperation("根据监测点id查询装置信息")
|
||||
public HttpResult<CsEquipmentDeliveryPO> getDevByLineId(@RequestParam("lineId") String lineId){
|
||||
public HttpResult<CsEquipmentDeliveryPO> getDevByLineId(@RequestParam("lineId") String lineId) {
|
||||
String methodDescribe = getMethodDescribe("getDevByLineId");
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.getDevByLineId(lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
@@ -349,7 +353,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiOperation("新增云前置设备")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.ADD)
|
||||
public HttpResult<CsEquipmentDeliveryPO> addCldDev(@RequestBody @Validated CsEquipmentDeliveryAddParm param){
|
||||
public HttpResult<CsEquipmentDeliveryPO> addCldDev(@RequestBody @Validated CsEquipmentDeliveryAddParm param) {
|
||||
String methodDescribe = getMethodDescribe("addCldDev");
|
||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.saveCld(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
@@ -360,7 +364,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiOperation("删除云前置设备")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.DELETE)
|
||||
public HttpResult<Boolean> delCldDev(@RequestParam("id") String id){
|
||||
public HttpResult<Boolean> delCldDev(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("delCldDev");
|
||||
boolean result = csEquipmentDeliveryService.delCldDev(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
@@ -371,7 +375,7 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiOperation("修改云前置设备")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
@DeviceLog(operateType = DeviceOperate.UPDATE)
|
||||
public HttpResult<Boolean> updateCldDev(@RequestBody @Validated CsEquipmentDeliveryAuditParm param){
|
||||
public HttpResult<Boolean> updateCldDev(@RequestBody @Validated CsEquipmentDeliveryAuditParm param) {
|
||||
String methodDescribe = getMethodDescribe("updateCldDev");
|
||||
boolean result = csEquipmentDeliveryService.updateCldDev(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
@@ -385,9 +389,9 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||
})
|
||||
@ApiIgnore
|
||||
public HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo){
|
||||
public HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo) {
|
||||
String methodDescribe = getMethodDescribe("updateCldDevStatus");
|
||||
csEquipmentDeliveryService.updateCldDevStatus(nodeId,processNo);
|
||||
csEquipmentDeliveryService.updateCldDevStatus(nodeId, processNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -395,13 +399,14 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/flipCldDevStatus")
|
||||
@ApiOperation("云前置设备状态翻转")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "date", value = "时间", required = true),
|
||||
@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){
|
||||
public HttpResult<Boolean> flipCldDevStatus(@RequestParam("date") String date, @RequestParam("devId") String devId, @RequestParam("status") Integer status) {
|
||||
String methodDescribe = getMethodDescribe("flipCldDevStatus");
|
||||
csEquipmentDeliveryService.flipCldDevStatus(devId,status);
|
||||
csEquipmentDeliveryService.flipCldDevStatus(date, devId, status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -409,10 +414,22 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@PostMapping("/getRunPortableDev")
|
||||
@ApiOperation("获取用户未绑定的在运的便携式设备")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||
public HttpResult<List<CsEquipmentDeliveryPO>> getRunPortableDev(@RequestParam("userId") String userId){
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/version/page")
|
||||
@ApiOperation("查询设备版本信息")
|
||||
@ApiImplicitParam(name = "baseParam", value = "查询日志参数", required = true)
|
||||
public HttpResult<IPage<DevVersionVO>> versionPage(@RequestBody CsEquipmentDeliveryQueryParm baseParam) {
|
||||
String methodDescribe = getMethodDescribe("versionPage");
|
||||
|
||||
IPage<DevVersionVO> list = csEquipmentDeliveryService.versionPage(baseParam);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class IcdController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzFileByEventId")
|
||||
@ApiOperation("指定事件补召波形")
|
||||
@ApiOperation("指定事件补召波形指令下发")
|
||||
@ApiImplicitParam(name = "eventId", value = "事件id", required = true)
|
||||
public HttpResult<String> bzFileByEventId(@RequestParam String eventId){
|
||||
String methodDescribe = getMethodDescribe("bzFileByEventId");
|
||||
@@ -77,7 +77,7 @@ public class IcdController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzEvent")
|
||||
@ApiOperation("补召事件")
|
||||
@ApiOperation("补召事件指令下发")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> bzEvent(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("bzEvent");
|
||||
@@ -87,7 +87,7 @@ public class IcdController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/bzFile")
|
||||
@ApiOperation("补召波形")
|
||||
@ApiOperation("补召波形指令下发")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||
public HttpResult<String> bzFile(@RequestBody @Validated IcdBzParam param){
|
||||
String methodDescribe = getMethodDescribe("bzFile");
|
||||
|
||||
@@ -12,6 +12,7 @@ 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.CsCommTerminalService;
|
||||
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
||||
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
||||
import com.njcn.csdevice.service.CsLinePOService;
|
||||
@@ -47,13 +48,8 @@ import java.util.stream.Collectors;
|
||||
@Api(tags = "通用台账查询")
|
||||
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;
|
||||
private final CsCommTerminalService commTerminalService;
|
||||
|
||||
/**
|
||||
* 根据用户获取设备信息
|
||||
@@ -64,7 +60,7 @@ public class CsCommTerminalController extends BaseController {
|
||||
@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);
|
||||
List<String> devIds = commTerminalService.commGetDevIds(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devIds, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -77,19 +73,8 @@ public class CsCommTerminalController extends BaseController {
|
||||
@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);
|
||||
}
|
||||
List<String> lineIds = commTerminalService.getLineIdsByUser(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineIds, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,37 +86,12 @@ public class CsCommTerminalController extends BaseController {
|
||||
@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);
|
||||
}
|
||||
String methodDescribe = getMethodDescribe("getLineIdsByUser");
|
||||
List<String> lineIds = commTerminalService.getPqUserIdsByUser(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineIds, 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过监测点获取监测点数据单位
|
||||
@@ -144,11 +104,7 @@ public class CsCommTerminalController extends BaseController {
|
||||
@ApiImplicitParam(name = "lineId", value = "实体", required = true)
|
||||
public HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineId") String lineId) {
|
||||
String methodDescribe = getMethodDescribe("lineUnitDetail");
|
||||
|
||||
PqsDeviceUnit pqsDeviceUnit = pqsDeviceUnitMapper.selectById(lineId);
|
||||
if(Objects.isNull(pqsDeviceUnit)){
|
||||
pqsDeviceUnit = new PqsDeviceUnit();
|
||||
}
|
||||
PqsDeviceUnit pqsDeviceUnit = commTerminalService.lineUnitDetail(lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pqsDeviceUnit, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,18 +54,29 @@ public class CsLedgerController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/lineTree")
|
||||
@ApiOperation("五层设备树(监测点层,根节点为治理设备和便携式设备)")
|
||||
public HttpResult<List<CsLedgerVO>> lineTree(){
|
||||
@ApiImplicitParam(name = "type", value = "台账树类型")
|
||||
public HttpResult<List<CsLedgerVO>> lineTree(@RequestParam(required = false) @Validated String type){
|
||||
String methodDescribe = getMethodDescribe("lineTree");
|
||||
List<CsLedgerVO> list = csLedgerService.getLineTree();
|
||||
List<CsLedgerVO> list = csLedgerService.getLineTree(type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/AppLineTree")
|
||||
@ApiOperation("app端监测点树")
|
||||
public HttpResult<List<CsLedgerVO>> appLineTree(){
|
||||
String methodDescribe = getMethodDescribe("AppLineTree");
|
||||
List<CsLedgerVO> list = csLedgerService.appLineTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/deviceTree")
|
||||
@ApiOperation("四层设备树(装置层,根节点为治理设备和便携式设备)")
|
||||
public HttpResult<List<CsLedgerVO>> getDeviceTree(){
|
||||
@ApiImplicitParam(name = "type", value = "台账树类型")
|
||||
public HttpResult<List<CsLedgerVO>> getDeviceTree(@RequestParam(required = false) @Validated String type){
|
||||
String methodDescribe = getMethodDescribe("getDeviceTree");
|
||||
List<CsLedgerVO> list = csLedgerService.getDeviceTree();
|
||||
List<CsLedgerVO> list = csLedgerService.getDeviceTree(type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -78,6 +89,16 @@ public class CsLedgerController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/objTree")
|
||||
@ApiOperation("三层对象用户树")
|
||||
public HttpResult<List<CsLedgerVO>> objTree(){
|
||||
String methodDescribe = getMethodDescribe("getProjectTree");
|
||||
List<CsLedgerVO> list = csLedgerService.objTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增台账信息")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -8,14 +7,15 @@ 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.OverlimitMapper;
|
||||
import com.njcn.csdevice.pojo.dto.CsLineDTO;
|
||||
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.csdevice.utils.COverlimitUtil;
|
||||
import com.njcn.device.biz.mapper.OverLimitWlMapper;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.utils.COverlimitUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.*;
|
||||
@@ -28,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -44,7 +45,7 @@ import java.util.List;
|
||||
public class CslineController extends BaseController {
|
||||
|
||||
private final CsLinePOService csLinePOService;
|
||||
private final OverlimitMapper overlimitMapper;
|
||||
private final OverLimitWlMapper overLimitWlMapper;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryLineById")
|
||||
@@ -87,8 +88,8 @@ public class CslineController extends BaseController {
|
||||
for(CsLinePO csLinePO: list){
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(csLinePO.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||
overlimit.setId(csLinePO.getLineId());
|
||||
overlimitMapper.deleteById(csLinePO.getLineId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
overLimitWlMapper.deleteById(csLinePO.getLineId());
|
||||
overLimitWlMapper.insert(overlimit);
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
@@ -104,6 +105,17 @@ public class CslineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getCustomDetailByLineId")
|
||||
@ApiOperation("根据id查询监测点")
|
||||
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam String id){
|
||||
String methodDescribe = getMethodDescribe("getCustomDetailByLineId");
|
||||
Map<String,String> map = csLinePOService.getCustomDetailByLineId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, map, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateLine")
|
||||
@ApiOperation("修改监测点信息")
|
||||
@@ -144,7 +156,17 @@ public class CslineController extends BaseController {
|
||||
@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);
|
||||
List<Overlimit> result = overLimitWlMapper.selectBatchIds(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@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 = overLimitWlMapper.selectById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -176,10 +198,10 @@ public class CslineController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("addCldLine");
|
||||
csLinePOService.addCldLine(param);
|
||||
//新增监测点限值
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),param.getProtocolCapacity().floatValue(),param.getDevCapacity().floatValue(),param.getShortCircuitCapacity().floatValue(),0,0);
|
||||
overlimit.setId(param.getLineId());
|
||||
overlimitMapper.deleteById(param.getLineId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
overLimitWlMapper.deleteById(param.getLineId());
|
||||
overLimitWlMapper.insert(overlimit);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -191,10 +213,10 @@ public class CslineController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("updateCldLine");
|
||||
csLinePOService.updateCldLine(param);
|
||||
//修改监测点限值
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),param.getProtocolCapacity().floatValue(),param.getDevCapacity().floatValue(),param.getShortCircuitCapacity().floatValue(),0,0);
|
||||
overlimit.setId(param.getLineId());
|
||||
overlimitMapper.deleteById(param.getLineId());
|
||||
overlimitMapper.insert(overlimit);
|
||||
overLimitWlMapper.deleteById(param.getLineId());
|
||||
overLimitWlMapper.insert(overlimit);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -205,6 +227,7 @@ public class CslineController extends BaseController {
|
||||
public HttpResult<List<CsLinePO>> delCldLine(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("delCldLine");
|
||||
csLinePOService.deleteCldLine(id);
|
||||
overLimitWlMapper.deleteById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -232,6 +255,15 @@ public class CslineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAllLineDetail")
|
||||
@ApiOperation("获取所有监测点id详情")
|
||||
public HttpResult<List<CsLineDTO>> getAllLineDetail(){
|
||||
String methodDescribe = getMethodDescribe("getAllLineDetail");
|
||||
List<CsLineDTO> list = csLinePOService.getAllLineDetail();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getSimpleLine")
|
||||
@ApiOperation("查询登录用户拥有的监测点台账")
|
||||
@@ -258,10 +290,7 @@ public class CslineController extends BaseController {
|
||||
@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));
|
||||
List<CsLinePO> list = csLinePOService.getLineList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -280,7 +309,7 @@ public class CslineController extends BaseController {
|
||||
@ApiOperation("获取敏感负荷用户监测点列表")
|
||||
@ApiImplicitParam(name = "param", value = "查询参数", required = true)
|
||||
public HttpResult<Page<PqSensitiveUserLineVO>> getSensitiveUserLineList(@RequestBody BaseParam param) {
|
||||
String methodDescribe = getMethodDescribe("getList");
|
||||
String methodDescribe = getMethodDescribe("getSensitiveUserLineList");
|
||||
Page<PqSensitiveUserLineVO> page = csLinePOService.getSensitiveUserLineList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.njcn.csdevice.controller.message;
|
||||
|
||||
|
||||
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.DeviceMessageParam;
|
||||
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||
import com.njcn.csdevice.pojo.vo.DeviceManagerDetailVO;
|
||||
import com.njcn.csdevice.service.DeviceMessageService;
|
||||
import com.njcn.csdevice.service.ICsDataArrayService;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
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.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详细数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-31
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/deviceMessage")
|
||||
@Api(tags = "App消息推送管理")
|
||||
@AllArgsConstructor
|
||||
public class DeviceMessageController extends BaseController {
|
||||
|
||||
private final DeviceMessageService deviceMessageService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventUserByDeviceId")
|
||||
@ApiOperation("根据设备获取需要推送的用户id")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devId", value = "设备id", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "isAdmin", value = "是否需要推送给管理员", required = true, paramType = "query")
|
||||
})
|
||||
public HttpResult<List<String>> getEventUserByDeviceId(@RequestParam("devId") String devId, @RequestParam("isAdmin") Boolean isAdmin){
|
||||
String methodDescribe = getMethodDescribe("getEventUserByDeviceId");
|
||||
List<String> list = deviceMessageService.getEventUserByDeviceId(devId,isAdmin);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSendUserByType")
|
||||
@ApiOperation("根据事件类型和用户id查询打开推送的用户信息")
|
||||
@ApiImplicitParam(name = "param", value = "参数", required = true, paramType = "query")
|
||||
public HttpResult<List<User>> getSendUserByType(@RequestBody DeviceMessageParam param){
|
||||
String methodDescribe = getMethodDescribe("getSendUserByType");
|
||||
List<User> list = deviceMessageService.getSendUserByType(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineInfo")
|
||||
@ApiOperation("获取监测点信息")
|
||||
@ApiImplicitParam(name = "id", value = "参数", required = true, paramType = "query")
|
||||
public HttpResult<String> getLineInfo(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("getLineInfo");
|
||||
deviceMessageService.getLineInfo(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "success", methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.njcn.csdevice.controller.message;
|
||||
|
||||
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.vo.MessageRecordReqVO;
|
||||
import com.njcn.csdevice.service.ISmsSendService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/sms")
|
||||
@Api(tags = "短信发送管理")
|
||||
@AllArgsConstructor
|
||||
public class SmsSendController extends BaseController {
|
||||
|
||||
private final ISmsSendService smsSendService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/send")
|
||||
@ApiOperation("发送短信(同步,包含重试)")
|
||||
public HttpResult<String> sendSms(@RequestBody MessageRecordReqVO vo) {
|
||||
String methodDescribe = getMethodDescribe("sendSms");
|
||||
|
||||
try {
|
||||
smsSendService.sendSmsWithRetry(vo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(
|
||||
CommonResponseEnum.SUCCESS,
|
||||
"短信发送成功",
|
||||
methodDescribe
|
||||
);
|
||||
} catch (Exception e) {
|
||||
log.error("短信发送失败", e);
|
||||
return HttpResultUtil.assembleCommonResponseResult(
|
||||
CommonResponseEnum.FAIL,
|
||||
e.getMessage(),
|
||||
methodDescribe
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/send/simple")
|
||||
@ApiOperation("发送短信(简化参数)")
|
||||
public HttpResult<String> sendSmsSimple(
|
||||
@RequestParam String receiver,
|
||||
@RequestParam String content,
|
||||
@RequestParam(defaultValue = "verify_code") String messageType) {
|
||||
String methodDescribe = getMethodDescribe("sendSmsSimple");
|
||||
|
||||
try {
|
||||
smsSendService.sendSmsWithRetry(receiver, content, messageType);
|
||||
return HttpResultUtil.assembleCommonResponseResult(
|
||||
CommonResponseEnum.SUCCESS,
|
||||
"短信发送成功",
|
||||
methodDescribe
|
||||
);
|
||||
} catch (Exception e) {
|
||||
log.error("短信发送失败", e);
|
||||
return HttpResultUtil.assembleCommonResponseResult(
|
||||
CommonResponseEnum.FAIL,
|
||||
e.getMessage(),
|
||||
methodDescribe
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -66,12 +65,21 @@ public class AppProjectController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addAppProject")
|
||||
@ApiOperation("新增项目")
|
||||
public HttpResult<Boolean> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
||||
public HttpResult<AppProjectPO> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
||||
String methodDescribe = getMethodDescribe("addAppProject");
|
||||
|
||||
AppProjectPO po = appProjectService.addAppProject(appProjectAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, ObjectUtil.isNotNull(po), methodDescribe);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addPortableProject")
|
||||
@ApiOperation("新增便携式项目")
|
||||
public HttpResult<AppProjectPO> addPortableProject(@Validated @RequestBody AppProjectAddParm appProjectAddParm){
|
||||
String methodDescribe = getMethodDescribe("addPortableProject");
|
||||
AppProjectPO po = appProjectService.addAppProject(appProjectAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/auditAppProject")
|
||||
@ApiOperation("修改/删除项目")
|
||||
@@ -91,4 +99,14 @@ public class AppProjectController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getProjectByName")
|
||||
@ApiOperation("根据项目名称获取项目信息")
|
||||
@ApiImplicitParam(name = "name", value = "项目名称", required = true)
|
||||
public HttpResult<AppProjectPO> getProjectByName(@RequestParam("name") String name){
|
||||
String methodDescribe = getMethodDescribe("getProjectByName");
|
||||
AppProjectPO po = appProjectService.getProjectByName(name);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.pojo.param.CsEdDataAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEdDataAuditParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEdDataQueryParm;
|
||||
import com.njcn.csdevice.pojo.po.CsEdDataPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEdDataVO;
|
||||
import com.njcn.csdevice.service.CsEdDataService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -79,4 +80,14 @@ public class CsEdDataController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getById")
|
||||
@ApiOperation("根据id查询")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
public HttpResult<CsEdDataPO> getById(@Validated @RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("getById");
|
||||
CsEdDataPO dataPO = csEdDataService.getById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, dataPO, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -99,4 +99,13 @@ public class CsMarketDataController extends BaseController {
|
||||
List<CsMarketDataVO> list = csMarketDataService.queryAllEnginner(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/insert")
|
||||
@ApiOperation("根据用户、工程新增数据")
|
||||
public HttpResult<Boolean> insertData(@RequestParam("userId")String userId, @RequestParam("engineeringId")String engineeringId){
|
||||
String methodDescribe = getMethodDescribe("insertData");
|
||||
Boolean result = csMarketDataService.insertData(userId,engineeringId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CsTouristDataPOController extends BaseController {
|
||||
@PostMapping("/queryAll")
|
||||
@ApiOperation("查询游客数据")
|
||||
public HttpResult<List<CsTouristDataParmVO>> queryAll(){
|
||||
String methodDescribe = getMethodDescribe("query");
|
||||
String methodDescribe = getMethodDescribe("queryAll");
|
||||
|
||||
List<CsTouristDataParmVO> list = csTouristDataPOService.queryAll();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.njcn.csdevice.controller.project;
|
||||
|
||||
|
||||
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.CsUserPinsParam;
|
||||
import com.njcn.csdevice.pojo.po.CsUserPins;
|
||||
import com.njcn.csdevice.service.ICsUserPinsService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户置顶表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2026-03-04
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/csUserPins")
|
||||
@Api(tags = "置顶设备(工程)")
|
||||
@AllArgsConstructor
|
||||
public class CsUserPinsController extends BaseController {
|
||||
|
||||
private final ICsUserPinsService csUserPinsService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/engineeringPinToTop")
|
||||
@ApiOperation("用户置顶工程(取消置顶)")
|
||||
public HttpResult<Boolean> engineeringPinToTop(@Validated @RequestBody CsUserPinsParam param){
|
||||
String methodDescribe = getMethodDescribe("engineeringPinToTop");
|
||||
Boolean result = csUserPinsService.engineeringPinToTop(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPinToTopList")
|
||||
@ApiOperation("获取用户置顶设备(工程)")
|
||||
public HttpResult<List<CsUserPins>> getPinToTopList(){
|
||||
String methodDescribe = getMethodDescribe("getPinToTopList");
|
||||
List<CsUserPins> result = csUserPinsService.getPinToTopList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ 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;
|
||||
@@ -105,4 +103,15 @@ public class EngineeringController extends BaseController {
|
||||
List<CsEngineeringPO> result = csEngineeringService.getUnlinkedEngineering(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEngineeringByName")
|
||||
@ApiOperation("根据工程名称获取工程信息")
|
||||
@ApiImplicitParam(name = "name", value = "工程名称", required = true)
|
||||
public HttpResult<CsEngineeringPO> getEngineeringByName(@RequestParam("name") String name){
|
||||
String methodDescribe = getMethodDescribe("getEngineeringByName");
|
||||
CsEngineeringPO po = csEngineeringService.getEngineeringByName(name);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user