Compare commits
36 Commits
| 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 |
@@ -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;
|
||||
@@ -68,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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
@@ -103,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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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文件")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -145,6 +145,14 @@ public class CsLineParam extends BaseEntity {
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@@ -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:正常
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -20,8 +20,14 @@ public class EngineeringProjectRelationVo implements Serializable {
|
||||
@ApiModelProperty("工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@ApiModelProperty("区域")
|
||||
private String engineeringArea;
|
||||
@ApiModelProperty("省ID")
|
||||
private String provinceId;
|
||||
|
||||
@ApiModelProperty("市ID")
|
||||
private String cityId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String engineeringAreaName;
|
||||
|
||||
@ApiModelProperty("工程备注")
|
||||
private String engineeringRemark;
|
||||
@@ -51,6 +57,9 @@ public class EngineeringProjectRelationVo implements Serializable {
|
||||
@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,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,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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,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.pojo.dto.CsLineDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
@@ -254,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("查询登录用户拥有的监测点台账")
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -103,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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.dto.CsLineDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -21,4 +22,6 @@ public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
||||
|
||||
|
||||
Map<String,String> getCustomDetailByLineId(@Param("lineId")String lineId);
|
||||
|
||||
List<CsLineDTO> findLineList();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsSmsSendRecord;
|
||||
|
||||
public interface CsSmsSendRecordMapper extends BaseMapper<CsSmsSendRecord> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsUpgradeLogs;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2026-04-23
|
||||
*/
|
||||
public interface CsUpgradeLogsMapper extends BaseMapper<CsUpgradeLogs> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsUserPins;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户置顶表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2026-03-04
|
||||
*/
|
||||
public interface CsUserPinsMapper extends BaseMapper<CsUserPins> {
|
||||
|
||||
}
|
||||
@@ -45,6 +45,7 @@
|
||||
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
|
||||
AND a.`name` like concat('%',#{temp.searchValue},'%')
|
||||
</if>
|
||||
AND a.`name` != '便携式项目'
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -41,7 +41,9 @@
|
||||
c.create_time createTime,
|
||||
c.run_status,
|
||||
c.mac mac,
|
||||
c.process process
|
||||
c.process process,
|
||||
c.sort sort,
|
||||
c.dev_type devType
|
||||
FROM
|
||||
(select * from cs_ledger where LEVEL = 0 and State =1
|
||||
) a,
|
||||
@@ -97,9 +99,14 @@
|
||||
<if test="queryParam.process != null and queryParam.process !=''">
|
||||
and process = #{queryParam.process}
|
||||
</if>
|
||||
<if test="queryParam.runStatus != null and queryParam.runStatus !=''">
|
||||
and run_status = #{queryParam.runStatus}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="queryParam.runStatus != null and queryParam.runStatus != ''">
|
||||
AND run_status = #{queryParam.runStatus}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND run_status IN (1,2)
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="queryParam.searchValue != null and queryParam.searchValue !=''">
|
||||
and (name like concat('%',#{queryParam.searchValue},'%') or ndid like concat('%',#{queryParam.searchValue},'%'))
|
||||
</if>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
t1.*
|
||||
from
|
||||
cs_equipment_delivery t0
|
||||
left join cs_line t1 on
|
||||
right join cs_line t1 on
|
||||
t0.id = t1.device_id
|
||||
where
|
||||
t0.ndid = #{id}
|
||||
@@ -53,4 +53,15 @@
|
||||
WHERE
|
||||
line.line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<select id="findLineList" resultType="com.njcn.csdevice.pojo.dto.CsLineDTO">
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.dev_type deviceType
|
||||
FROM
|
||||
cs_line t1
|
||||
LEFT JOIN cs_equipment_delivery t2 ON t1.device_id = t2.id
|
||||
WHERE
|
||||
t1.`status` = 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -62,4 +62,7 @@ public interface AppProjectService extends IService<AppProjectPO> {
|
||||
AppProjectPO updateData(AppProjectAuditParm param);
|
||||
|
||||
boolean delete(String id);
|
||||
|
||||
AppProjectPO getProjectByName(String name);
|
||||
|
||||
}
|
||||
|
||||
@@ -56,4 +56,6 @@ public interface AppTopologyDiagramService extends IService<AppTopologyDiagramPO
|
||||
IPage<AppTopologyDiagramVO> queryTopologyDiagramPage(AppTopologyDiagramQueryPageParm appTopologyDiagramQueryPageParm);
|
||||
|
||||
Boolean checkCanDelete(String id);
|
||||
|
||||
AppTopologyDiagramPO getByProjectId(String projectId);
|
||||
}
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
package com.njcn.csdevice.service;
|
||||
|
||||
|
||||
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CsCommTerminalService {
|
||||
|
||||
|
||||
List<String> getLineIdsByUser(String userId);
|
||||
|
||||
|
||||
|
||||
List<String> getPqUserIdsByUser(String userId);
|
||||
|
||||
|
||||
PqsDeviceUnit lineUnitDetail(String lineId);
|
||||
|
||||
|
||||
List<String> commGetDevIds(String userId);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface CsDeviceUserPOService extends IService<CsDeviceUserPO>{
|
||||
|
||||
Boolean share(List<String> ids);
|
||||
|
||||
DevCountVO devCount(String id);
|
||||
DevCountVO devCount(String id,String time);
|
||||
|
||||
String isPrimaryUser(String deviceId);
|
||||
|
||||
@@ -53,4 +53,12 @@ public interface CsDeviceUserPOService extends IService<CsDeviceUserPO>{
|
||||
List<String> findDevByUserId(String userId);
|
||||
|
||||
void channelDevByUserId(UserDevParam param);
|
||||
|
||||
List<CsDeviceUserPO> getList(UserDevParam param);
|
||||
|
||||
/**
|
||||
* 新增用户设备关系表数据 新增主用户信息 && 新增已关联工程的用户的设备关系
|
||||
* @return
|
||||
*/
|
||||
Boolean addRelation(UserDevParam param);
|
||||
}
|
||||
|
||||
@@ -48,5 +48,13 @@ public interface CsEdDataService extends IService<CsEdDataPO> {
|
||||
* @author: xuyang
|
||||
*/
|
||||
CsEdDataVO findByDevTypeId(String devType);
|
||||
|
||||
/**
|
||||
* @Description: 根据装置型号和版本号获取装置类型
|
||||
* @param devTypeId 装置型号
|
||||
* @param versionNo 版本号
|
||||
* @return
|
||||
*/
|
||||
CsEdDataPO findByDevTypeIdAndVersionNo(String devTypeId, String versionNo);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,4 +66,6 @@ public interface CsEngineeringService extends IService<CsEngineeringPO>{
|
||||
|
||||
boolean deleteData(String id);
|
||||
|
||||
CsEngineeringPO getEngineeringByName(String name);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package com.njcn.csdevice.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryAuditParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryQueryParm;
|
||||
import com.njcn.csdevice.pojo.param.ProjectEquipmentQueryParm;
|
||||
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.web.pojo.param.BaseParam;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -179,10 +179,11 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
|
||||
|
||||
/**
|
||||
* 根据设备id和状态来修改设备运行状态;同时修改设备下的监测点的状态
|
||||
* @param date
|
||||
* @param devId
|
||||
* @param status
|
||||
*/
|
||||
void flipCldDevStatus(String devId, Integer status);
|
||||
void flipCldDevStatus(String date, String devId, Integer status);
|
||||
|
||||
/**
|
||||
* 根据项目id获取设备列表
|
||||
@@ -195,4 +196,5 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
|
||||
|
||||
List<CsEquipmentDeliveryPO> getRunPortableDev(String userId);
|
||||
|
||||
IPage<DevVersionVO> versionPage(CsEquipmentDeliveryQueryParm baseParam);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.csdevice.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.csdevice.pojo.dto.CsLineDTO;
|
||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
@@ -81,6 +82,8 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
||||
|
||||
List<String> getAllLine();
|
||||
|
||||
List<CsLineDTO> getAllLineDetail();
|
||||
|
||||
List<CsLinePO> getSimpleLine();
|
||||
|
||||
List<CsLinePO> getLineBySensitiveUser(List<String> list);
|
||||
|
||||
@@ -30,4 +30,6 @@ public interface CsMarketDataService extends IService<CsMarketData> {
|
||||
List<CsMarketDataVO> queryAllEnginner(String userId);
|
||||
|
||||
Boolean follow(EngineerIdParam engineerIdParams);
|
||||
|
||||
Boolean insertData(String userId,String engineeringId);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user