Compare commits
160 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b7574b2916 | |||
| 43bdcbf623 | |||
| 629ba0746a | |||
| b86c81d70a | |||
| d10240758b | |||
| 995bd8b310 | |||
| 9531e18e93 | |||
| 753a22eb4c | |||
| 814b5757fd | |||
| 9d2b4b97f9 | |||
| ee07f7a5e2 | |||
| 214f297297 | |||
|
|
b908186758 | ||
| 0d1c142885 | |||
| 43b8473976 | |||
| 8c442d8897 | |||
| 066dceaeaf | |||
| 9dca3408ae | |||
| 0d7d1781e3 | |||
| b794842d33 | |||
| 5e0c2d5cbc | |||
| 6c9a33c05d | |||
| a847f541f1 | |||
| 94b5b92991 | |||
| 882d56a2c5 | |||
| 1629e1c4cc | |||
| 45846e1889 | |||
| 030384333e | |||
| dc9958b249 | |||
| a607437225 | |||
| d277eba5fb | |||
| 913c2ef262 | |||
| 0fe80e12b5 | |||
| ffb6ead753 | |||
| 6782b19b7d | |||
| eeb22c749a | |||
| 31c21a43f4 | |||
| a923978f72 | |||
| 40588c6cd4 | |||
| cb76943f0f | |||
| 660925df31 | |||
| 0ce5840d02 | |||
| 9bd6ca43e1 | |||
| d6056e2cac | |||
| 8d8eb4d274 | |||
| b045860a43 | |||
| c0c3ae4e41 | |||
| 443adfaa37 | |||
| a314b3c862 | |||
| 282a592a13 | |||
| 0f839dfd5b | |||
| 45f706475b | |||
| 0a06d2d5eb | |||
| bba6da3c7d | |||
| 71d59528a3 | |||
| 06de2121f6 | |||
| 65d39224ed | |||
| fda83a1bd9 | |||
| 4ee41b833b | |||
|
|
cd07f8bee3 | ||
| 58a559b7b7 | |||
|
|
52342d736d | ||
| 6f5ffb8395 | |||
|
|
ed7c02a116 | ||
|
|
e12d23d4e1 | ||
| 0965eed31b | |||
| f754cf61c4 | |||
| e32e820417 | |||
| 158917f2bc | |||
| 2df06d9597 | |||
| 81da6e54ca | |||
| 1f4e8c7e25 | |||
| f90a3228b9 | |||
| 04cdb50b13 | |||
| b377ad7c95 | |||
|
|
698c0a6eb0 | ||
| ada760eeb2 | |||
| b22bd79750 | |||
|
|
5f14f8fe2f | ||
| b93faee241 | |||
| 2191276185 | |||
| 2206f203e8 | |||
| c28724bb05 | |||
|
|
86d21f984c | ||
|
|
6f38ddf068 | ||
| d1aefa92d8 | |||
| 51a22057a9 | |||
| 8055d08bda | |||
| 8a0e0d8c08 | |||
| 3df2bedaa6 | |||
| 8e4adc58d4 | |||
| 98e880b68d | |||
| 327923ba44 | |||
| e37ace2fd7 | |||
| ea3cff888b | |||
| 1f451f9d0e | |||
| b6c2675311 | |||
|
|
d0c7edff8a | ||
| 59a2bb5e62 | |||
|
|
9c2b2dbd3e | ||
|
|
be4f50fbc5 | ||
| 625ed864c7 | |||
| 10910e36e0 | |||
|
|
49d42328ff | ||
| 53debdf2ef | |||
| be6b29cbb7 | |||
| c72882d023 | |||
| 5022aff834 | |||
|
|
b2511aaaf5 | ||
| 75f07ac86f | |||
|
|
00b16325d6 | ||
|
|
e09232dc55 | ||
|
|
b8157f94c9 | ||
| 5c50e18fc9 | |||
|
|
4b8e2488d2 | ||
|
|
a4acc4775a | ||
|
|
c4803846a4 | ||
| 66c54ac3eb | |||
|
|
ce861e1804 | ||
| 35d44dcc08 | |||
| c3d87eca34 | |||
| 86c6c95777 | |||
| f9d696faad | |||
| c325301a8f | |||
|
|
014370062a | ||
|
|
ada65fd40d | ||
|
|
a940d3961a | ||
|
|
4b7a60190c | ||
| c0be7629dd | |||
|
|
5f82f65b8f | ||
| 4e0b4b6b90 | |||
|
|
ca9193b861 | ||
|
|
469a4ba63e | ||
|
|
4316e72521 | ||
|
|
f942be74f1 | ||
| b750064b16 | |||
| b7c9cd2ee0 | |||
|
|
6cca1cc74d | ||
|
|
a83ab8b141 | ||
|
|
edc2453da2 | ||
| cbc301da5f | |||
| 4142de1fcf | |||
| 78b9a98ab8 | |||
|
|
5169669b2b | ||
|
|
10e0e96b65 | ||
| cd35e67007 | |||
| eb7a1d9beb | |||
|
|
3059f5ac75 | ||
|
|
346afef6d0 | ||
|
|
2cf47ec3b3 | ||
| 83199f07b6 | |||
|
|
8295801f16 | ||
| 306b426573 | |||
|
|
3a60a05ea2 | ||
| 86108004d5 | |||
| 5ef232a485 | |||
| 05112b5262 | |||
|
|
2ca4ee702b | ||
| c95c1271c2 | |||
|
|
105a5314cb |
@@ -112,7 +112,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pqs-influx</artifactId>
|
<artifactId>pqs-influx</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csdevice.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.fallback.CsCommunicateFeignClientFallbackFactory;
|
||||||
|
import com.njcn.csdevice.pojo.dto.PqsCommunicateDto;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/pqsCommunicate", fallbackFactory = CsCommunicateFeignClientFallbackFactory.class,contextId = "pqsCommunicate")
|
||||||
|
|
||||||
|
public interface CsCommunicateFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/insertion")
|
||||||
|
HttpResult<String> insertion(@RequestBody PqsCommunicateDto pqsCommunicateDto);
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
|||||||
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLedger;
|
import com.njcn.csdevice.pojo.po.CsLedger;
|
||||||
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -39,4 +38,9 @@ public interface CsLedgerFeignClient {
|
|||||||
@PostMapping("/deviceTree")
|
@PostMapping("/deviceTree")
|
||||||
@ApiOperation("三层设备树(装置层)")
|
@ApiOperation("三层设备树(装置层)")
|
||||||
HttpResult<List<CsLedgerVO>> getDeviceTree();
|
HttpResult<List<CsLedgerVO>> getDeviceTree();
|
||||||
|
|
||||||
|
@PostMapping("/getAllLedger")
|
||||||
|
HttpResult<List<CsLedgerVO>> getAllLedger();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
|
|||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@@ -18,7 +19,6 @@ import java.util.List;
|
|||||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csline", fallbackFactory = CsLineClientFallbackFactory.class,contextId = "csline")
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csline", fallbackFactory = CsLineClientFallbackFactory.class,contextId = "csline")
|
||||||
public interface CsLineFeignClient {
|
public interface CsLineFeignClient {
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/queryLineById")
|
@PostMapping("/queryLineById")
|
||||||
HttpResult<List<CsLinePO>> queryLineById(@RequestParam("ids") List<String> ids );
|
HttpResult<List<CsLinePO>> queryLineById(@RequestParam("ids") List<String> ids );
|
||||||
|
|
||||||
@@ -36,4 +36,16 @@ public interface CsLineFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/updateLine")
|
@PostMapping("/updateLine")
|
||||||
HttpResult<String> updateLine(@RequestBody CsLineParam csLineParam);
|
HttpResult<String> updateLine(@RequestBody CsLineParam csLineParam);
|
||||||
|
|
||||||
|
@PostMapping("/updateIds")
|
||||||
|
HttpResult<Boolean> updateIds(@RequestBody @Validated CsLineParam csLineParam);
|
||||||
|
|
||||||
|
@PostMapping("/getById")
|
||||||
|
HttpResult<CsLinePO> getById(@RequestParam("lineId") String lineId);
|
||||||
|
|
||||||
|
@PostMapping("/getLinesByDevList")
|
||||||
|
HttpResult<List<CsLinePO>> getLinesByDevList(@RequestBody List<String> ids);
|
||||||
|
|
||||||
|
@PostMapping("/updateLineDataByList")
|
||||||
|
HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id, @RequestParam("setId") String setId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csdevice.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.fallback.CsTerminalLogsClientFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csTerminalLogs", fallbackFactory = CsTerminalLogsClientFallbackFactory.class,contextId = "csTerminalLogs")
|
||||||
|
|
||||||
|
public interface CsTerminalLogsFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/updateLaterData")
|
||||||
|
HttpResult<String> updateLaterData(@RequestParam("id") String id, @RequestParam("code") String code);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.csdevice.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.fallback.CsTerminalReplyClientFallbackFactory;
|
||||||
|
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csTerminalReply", fallbackFactory = CsTerminalReplyClientFallbackFactory.class,contextId = "csTerminalReply")
|
||||||
|
|
||||||
|
public interface CsTerminalReplyFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/updateData")
|
||||||
|
@ApiOperation("更新推送结果")
|
||||||
|
HttpResult<String> updateData(@RequestBody @Validated IcdBzReplyParam param);
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/updateBzData")
|
||||||
|
@ApiOperation("更新补召推送结果")
|
||||||
|
HttpResult<String> updateBzData(@RequestBody @Validated IcdBzReplyParam param);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,7 +5,6 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.csdevice.api.fallback.DataArrayFeignClientFallbackFactory;
|
import com.njcn.csdevice.api.fallback.DataArrayFeignClientFallbackFactory;
|
||||||
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -22,13 +21,14 @@ import java.util.List;
|
|||||||
public interface DataArrayFeignClient {
|
public interface DataArrayFeignClient {
|
||||||
|
|
||||||
@PostMapping("/getArrayBySet")
|
@PostMapping("/getArrayBySet")
|
||||||
HttpResult<List<CsDataArray>> getArrayBySet(@RequestBody List<CsDataSet> setList);
|
HttpResult<List<CsDataArray>> getArrayBySet(@RequestParam("dataSet") String dataSet);
|
||||||
|
|
||||||
@PostMapping("/getDataArray")
|
@PostMapping("/getDataArray")
|
||||||
HttpResult<List<DataArrayTreeVO>> getDataArray(@RequestBody List<String> dataSetList);
|
HttpResult<List<DataArrayTreeVO>> getDataArray(@RequestBody List<String> dataSetList);
|
||||||
|
|
||||||
@PostMapping("/getDataArrayById")
|
@PostMapping("/getDataArrayById")
|
||||||
HttpResult<List<CsDataArray>> getDataArrayById(@RequestParam("pid") String pid, @RequestParam("name") String name);
|
HttpResult<List<CsDataArray>> getDataArrayById(@RequestParam("pid") String pid, @RequestParam("name") String name);
|
||||||
|
|
||||||
@PostMapping("/getDataArrayByIds")
|
@PostMapping("/getDataArrayByIds")
|
||||||
HttpResult<List<CsDataArray>> getDataArrayByIds(@RequestParam("ids") List<String> ids);
|
HttpResult<List<CsDataArray>> getDataArrayByIds(@RequestParam("ids") List<String> ids);
|
||||||
|
|
||||||
|
|||||||
@@ -31,5 +31,13 @@ public interface DataSetFeignClient {
|
|||||||
@PostMapping("/getDataSetBySetIds")
|
@PostMapping("/getDataSetBySetIds")
|
||||||
HttpResult<List<CsDataSet>> getDataSetBySetIds(@RequestBody List<String> lineIds);
|
HttpResult<List<CsDataSet>> getDataSetBySetIds(@RequestBody List<String> lineIds);
|
||||||
|
|
||||||
|
@PostMapping("/getBaseDataSet")
|
||||||
|
HttpResult<CsDataSet> getBaseDataSet(@RequestParam("modelId") String modelId,@RequestParam("clDev") Integer clDev);
|
||||||
|
|
||||||
|
@PostMapping("/getHarmonicDataSet")
|
||||||
|
HttpResult<CsDataSet> getHarmonicDataSet(@RequestParam("modelId") String modelId,@RequestParam("clDev") Integer clDev,@RequestParam("target") Integer target);
|
||||||
|
|
||||||
|
@PostMapping("/getDataSetByIdx")
|
||||||
|
HttpResult<CsDataSet> getDataSetByIdx(@RequestParam("modelId") String modelId,@RequestParam("idx") Integer idx);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,4 +28,7 @@ public interface DevModelRelationFeignClient {
|
|||||||
@PostMapping("/getModelByType")
|
@PostMapping("/getModelByType")
|
||||||
HttpResult<String> getModelByType(@RequestParam("devId") String devId, @RequestParam("type") Integer type);
|
HttpResult<String> getModelByType(@RequestParam("devId") String devId, @RequestParam("type") Integer type);
|
||||||
|
|
||||||
|
@PostMapping("/updateDataByList")
|
||||||
|
HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,13 @@ import com.njcn.csdevice.api.fallback.EquipmentFeignClientFallbackFactory;
|
|||||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -58,4 +61,16 @@ public interface EquipmentFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/getAll")
|
@PostMapping("/getAll")
|
||||||
HttpResult<List<CsEquipmentDeliveryPO>> getAll();
|
HttpResult<List<CsEquipmentDeliveryPO>> getAll();
|
||||||
|
|
||||||
|
@PostMapping("/judgeDevModel")
|
||||||
|
HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid);
|
||||||
|
|
||||||
|
@PostMapping("/getDevByLineId")
|
||||||
|
HttpResult<CsEquipmentDeliveryPO> getDevByLineId(@RequestParam("lineId") String lineId);
|
||||||
|
|
||||||
|
@PostMapping("/updateCldDevStatus")
|
||||||
|
HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo);
|
||||||
|
|
||||||
|
@PostMapping("/flipCldDevStatus")
|
||||||
|
HttpResult<Boolean> flipCldDevStatus(@RequestParam("devId") String devId, @RequestParam("status") Integer status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.csdevice.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.fallback.CsTerminalLogsClientFallbackFactory;
|
||||||
|
import com.njcn.csdevice.api.fallback.IcdFallbackFactory;
|
||||||
|
import com.njcn.csdevice.param.IcdBzParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/icd", fallbackFactory = IcdFallbackFactory.class,contextId = "icd")
|
||||||
|
|
||||||
|
public interface IcdFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/bzEvent")
|
||||||
|
@ApiOperation("补召事件")
|
||||||
|
HttpResult<String> bzEvent(@RequestBody @Validated IcdBzParam param);
|
||||||
|
|
||||||
|
@PostMapping("/bzFile")
|
||||||
|
@ApiOperation("补召波形")
|
||||||
|
HttpResult<String> bzFile(@RequestBody @Validated IcdBzParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,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.IntegrityClientFallbackFactory;
|
||||||
|
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 java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/rStatIntegrityD", fallbackFactory = IntegrityClientFallbackFactory.class,contextId = "rStatIntegrityD")
|
||||||
|
public interface IntegrityFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
HttpResult<List<RStatIntegrityD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.csdevice.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.fallback.NodeFallbackFactory;
|
||||||
|
import com.njcn.csdevice.pojo.po.Node;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/node", fallbackFactory = NodeFallbackFactory.class,contextId = "node")
|
||||||
|
public interface NodeFeignClient {
|
||||||
|
|
||||||
|
@ApiOperation("获取全部前置机")
|
||||||
|
@GetMapping("/nodeAllList")
|
||||||
|
HttpResult<List<Node>> nodeAllList();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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.onlineRateClientFallbackFactory;
|
||||||
|
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 java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/rStatOnlineRateD", fallbackFactory = onlineRateClientFallbackFactory.class,contextId = "rStatOnlineRateD")
|
||||||
|
public interface OnlineRateFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
HttpResult<List<RStatOnlineRateD>> list(@Validated @RequestParam("list") List<String> list, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,10 +5,13 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.csdevice.api.fallback.WlRecordClientFallbackFactory;
|
import com.njcn.csdevice.api.fallback.WlRecordClientFallbackFactory;
|
||||||
import com.njcn.csdevice.pojo.param.WlRecordParam;
|
import com.njcn.csdevice.pojo.param.WlRecordParam;
|
||||||
import com.njcn.csdevice.pojo.po.WlRecord;
|
import com.njcn.csdevice.pojo.po.WlRecord;
|
||||||
|
import com.njcn.csdevice.pojo.vo.RecordVo;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -41,4 +44,17 @@ public interface WlRecordFeignClient {
|
|||||||
|
|
||||||
@PostMapping("/updateTestRecord")
|
@PostMapping("/updateTestRecord")
|
||||||
HttpResult<Boolean> updateTestRecord(@RequestBody @Validated WlRecordParam.UpdateRecord record);
|
HttpResult<Boolean> updateTestRecord(@RequestBody @Validated WlRecordParam.UpdateRecord record);
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/dayDealNoEndTimeEvent")
|
||||||
|
void dayDealNoEndTimeEvent(@RequestParam("date") String date);
|
||||||
|
|
||||||
|
@GetMapping("/getWlAssByWlId")
|
||||||
|
HttpResult<List<WlRecord>> getWlAssByWlId(@RequestParam("wlId")String wlId);
|
||||||
|
|
||||||
|
@PostMapping("/findDevBaseDataByLineId")
|
||||||
|
HttpResult<List<RecordVo>> findDevBaseDataByLineId(@RequestBody @Validated WlRecordParam.lineRecord param);
|
||||||
|
|
||||||
|
@GetMapping("/getTestRecordById")
|
||||||
|
HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam("testRecordId") @Validated String testRecordId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.CsCommunicateFeignClient;
|
||||||
|
import com.njcn.csdevice.pojo.dto.PqsCommunicateDto;
|
||||||
|
import com.njcn.csdevice.utils.CsDeviceEnumUtil;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/4/10 20:09
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class CsCommunicateFeignClientFallbackFactory implements FallbackFactory<CsCommunicateFeignClient> {
|
||||||
|
@Override
|
||||||
|
public CsCommunicateFeignClient 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 CsCommunicateFeignClient() {
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> insertion(PqsCommunicateDto pqsCommunicateDto) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","新增记录",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,6 +62,12 @@ public class CsLedgerFeignClientFallbackFactory implements FallbackFactory<CsLed
|
|||||||
log.error("{}异常,降级处理,异常为:{}","查询设备树",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","查询设备树",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<CsLedgerVO>> getAllLedger() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","获取台账树所有数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
|||||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
return new CsLineFeignClient() {
|
return new CsLineFeignClient() {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<CsLinePO>> queryLineById(List<String> ids) {
|
public HttpResult<List<CsLinePO>> queryLineById(List<String> ids) {
|
||||||
log.error("{}异常,降级处理,异常为:{}","查询监测点详情异常",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","查询监测点详情异常",cause.toString());
|
||||||
@@ -63,6 +62,30 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
|||||||
log.error("{}异常,降级处理,异常为:{}","更新监测点信息",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","更新监测点信息",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> updateIds(CsLineParam csLineParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","修改监测点模板id和数据集id",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CsLinePO> getById(String lineId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据监测点id获取监测点详情",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<CsLinePO>> getLinesByDevList(List<String> ids) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据装置id集合获取监测点id集合",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateDataByList(List<String> list, String id, String setId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据装置集合修改监测点信息",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.CsTerminalLogsFeignClient;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class CsTerminalLogsClientFallbackFactory implements FallbackFactory<CsTerminalLogsFeignClient> {
|
||||||
|
@Override
|
||||||
|
public CsTerminalLogsFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new CsTerminalLogsFeignClient() {
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateLaterData(String id, String code) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","更新最新一组数据的推送状态",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.CsTerminalReplyFeignClient;
|
||||||
|
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class CsTerminalReplyClientFallbackFactory implements FallbackFactory<CsTerminalReplyFeignClient> {
|
||||||
|
@Override
|
||||||
|
public CsTerminalReplyFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new CsTerminalReplyFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateData(IcdBzReplyParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","更新推送结果异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateBzData(IcdBzReplyParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","更新补召推送结果异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,6 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.csdevice.api.DataArrayFeignClient;
|
import com.njcn.csdevice.api.DataArrayFeignClient;
|
||||||
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
import com.njcn.csdevice.pojo.param.DataArrayParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataArray;
|
import com.njcn.csdevice.pojo.po.CsDataArray;
|
||||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
|
||||||
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
import com.njcn.csdevice.pojo.vo.DataArrayTreeVO;
|
||||||
import com.njcn.csdevice.utils.CsDeviceEnumUtil;
|
import com.njcn.csdevice.utils.CsDeviceEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
@@ -36,7 +35,7 @@ public class DataArrayFeignClientFallbackFactory implements FallbackFactory<Data
|
|||||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
return new DataArrayFeignClient() {
|
return new DataArrayFeignClient() {
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<CsDataArray>> getArrayBySet(List<CsDataSet> setList) {
|
public HttpResult<List<CsDataArray>> getArrayBySet(String dataSet) {
|
||||||
log.error("{}异常,降级处理,异常为:{}","根据数据集获取详细数据失败",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","根据数据集获取详细数据失败",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,24 @@ public class DataSetFeignClientFallbackFactory implements FallbackFactory<DataSe
|
|||||||
log.error("{}异常,降级处理,异常为:{}","根据数据集ids获取数据集",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","根据数据集ids获取数据集",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CsDataSet> getBaseDataSet(String modelId, Integer clDev) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","获取实时数据-基础数据集",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CsDataSet> getHarmonicDataSet(String modelId, Integer clDev, Integer target) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","获取实时数据-谐波数据集",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CsDataSet> getDataSetByIdx(String modelId, Integer idx) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据idx获取数据集数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ public class DevModelRelationFeignClientFallbackFactory implements FallbackFacto
|
|||||||
log.error("{}异常,降级处理,异常为:{}","根据装置类型查询模板",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","根据装置类型查询模板",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> updateDataByList(List<String> list, String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据装置集合修改模板信息",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,31 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
|||||||
log.error("{}异常,降级处理,异常为:{}","获取所有装置",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","获取所有装置",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> judgeDevModel(String nDid) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","判断设备型号",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<CsEquipmentDeliveryPO> getDevByLineId(String lineId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据监测点id查询装置信息",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> updateCldDevStatus(String nodeId, Integer processNo) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","云前置心跳丢失切换设备状态",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Boolean> flipCldDevStatus(String devId, Integer status) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","云前置设备状态翻转",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.IcdFeignClient;
|
||||||
|
import com.njcn.csdevice.param.IcdBzParam;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class IcdFallbackFactory implements FallbackFactory<IcdFeignClient> {
|
||||||
|
@Override
|
||||||
|
public IcdFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new IcdFeignClient() {
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> bzEvent(IcdBzParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","定时补召事件异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<String> bzFile(IcdBzParam param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","定时补召波形异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.IntegrityFeignClient;
|
||||||
|
import com.njcn.csdevice.pojo.po.RStatIntegrityD;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class IntegrityClientFallbackFactory implements FallbackFactory<IntegrityFeignClient> {
|
||||||
|
@Override
|
||||||
|
public IntegrityFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new IntegrityFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RStatIntegrityD>> list(List<String> list, String startTime, String endTime) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","查询数据异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.NodeFeignClient;
|
||||||
|
import com.njcn.csdevice.pojo.po.Node;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class NodeFallbackFactory implements FallbackFactory<NodeFeignClient> {
|
||||||
|
@Override
|
||||||
|
public NodeFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new NodeFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<Node>> nodeAllList() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","获取全部前置机异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.csdevice.api.WlRecordFeignClient;
|
import com.njcn.csdevice.api.WlRecordFeignClient;
|
||||||
import com.njcn.csdevice.pojo.param.WlRecordParam;
|
import com.njcn.csdevice.pojo.param.WlRecordParam;
|
||||||
import com.njcn.csdevice.pojo.po.WlRecord;
|
import com.njcn.csdevice.pojo.po.WlRecord;
|
||||||
|
import com.njcn.csdevice.pojo.vo.RecordVo;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -51,6 +52,30 @@ public class WlRecordClientFallbackFactory implements FallbackFactory<WlRecordFe
|
|||||||
log.error("{}异常,降级处理,异常为:{}","修改测试项",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","修改测试项",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dayDealNoEndTimeEvent(String date) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","每日处理没有结束时间的测试基础数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<WlRecord>> getWlAssByWlId(String wlId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据测试项id获取测试项详细条目",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RecordVo>> findDevBaseDataByLineId(WlRecordParam.lineRecord param) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据监测点id查询装置基础数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(String testRecordId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据测试项ID查询测试项信息",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.njcn.csdevice.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.csdevice.api.OnlineRateFeignClient;
|
||||||
|
import com.njcn.csdevice.pojo.po.RStatOnlineRateD;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class onlineRateClientFallbackFactory implements FallbackFactory<OnlineRateFeignClient> {
|
||||||
|
@Override
|
||||||
|
public OnlineRateFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (cause.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new OnlineRateFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RStatOnlineRateD>> list(List<String> list, String startTime, String endTime) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","查询数据异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,8 +48,18 @@ public interface DataParam {
|
|||||||
|
|
||||||
String portableDev = "便携式设备";
|
String portableDev = "便携式设备";
|
||||||
|
|
||||||
|
String PORTABLE_SYSTEM = "便携式系统";
|
||||||
|
|
||||||
|
String WIRELESS_PROJECT = "无线项目";
|
||||||
|
|
||||||
|
String WIRELESS_PROJECT_ID = "WIRELESS_PROJECT_ID";
|
||||||
|
|
||||||
String governmentDev = "治理设备";
|
String governmentDev = "治理设备";
|
||||||
|
|
||||||
|
String GOVERNANCE_SYSTEM = "治理系统";
|
||||||
|
|
||||||
|
String cldDev = "在线设备";
|
||||||
|
|
||||||
String EvtParamPhase = "Evt_Param_Phase";
|
String EvtParamPhase = "Evt_Param_Phase";
|
||||||
|
|
||||||
String EvtParamDepth = "Evt_Param_VVaDepth";
|
String EvtParamDepth = "Evt_Param_VVaDepth";
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public enum AlgorithmResponseEnum {
|
|||||||
CHIRLDREN2_EXIST("A00514","项目下存在设备,不能删除"),
|
CHIRLDREN2_EXIST("A00514","项目下存在设备,不能删除"),
|
||||||
CHIRLDREN3_EXIST("A00516","存在设备使用拓扑图,不能删除"),
|
CHIRLDREN3_EXIST("A00516","存在设备使用拓扑图,不能删除"),
|
||||||
|
|
||||||
|
|
||||||
DATA_ARRAY_MISSING("A00515","详细数据为空"),
|
DATA_ARRAY_MISSING("A00515","详细数据为空"),
|
||||||
UNKNOW_ROLE("A00515","角色无权限操作"),
|
UNKNOW_ROLE("A00515","角色无权限操作"),
|
||||||
DATA_MISSING("A00516","数据缺失"),
|
DATA_MISSING("A00516","数据缺失"),
|
||||||
@@ -47,6 +46,14 @@ public enum AlgorithmResponseEnum {
|
|||||||
FILE_BUSY("A00516","正在进行其他文件操作,请稍后重试"),
|
FILE_BUSY("A00516","正在进行其他文件操作,请稍后重试"),
|
||||||
RECORD_FILE_LOST("A00516","record.bin文件缺失,请检查上传文件夹"),
|
RECORD_FILE_LOST("A00516","record.bin文件缺失,请检查上传文件夹"),
|
||||||
LINE_NUM_MISMATCH("A00516","上传文件的监测点序号和选择的监测点不匹配,请检查"),
|
LINE_NUM_MISMATCH("A00516","上传文件的监测点序号和选择的监测点不匹配,请检查"),
|
||||||
|
DEV_OFFLINE("A00516","装置未连接MQTT服务器"),
|
||||||
|
OVER_MAX_DEV_COUNT("A00517","前置机超出最大支持装置数"),
|
||||||
|
DEV_OLD_DATA("A00519","进程数修改失败,原进程数下存在装置,请修改装置进程号"),
|
||||||
|
DEV_EXIST_DATA("A00520","删除失败,前置机下存在装置"),
|
||||||
|
|
||||||
|
CLD_MODEL_MISSING("A00521","云前置模板缺失,请检查模板信息"),
|
||||||
|
CLD_MODEL_MORE("A00521","存在多个云前置模板,请检查模板信息"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IcdBzParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点集合")
|
||||||
|
private List<String> lineList;
|
||||||
|
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IcdBzReplyParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("guid")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("响应码")
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
@ApiModelProperty("响应消息")
|
||||||
|
private String msg;
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import com.njcn.csdevice.pojo.param.AppProjectAddParm;
|
||||||
|
import com.njcn.csdevice.pojo.param.CsEngineeringAddParm;
|
||||||
|
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryAddParm;
|
||||||
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IcdLedgerParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("工程索引")
|
||||||
|
private String engineeringIndex;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目索引")
|
||||||
|
private String projectIndex;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String devIndex;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备和mac关系")
|
||||||
|
private Map<String,String> devMacMap;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备mac和设备信息关系")
|
||||||
|
private Map<String, CsEquipmentDeliveryPO> devMap;
|
||||||
|
|
||||||
|
@ApiModelProperty("工程信息")
|
||||||
|
private CsEngineeringAddParm engineering;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目信息")
|
||||||
|
private AppProjectAddParm project;
|
||||||
|
|
||||||
|
@ApiModelProperty("装置信息")
|
||||||
|
private List<CsEquipmentDeliveryAddParm> device;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点信息")
|
||||||
|
private List<CsLineParam> line;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IcdNodeParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("前置服务器id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("进程号")
|
||||||
|
private Integer processNo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IcdParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("前置id,不传时查询所有的终端台账信息")
|
||||||
|
@NotBlank(message = "前置id不可为空")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端运行状态,不传则查询所有的终端信息 (0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||||
|
private List<Integer> runFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端型号(集合为空查询所有icd模型)")
|
||||||
|
private List<String> devType;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.njcn.csdevice.param;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点有效数值统计数据评估入参
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/6 20:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LineCountEvaluateParam implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点编号集合
|
||||||
|
*/
|
||||||
|
private List<String> lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名
|
||||||
|
*/
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相别集合
|
||||||
|
*/
|
||||||
|
private List<String> phasicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值类型
|
||||||
|
*/
|
||||||
|
private List<String> valueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常数据时间集合
|
||||||
|
* Map<String,List<String>> key:监测点id value:异常时间集合
|
||||||
|
*/
|
||||||
|
private Map<String, List<String>> abnormalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列名
|
||||||
|
*/
|
||||||
|
private String columnName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小值 >=
|
||||||
|
*/
|
||||||
|
private String ge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大值 <=
|
||||||
|
*/
|
||||||
|
private String lt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型 判断获取数据是否排除暂态异常数据
|
||||||
|
*/
|
||||||
|
private Boolean dataType = true;
|
||||||
|
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
package com.njcn.csdevice.pojo.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化模板实体
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CsDevModelDto implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("模板id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本号")
|
||||||
|
private String versionNo;
|
||||||
|
|
||||||
|
@TableField("版本日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||||
|
private Date versionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("模板名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备类型名称")
|
||||||
|
private String devTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("模板存储路径")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
@ApiModelProperty("模板类型(0:治理类型 1:电能质量类型)")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集")
|
||||||
|
private List<CsDataSet> dataSets;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CsDataSet implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("模板id")
|
||||||
|
private String pid;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集别名")
|
||||||
|
private String anotherName;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集编号")
|
||||||
|
private Integer idx;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("统计周期")
|
||||||
|
private Integer period;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否存储 0:不存储 1:存储")
|
||||||
|
private Integer storeFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("逻辑子设备")
|
||||||
|
private Integer clDev;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集类型(0:主设备 1:子模块 2:监测设备)")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型(Primary:一次值 Secondary:二次值)")
|
||||||
|
private String dataLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型")
|
||||||
|
private List<CsDataArray> dataArrays;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class CsDataArray implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("指标id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集id")
|
||||||
|
private String pid;
|
||||||
|
|
||||||
|
@ApiModelProperty("字典表id")
|
||||||
|
private String dataId;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集别名")
|
||||||
|
private String anotherName;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集编号")
|
||||||
|
private Integer idx;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据统计方法(max、min、avg、cp95)")
|
||||||
|
private String statMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("相别")
|
||||||
|
private String phase;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.csdevice.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2025/3/10 10:01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PqsCommunicateDto implements Serializable {
|
||||||
|
|
||||||
|
private String time;
|
||||||
|
|
||||||
|
private String devId;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,7 +5,6 @@ import lombok.Data;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -20,16 +19,16 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class AppProjectAddParm {
|
public class AppProjectAddParm {
|
||||||
|
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@ApiModelProperty(value="项目名称")
|
@ApiModelProperty(value="项目名称")
|
||||||
@NotBlank(message="项目名称不能为空!")
|
@NotBlank(message="项目名称不能为空!")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@NotBlank(message="工程id不能为空!")
|
//@NotBlank(message="工程id不能为空!")
|
||||||
private String engineeringId;
|
private String engineeringId;
|
||||||
|
|
||||||
|
private String icdEngineeringId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地市Id
|
* 地市Id
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.njcn.csdevice.pojo.param;
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -36,8 +39,9 @@ public class CsDevModelAddParm {
|
|||||||
/**
|
/**
|
||||||
* 版本日期
|
* 版本日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "版本日期")
|
@TableField(value = "version_date")
|
||||||
private String time;
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||||
|
private Date versionDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置模板文件路径
|
* 装置模板文件路径
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ public class CsDevModelQueryParm {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private String versionEndDate;
|
private String versionEndDate;
|
||||||
|
@ApiModelProperty(value = "装置型号")
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.njcn.csdevice.pojo.param;
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.Pattern;
|
||||||
import java.util.Date;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -19,8 +18,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CsEquipmentDeliveryAddParm{
|
public class CsEquipmentDeliveryAddParm implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置名称
|
* 装置名称
|
||||||
@@ -34,13 +32,13 @@ public class CsEquipmentDeliveryAddParm{
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="网络设备ID")
|
@ApiModelProperty(value="网络设备ID")
|
||||||
@NotBlank(message="网络设备ID不能为空!")
|
@NotBlank(message="网络设备ID不能为空!")
|
||||||
|
@Pattern(regexp = "^[A-Za-z0-9]{6,32}$", message = "网络设备ID只可为数字或字母,长度至少为6位")
|
||||||
private String ndid;
|
private String ndid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置mac地址
|
* 装置mac地址
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="装置mac地址")
|
@ApiModelProperty(value="装置mac地址")
|
||||||
// @NotBlank(message="装置mac地址不能为空!")
|
|
||||||
private String mac;
|
private String mac;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,56 +55,12 @@ public class CsEquipmentDeliveryAddParm{
|
|||||||
@NotBlank(message="装置型号不能为空!")
|
@NotBlank(message="装置型号不能为空!")
|
||||||
private String devModel;
|
private String devModel;
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 装置程序版本
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="装置程序版本")
|
|
||||||
// @NotBlank(message="装置程序版本不能为空!")
|
|
||||||
// private String programVersion;
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 调试人员
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="调试人员")
|
|
||||||
// @NotBlank(message="调试人员不能为空!")
|
|
||||||
// private String debugPerson;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 出厂日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="出厂日期")
|
|
||||||
// @NotNull(message="出厂日期不能为空!")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date producteTime;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 检修日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="检修日期")
|
|
||||||
// @NotNull(message="检修日期不能为空!")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date checkTime;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 调试日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="调试日期")
|
|
||||||
// @NotNull(message="调试日期不能为空!")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date debugTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同号
|
* 合同号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="合同号")
|
@ApiModelProperty(value="合同号")
|
||||||
private String cntractNo;
|
private String cntractNo;
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 营销经理
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="营销经理")
|
|
||||||
// private String salesManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置接入方式
|
* 装置接入方式
|
||||||
*/
|
*/
|
||||||
@@ -125,4 +79,22 @@ public class CsEquipmentDeliveryAddParm{
|
|||||||
@ApiModelProperty(value="模块个数")
|
@ApiModelProperty(value="模块个数")
|
||||||
private Integer modelNumber;
|
private Integer modelNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="前置机id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="前置机进程号")
|
||||||
|
private Integer nodeProcess;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="模板id")
|
||||||
|
private String modelId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="工程id")
|
||||||
|
private String engineeringId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.njcn.csdevice.pojo.param;
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.util.Date;
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -34,6 +33,7 @@ public class CsEquipmentDeliveryAuditParm {
|
|||||||
* 网关识别码
|
* 网关识别码
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="网关识别码")
|
@ApiModelProperty(value="网关识别码")
|
||||||
|
@Pattern(regexp = "^[A-Za-z0-9]{1,32}$", message = "网络设备ID只可为(数字,字母)")
|
||||||
private String ndid;
|
private String ndid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,51 +60,12 @@ public class CsEquipmentDeliveryAuditParm {
|
|||||||
@ApiModelProperty(value="装置接入方式")
|
@ApiModelProperty(value="装置接入方式")
|
||||||
private String devAccessMethod;
|
private String devAccessMethod;
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 装置程序版本
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="装置程序版本")
|
|
||||||
// private String programVersion;
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 调试人员
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="调试人员")
|
|
||||||
// private String debugPerson;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 出厂日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="出厂日期")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date producteTime;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 检修日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="检修日期")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date checkTime;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 调试日期
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="调试日期")
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
|
||||||
// private Date debugTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同号
|
* 合同号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="合同号")
|
@ApiModelProperty(value="合同号")
|
||||||
private String cntractNo;
|
private String cntractNo;
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 营销经理
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty(value="营销经理")
|
|
||||||
// private String salesManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
@@ -128,4 +89,16 @@ public class CsEquipmentDeliveryAuditParm {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="模块个数")
|
@ApiModelProperty(value="模块个数")
|
||||||
private Integer modelNumber;
|
private Integer modelNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="装置使用状态(0:停用 1:启用)")
|
||||||
|
private Integer usageStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="前置机id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="前置机进程号")
|
||||||
|
private Integer nodeProcess;
|
||||||
}
|
}
|
||||||
@@ -34,4 +34,10 @@ public class CsEquipmentDeliveryQueryParm extends BaseParam {
|
|||||||
@ApiModelProperty("运行状态 1:离线 2:在线")
|
@ApiModelProperty("运行状态 1:离线 2:在线")
|
||||||
private Integer runStatus;
|
private Integer runStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("流程步骤")
|
||||||
|
private Integer process;
|
||||||
|
|
||||||
|
@ApiModelProperty("物联通讯状态 0:未连接 1:已连接")
|
||||||
|
private Integer connectStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.njcn.csdevice.pojo.param;
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -18,24 +21,88 @@ public class CsLineParam extends BaseEntity {
|
|||||||
|
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="工程id")
|
||||||
|
private String engineeringId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="项目id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置id
|
||||||
|
*/
|
||||||
|
private String devId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置mac
|
||||||
|
*/
|
||||||
|
private String devMac;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压等级
|
* 电压等级
|
||||||
*/
|
*/
|
||||||
private Double volGrade;
|
private Double volGrade;
|
||||||
|
|
||||||
/**
|
|
||||||
* PT变比
|
|
||||||
*/
|
|
||||||
private Double ptRatio;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CT变比
|
|
||||||
*/
|
|
||||||
private Double ctRatio;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接线方式
|
* 接线方式
|
||||||
*/
|
*/
|
||||||
private Integer conType;
|
private Integer conType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PT一次变比
|
||||||
|
*/
|
||||||
|
@Min(value = 1, message = "PT一次变比必须大于等于1")
|
||||||
|
private Double ptRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PT二次变比
|
||||||
|
*/
|
||||||
|
@Min(value = 1, message = "PT二次变比必须大于等于1")
|
||||||
|
private Double pt2Ratio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CT一次变比
|
||||||
|
*/
|
||||||
|
@Min(value = 1, message = "CT一次变比必须大于等于1")
|
||||||
|
private Double ctRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CT二次变比
|
||||||
|
*/
|
||||||
|
@Min(value = 1, message = "CT二次变比必须大于等于1")
|
||||||
|
private Double ct2Ratio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑子设备id
|
||||||
|
*/
|
||||||
|
private Integer clDid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点线路号
|
||||||
|
*/
|
||||||
|
private Integer lineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计间隔
|
||||||
|
*/
|
||||||
|
private Integer lineInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板id
|
||||||
|
*/
|
||||||
|
private String modelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据集id
|
||||||
|
*/
|
||||||
|
private String dataSetId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)
|
||||||
|
*/
|
||||||
|
private Integer runStatus;
|
||||||
}
|
}
|
||||||
@@ -24,4 +24,7 @@ public class DataArrayParam {
|
|||||||
|
|
||||||
@ApiModelProperty("数据类型")
|
@ApiModelProperty("数据类型")
|
||||||
private String statMethod;
|
private String statMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据集编号")
|
||||||
|
private Integer idx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
|
import com.njcn.web.constant.ValidMessage;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/1/14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel
|
||||||
|
public class NodeParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "name",value = "前置服务器名称")
|
||||||
|
@NotBlank(message = "前置机名称不能为空")
|
||||||
|
@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务器IP
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "ip",value = "服务器IP")
|
||||||
|
@NotBlank(message = "前置机IP不能为空")
|
||||||
|
@Pattern(regexp = PatternRegex.IP_REGEX, message = ValidMessage.IP_FORMAT_ERROR)
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "remark",value = "描述")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 前置等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "nodeGrade",value = "前置等级")
|
||||||
|
@NotNull(message = "前置机等级不可为空")
|
||||||
|
private Integer nodeGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置机支持最大装置数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "nodeDevNum",value = "前置机支持最大装置数")
|
||||||
|
@NotNull(message = "前置机支持最大装置数不可为空")
|
||||||
|
@Min(value = 1, message = "装置数不可小于1")
|
||||||
|
@Max(value = 1000, message = "装置数不可大于1000")
|
||||||
|
private Integer nodeDevNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置机支持最大进程数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "nodeDevNum",value = "前置机支持最大进程数量")
|
||||||
|
@NotNull(message = "前置机支持最大进程数量")
|
||||||
|
@Min(value = 1, message = "最大进程数量不可小于1")
|
||||||
|
@Max(value = 10, message = "最大进程数量不可大于10")
|
||||||
|
private Integer maxProcessNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "sort",value = "排序")
|
||||||
|
@NotNull(message = "排序不可为空")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新操作实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class NodeUpdateParam extends NodeParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表Id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||||
|
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置查询
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class NodeQueryParam extends BaseParam {
|
||||||
|
@ApiModelProperty("前置等级")
|
||||||
|
private Integer nodeGrade;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.csdevice.pojo.param;
|
package com.njcn.csdevice.pojo.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -34,9 +35,11 @@ public class WlRecordParam {
|
|||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
@ApiModelProperty("项目起始时间")
|
@ApiModelProperty("项目起始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime proStartTime;
|
private LocalDateTime proStartTime;
|
||||||
|
|
||||||
@ApiModelProperty("项目结束时间")
|
@ApiModelProperty("项目结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime proEndTime;
|
private LocalDateTime proEndTime;
|
||||||
|
|
||||||
@ApiModelProperty("测试项名称")
|
@ApiModelProperty("测试项名称")
|
||||||
@@ -99,4 +102,23 @@ public class WlRecordParam {
|
|||||||
private String id;
|
private String id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class lineRecord extends WlRecordParam {
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("测试项起始时间")
|
||||||
|
private String itemStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("测试项结束时间")
|
||||||
|
private String itemEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据来源 0:补召 1:在线监测 ")
|
||||||
|
private Integer dataSource;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,4 +80,8 @@ public class CsDataSet extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String dataLevel;
|
private String dataLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接线方式
|
||||||
|
*/
|
||||||
|
private Integer conType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
|||||||
@TableField(value = "dev_access_method")
|
@TableField(value = "dev_access_method")
|
||||||
private String devAccessMethod;
|
private String devAccessMethod;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同号
|
* 合同号
|
||||||
*/
|
*/
|
||||||
@@ -108,4 +106,28 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
|||||||
@TableField(value = "process")
|
@TableField(value = "process")
|
||||||
private Integer process;
|
private Integer process;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置使用状态(0:停用 1:启用)
|
||||||
|
*/
|
||||||
|
@TableField(value = "usage_status")
|
||||||
|
private Integer usageStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@TableField(value = "sort")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置服务器IP
|
||||||
|
*/
|
||||||
|
@TableField(value = "node_id")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置进程号
|
||||||
|
*/
|
||||||
|
@TableField(value = "node_process")
|
||||||
|
private Integer nodeProcess;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -66,12 +66,24 @@ public class CsLinePO extends BaseEntity {
|
|||||||
@TableField(value = "pt_ratio")
|
@TableField(value = "pt_ratio")
|
||||||
private Double ptRatio;
|
private Double ptRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PT2次变比
|
||||||
|
*/
|
||||||
|
@TableField(value = "pt2_ratio")
|
||||||
|
private Double pt2Ratio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CT变比
|
* CT变比
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ct_ratio")
|
@TableField(value = "ct_ratio")
|
||||||
private Double ctRatio;
|
private Double ctRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CT2变比
|
||||||
|
*/
|
||||||
|
@TableField(value = "ct2_ratio")
|
||||||
|
private Double ct2Ratio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(0:删除 1:正常)
|
* 状态(0:删除 1:正常)
|
||||||
*/
|
*/
|
||||||
@@ -86,13 +98,28 @@ public class CsLinePO extends BaseEntity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 逻辑子设备id(与模板对应)
|
* 逻辑子设备id(与模板对应)
|
||||||
* 治理监测点 0
|
|
||||||
* 负载监测点 1
|
|
||||||
* 电网监测点 2
|
|
||||||
*/
|
*/
|
||||||
@TableField(value = "clDid")
|
@TableField(value = "clDid")
|
||||||
private Integer clDid;
|
private Integer clDid;
|
||||||
|
|
||||||
@TableField(value = "device_id")
|
@TableField(value = "device_id")
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点统计间隔
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_interval")
|
||||||
|
private Integer lineInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "run_status")
|
||||||
|
private Integer runStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点线路号
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_no")
|
||||||
|
private Integer lineNo;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-09-26
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@TableName("cs_terminal_logs")
|
||||||
|
public class CsTerminalLogs extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置服务器id
|
||||||
|
*/
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进程号
|
||||||
|
*/
|
||||||
|
private Integer nodeProcess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型(0:新增 1:修改 2:删除)
|
||||||
|
*/
|
||||||
|
private Integer operateType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否推送(0未推送 1已推送)
|
||||||
|
*/
|
||||||
|
private Integer isPush;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-10-09
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@TableName("cs_terminal_reply")
|
||||||
|
public class CsTerminalReply extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息id
|
||||||
|
*/
|
||||||
|
private String replyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置id
|
||||||
|
*/
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进程号
|
||||||
|
*/
|
||||||
|
private Integer processNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否收到(0:未收到 1:收到)
|
||||||
|
*/
|
||||||
|
private Integer isReceived;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收消息状态码
|
||||||
|
*/
|
||||||
|
private Integer receivedCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收消息描述
|
||||||
|
*/
|
||||||
|
private String receivedMsg;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("pq_node")
|
||||||
|
public class Node extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置序号
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务器IP
|
||||||
|
*/
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-删除;1-正常;默认正常
|
||||||
|
*/
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 前置等级
|
||||||
|
*/
|
||||||
|
private Integer nodeGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置机支持最大装置数
|
||||||
|
*/
|
||||||
|
private Integer nodeDevNum;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置机支持最大进程数量
|
||||||
|
*/
|
||||||
|
private Integer maxProcessNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/10/15 10:43【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "portable_off_main_log")
|
||||||
|
public class PortableOffMainLog extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 批次id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入开始时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "start_time")
|
||||||
|
@JsonFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "project_name")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
@TableField(value = "end_time")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功解析数
|
||||||
|
*/
|
||||||
|
@TableField(value = "success_count")
|
||||||
|
private Integer successCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0:删除 1:正常)
|
||||||
|
*/
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<PortableOfflLog> portableOfflLogList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.csdevice.pojo.po;
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -21,6 +22,8 @@ public class PortableOfflLog extends BaseEntity {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String logsIndex;
|
private String logsIndex;
|
||||||
|
@TableField( value = "log_main_id")
|
||||||
|
private String logMainId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件名称
|
* 文件名称
|
||||||
@@ -38,7 +41,7 @@ public class PortableOfflLog extends BaseEntity {
|
|||||||
private String dataPath;
|
private String dataPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0-未解析 1-解析成功 2-解析失败 3-文件不存在
|
* 0-无需解析解析 1-解析成功 2-解析失败 3-文件不存在
|
||||||
*/
|
*/
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 数据完整性日表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-06-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("r_stat_integrity_d")
|
||||||
|
public class RStatIntegrityD implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
private LocalDate timeId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
private String lineIndex;
|
||||||
|
|
||||||
|
private Integer dueTime;
|
||||||
|
|
||||||
|
private Integer realTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.njcn.csdevice.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 在线率日表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-06-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("r_stat_onlinerate_d")
|
||||||
|
public class RStatOnlineRateD implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
private LocalDate timeId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
private String devIndex;
|
||||||
|
|
||||||
|
private Integer onlineMin;
|
||||||
|
|
||||||
|
private Integer offlineMin;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -150,4 +150,10 @@ public class WlRecord extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String gcDataPath;
|
private String gcDataPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型(Primary:一次值 Secondary:二次值)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dataLevel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/ //台账信息
|
||||||
|
@Data
|
||||||
|
public class CldLedgerVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("工程id")
|
||||||
|
private String engineeringId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工程名称")
|
||||||
|
private String engineeringName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "省")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工程描述")
|
||||||
|
private String engineeringDescription;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "项目信息")
|
||||||
|
private List<AppProjectPO> projectInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备信息")
|
||||||
|
private List<CsEquipmentDeliveryPO> deviceInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监测点信息")
|
||||||
|
private List<CsLinePO> lineInfoList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
* 日志信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CldLogsVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("工程名称")
|
||||||
|
private String engineeringName;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("补召类型")
|
||||||
|
private String log;
|
||||||
|
|
||||||
|
@ApiModelProperty("补召时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime logTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@ApiModelProperty("结果")
|
||||||
|
private String result;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -83,4 +83,15 @@ public class CsEquipmentDeliveryVO extends BaseEntity {
|
|||||||
@ApiModelProperty(value="设备当前流程状态")
|
@ApiModelProperty(value="设备当前流程状态")
|
||||||
private Integer process ;
|
private Integer process ;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="装置使用状态(0:停用 1:启用)")
|
||||||
|
private Integer usageStatus ;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="装置与MQTT服务器连接状态")
|
||||||
|
private String connectStatus ;
|
||||||
|
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="前置服务器id")
|
||||||
|
private String nodeId ;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,13 +23,25 @@ public class CsLedgerVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "pid",value = "父id")
|
@ApiModelProperty(name = "pid",value = "父id")
|
||||||
private String pid;
|
private String pid;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "pids",value = "父id集合")
|
||||||
|
private String pids;
|
||||||
|
|
||||||
@ApiModelProperty(name = "name",value = "名称")
|
@ApiModelProperty(name = "name",value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(name = "path",value = "拓扑图路径")
|
@ApiModelProperty(name = "path",value = "拓扑图路径")
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "provinceId",value = "省Id")
|
||||||
|
private String provinceId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "cityId",value = "市Id")
|
||||||
|
private String cityId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "area",value = "区域")
|
@ApiModelProperty(name = "area",value = "区域")
|
||||||
private String area;
|
private String area;
|
||||||
|
|
||||||
@ApiModelProperty(name = "remark",value = "备注")
|
@ApiModelProperty(name = "remark",value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@@ -45,6 +57,18 @@ public class CsLedgerVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "nDid",value = "nDid")
|
@ApiModelProperty(name = "nDid",value = "nDid")
|
||||||
private String nDId;
|
private String nDId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "type",value = "类型 项目 工程 装置 监测点")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineType",value = "监测点类型 0:治理监测点 1:电能质量监测点")
|
||||||
|
private Integer lineType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "conType",value = "接线方式 0-星型 1-角型 2-V型")
|
||||||
|
private Integer conType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "process",value = "流程状态")
|
||||||
|
private Integer process;
|
||||||
|
|
||||||
@ApiModelProperty(name = "children",value = "子节点")
|
@ApiModelProperty(name = "children",value = "子节点")
|
||||||
private List<CsLedgerVO> children = new ArrayList<>();
|
private List<CsLedgerVO> children = new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,6 +27,12 @@ public class DataGroupEventVO {
|
|||||||
@ApiModelProperty("监测点名称")
|
@ApiModelProperty("监测点名称")
|
||||||
private String lineName;
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("装置ID")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("装置名称")
|
||||||
|
private String devName;
|
||||||
|
|
||||||
@ApiModelProperty("项目名称")
|
@ApiModelProperty("项目名称")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
@@ -53,4 +60,7 @@ public class DataGroupEventVO {
|
|||||||
@ApiModelProperty("暂降幅值")
|
@ApiModelProperty("暂降幅值")
|
||||||
private Float featureAmplitude;
|
private Float featureAmplitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("波形路径")
|
||||||
|
private String wavePath;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
//台账信息
|
||||||
|
@Data
|
||||||
|
public class DeviceInfo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("终端索引")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端mac")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端型号")
|
||||||
|
private String devType;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("前置机序号")
|
||||||
|
private Integer node;
|
||||||
|
|
||||||
|
@ApiModelProperty("开启的进程数")
|
||||||
|
private Integer maxProcessNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("对时启动标志")
|
||||||
|
private boolean rightTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点集合")
|
||||||
|
private List<MonitorInfo> monitorData;
|
||||||
|
|
||||||
|
//终端下的监测点信息
|
||||||
|
@Data
|
||||||
|
public static class MonitorInfo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点索引")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点逻辑号")
|
||||||
|
private String lineNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点电压等级")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点运行状态 0:运行;1:检修;2:停运;3:调试;4:退运")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点接线方式 0-星型 1-角型 2-V型")
|
||||||
|
private String ptType;
|
||||||
|
|
||||||
|
@ApiModelProperty("装置id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("pt1")
|
||||||
|
private Double pt1;
|
||||||
|
|
||||||
|
@ApiModelProperty("pt2")
|
||||||
|
private Double pt2;
|
||||||
|
|
||||||
|
@ApiModelProperty("ct1")
|
||||||
|
private Double ct1;
|
||||||
|
|
||||||
|
@ApiModelProperty("ct2")
|
||||||
|
private Double ct2;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EachModuleVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("模块名称")
|
||||||
|
private String moduleName;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块状态")
|
||||||
|
private String moduleState;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块运行状态数据")
|
||||||
|
List<HarmonicVo> dataList;
|
||||||
|
|
||||||
|
@ApiModelProperty("负载电流数据")
|
||||||
|
List<DataVo> loadList;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块输出电流")
|
||||||
|
List<DataVo> modOutList;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块温度")
|
||||||
|
List<DataVo> temperatureList;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class HarmonicVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("稳态数据时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime time;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块状态 0-离线,1-运行,2-停止,3-故障")
|
||||||
|
private String stateDesc;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据类型 0-稳态数据 1-事件数据 2-主动触发")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("事件code")
|
||||||
|
private String eventCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("事件名称")
|
||||||
|
private String eventName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class DataVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("稳态数据时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime time;
|
||||||
|
|
||||||
|
@ApiModelProperty("相别")
|
||||||
|
private String phasicType;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据")
|
||||||
|
private Double data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.Node;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class NodeProcessDeviceVo implements Serializable {
|
||||||
|
|
||||||
|
private Node node;
|
||||||
|
|
||||||
|
private List<ProcessDevice> processDeviceList;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public static class ProcessDevice implements Serializable{
|
||||||
|
private Integer processNo;
|
||||||
|
private String processState;
|
||||||
|
private List<CsEquipmentDeliveryPO> deviceInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,6 +22,9 @@ public class RecordVo {
|
|||||||
@ApiModelProperty("名称")
|
@ApiModelProperty("名称")
|
||||||
private String itemName;
|
private String itemName;
|
||||||
|
|
||||||
|
@ApiModelProperty("监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
@ApiModelProperty("数据起始时间")
|
@ApiModelProperty("数据起始时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime startTime;
|
private LocalDateTime startTime;
|
||||||
@@ -30,6 +33,9 @@ public class RecordVo {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endTime;
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("持续时间")
|
||||||
|
private String lastTime;
|
||||||
|
|
||||||
@ApiModelProperty("测试位置")
|
@ApiModelProperty("测试位置")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
@@ -66,6 +72,9 @@ public class RecordVo {
|
|||||||
@ApiModelProperty("电压接线方式")
|
@ApiModelProperty("电压接线方式")
|
||||||
private String volConType;
|
private String volConType;
|
||||||
|
|
||||||
|
@ApiModelProperty("基础数据集合ID")
|
||||||
|
private List<String> list;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class RecordItemVo{
|
public static class RecordItemVo{
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.csdevice.utils;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/12/17 14:29【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public class StringUtil {
|
||||||
|
public static void containsSpecialCharacters(String str) {
|
||||||
|
// 定义包含特殊字符的正则表达式
|
||||||
|
String specialChars = "[<>%'%;()&+/\\\\-\\\\\\\\_|@*?#$!,.]|html";
|
||||||
|
// 创建Pattern对象
|
||||||
|
Pattern pattern = Pattern.compile(specialChars);
|
||||||
|
// 使用Pattern对象的matcher方法检查字符串
|
||||||
|
if(pattern.matcher(str).find()){
|
||||||
|
throw new BusinessException("存在特殊字符[<>\"'%;()&+//\\-———|@*_?#$!,.html]");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
StringUtil.containsSpecialCharacters("*");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,8 +76,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>user-api</artifactId>
|
<artifactId>user-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
@@ -92,8 +91,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>cs-warn-api</artifactId>
|
<artifactId>cs-warn-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- zxing生成二维码 -->
|
<!-- zxing生成二维码 -->
|
||||||
@@ -107,9 +105,6 @@
|
|||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
@@ -139,8 +134,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>cs-harmonic-api</artifactId>
|
<artifactId>cs-harmonic-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
@@ -151,20 +145,20 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>cs-system-api</artifactId>
|
<artifactId>cs-system-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>access-api</artifactId>
|
<artifactId>access-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-mq</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csdevice.controller.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 动态注解类
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/7 11:00
|
||||||
|
*/
|
||||||
|
@Target({ElementType.TYPE,ElementType.METHOD,ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface InsertBean {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csdevice.controller.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 动态注解类
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/7 11:00
|
||||||
|
*/
|
||||||
|
@Target({ElementType.TYPE,ElementType.METHOD,ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface QueryBean {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.njcn.csdevice.controller.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.csdevice.controller.annotation.InsertBean;
|
||||||
|
import com.njcn.csdevice.controller.annotation.QueryBean;
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/7 11:31
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class DynamicBeanProcessor implements BeanPostProcessor {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationContext context;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置
|
||||||
|
*/
|
||||||
|
@Value("${data.source.query:Influxdb}")
|
||||||
|
private String queryParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入配置
|
||||||
|
*/
|
||||||
|
@Value("${data.source.insert:Relation}")
|
||||||
|
private String insertParam;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||||
|
if (bean.getClass().isAnnotationPresent(Controller.class) || bean.getClass().isAnnotationPresent(RestController.class) || bean.getClass().isAnnotationPresent(Service.class)) {
|
||||||
|
processFields(bean);
|
||||||
|
}
|
||||||
|
return bean;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processFields(Object bean) {
|
||||||
|
Field[] fields = bean.getClass().getDeclaredFields();
|
||||||
|
for (Field field : fields) {
|
||||||
|
String beanId;
|
||||||
|
Class<?> type = field.getType();
|
||||||
|
// 判断是否是接口类型,并且是否是注解指定类库
|
||||||
|
if (type.isInterface() && (field.isAnnotationPresent(QueryBean.class) || field.isAnnotationPresent(InsertBean.class))) {
|
||||||
|
String name = type.getName();
|
||||||
|
beanId = name.substring(name.lastIndexOf(".") + 2);
|
||||||
|
if (field.isAnnotationPresent(QueryBean.class)) {
|
||||||
|
beanId = queryParam + beanId + "Impl";
|
||||||
|
} else if (field.isAnnotationPresent(InsertBean.class)) {
|
||||||
|
beanId = insertParam + beanId + "Impl";
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
field.setAccessible(true);
|
||||||
|
field.set(bean, context.getBean(beanId));
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
throw new BusinessException("获取动态实现类失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||||
|
return bean;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.njcn.csdevice.controller.data;
|
||||||
|
|
||||||
|
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.controller.annotation.QueryBean;
|
||||||
|
import com.njcn.csdevice.param.LineCountEvaluateParam;
|
||||||
|
import com.njcn.csdevice.pojo.dto.PqsCommunicateDto;
|
||||||
|
import com.njcn.csdevice.service.ICsCommunicateService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/6 19:48
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
@Controller
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pqsCommunicate")
|
||||||
|
@Api(tags = "获取装置上下线记录")
|
||||||
|
public class PqsCommunicateController extends BaseController {
|
||||||
|
|
||||||
|
@QueryBean
|
||||||
|
private ICsCommunicateService pqsCommunicateCvtQuery;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getRawDataLatest")
|
||||||
|
@ApiOperation("获取取出最新装置数据")
|
||||||
|
public HttpResult<List<PqsCommunicateDto>> getRawDataLatest(@RequestBody LineCountEvaluateParam lineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getRawDataLatest");
|
||||||
|
List<PqsCommunicateDto> rawData = pqsCommunicateCvtQuery.getRawDataLatest(lineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rawData, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getRawData")
|
||||||
|
@ApiOperation("获取原始数据")
|
||||||
|
public HttpResult<List<PqsCommunicateDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getRawData");
|
||||||
|
List<PqsCommunicateDto> rawData = pqsCommunicateCvtQuery.getRawData(lineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rawData, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getRawDataEnd")
|
||||||
|
@ApiOperation("获取是否有当天最后一条数据")
|
||||||
|
public HttpResult<List<PqsCommunicateDto>> getRawDataEnd(@RequestBody LineCountEvaluateParam lineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("getRawData");
|
||||||
|
List<PqsCommunicateDto> rawData = pqsCommunicateCvtQuery.getRawDataEnd(lineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rawData, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/insertion")
|
||||||
|
@ApiOperation("插入数据")
|
||||||
|
public HttpResult<String> insertion(@RequestBody PqsCommunicateDto pqsCommunicateDto) {
|
||||||
|
String methodDescribe = getMethodDescribe("insertion");
|
||||||
|
pqsCommunicateCvtQuery.insertion(pqsCommunicateDto);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.njcn.csdevice.controller.data;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.pojo.po.RStatIntegrityD;
|
||||||
|
import com.njcn.csdevice.service.IRStatIntegrityDService;
|
||||||
|
import com.njcn.csharmonic.pojo.param.StatisticsDataParam;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 数据完整性日表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-06-23
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rStatIntegrityD")
|
||||||
|
@Api(tags = "数据完整性接口")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class RStatIntegrityDController extends BaseController {
|
||||||
|
|
||||||
|
private final IRStatIntegrityDService irStatIntegrityDService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增数据完整性(可根据时间段进行补召)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> addData(@RequestBody @Validated StatisticsDataParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("addData");
|
||||||
|
irStatIntegrityDService.addData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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){
|
||||||
|
String methodDescribe = getMethodDescribe("list");
|
||||||
|
List<RStatIntegrityD> result = irStatIntegrityDService.getData(list,startTime,endTime);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.njcn.csdevice.controller.data;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.pojo.po.RStatOnlineRateD;
|
||||||
|
import com.njcn.csdevice.service.IRStatOnlineRateDService;
|
||||||
|
import com.njcn.csharmonic.pojo.param.StatisticsDataParam;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 在线率日表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-06-23
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rStatOnlineRateD")
|
||||||
|
@Api(tags = "终端在线率接口")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class RStatOnlineRateDController extends BaseController {
|
||||||
|
|
||||||
|
private final IRStatOnlineRateDService rStatOnlineRateDService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增终端在线率(可根据时间段进行补召)")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> addData(@RequestBody @Validated StatisticsDataParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("addData");
|
||||||
|
rStatOnlineRateDService.addData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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){
|
||||||
|
String methodDescribe = getMethodDescribe("list");
|
||||||
|
List<RStatOnlineRateD> result = rStatOnlineRateDService.getData(list,startTime,endTime);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -83,5 +83,45 @@ public class CsDataSetController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getBaseDataSet")
|
||||||
|
@ApiOperation("获取实时数据-基础数据集")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "modelId", value = "模板id", required = true),
|
||||||
|
@ApiImplicitParam(name = "clDev", value = "逻辑子设备标识", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<CsDataSet> getBaseDataSet(@RequestParam("modelId") String modelId,@RequestParam("clDev") Integer clDev){
|
||||||
|
String methodDescribe = getMethodDescribe("getBaseDataSet");
|
||||||
|
CsDataSet dataSet = csDataSetService.getBaseDataSet(modelId,clDev);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, dataSet, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getHarmonicDataSet")
|
||||||
|
@ApiOperation("获取实时数据-谐波数据集")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "modelId", value = "模板id", required = true),
|
||||||
|
@ApiImplicitParam(name = "clDev", value = "逻辑子设备标识", required = true),
|
||||||
|
@ApiImplicitParam(name = "target", value = "指标序号", required = true),
|
||||||
|
})
|
||||||
|
public HttpResult<CsDataSet> getHarmonicDataSet(@RequestParam("modelId") String modelId,@RequestParam("clDev") Integer clDev,@RequestParam("target") Integer target){
|
||||||
|
String methodDescribe = getMethodDescribe("getHarmonicDataSet");
|
||||||
|
CsDataSet dataSet = csDataSetService.getHarmonicDataSet(modelId,clDev,target);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, dataSet, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getDataSetByIdx")
|
||||||
|
@ApiOperation("根据idx获取数据集数据")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "modelId", value = "模板id", required = true),
|
||||||
|
@ApiImplicitParam(name = "idx", value = "数据集序号", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<CsDataSet> getDataSetByIdx(@RequestParam("modelId") String modelId,@RequestParam("idx") Integer idx){
|
||||||
|
String methodDescribe = getMethodDescribe("getDataSetByIdx");
|
||||||
|
CsDataSet csDataSet = csDataSetService.getDataSetByIdx(modelId,idx);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csDataSet, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,10 @@ public class CsLogController extends BaseController {
|
|||||||
@ApiOperation("查询日志")
|
@ApiOperation("查询日志")
|
||||||
@ApiImplicitParam(name = "baseParam", value = "查询日志参数", required = true)
|
@ApiImplicitParam(name = "baseParam", value = "查询日志参数", required = true)
|
||||||
public HttpResult<IPage<CsLogsPO>> queryLog(@RequestBody BaseParam baseParam){
|
public HttpResult<IPage<CsLogsPO>> queryLog(@RequestBody BaseParam baseParam){
|
||||||
IPage<CsLogsPO> list = csLogsPOService.queryPage(baseParam);
|
|
||||||
String methodDescribe = getMethodDescribe("queryLog");
|
String methodDescribe = getMethodDescribe("queryLog");
|
||||||
|
|
||||||
|
IPage<CsLogsPO> list = csLogsPOService.queryPage(baseParam);
|
||||||
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class DevModelController extends BaseController {
|
|||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/AuditDevModel")
|
@PostMapping("/AuditDevModel")
|
||||||
@ApiOperation("更新/删除出厂设备")
|
@ApiOperation("更新/删除设备模板参数")
|
||||||
@ApiImplicitParam(name = "csDevModelAuditParm", value = "更新/删除设备模板参数", required = true)
|
@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");
|
String methodDescribe = getMethodDescribe("AuditDevModel");
|
||||||
|
|||||||
@@ -103,4 +103,18 @@ public class DevModelRelationController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, modelId, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, modelId, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateDataByList")
|
||||||
|
@ApiOperation("根据装置集合修改模板信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "list", value = "装置id集合", required = true),
|
||||||
|
@ApiImplicitParam(name = "id", value = "模板id", required = true)
|
||||||
|
})
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id){
|
||||||
|
String methodDescribe = getMethodDescribe("updateDataByList");
|
||||||
|
csDevModelRelationService.updateDataByList(list,id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.njcn.csdevice.controller.equipment;
|
package com.njcn.csdevice.controller.equipment;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import com.github.tocrhz.mqtt.publisher.MqttPublisher;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
|
||||||
import com.njcn.csdevice.service.DeviceFtpService;
|
import com.njcn.csdevice.service.DeviceFtpService;
|
||||||
import com.njcn.csharmonic.pojo.vo.MakeUpVo;
|
import com.njcn.csharmonic.pojo.vo.MakeUpVo;
|
||||||
import com.njcn.redis.utils.RedisUtil;
|
import com.njcn.redis.utils.RedisUtil;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xy
|
* @author xy
|
||||||
@@ -38,6 +36,7 @@ public class DeviceFtpController extends BaseController {
|
|||||||
|
|
||||||
private final DeviceFtpService deviceFtpService;
|
private final DeviceFtpService deviceFtpService;
|
||||||
private final RedisUtil redisUtil;
|
private final RedisUtil redisUtil;
|
||||||
|
private final MqttPublisher publisher;
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/askDeviceRootPath")
|
@PostMapping("/askDeviceRootPath")
|
||||||
@@ -61,9 +60,6 @@ public class DeviceFtpController extends BaseController {
|
|||||||
public HttpResult<List<MakeUpVo>> askDeviceFileOrDir(@RequestParam("nDid") String nDid, @RequestParam("name") String name, @RequestParam("type") String type){
|
public HttpResult<List<MakeUpVo>> askDeviceFileOrDir(@RequestParam("nDid") String nDid, @RequestParam("name") String name, @RequestParam("type") String type){
|
||||||
String methodDescribe = getMethodDescribe("askDeviceFileOrDir");
|
String methodDescribe = getMethodDescribe("askDeviceFileOrDir");
|
||||||
List<MakeUpVo> list = deviceFtpService.askDeviceFileOrDir(nDid,name,type);
|
List<MakeUpVo> list = deviceFtpService.askDeviceFileOrDir(nDid,name,type);
|
||||||
if (CollectionUtil.isEmpty(list) && Objects.equals(type,"file")) {
|
|
||||||
throw new BusinessException(AlgorithmResponseEnum.ASK_DEVICE_DIR_ERROR);
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,16 +73,22 @@ public class DeviceFtpController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "fileCheck", value = "文件校验码", required = true)
|
@ApiImplicitParam(name = "fileCheck", value = "文件校验码", required = true)
|
||||||
})
|
})
|
||||||
public HttpResult<String> downloadFile(@RequestParam("nDid") String nDid, @RequestParam("name") String name, @RequestParam("size") Integer size, @RequestParam("fileCheck") String fileCheck){
|
public HttpResult<String> downloadFile(@RequestParam("nDid") String nDid, @RequestParam("name") String name, @RequestParam("size") Integer size, @RequestParam("fileCheck") String fileCheck){
|
||||||
String methodDescribe = getMethodDescribe("downloadFile");
|
redisUtil.saveByKeyWithExpire("fileDownUserId"+nDid+name,RequestUtil.getUserIndex(),600L);
|
||||||
String result = deviceFtpService.downloadFile(nDid,name,size,fileCheck);
|
deviceFtpService.downloadFile(nDid,name,size,fileCheck);
|
||||||
redisUtil.delete("downloadFilePath:"+name);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, "文件下载中,请稍等");
|
||||||
redisUtil.delete("fileCheck"+name);
|
|
||||||
redisUtil.delete("fileDowning:"+nDid);
|
|
||||||
if (Objects.isNull(result)) {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
|
||||||
} else {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getDownloadFilePath")
|
||||||
|
@ApiOperation("获取文件下载路径")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "nDid", value = "nDid", required = true),
|
||||||
|
@ApiImplicitParam(name = "name", value = "文件路径名", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<String> getDownloadFilePath(@RequestParam("nDid") String nDid, @RequestParam("name") String name){
|
||||||
|
String methodDescribe = getMethodDescribe("getDownloadFilePath");
|
||||||
|
String result = deviceFtpService.getDownloadFilePath(nDid,name);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.csdevice.controller.equipment;
|
|||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
@@ -9,7 +10,6 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.constant.DataParam;
|
|
||||||
import com.njcn.csdevice.enums.DeviceOperate;
|
import com.njcn.csdevice.enums.DeviceOperate;
|
||||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||||
import com.njcn.csdevice.pojo.param.*;
|
import com.njcn.csdevice.pojo.param.*;
|
||||||
@@ -23,6 +23,9 @@ import com.njcn.csdevice.service.IMqttUserService;
|
|||||||
import com.njcn.csdevice.utils.ExcelStyleUtil;
|
import com.njcn.csdevice.utils.ExcelStyleUtil;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
|
import com.njcn.system.api.DictTreeFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
import com.njcn.web.advice.DeviceLog;
|
import com.njcn.web.advice.DeviceLog;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@@ -30,6 +33,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -37,10 +41,11 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
@@ -55,21 +60,20 @@ import java.util.stream.Stream;
|
|||||||
@Api(tags = " 出厂设备")
|
@Api(tags = " 出厂设备")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class EquipmentDeliveryController extends BaseController {
|
public class EquipmentDeliveryController extends BaseController {
|
||||||
|
|
||||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||||
|
|
||||||
private final IMqttUserService mqttUserService;
|
private final IMqttUserService mqttUserService;
|
||||||
private final CsDevModelRelationService csDevModelRelationService;
|
private final CsDevModelRelationService csDevModelRelationService;
|
||||||
|
private final DictTreeFeignClient dictTreeFeignClient;
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/addEquipmentDelivery")
|
@PostMapping("/addEquipmentDelivery")
|
||||||
@ApiOperation("新增出厂设备")
|
@ApiOperation("新增出厂设备")
|
||||||
@ApiImplicitParam(name = "csEquipmentDeliveryAddParm", value = "新增项目参数", required = true)
|
@ApiImplicitParam(name = "csEquipmentDeliveryAddParm", value = "新增项目参数", required = true)
|
||||||
@DeviceLog(operateType = DeviceOperate.ADD)
|
@DeviceLog(operateType = DeviceOperate.ADD)
|
||||||
public HttpResult<Boolean> addEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm){
|
public HttpResult<CsEquipmentDeliveryPO> addEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm){
|
||||||
String methodDescribe = getMethodDescribe("addEquipmentDelivery");
|
String methodDescribe = getMethodDescribe("addEquipmentDelivery");
|
||||||
Boolean flag = csEquipmentDeliveryService.save(csEquipmentDeliveryAddParm);
|
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.save(csEquipmentDeliveryAddParm);
|
||||||
if (flag){
|
if (Objects.nonNull(po)){
|
||||||
//查询mqtt用户名和密码是否存在
|
//查询mqtt用户名和密码是否存在
|
||||||
boolean result = mqttUserService.findMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
boolean result = mqttUserService.findMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
||||||
if (result){
|
if (result){
|
||||||
@@ -77,10 +81,9 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
mqttUserService.insertMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
mqttUserService.insertMqttUser(csEquipmentDeliveryAddParm.getNdid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/AuditEquipmentDelivery")
|
@PostMapping("/AuditEquipmentDelivery")
|
||||||
@ApiOperation("删除出厂设备")
|
@ApiOperation("删除出厂设备")
|
||||||
@@ -99,18 +102,23 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
public HttpResult<Boolean> updateEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAuditParm csEquipmentDeliveryAuditParm ){
|
public HttpResult<Boolean> updateEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAuditParm csEquipmentDeliveryAuditParm ){
|
||||||
String methodDescribe = getMethodDescribe("updateEquipmentDelivery");
|
String methodDescribe = getMethodDescribe("updateEquipmentDelivery");
|
||||||
Boolean flag = csEquipmentDeliveryService.updateEquipmentDelivery(csEquipmentDeliveryAuditParm);
|
Boolean flag = csEquipmentDeliveryService.updateEquipmentDelivery(csEquipmentDeliveryAuditParm);
|
||||||
|
if (flag){
|
||||||
|
//查询mqtt用户名和密码是否存在
|
||||||
|
boolean result = mqttUserService.findMqttUser(csEquipmentDeliveryAuditParm.getNdid());
|
||||||
|
if (result){
|
||||||
|
//初始化装置mqtt连接信息(使用sha256加密)
|
||||||
|
mqttUserService.insertMqttUser(csEquipmentDeliveryAuditParm.getNdid());
|
||||||
|
}
|
||||||
|
}
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryEquipmentByndid")
|
@PostMapping("/queryEquipmentByndid")
|
||||||
@ApiOperation("通过ndid查询出厂设备")
|
@ApiOperation("通过ndid查询出厂设备")
|
||||||
@ApiImplicitParam(name = "ndid", value = "网关识别码", required = true)
|
@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");
|
String methodDescribe = getMethodDescribe("queryEquipmentByndid");
|
||||||
|
|
||||||
CsEquipmentDeliveryVO csEquipmentDeliveryVO = csEquipmentDeliveryService.queryEquipmentByndid (ndid);
|
CsEquipmentDeliveryVO csEquipmentDeliveryVO = csEquipmentDeliveryService.queryEquipmentByndid (ndid);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEquipmentDeliveryVO, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEquipmentDeliveryVO, methodDescribe);
|
||||||
}
|
}
|
||||||
@@ -138,12 +146,16 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
csEquipmentDeliveryService.updateStatusBynDid(nDid,status);
|
csEquipmentDeliveryService.updateStatusBynDid(nDid,status);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryEquipmentById")
|
@PostMapping("/queryEquipmentById")
|
||||||
@ApiOperation("设备查询通过id获取")
|
@ApiOperation("设备查询通过id获取")
|
||||||
@ApiImplicitParam(name = "ids", value = "设备id集合", required = true)
|
@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");
|
String methodDescribe = getMethodDescribe("queryEquipmentById");
|
||||||
|
if (CollectionUtil.isEmpty(ids)) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
List<CsEquipmentDeliveryPO> csEquipmentDeliveryPOS = csEquipmentDeliveryService.listByIds(ids);
|
List<CsEquipmentDeliveryPO> csEquipmentDeliveryPOS = csEquipmentDeliveryService.listByIds(ids);
|
||||||
List<CsEquipmentDeliveryDTO> collect = csEquipmentDeliveryPOS.stream().map(temp -> {
|
List<CsEquipmentDeliveryDTO> collect = csEquipmentDeliveryPOS.stream().map(temp -> {
|
||||||
CsEquipmentDeliveryDTO csEquipmentDeliveryDTO = new CsEquipmentDeliveryDTO();
|
CsEquipmentDeliveryDTO csEquipmentDeliveryDTO = new CsEquipmentDeliveryDTO();
|
||||||
@@ -162,12 +174,6 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
public HttpResult<Page<CsEquipmentDeliveryVO>> list(@RequestBody CsEquipmentDeliveryQueryParm param){
|
public HttpResult<Page<CsEquipmentDeliveryVO>> list(@RequestBody CsEquipmentDeliveryQueryParm param){
|
||||||
String methodDescribe = getMethodDescribe("list");
|
String methodDescribe = getMethodDescribe("list");
|
||||||
Page<CsEquipmentDeliveryVO> page = csEquipmentDeliveryService.list(param);
|
Page<CsEquipmentDeliveryVO> page = csEquipmentDeliveryService.list(param);
|
||||||
//新增逻辑(只针对便携式设备):修改设备中的未注册状态(status = 1)改为5(前端定义的字典也即未接入)
|
|
||||||
for(CsEquipmentDeliveryVO csEquipmentDeliveryVO : page.getRecords()){
|
|
||||||
if(DataParam.portableDevType.equals(csEquipmentDeliveryVO.getDevType()) && csEquipmentDeliveryVO.getStatus() == 1){
|
|
||||||
csEquipmentDeliveryVO.setStatus(5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,17 +216,21 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ApiOperation("导出设备模板")
|
@ApiOperation("导出设备模板")
|
||||||
@GetMapping(value = "getExcelTemplate")
|
@GetMapping(value = "getExcelTemplate")
|
||||||
public HttpResult<String> getExcelTemplate(HttpServletResponse response) {
|
public HttpResult<String> getExcelTemplate(HttpServletResponse response) {
|
||||||
String methodDescribe = getMethodDescribe("getExcelTemplate");
|
String methodDescribe = getMethodDescribe("getExcelTemplate");
|
||||||
|
|
||||||
ExportParams exportParams = new ExportParams("批量导入模板(请严格按照模板标准填入数据)", "终端入网检测录入信息");
|
ExportParams exportParams = new ExportParams("批量导入模板(请严格按照模板标准填入数据)", "终端入网检测录入信息");
|
||||||
exportParams.setStyle(ExcelStyleUtil.class);
|
exportParams.setStyle(ExcelStyleUtil.class);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, DeviceExcelTemplete.class, new ArrayList<DeviceExcelTemplete>());
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, DeviceExcelTemplete.class, new ArrayList<DeviceExcelTemplete>());
|
||||||
ExcelUtil.selectList(workbook, 2, 2, Stream.of("直连设备","网关设备").collect(Collectors.toList()).toArray(new String[]{}));
|
List<SysDicTreePO> deviceType = dictTreeFeignClient.queryByCodeList(DicDataTypeEnum.DEVICE_TYPE.getCode()).getData();
|
||||||
|
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";
|
String fileName = "设备模板.xlsx";
|
||||||
ExportParams exportExcel = new ExportParams("设备模板", "设备模板");
|
ExportParams exportExcel = new ExportParams("设备模板", "设备模板");
|
||||||
@@ -233,9 +243,20 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
@PostMapping(value = "importEquipment")
|
@PostMapping(value = "importEquipment")
|
||||||
public HttpResult<String> importEquipment(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
public HttpResult<String> importEquipment(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||||
String methodDescribe = getMethodDescribe("importEquipment");
|
String methodDescribe = getMethodDescribe("importEquipment");
|
||||||
csEquipmentDeliveryService.importEquipment(file, response);
|
List<CsEquipmentDeliveryPO> csEquipmentDeliveryPOS = csEquipmentDeliveryService.importEquipment(file, response);
|
||||||
|
if (!CollectionUtils.isEmpty(csEquipmentDeliveryPOS)){
|
||||||
|
csEquipmentDeliveryPOS.forEach(temp->{
|
||||||
|
//查询mqtt用户名和密码是否存在
|
||||||
|
boolean result = mqttUserService.findMqttUser(temp.getNdid());
|
||||||
|
if (result){
|
||||||
|
//初始化装置mqtt连接信息(使用sha256加密)
|
||||||
|
mqttUserService.insertMqttUser(temp.getNdid());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ApiOperation("联调完成")
|
@ApiOperation("联调完成")
|
||||||
@PostMapping(value = "testcompletion")
|
@PostMapping(value = "testcompletion")
|
||||||
@@ -282,7 +303,6 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/rebootDevice")
|
@PostMapping("/rebootDevice")
|
||||||
@ApiOperation("重启设备")
|
@ApiOperation("重启设备")
|
||||||
@@ -306,4 +326,83 @@ public class EquipmentDeliveryController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/judgeDevModel")
|
||||||
|
@ApiOperation("判断设备型号")
|
||||||
|
public HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid){
|
||||||
|
String methodDescribe = getMethodDescribe("judgeDevModel");
|
||||||
|
boolean result = csEquipmentDeliveryService.judgeDevModel(nDid);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getDevByLineId")
|
||||||
|
@ApiOperation("根据监测点id查询装置信息")
|
||||||
|
public HttpResult<CsEquipmentDeliveryPO> getDevByLineId(@RequestParam("lineId") String lineId){
|
||||||
|
String methodDescribe = getMethodDescribe("getDevByLineId");
|
||||||
|
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.getDevByLineId(lineId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/addCldDev")
|
||||||
|
@ApiOperation("新增云前置设备")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
@DeviceLog(operateType = DeviceOperate.ADD)
|
||||||
|
public HttpResult<CsEquipmentDeliveryPO> addCldDev(@RequestBody @Validated CsEquipmentDeliveryAddParm param){
|
||||||
|
String methodDescribe = getMethodDescribe("addCldDev");
|
||||||
|
CsEquipmentDeliveryPO po = csEquipmentDeliveryService.saveCld(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/delCldDev")
|
||||||
|
@ApiOperation("删除云前置设备")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
@DeviceLog(operateType = DeviceOperate.DELETE)
|
||||||
|
public HttpResult<Boolean> delCldDev(@RequestParam("id") String id){
|
||||||
|
String methodDescribe = getMethodDescribe("delCldDev");
|
||||||
|
boolean result = csEquipmentDeliveryService.delCldDev(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateCldDev")
|
||||||
|
@ApiOperation("修改云前置设备")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
@DeviceLog(operateType = DeviceOperate.UPDATE)
|
||||||
|
public HttpResult<Boolean> updateCldDev(@RequestBody @Validated CsEquipmentDeliveryAuditParm param){
|
||||||
|
String methodDescribe = getMethodDescribe("updateCldDev");
|
||||||
|
boolean result = csEquipmentDeliveryService.updateCldDev(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateCldDevStatus")
|
||||||
|
@ApiOperation("云前置心跳丢失切换设备状态")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "nodeId", value = "前置服务器id", required = true),
|
||||||
|
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||||
|
})
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<Boolean> updateCldDevStatus(@RequestParam("nodeId") String nodeId, @RequestParam("processNo") Integer processNo){
|
||||||
|
String methodDescribe = getMethodDescribe("updateCldDevStatus");
|
||||||
|
csEquipmentDeliveryService.updateCldDevStatus(nodeId,processNo);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/flipCldDevStatus")
|
||||||
|
@ApiOperation("云前置设备状态翻转")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||||
|
@ApiImplicitParam(name = "status", value = "状态", required = true)
|
||||||
|
})
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<Boolean> flipCldDevStatus(@RequestParam("devId") String devId, @RequestParam("status") Integer status){
|
||||||
|
String methodDescribe = getMethodDescribe("flipCldDevStatus");
|
||||||
|
csEquipmentDeliveryService.flipCldDevStatus(devId,status);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,12 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.pojo.param.WlRecordTemplete;
|
import com.njcn.csdevice.pojo.param.WlRecordTemplete;
|
||||||
|
import com.njcn.csdevice.pojo.po.PortableOffMainLog;
|
||||||
import com.njcn.csdevice.pojo.po.PortableOfflLog;
|
import com.njcn.csdevice.pojo.po.PortableOfflLog;
|
||||||
import com.njcn.csdevice.service.IPortableOfflLogService;
|
import com.njcn.csdevice.service.IPortableOfflLogService;
|
||||||
import com.njcn.csdevice.utils.ExcelStyleUtil;
|
import com.njcn.csdevice.utils.ExcelStyleUtil;
|
||||||
import com.njcn.csdevice.param.UploadDataParam;
|
import com.njcn.csdevice.param.UploadDataParam;
|
||||||
|
import com.njcn.minioss.config.MinIossProperties;
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
@@ -55,7 +57,7 @@ public class PortableOfflLogController extends BaseController {
|
|||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
private final MinIossProperties minIossProperties;
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ApiOperation("导出设备基础数据模板")
|
@ApiOperation("导出设备基础数据模板")
|
||||||
@GetMapping(value = "getExcelTemplate")
|
@GetMapping(value = "getExcelTemplate")
|
||||||
@@ -80,6 +82,15 @@ public class PortableOfflLogController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryMainLogPage")
|
||||||
|
@ApiOperation("便携式设备解析日志")
|
||||||
|
public HttpResult<Page<PortableOffMainLog>> queryMainLogPage(@RequestBody BaseParam baseParam){
|
||||||
|
String methodDescribe = getMethodDescribe("queryMainLogPage");
|
||||||
|
Page<PortableOffMainLog> list = iPortableOfflLogService.queryMainLogPage(baseParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("离线数据导入")
|
@ApiOperation("离线数据导入")
|
||||||
@PostMapping(value = "importEquipment")
|
@PostMapping(value = "importEquipment")
|
||||||
@@ -110,7 +121,7 @@ public class PortableOfflLogController extends BaseController {
|
|||||||
|
|
||||||
List<MultipartFile> excelreport = null;
|
List<MultipartFile> excelreport = null;
|
||||||
try {
|
try {
|
||||||
excelreport = fileStorageUtil.getAllFile("excelreport", path);
|
excelreport = fileStorageUtil.getAllFile(minIossProperties.getBucket(), path);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.njcn.csdevice.controller.icd;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.service.ICsTerminalLogsService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-09-26
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/csTerminalLogs")
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "云前置台账信息日志")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CsTerminalLogsController extends BaseController {
|
||||||
|
|
||||||
|
private final ICsTerminalLogsService csTerminalLogsService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pushCldInfo")
|
||||||
|
@ApiOperation("推送日志台账信息")
|
||||||
|
public HttpResult<String> pushCldInfo(){
|
||||||
|
String methodDescribe = getMethodDescribe("pushCldInfo");
|
||||||
|
String result = csTerminalLogsService.pushCldInfo();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateCldInfo")
|
||||||
|
@ApiOperation("更新日志台账信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||||
|
@ApiImplicitParam(name = "code", value = "流程状态", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<String> updateCldInfo(@RequestParam String id, @RequestParam Integer code){
|
||||||
|
String methodDescribe = getMethodDescribe("updateCldInfo");
|
||||||
|
csTerminalLogsService.updateLogs(id,code);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateLaterData")
|
||||||
|
@ApiOperation("更新最新一组数据的推送状态")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||||
|
@ApiImplicitParam(name = "code", value = "流程状态", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<String> updateLaterData(@RequestParam String id, @RequestParam String code){
|
||||||
|
String methodDescribe = getMethodDescribe("updateLaterData");
|
||||||
|
csTerminalLogsService.updateLaterData(id,code);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.njcn.csdevice.controller.icd;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.param.IcdBzParam;
|
||||||
|
import com.njcn.csdevice.param.IcdBzReplyParam;
|
||||||
|
import com.njcn.csdevice.pojo.vo.CldLogsVo;
|
||||||
|
import com.njcn.csdevice.service.ICsTerminalReplyService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-10-09
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/csTerminalReply")
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "云前置台账信息响应记录")
|
||||||
|
@AllArgsConstructor
|
||||||
|
|
||||||
|
public class CsTerminalReplyController extends BaseController {
|
||||||
|
|
||||||
|
private final ICsTerminalReplyService csTerminalReplyService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryData")
|
||||||
|
@ApiOperation("查询推送结果")
|
||||||
|
public HttpResult<List<String>> queryData(){
|
||||||
|
String methodDescribe = getMethodDescribe("queryData");
|
||||||
|
List<String> result = csTerminalReplyService.queryReplyData();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateData")
|
||||||
|
@ApiOperation("更新推送结果")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> updateData(@RequestBody @Validated IcdBzReplyParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("updateData");
|
||||||
|
csTerminalReplyService.updateReplyData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/bzLogs")
|
||||||
|
@ApiOperation("补召日志")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<Page<CldLogsVo>> bzLogs(@RequestBody @Validated BaseParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("bzLogs");
|
||||||
|
Page<CldLogsVo> list = csTerminalReplyService.getBzLogs(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateBzData")
|
||||||
|
@ApiOperation("更新补召推送结果")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> updateBzData(@RequestBody @Validated IcdBzReplyParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("updateBzData");
|
||||||
|
csTerminalReplyService.updateBzData(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.njcn.csdevice.controller.icd;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.param.IcdBzParam;
|
||||||
|
import com.njcn.csdevice.param.IcdLedgerParam;
|
||||||
|
import com.njcn.csdevice.param.IcdParam;
|
||||||
|
import com.njcn.csdevice.pojo.vo.CldLedgerVo;
|
||||||
|
import com.njcn.csdevice.pojo.vo.DeviceInfo;
|
||||||
|
import com.njcn.csdevice.service.IcdService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/icd")
|
||||||
|
@Api(tags = "云前置改造")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class IcdController extends BaseController {
|
||||||
|
|
||||||
|
private final IcdService icdService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLedgerInfo")
|
||||||
|
@ApiOperation("获取台账信息")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<List<DeviceInfo>> getLedgerInfo(@RequestBody @Validated IcdParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("getLedgerInfo");
|
||||||
|
List<DeviceInfo> result = icdService.getLedgerInfo(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/addLedgerInfo")
|
||||||
|
@ApiOperation("新增台账信息")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<List<DeviceInfo>> addLedgerInfo(@RequestBody @Validated IcdLedgerParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("addLedgerInfo");
|
||||||
|
icdService.addLedgerInfo(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLedgerById")
|
||||||
|
@ApiOperation("根据Id获取台账信息")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
public HttpResult<CldLedgerVo> getLedgerById(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("getLedgerById");
|
||||||
|
CldLedgerVo vo = icdService.getLedgerById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/bzFileByEventId")
|
||||||
|
@ApiOperation("指定事件补召波形")
|
||||||
|
@ApiImplicitParam(name = "eventId", value = "事件id", required = true)
|
||||||
|
public HttpResult<String> bzFileByEventId(@RequestParam String eventId){
|
||||||
|
String methodDescribe = getMethodDescribe("bzFileByEventId");
|
||||||
|
icdService.bzFileByEventId(eventId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/bzEvent")
|
||||||
|
@ApiOperation("补召事件")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> bzEvent(@RequestBody @Validated IcdBzParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("bzEvent");
|
||||||
|
icdService.bzEvent(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/bzFile")
|
||||||
|
@ApiOperation("补召波形")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> bzFile(@RequestBody @Validated IcdBzParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("bzFile");
|
||||||
|
icdService.bzFile(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
package com.njcn.csdevice.controller.icd;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.param.IcdNodeParam;
|
||||||
|
import com.njcn.csdevice.pojo.param.NodeParam;
|
||||||
|
import com.njcn.csdevice.pojo.po.Node;
|
||||||
|
import com.njcn.csdevice.pojo.vo.NodeProcessDeviceVo;
|
||||||
|
import com.njcn.csdevice.service.INodeService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前置程序控制器
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "前置机管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("node")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class NodeController extends BaseController {
|
||||||
|
|
||||||
|
private final INodeService iNodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增前置机
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("新增前置机")
|
||||||
|
@ApiImplicitParam(value = "前置机信息",name = "nodeParam",required = true)
|
||||||
|
@PostMapping("addNode")
|
||||||
|
public HttpResult<Boolean> addNode(@Validated @RequestBody NodeParam nodeParam){
|
||||||
|
String methodDescribe = getMethodDescribe("addNode");
|
||||||
|
boolean result = iNodeService.addNode(nodeParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改前置机
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改前置机")
|
||||||
|
@ApiImplicitParam(value = "前置机信息",name = "updateNodeParam",required = true)
|
||||||
|
@PutMapping("updateNode")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
public HttpResult<Boolean> updateNode(@Validated @RequestBody NodeParam.NodeUpdateParam updateNodeParam){
|
||||||
|
String methodDescribe = getMethodDescribe("updateNode");
|
||||||
|
boolean result = iNodeService.updateNode(updateNodeParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除前置
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "删除前置机")
|
||||||
|
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||||
|
@PostMapping("delNode")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||||
|
public HttpResult<Boolean> delNode(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||||
|
String methodDescribe = getMethodDescribe("delNode");
|
||||||
|
boolean result = iNodeService.delNode(id);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更前置机状态
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "变更前置机状态")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(value = "前置机id",name = "id",required = true ),
|
||||||
|
@ApiImplicitParam(value = "前置机状态",name = "state",required = true )
|
||||||
|
})
|
||||||
|
@PostMapping("updateNodeState")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||||
|
public HttpResult<Boolean> updateNodeState(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id,@NotNull(message = "状态不为空") @RequestParam("state")Integer state){
|
||||||
|
String methodDescribe = getMethodDescribe("updateNodeState");
|
||||||
|
boolean result = iNodeService.updateNodeState(id,state);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部前置机分页
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取全部前置机")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@PostMapping("nodeList")
|
||||||
|
public HttpResult<Page<Node>> nodeList(@RequestBody NodeParam.NodeQueryParam nodeQueryParam){
|
||||||
|
String methodDescribe = getMethodDescribe("nodeList");
|
||||||
|
Page<Node> page = iNodeService.nodeList(nodeQueryParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部前置机不分页
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取全部前置机")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@GetMapping("/nodeAllList")
|
||||||
|
public HttpResult<List<Node>> nodeAllList(){
|
||||||
|
String methodDescribe = getMethodDescribe("nodeAllList");
|
||||||
|
List<Node> resList = iNodeService.nodeAllList();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id获取前置机
|
||||||
|
* @author cdf
|
||||||
|
* @date 2021/6/23
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据id获取前置机")
|
||||||
|
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@GetMapping("/getNodeById")
|
||||||
|
public HttpResult<Node> getNodeById(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||||
|
String methodDescribe = getMethodDescribe("getNodeById");
|
||||||
|
Node node = iNodeService.getNodeById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, node, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据前置机id获取下面的进程和设备
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据前置机id获取下面的进程和设备")
|
||||||
|
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||||
|
@GetMapping("/getProcessNoAndDeviceById")
|
||||||
|
public HttpResult<NodeProcessDeviceVo> getProcessNoAndDeviceById(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||||
|
String methodDescribe = getMethodDescribe("getProcessNoAndDeviceById");
|
||||||
|
NodeProcessDeviceVo vo = iNodeService.getProcessNoAndDeviceById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/restartProcess")
|
||||||
|
@ApiOperation("重启前置机进程")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "nodeId", value = "前置服务器id", required = true),
|
||||||
|
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<String> restartProcess(@RequestParam String nodeId,@RequestParam Integer processNo){
|
||||||
|
String methodDescribe = getMethodDescribe("restartProcess");
|
||||||
|
iNodeService.restartProcess(nodeId,processNo);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateDevProcessNo")
|
||||||
|
@ApiOperation("更新设备进程号")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "设备id", required = true),
|
||||||
|
@ApiImplicitParam(name = "processNo", value = "进程号", required = true)
|
||||||
|
})
|
||||||
|
public HttpResult<String> updateDevProcessNo(@RequestParam String id,@RequestParam Integer processNo){
|
||||||
|
String methodDescribe = getMethodDescribe("updateDevProcessNo");
|
||||||
|
String result = iNodeService.updateDevProcessNo(id,processNo);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateDevNode")
|
||||||
|
@ApiOperation("更新设备前置信息")
|
||||||
|
@ApiImplicitParam(name = "param", value = "参数", required = true)
|
||||||
|
public HttpResult<String> updateDevNode(@RequestBody IcdNodeParam param){
|
||||||
|
String methodDescribe = getMethodDescribe("updateDevNode");
|
||||||
|
String result = iNodeService.updateDevNode(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.csdevice.mapper.CsLedgerMapper;
|
||||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||||
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
||||||
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
||||||
@@ -39,6 +40,7 @@ import java.util.List;
|
|||||||
public class CsLedgerController extends BaseController {
|
public class CsLedgerController extends BaseController {
|
||||||
|
|
||||||
private final ICsLedgerService csLedgerService;
|
private final ICsLedgerService csLedgerService;
|
||||||
|
private final CsLedgerMapper csLedgerMapper;
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/tree")
|
@PostMapping("/tree")
|
||||||
@@ -67,6 +69,15 @@ public class CsLedgerController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getztProjectTree")
|
||||||
|
@ApiOperation("三层设备树(项目层根节点为治理系统和便携式系统组态)")
|
||||||
|
public HttpResult<List<CsLedgerVO>> getztProjectTree(){
|
||||||
|
String methodDescribe = getMethodDescribe("getProjectTree");
|
||||||
|
List<CsLedgerVO> list = csLedgerService.getztProjectTree();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增台账信息")
|
@ApiOperation("新增台账信息")
|
||||||
@@ -136,5 +147,23 @@ public class CsLedgerController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getAllLedger")
|
||||||
|
@ApiOperation("获取台账树所有数据")
|
||||||
|
public HttpResult<List<CsLedgerVO>> getAllLedger(){
|
||||||
|
String methodDescribe = getMethodDescribe("getAllLedger");
|
||||||
|
List<CsLedgerVO> allList = csLedgerMapper.getAll();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, allList, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/cldTree")
|
||||||
|
@ApiOperation("云前置树")
|
||||||
|
public HttpResult<CsLedgerVO> cldTree(){
|
||||||
|
String methodDescribe = getMethodDescribe("cldTree");
|
||||||
|
CsLedgerVO vo = csLedgerService.cldTree();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.csdevice.controller.line;
|
package com.njcn.csdevice.controller.line;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -14,6 +15,7 @@ import com.njcn.device.biz.utils.COverlimitUtil;
|
|||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -39,7 +41,6 @@ import java.util.List;
|
|||||||
public class CslineController extends BaseController {
|
public class CslineController extends BaseController {
|
||||||
|
|
||||||
private final CsLinePOService csLinePOService;
|
private final CsLinePOService csLinePOService;
|
||||||
|
|
||||||
private final OverlimitMapper overlimitMapper;
|
private final OverlimitMapper overlimitMapper;
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@@ -89,16 +90,6 @@ public class CslineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
|
||||||
// @PostMapping("/addLineList")
|
|
||||||
// @ApiOperation("批量新增监测点及绑定关系")
|
|
||||||
// @ApiImplicitParam(name = "list", value = "监测点数据集", required = true)
|
|
||||||
// public HttpResult<String> addLines(@RequestBody List<CsLineParm> list){
|
|
||||||
// String methodDescribe = getMethodDescribe("addLines");
|
|
||||||
// csLinePOService.addLines(list);
|
|
||||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/findByNdid")
|
@PostMapping("/findByNdid")
|
||||||
@ApiOperation("根据ndid查询监测点")
|
@ApiOperation("根据ndid查询监测点")
|
||||||
@@ -121,4 +112,112 @@ public class CslineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateIds")
|
||||||
|
@ApiOperation("修改监测点模板id和数据集id")
|
||||||
|
@ApiImplicitParam(name = "csLineParam", value = "监测点信息", required = true)
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<Boolean> updateIds(@RequestBody @Validated CsLineParam csLineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateIds");
|
||||||
|
csLinePOService.updateIds(csLineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getById")
|
||||||
|
@ApiOperation("根据监测点id获取监测点详情")
|
||||||
|
@ApiImplicitParam(name = "lineId", value = "监测点id", required = true)
|
||||||
|
public HttpResult<CsLinePO> getById(@RequestParam String lineId) {
|
||||||
|
String methodDescribe = getMethodDescribe("getById");
|
||||||
|
LambdaQueryWrapper<CsLinePO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(CsLinePO::getLineId,lineId).eq(CsLinePO::getStatus,1);
|
||||||
|
CsLinePO po = csLinePOService.getOne(queryWrapper);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getOverLimitData")
|
||||||
|
@ApiOperation("根据监测点id获取国标限值")
|
||||||
|
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||||
|
public HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getOverLimitData");
|
||||||
|
Overlimit result = overlimitMapper.selectById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
// @PostMapping("/getLinesByDevList")
|
||||||
|
// @ApiOperation("根据装置id集合获取监测点id集合")
|
||||||
|
// @ApiImplicitParam(name = "ids", value = "装置id集合", required = true)
|
||||||
|
// public HttpResult<List<CsLinePO>> getLinesByDevList(@RequestParam("ids") List<String> ids) {
|
||||||
|
// String methodDescribe = getMethodDescribe("getLinesByDevList");
|
||||||
|
// List<CsLinePO> list = csLinePOService.getLinesByDevList(ids);
|
||||||
|
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLinesByDevList")
|
||||||
|
@ApiOperation("根据装置id集合获取监测点id集合")
|
||||||
|
@ApiImplicitParam(name = "ids", value = "装置id集合", required = true)
|
||||||
|
public HttpResult<List<CsLinePO>> getLinesByDevList(@RequestBody List<String> ids) {
|
||||||
|
String methodDescribe = getMethodDescribe("getLinesByDevList");
|
||||||
|
List<CsLinePO> list = csLinePOService.getLinesByDevList(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/addCldLine")
|
||||||
|
@ApiOperation("新增云前置监测点")
|
||||||
|
@ApiImplicitParam(name = "param", value = "param", required = true)
|
||||||
|
public HttpResult<List<CsLinePO>> addCldLine(@RequestBody @Validated CsLineParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("addCldLine");
|
||||||
|
csLinePOService.addCldLine(param);
|
||||||
|
//新增监测点限值
|
||||||
|
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||||
|
overlimit.setId(param.getLineId());
|
||||||
|
overlimitMapper.deleteById(param.getLineId());
|
||||||
|
overlimitMapper.insert(overlimit);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateCldLine")
|
||||||
|
@ApiOperation("修改云前置监测点")
|
||||||
|
@ApiImplicitParam(name = "param", value = "param", required = true)
|
||||||
|
public HttpResult<List<CsLinePO>> updateCldLine(@RequestBody CsLineParam param) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateCldLine");
|
||||||
|
csLinePOService.updateCldLine(param);
|
||||||
|
//修改监测点限值
|
||||||
|
Overlimit overlimit = COverlimitUtil.globalAssemble(param.getVolGrade().floatValue(),10f,10f,10f,0,1);
|
||||||
|
overlimit.setId(param.getLineId());
|
||||||
|
overlimitMapper.deleteById(param.getLineId());
|
||||||
|
overlimitMapper.insert(overlimit);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/delCldLine")
|
||||||
|
@ApiOperation("删除云前置监测点")
|
||||||
|
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||||
|
public HttpResult<List<CsLinePO>> delCldLine(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("delCldLine");
|
||||||
|
csLinePOService.deleteCldLine(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateLineDataByList")
|
||||||
|
@ApiOperation("根据装置集合修改监测点信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "list", value = "装置id集合", required = true),
|
||||||
|
@ApiImplicitParam(name = "id", value = "模板id", required = true),
|
||||||
|
@ApiImplicitParam(name = "setId", value = "数据集id", required = true),
|
||||||
|
})
|
||||||
|
@ApiIgnore
|
||||||
|
public HttpResult<String> updateDataByList(@RequestParam("list") List<String> list, @RequestParam("id") String id, @RequestParam("setId") String setId){
|
||||||
|
String methodDescribe = getMethodDescribe("updateLineDataByList");
|
||||||
|
csLinePOService.updateLineDataByList(list,id,setId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.csdevice.controller.project;
|
package com.njcn.csdevice.controller.project;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
@@ -68,8 +69,8 @@ public class AppProjectController extends BaseController {
|
|||||||
public HttpResult<Boolean> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
public HttpResult<Boolean> addAppProject(@Validated AppProjectAddParm appProjectAddParm){
|
||||||
String methodDescribe = getMethodDescribe("addAppProject");
|
String methodDescribe = getMethodDescribe("addAppProject");
|
||||||
|
|
||||||
Boolean flag = appProjectService.addAppProject(appProjectAddParm);
|
AppProjectPO po = appProjectService.addAppProject(appProjectAddParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, ObjectUtil.isNotNull(po), methodDescribe);
|
||||||
}
|
}
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/auditAppProject")
|
@PostMapping("/auditAppProject")
|
||||||
@@ -80,4 +81,14 @@ public class AppProjectController extends BaseController {
|
|||||||
Boolean flag = appProjectService.AuditAppProject(appProjectAuditParm);
|
Boolean flag = appProjectService.AuditAppProject(appProjectAuditParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/updateProject")
|
||||||
|
@ApiOperation("web修改项目信息")
|
||||||
|
public HttpResult<Boolean> updateProject(@RequestBody @Validated AppProjectAuditParm appProjectAuditParm){
|
||||||
|
String methodDescribe = getMethodDescribe("updateProject");
|
||||||
|
Boolean flag = appProjectService.updateProject(appProjectAuditParm);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.csdevice.pojo.param.CsEngineeringAuditParm;
|
|||||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryPageParm;
|
import com.njcn.csdevice.pojo.param.CsEngineeringQueryPageParm;
|
||||||
import com.njcn.csdevice.pojo.param.CsEngineeringQueryParm;
|
import com.njcn.csdevice.pojo.param.CsEngineeringQueryParm;
|
||||||
import com.njcn.csdevice.pojo.po.CsEngineeringPO;
|
import com.njcn.csdevice.pojo.po.CsEngineeringPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
import com.njcn.csdevice.pojo.vo.CsEngineeringVO;
|
import com.njcn.csdevice.pojo.vo.CsEngineeringVO;
|
||||||
import com.njcn.csdevice.service.CsEngineeringService;
|
import com.njcn.csdevice.service.CsEngineeringService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
@@ -20,10 +21,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
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;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -42,10 +40,8 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class EngineeringController extends BaseController {
|
public class EngineeringController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
private final CsEngineeringService csEngineeringService;
|
private final CsEngineeringService csEngineeringService;
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/addEngineering")
|
@PostMapping("/addEngineering")
|
||||||
@ApiOperation("新增工程")
|
@ApiOperation("新增工程")
|
||||||
@@ -88,4 +84,14 @@ public class EngineeringController extends BaseController {
|
|||||||
IPage<CsEngineeringVO> page = csEngineeringService.queryEngineeringPage(csEngineeringQueryPageParm);
|
IPage<CsEngineeringVO> page = csEngineeringService.queryEngineeringPage(csEngineeringQueryPageParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/queryEngineeringById")
|
||||||
|
@ApiOperation("工程查询通过id获取")
|
||||||
|
@ApiImplicitParam(name = "id", value = "工程id", required = true)
|
||||||
|
public HttpResult<CsEngineeringPO> queryEngineeringById(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("queryEngineeringById");
|
||||||
|
CsEngineeringPO po = csEngineeringService.queryEngineeringById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class WlRecordController extends BaseController {
|
|||||||
@GetMapping("/getTestRecordById")
|
@GetMapping("/getTestRecordById")
|
||||||
@ApiOperation("根据测试项ID查询测试项信息")
|
@ApiOperation("根据测试项ID查询测试项信息")
|
||||||
@ApiImplicitParam(name = "testRecordId", value = "测试项ID", required = true)
|
@ApiImplicitParam(name = "testRecordId", value = "测试项ID", required = true)
|
||||||
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam @Validated String testRecordId) {
|
public HttpResult<RecordVo.RecordItemVo> getTestRecordById(@RequestParam("testRecordId") @Validated String testRecordId) {
|
||||||
String methodDescribe = getMethodDescribe("getTestRecordById");
|
String methodDescribe = getMethodDescribe("getTestRecordById");
|
||||||
LogUtil.njcnDebug(log, "{},测试项id为:{}", methodDescribe, testRecordId);
|
LogUtil.njcnDebug(log, "{},测试项id为:{}", methodDescribe, testRecordId);
|
||||||
RecordVo.RecordItemVo result = wlRecordService.getTestRecordById(testRecordId);
|
RecordVo.RecordItemVo result = wlRecordService.getTestRecordById(testRecordId);
|
||||||
@@ -127,6 +127,20 @@ public class WlRecordController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改测试项日志
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.UPDATE)
|
||||||
|
@PostMapping("/updateRecordData")
|
||||||
|
@ApiOperation("修改测试项日志")
|
||||||
|
@ApiImplicitParam(name = "record", value = "测试项日志信息", required = true)
|
||||||
|
public HttpResult<Boolean> updateRecordData(@RequestBody @Validated WlRecordParam.UpdateRecord record) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateRecordData");
|
||||||
|
LogUtil.njcnDebug(log, "{},修改的测试项日志信息:{}", methodDescribe, record);
|
||||||
|
wlRecordService.updateRecordData(record);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增或修改方案
|
* 新增或修改方案
|
||||||
*/
|
*/
|
||||||
@@ -168,6 +182,20 @@ public class WlRecordController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除装置测试项
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.UPDATE)
|
||||||
|
@PostMapping("/deleteItem")
|
||||||
|
@ApiOperation("删除装置测试项")
|
||||||
|
@ApiImplicitParam(name = "id", value = "装置测试项Id", required = true)
|
||||||
|
public HttpResult<Boolean> deleteItem(@RequestParam @Validated String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("deleteItem");
|
||||||
|
LogUtil.njcnDebug(log, "{},装置测试项Id为:{}", methodDescribe, id);
|
||||||
|
wlRecordService.deleteItem(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询测试项时间段实时数据
|
* 查询测试项时间段实时数据
|
||||||
*/
|
*/
|
||||||
@@ -195,6 +223,19 @@ public class WlRecordController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, record, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, record, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据监测点id查询装置基础数据
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
||||||
|
@PostMapping("/findDevBaseDataByLineId")
|
||||||
|
@ApiOperation("根据监测点id查询装置基础数据")
|
||||||
|
@ApiImplicitParam(name = "param", value = "查询条件", required = true)
|
||||||
|
public HttpResult<List<RecordVo>> findDevBaseDataByLineId(@RequestBody @Validated WlRecordParam.lineRecord param) {
|
||||||
|
String methodDescribe = getMethodDescribe("findDevBaseDataByLineId");
|
||||||
|
LogUtil.njcnDebug(log, "{},查询对象为:{}", methodDescribe, param);
|
||||||
|
List<RecordVo> record = wlRecordService.findDevBaseDataByLineId(param);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, record, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,9 +244,21 @@ public class WlRecordController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
@PostMapping("/dayDealNoEndTimeEvent")
|
@PostMapping("/dayDealNoEndTimeEvent")
|
||||||
@ApiOperation("每日处理没有结束时间的测试基础数据")
|
@ApiOperation("每日处理没有结束时间的测试基础数据")
|
||||||
public void dayDealNoEndTimeEvent() {
|
public void dayDealNoEndTimeEvent(@RequestParam("date") String date) {
|
||||||
String methodDescribe = getMethodDescribe("dayDealNoEndTimeEvent");
|
String methodDescribe = getMethodDescribe("dayDealNoEndTimeEvent");
|
||||||
wlRecordService.dayDealNoEndTimeEvent();
|
wlRecordService.dayDealNoEndTimeEvent(date);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据测试项获取测试项绑定测点数据
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@GetMapping("/getWlAssByWlId")
|
||||||
|
@ApiOperation("根据测试项获取测试项绑定测点数据")
|
||||||
|
public HttpResult<List<WlRecord>> getWlAssByWlId(@RequestParam("wlId") String wlId) {
|
||||||
|
String methodDescribe = getMethodDescribe("getWlAssByWlId");
|
||||||
|
List<WlRecord> result = wlRecordService.getWlAssByWlId(wlId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.csdevice.init;
|
||||||
|
|
||||||
|
import com.njcn.csdevice.service.CsDevModelService;
|
||||||
|
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目初始化缓存设备池,后续从缓存中获取设备数据
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class InitData implements CommandLineRunner {
|
||||||
|
|
||||||
|
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||||
|
private final CsDevModelService csDevModelService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) {
|
||||||
|
csEquipmentDeliveryService.refreshDeviceDataCache();
|
||||||
|
csDevModelService.refreshDevModelCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.njcn.csdevice.job;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import com.njcn.csdevice.service.IRStatIntegrityDService;
|
||||||
|
import com.njcn.csdevice.service.IRStatOnlineRateDService;
|
||||||
|
import com.njcn.csharmonic.pojo.param.StatisticsDataParam;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@EnableScheduling
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class DayDataJob {
|
||||||
|
|
||||||
|
private final IRStatIntegrityDService statIntegrityDService;
|
||||||
|
private final IRStatOnlineRateDService statOnlineRateDService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每天1点计算治理设备的完整性
|
||||||
|
*
|
||||||
|
* @date 2025/7/1
|
||||||
|
*/
|
||||||
|
@Scheduled(cron = "0 0 1 * * ?")
|
||||||
|
public void lineIntegrityJob() {
|
||||||
|
StatisticsDataParam param = new StatisticsDataParam();
|
||||||
|
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||||
|
LocalDateTime start = yesterday.atStartOfDay();
|
||||||
|
LocalDateTime end = yesterday.atTime(23, 59, 59);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DatePattern.NORM_DATE_PATTERN);
|
||||||
|
param.setStartTime(start.format(formatter));
|
||||||
|
param.setEndTime(end.format(formatter));
|
||||||
|
statIntegrityDService.addData(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每天2点计算治理设备的在线率
|
||||||
|
*
|
||||||
|
* @date 2025/7/1
|
||||||
|
*/
|
||||||
|
@Scheduled(cron = "0 30 1 * * ?")
|
||||||
|
public void devOnlineRateJob() {
|
||||||
|
StatisticsDataParam param = new StatisticsDataParam();
|
||||||
|
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||||
|
LocalDateTime start = yesterday.atStartOfDay();
|
||||||
|
LocalDateTime end = yesterday.atTime(23, 59, 59);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DatePattern.NORM_DATE_PATTERN);
|
||||||
|
param.setStartTime(start.format(formatter));
|
||||||
|
param.setEndTime(end.format(formatter));
|
||||||
|
statOnlineRateDService.addData(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.njcn.csdevice.mapper;
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.csdevice.pojo.param.CsEquipmentDeliveryQueryParm;
|
||||||
import com.njcn.csdevice.pojo.param.ProjectEquipmentQueryParm;
|
import com.njcn.csdevice.pojo.param.ProjectEquipmentQueryParm;
|
||||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
@@ -20,10 +22,19 @@ import java.util.List;
|
|||||||
* @author clam
|
* @author clam
|
||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
|
@DS("master")
|
||||||
public interface CsEquipmentDeliveryMapper extends BaseMapper<CsEquipmentDeliveryPO> {
|
public interface CsEquipmentDeliveryMapper extends BaseMapper<CsEquipmentDeliveryPO> {
|
||||||
Page<ProjectEquipmentVO> queryProjectEquipmentVO(Page<ProjectEquipmentVO> returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm,@Param("device")List<String> device);
|
Page<ProjectEquipmentVO> queryProjectEquipmentVO(Page<ProjectEquipmentVO> returnpage,@Param("projectEquipmentQueryParm")ProjectEquipmentQueryParm projectEquipmentQueryParm,@Param("device")List<String> device);
|
||||||
|
|
||||||
Page<CsEquipmentDeliveryVO> page(Page<CsEquipmentDeliveryPO> returnpage, @Param("ew") QueryWrapper<CsEquipmentDeliveryPO> queryWrapper);
|
Page<CsEquipmentDeliveryVO> page(Page<CsEquipmentDeliveryPO> returnpage, @Param("ew") QueryWrapper<CsEquipmentDeliveryPO> queryWrapper);
|
||||||
|
|
||||||
|
//获取符合条件的设备列表
|
||||||
|
List<CsEquipmentDeliveryVO> getList(@Param("queryParam") CsEquipmentDeliveryQueryParm queryParam);
|
||||||
|
|
||||||
|
//获取符合条件的设备数量
|
||||||
|
int getCounts(@Param("queryParam") CsEquipmentDeliveryQueryParm queryParam);
|
||||||
|
|
||||||
|
int getListByNodeProcess(@Param("nodeId")String nodeId,@Param("process")Integer process);
|
||||||
|
|
||||||
|
List<CsEquipmentDeliveryPO> getDataByNodeIdAndProcessNo(@Param("nodeId")String nodeId,@Param("process")Integer process);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsTerminalLogs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-09-26
|
||||||
|
*/
|
||||||
|
public interface CsTerminalLogsMapper extends BaseMapper<CsTerminalLogs> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsTerminalReply;
|
||||||
|
import com.njcn.user.pojo.vo.RoleVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-10-09
|
||||||
|
*/
|
||||||
|
public interface CsTerminalReplyMapper extends BaseMapper<CsTerminalReply> {
|
||||||
|
|
||||||
|
Page<CsTerminalReply> page(@Param("page")Page<RoleVO> page, @Param("ew") QueryWrapper<CsTerminalReply> queryWrapper);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csdevice.param.IcdParam;
|
||||||
|
import com.njcn.csdevice.pojo.po.Node;
|
||||||
|
import com.njcn.csdevice.pojo.vo.DeviceInfo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2022-01-04
|
||||||
|
*/
|
||||||
|
@DS("sjzx")
|
||||||
|
public interface NodeMapper extends BaseMapper<Node> {
|
||||||
|
|
||||||
|
List<DeviceInfo> nodeDeviceList(@Param("nodeDeviceParam") IcdParam icdParam);
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.njcn.csdevice.mapper;
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,6 +15,8 @@ import com.njcn.device.biz.pojo.po.Overlimit;
|
|||||||
* @author cdf
|
* @author cdf
|
||||||
* @since 2022-01-04
|
* @since 2022-01-04
|
||||||
*/
|
*/
|
||||||
|
@DS("sjzx")
|
||||||
|
@Mapper
|
||||||
public interface OverlimitMapper extends BaseMapper<Overlimit> {
|
public interface OverlimitMapper extends BaseMapper<Overlimit> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user