diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DeptLineController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DeptLineController.java new file mode 100644 index 000000000..db2812194 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DeptLineController.java @@ -0,0 +1,121 @@ +package com.njcn.device.pms.controller; + +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.common.utils.LogUtil; +import com.njcn.device.pms.service.DeptLineService; +import com.njcn.web.controller.BaseController; +import com.njcn.web.pojo.param.DeptLineParam; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @author denghuajun + * @date 2022/1/12 16:33 + * 部门监测点相关 + */ +@Validated +@Slf4j +@Api(tags = "部门监测点相关") +@RestController +@RequestMapping("/deptLine") +@RequiredArgsConstructor +public class DeptLineController extends BaseController { + + private final DeptLineService deptLineService; + + /** + * 部门绑定监测点 + * + * @param deptLineParam 部门监测点 + */ + @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD) + @PostMapping("/deptBindLine") + @ApiOperation("部门绑定监测点") + @ApiImplicitParam(name = "deptLineParam", value = "部门绑定监测点", required = true) + public HttpResult deptBindLine(@RequestBody @Validated DeptLineParam deptLineParam) { + String methodDescribe = getMethodDescribe("deptBindLine"); + LogUtil.njcnDebug(log, "{},部门监测点数据为:{}", methodDescribe, deptLineParam); + deptLineService.deptBindLine(deptLineParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + + /** + * 部门解除绑定监测点 + * + * @param deptLineParam 部门监测点 + */ + @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE) + @PostMapping("/deptDeleteBindLine") + @ApiOperation("部门解除绑定监测点") + @ApiImplicitParam(name = "deptLineParam", value = "部门绑定监测点", required = true) + public HttpResult deptDeleteBindLine(@RequestBody @Validated DeptLineParam deptLineParam) { + String methodDescribe = getMethodDescribe("deptDeleteBindLine"); + LogUtil.njcnDebug(log, "{},部门监测点数据为:{}", methodDescribe, deptLineParam); + deptLineService.deptDeleteBindLine(deptLineParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + + /** + * 根据部门ids集合查询是否绑定监测点 + * + * @param ids 部门id + */ + @OperateInfo(info = LogEnum.SYSTEM_COMMON) + @PostMapping("/selectDeptBindLines") + @ApiOperation("查询是否绑定监测点") + @ApiImplicitParam(name = "ids", value = "部门id", required = true) + public HttpResult selectDeptBindLines(@RequestParam("ids") List ids) { + String methodDescribe = getMethodDescribe("selectDeptBindLines"); + deptLineService.selectDeptBindLines(ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + + /** + * 根据部门id解除绑定监测点 + * + * @param id 部门id + */ + @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE) + @PostMapping("/removeBind") + @ApiOperation("部门解除绑定监测点") + @ApiImplicitParam(name = "id", value = "部门id", required = true) + public HttpResult removeBind(@RequestParam("id") String id) { + String methodDescribe = getMethodDescribe("removeBind"); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptLineService.removeBind(id), methodDescribe); + } + + + @OperateInfo(info = LogEnum.SYSTEM_COMMON) + @PostMapping("/getLineByDeptId") + @ApiOperation("部门Id获取绑定监测点") + @ApiImplicitParam(name = "id", value = "部门id", required = true) + public HttpResult> getLineByDeptId(@RequestParam("id") String id) { + String methodDescribe = getMethodDescribe("getLineByDeptId"); + List list = deptLineService.getLineByDeptId(id); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + @PostMapping("/getLineByDeptRelation") + @ApiOperation("获取部门和监测点的关系(分稳态暂态)") + @ApiImplicitParam(name = "devDataType", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true) + public HttpResult> > getLineByDeptRelation(@RequestParam("devDataType") Integer devDataType) { + String methodDescribe = getMethodDescribe("getLineByDeptRelation"); + Map> map= deptLineService.getLineByDeptRelation(devDataType); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, map, methodDescribe); + } + + +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DistributionMonitorController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DistributionMonitorController.java deleted file mode 100644 index 85f74c5c0..000000000 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/DistributionMonitorController.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.njcn.device.pms.controller; - - -import com.njcn.common.pojo.enums.response.CommonResponseEnum; -import com.njcn.common.pojo.response.HttpResult; -import com.njcn.common.utils.HttpResultUtil; -import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; -import com.njcn.device.pms.pojo.param.DistributionMonitorParam; -import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import com.njcn.web.controller.BaseController; - -import java.util.List; - -/** - *

- * 配网监测点台账 - *

- * - * @author hongawen - * @since 2022-10-14 - */ -@RestController -@RequestMapping("/pms/distributionMonitor") -@Slf4j -@RequiredArgsConstructor -@Api(tags = "台账-配网监测点") -public class DistributionMonitorController extends BaseController { - - /** - * 新增配网监测点表 - * @author cdf - * @date 2022/10/26 - */ - @PostMapping - @ApiImplicitParam(name = "distributionMonitorParam",value = "配网监测点实体",required = true) - public HttpResult addDistributionMonitor(@RequestBody DistributionMonitorParam distributionMonitorParam){ - String methodDescribe = getMethodDescribe("addDistributionMonitor"); - - return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); - } - - - - -} - diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityCheckController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityCheckController.java new file mode 100644 index 000000000..c096b78fb --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityCheckController.java @@ -0,0 +1,76 @@ +package com.njcn.device.pms.controller.distribution; + +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.param.StatisticsBizBaseParam; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.vo.PwRStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import com.njcn.device.pms.service.distribution.PwDataQualityCheckService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import 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 yzh + * @date 2022/11/2 + */ +@RestController +@RequestMapping("/pwDataQualityCheck") +@Api(tags = "配网数据质量-数据质量核查") +@RequiredArgsConstructor +public class PwDataQualityCheckController extends BaseController { + + private final PwDataQualityCheckService pwDataQualityCheckService; + + /** + * 获取配网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/2 + */ + @PostMapping("/getPwQualityCheckOfAccountData") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-台帐类数据质量核查") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwQualityCheckOfAccountData(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getPwQualityCheckOfAccountData"); + List list = pwDataQualityCheckService.getPwQualityCheckOfAccountData(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/2 + */ + @PostMapping("/getPwMonitoringIndexDataQualityVerification") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-监测指标数据质量核查") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwMonitoringIndexDataQualityVerification(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getPwMonitoringIndexDataQualityVerification"); + List list = pwDataQualityCheckService.getPwMonitoringIndexDataQualityVerification(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityDetailsController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityDetailsController.java new file mode 100644 index 000000000..100b25df4 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityDetailsController.java @@ -0,0 +1,73 @@ +package com.njcn.device.pms.controller.distribution; + +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.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.vo.PwRStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.PwRStatTargetDetailVO; +import com.njcn.device.pms.service.distribution.PwDataQualityDetailsService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import 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; + +/** + * TODO 配网数据质量-数据质量核查详情 + * + * @author yzh + * @date 2022/11/4 + */ +@RestController +@RequestMapping("/pwDataQualityDetails") +@Api(tags = "配网数据质量-数据质量核查详情") +@RequiredArgsConstructor +public class PwDataQualityDetailsController extends BaseController { + + private final PwDataQualityDetailsService pwDataQualityDetailsService; + + /** + * 获取配网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/4 + */ + @PostMapping("/getPwQualityProblemsOfMonitoringPointAccountData") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-台账类数据指标核查详情-监测点台账数据质量问题") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwQualityProblemsOfMonitoringPointAccountData(@RequestBody DataQualityDetailsParam param) { + String methodDescribe = getMethodDescribe("getPwQualityProblemsOfMonitoringPointAccountData"); + List list = pwDataQualityDetailsService.getPwQualityProblemsOfMonitoringPointAccountData(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取配网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/8 + */ + @PostMapping("/getPwRStatTargetDetail") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-稳态指标类数据质量问题查询") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwRStatTargetDetail(@RequestBody DataQualityDetailsParam param) { + String methodDescribe = getMethodDescribe("getPwRStatTargetDetail"); + List list = pwDataQualityDetailsService.getPwRStatTargetDetail(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityStatController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityStatController.java new file mode 100644 index 000000000..7bfd2076c --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwDataQualityStatController.java @@ -0,0 +1,93 @@ +package com.njcn.device.pms.controller.distribution; + +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.param.StatisticsBizBaseParam; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingVO; +import com.njcn.device.pms.pojo.vo.PwRQualityParameterVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; +import com.njcn.device.pms.service.distribution.PwDataQualityStatService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import 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 yzh + * @date 2022/11/4 + */ + +@RestController +@RequestMapping("/pwDataQualityStat") +@Api(tags = "配网数据质量-数据质量统计") +@RequiredArgsConstructor +public class PwDataQualityStatController extends BaseController { + + private final PwDataQualityStatService pwDataQualityStatService; + + /** + * 获取配网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/4 + */ + @PostMapping("/getPwLedgerDataQualityStat") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-台账数据质量统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwLedgerDataQualityStat(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getPwLedgerDataQualityStat"); + List list = pwDataQualityStatService.getPwLedgerDataQualityStat(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取配网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/4 + */ + @PostMapping("/getPwMonitoringIndexDataQualityStat") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-监测指标数据质量统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwMonitoringIndexDataQualityStat(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getPwMonitoringIndexDataQualityStat"); + List list = pwDataQualityStatService.getPwMonitoringIndexDataQualityStat(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取配网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/7 + */ + @PostMapping("/getPwSummaryStatOfMonitoringIndexDataQualityProblems") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取配网数据质量-监测指标数据质量问题汇总统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPwSummaryStatOfMonitoringIndexDataQualityProblems(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getPwSummaryStatOfMonitoringIndexDataQualityProblems"); + List list = pwDataQualityStatService.getPwSummaryStatOfMonitoringIndexDataQualityProblems(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PwMonitorController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwMonitorController.java similarity index 83% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PwMonitorController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwMonitorController.java index 8c7268271..0a48076bb 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PwMonitorController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwMonitorController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.distribution; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.annotation.OperateInfo; @@ -6,21 +6,21 @@ 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.device.pms.pojo.dto.PmsGeneralDeviceDTO; import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; -import com.njcn.device.pms.service.IMonitorService; -import com.njcn.device.pms.service.IPwMonitorService; +import com.njcn.device.pms.pojo.vo.DoubleUserVO; +import com.njcn.device.pms.service.distribution.IPwMonitorService; 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.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -59,4 +59,8 @@ public class PwMonitorController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorList, methodDescribe); } } + + + + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRDnOperatingIndexController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRDnOperatingIndexController.java new file mode 100644 index 000000000..c63802bc8 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRDnOperatingIndexController.java @@ -0,0 +1,65 @@ +package com.njcn.device.pms.controller.distribution; + +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.constant.BizParamConstant; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.param.PwRDnOperatingParam; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; +import com.njcn.device.pms.service.distribution.RDnOperatingIndexMService; +import com.njcn.device.pms.service.distribution.RDnOperatingYService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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; + +/** + * @Title ROperatingIndexController + * @Package com.njcn.device.pms.controller.majornetwork + * @Author jianghaifei + * @Date 2022-11-09 16:18 + * @Version V1.0 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/pwROperatingIndex") +@Api(tags = "配网-运行指标统计") +public class PwRDnOperatingIndexController extends BaseController { + + private final RDnOperatingIndexMService rDnOperatingIndexMService; //月 + + private final RDnOperatingYService rDnOperatingYService; //年 + + @PostMapping("/getOperatingList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("查询运行指标统计(配网)") + public HttpResult> getOperatingList(@RequestBody PwRDnOperatingParam pwRDnOperatingParam) { + String methodDescribe = getMethodDescribe("getOperatingList"); + Integer type = pwRDnOperatingParam.getType(); + if (type == null) { + throw new BusinessException(CommonResponseEnum.INVALID_PARAMETER, "参数日期维度【type】非法"); + } + List list; + + if (BizParamConstant.STAT_BIZ_YEAR.equals(type.toString())) { + //年 + list = rDnOperatingYService.getOperatingList(pwRDnOperatingParam); + } else if (BizParamConstant.STAT_BIZ_MONTH.equals(type.toString())) { + //月 + list = rDnOperatingIndexMService.getOperatingList(pwRDnOperatingParam); + } else { + throw new BusinessException(CommonResponseEnum.INVALID_PARAMETER, "参数日期维度【type】非法"); + } + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRMpMonitorAlarmCountMController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRMpMonitorAlarmCountMController.java new file mode 100644 index 000000000..2383f1aca --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRMpMonitorAlarmCountMController.java @@ -0,0 +1,53 @@ +package com.njcn.device.pms.controller.distribution; + +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.device.pms.pojo.param.RMpMonitorAlarmCountMParam; +import com.njcn.device.pms.pojo.vo.PwRMpMonitorAlarmCountMVO; +import com.njcn.device.pms.service.distribution.PwRMpMonitorAlarmCountMService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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; + +/** + * 监测点告警统计 + * @Title RMpMonitorAlarmCountMController + * @Package com.njcn.device.pms.controller + * @Author jianghaifei + * @Date 2022-10-13 08:54 + * @Version V1.0 + */ +@RestController +@Api(tags = "配网-监测点告警统计(月)") +@RequiredArgsConstructor +@RequestMapping("/pwRMpMonitorAlarmCountM") +public class PwRMpMonitorAlarmCountMController extends BaseController { + + private final PwRMpMonitorAlarmCountMService rMpMonitorAlarmCountMService; + + /*** + * 根据条件查询监测点告警统计(月)(配网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return java.util.List + */ + @PostMapping("/getPwRMpMonitorAlarmCountMList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("查询监测点告警统计(月)(配网)") + public HttpResult> getPwRMpMonitorAlarmCountMList(@RequestBody RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam) { + String methodDescribe = getMethodDescribe("getPwRMpMonitorAlarmCountMList"); + List list = rMpMonitorAlarmCountMService.getPwRMpMonitorAlarmCountMList(rMpMonitorAlarmCountMParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRStatAreaAlarmCountMController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRStatAreaAlarmCountMController.java new file mode 100644 index 000000000..4f3b8d7fb --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/PwRStatAreaAlarmCountMController.java @@ -0,0 +1,46 @@ +package com.njcn.device.pms.controller.distribution; + +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.device.pms.pojo.param.RStatAreaAlarmCountMParam; +import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; +import com.njcn.device.pms.service.distribution.PwRStatAreaAlarmCountMService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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; + +/** + * @Title RStatAreaAlarmCountMController + * @Package com.njcn.device.pms.controller + * @Author jianghaifei + * @Date 2022-10-10 15:13 + * @Version V1.0 + */ + +@RestController +@Api(tags = "配网-区域告警统计(月)") +@RequiredArgsConstructor +@RequestMapping("/pwRStatAreaAlarmCountM") +public class PwRStatAreaAlarmCountMController extends BaseController { + + private final PwRStatAreaAlarmCountMService rStatAreaAlarmCountMService; + + @PostMapping("getPwAllRStatAreaAlarmCountMList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("查询区域告警统计(月)(配网)") + public HttpResult> getPwAllRStatAreaAlarmCountMList(@RequestBody RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam) { + String methodDescribe = getMethodDescribe("getPwAllRStatAreaAlarmCountMList"); + List list = rStatAreaAlarmCountMService.getPwAllRStatAreaAlarmCountMList(rStatAreaAlarmCountMParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/RStatPwAlarmCountWController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/RStatPwAlarmCountWController.java new file mode 100644 index 000000000..72cfbf676 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/distribution/RStatPwAlarmCountWController.java @@ -0,0 +1,64 @@ +package com.njcn.device.pms.controller.distribution; + +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.device.pms.pojo.param.RStatPwAlarmCountWParam; +import com.njcn.device.pms.pojo.param.RStatPwAlarmDetailParam; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmCountWVO; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmDetailVO; +import com.njcn.device.pms.service.distribution.RStatPwAlarmCountWService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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; + +/** + * @Title RStatPwAlarmCountWController + * @Package com.njcn.device.pms.controller + * @Author jianghaifei + * @Date 2022-11-02 18:53 + * @Version V1.0 + */ +@RestController +@RequestMapping("/rStatPwAlarmCountW") +@Api(tags = "配网-告警统计(周)") +@RequiredArgsConstructor +public class RStatPwAlarmCountWController extends BaseController { + + private final RStatPwAlarmCountWService rStatPwAlarmCountWService; + + /*** + * + * @author jianghaifei + * @date 2022-11-02 19:01 + * @param rStatPwAlarmCountWParam + * @return com.njcn.common.pojo.response.HttpResult> + */ + @PostMapping("getAllRStatPwAlarmCountList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("查询告警统计(周)") + public HttpResult> getAllRStatPwAlarmCountList(@RequestBody RStatPwAlarmCountWParam rStatPwAlarmCountWParam) { + String methodDescribe = getMethodDescribe("getAllRStatPwAlarmCountList"); + List list = rStatPwAlarmCountWService.getAllRStatPwAlarmCountList(rStatPwAlarmCountWParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + + @PostMapping("getAlarmDetailList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("告警明细查看") + public HttpResult> getAlarmDetailList(@RequestBody RStatPwAlarmDetailParam rStatPwAlarmDetailParam) { + String methodDescribe = getMethodDescribe("getAlarmDetailList"); + List list = rStatPwAlarmCountWService.getAlarmDetailList(rStatPwAlarmDetailParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityCheckController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityCheckController.java new file mode 100644 index 000000000..240e133d1 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityCheckController.java @@ -0,0 +1,76 @@ +package com.njcn.device.pms.controller.majornetwork; + +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.param.StatisticsBizBaseParam; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import com.njcn.device.pms.service.majornetwork.DataQualityCheckService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import 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 yzh + * @date 2022/11/2 + */ +@RestController +@RequestMapping("/dataQualityCheck") +@Api(tags = "主网数据质量-数据质量核查") +@RequiredArgsConstructor +public class DataQualityCheckController extends BaseController { + + private final DataQualityCheckService dataQualityCheckService; + + /** + * 获取主网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/2 + */ + @PostMapping("/getQualityCheckOfAccountData") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-台帐类数据质量核查") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getQualityCheckOfAccountData(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getQualityCheckOfAccountData"); + List list = dataQualityCheckService.getQualityCheckOfAccountData(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/2 + */ + @PostMapping("/getMonitoringIndexDataQualityVerification") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-监测指标数据质量核查") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getMonitoringIndexDataQualityVerification(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getMonitoringIndexDataQualityVerification"); + List list = dataQualityCheckService.getMonitoringIndexDataQualityVerification(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityDetailsController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityDetailsController.java new file mode 100644 index 000000000..4d790ba5f --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityDetailsController.java @@ -0,0 +1,95 @@ +package com.njcn.device.pms.controller.majornetwork; + +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.device.pms.api.TractionStationClient; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTargetDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTractionStationAccountDetailVO; +import com.njcn.device.pms.service.majornetwork.DataQualityDetailsService; +import com.njcn.device.pms.service.majornetwork.ITractionStationService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * TODO 主网数据质量-数据质量核查详情 + * + * @author yzh + * @date 2022/11/4 + */ +@RestController +@RequestMapping("/dataQualityDetails") +@Api(tags = "主网数据质量-数据质量核查详情") +@RequiredArgsConstructor +public class DataQualityDetailsController extends BaseController { + + private final DataQualityDetailsService dataQualityDetailsService; + + /** + * 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/4 + */ + @PostMapping("/getQualityProblemsOfMonitoringPointAccountData") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getQualityProblemsOfMonitoringPointAccountData(@RequestBody DataQualityDetailsParam param) { + String methodDescribe = getMethodDescribe("getQualityProblemsOfMonitoringPointAccountData"); + List list = dataQualityDetailsService.getQualityProblemsOfMonitoringPointAccountData(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/4 + */ + @PostMapping("/getTractionPlatformAccountDataQualityProblem") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getTractionPlatformAccountDataQualityProblem(@RequestBody DataQualityDetailsParam param) { + String methodDescribe = getMethodDescribe("getTractionPlatformAccountDataQualityProblem"); + List list = dataQualityDetailsService.getTractionPlatformAccountDataQualityProblem(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/8 + */ + @PostMapping("/getRStatTargetDetail") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-稳态指标类数据质量问题查询") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getRStatTargetDetail(@RequestBody DataQualityDetailsParam param) { + String methodDescribe = getMethodDescribe("getRStatTargetDetail"); + List list = dataQualityDetailsService.getRStatTargetDetail(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityStatController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityStatController.java new file mode 100644 index 000000000..f9e7d57fe --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DataQualityStatController.java @@ -0,0 +1,93 @@ +package com.njcn.device.pms.controller.majornetwork; + +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.param.StatisticsBizBaseParam; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.vo.ROperatingIndexVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterVO; +import com.njcn.device.pms.service.majornetwork.DataQualityStatService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import 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 yzh + * @date 2022/11/1 + */ + +@RestController +@RequestMapping("/dataQualityStat") +@Api(tags = "主网数据质量-数据质量统计") +@RequiredArgsConstructor +public class DataQualityStatController extends BaseController { + + private final DataQualityStatService dataQualityStatService; + + /** + * 获取主网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/1 + */ + @PostMapping("/getLedgerDataQualityStat") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-台账数据质量统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getLedgerDataQualityStat(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getLedgerDataQualityStat"); + List list = dataQualityStatService.getLedgerDataQualityStat(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/1 + */ + @PostMapping("/getMonitoringIndexDataQualityStat") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-监测指标数据质量统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getMonitoringIndexDataQualityStat(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getMonitoringIndexDataQualityStat"); + List list = dataQualityStatService.getMonitoringIndexDataQualityStat(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } + + /** + * 获取主网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/1 + */ + @PostMapping("/getSummaryStatOfMonitoringIndexDataQualityProblems") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取主网数据质量-监测指标数据质量问题汇总统计") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getSummaryStatOfMonitoringIndexDataQualityProblems(@RequestBody StatisticsBizBaseParam param) { + String methodDescribe = getMethodDescribe("getSummaryStatOfMonitoringIndexDataQualityProblems"); + List list = dataQualityStatService.getSummaryStatOfMonitoringIndexDataQualityProblems(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DistributionMonitorController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DistributionMonitorController.java new file mode 100644 index 000000000..b01d810cc --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/DistributionMonitorController.java @@ -0,0 +1,82 @@ +package com.njcn.device.pms.controller.majornetwork; + + +import cn.hutool.core.collection.CollectionUtil; +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.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; +import com.njcn.device.pms.pojo.param.DistributionMonitorParam; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.vo.DoubleUserVO; +import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService; +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.web.bind.annotation.*; + +import com.njcn.web.controller.BaseController; + +import java.util.List; + +/** + *

+ * 配网监测点台账 + *

+ * + * @author hongawen + * @since 2022-10-14 + */ +@RestController +@RequestMapping("/pms/distributionMonitor") +@Slf4j +@RequiredArgsConstructor +@Api(tags = "台账-配网监测点") +public class DistributionMonitorController extends BaseController { + + private final IDistributionMonitorService iDistributionMonitorService; + + /** + * 新增配网监测点表 + * @author cdf + * @date 2022/10/26 + */ + @PostMapping + @ApiImplicitParam(name = "distributionMonitorParam",value = "配网监测点实体",required = true) + public HttpResult addDistributionMonitor(@RequestBody DistributionMonitorParam distributionMonitorParam){ + String methodDescribe = getMethodDescribe("addDistributionMonitor"); + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + + + /** + * 获取指定组装下的发电用电用户 + * @author cdf + * @date 2022/11/15 + */ + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/getDoubleUserByDept") + @ApiOperation("获取指定组装下的发电用电用户") + @ApiImplicitParam(name = "orgId", value = "组装机构编号", required = true) + public HttpResult> getDoubleUserByDept(@RequestParam("orgId")String orgId) { + String methodDescribe = getMethodDescribe("getDoubleUserByDept"); + List infos = iDistributionMonitorService.getDoubleUserByDept(orgId); + if (CollectionUtil.isEmpty(infos)) { + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe); + } else { + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, infos, methodDescribe); + } + } + + + + +} + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/GeneratrixWireController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/GeneratrixWireController.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/GeneratrixWireController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/GeneratrixWireController.java index 941cb8a7a..788cb97c8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/GeneratrixWireController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/GeneratrixWireController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.constant.OperateType; @@ -8,7 +8,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.GeneratrixWireParam; import com.njcn.device.pms.pojo.po.GeneratrixWire; -import com.njcn.device.pms.service.IGeneratrixWireService; +import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService; import com.njcn.web.controller.BaseController; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; @@ -55,7 +55,7 @@ public class GeneratrixWireController extends BaseController { @PostMapping("/updateGeneratrixWire") @ApiOperation("修改线路") @ApiImplicitParam(name = "generatrixWireParam", value = "线路实体", required = true) - public HttpResult updateGeneratrixWire(@RequestBody GeneratrixWireParam.UpdateGeneratrixWireParam generatrixWireParam) { + public HttpResult updateGeneratrixWire(@RequestBody GeneratrixWireParam generatrixWireParam) { String methodDescribe = getMethodDescribe("updateGeneratrixWire"); boolean result = iGeneratrixWireService.updateGeneratrixWire(generatrixWireParam); if(result){ diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementController.java index 97feb0056..156a45bc3 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementDataController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementDataController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementDataController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementDataController.java index 1f2ab32b5..d81341468 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/HarmonicGeneralManagementDataController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/HarmonicGeneralManagementDataController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/MonitorController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/MonitorController.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/MonitorController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/MonitorController.java index 7e8fd15ea..6dbe839b4 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/MonitorController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/MonitorController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.annotation.OperateInfo; @@ -9,13 +9,11 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.dto.PmsMonitorDTO; import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO; -import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; import com.njcn.device.pms.pojo.param.MonitorParam; import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam; import com.njcn.device.pms.pojo.param.PmsMonitorParam; -import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; import com.njcn.device.pms.pojo.vo.PmsMonitorVO; -import com.njcn.device.pms.service.IMonitorService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; import com.njcn.device.pq.pojo.po.Overlimit; import com.njcn.web.controller.BaseController; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneralDeviceController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneralDeviceController.java similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneralDeviceController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneralDeviceController.java index dc7beccad..10fb4b53b 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneralDeviceController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneralDeviceController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.annotation.OperateInfo; @@ -9,9 +9,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; -import com.njcn.device.pms.service.IPmsGeneralDeviceService; -import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO; -import com.njcn.device.pq.pojo.param.DeviceInfoParam; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneratrixController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneratrixController.java similarity index 98% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneratrixController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneratrixController.java index 1c7da4d50..166e6b9fc 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PmsGeneratrixController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PmsGeneratrixController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.annotation.OperateInfo; @@ -12,7 +12,7 @@ import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO; import com.njcn.device.pms.pojo.param.GeneratrixParam; import com.njcn.device.pms.pojo.param.PmsGeneratrixParam; import com.njcn.device.pms.pojo.po.Generatrix; -import com.njcn.device.pms.service.IPmsGeneratrixService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService; import com.njcn.web.controller.BaseController; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.*; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerClientController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerClientController.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerClientController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerClientController.java index e29c2e09b..f419731a8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerClientController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerClientController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; @@ -9,7 +9,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.PowerClientParam; import com.njcn.device.pms.pojo.po.PowerClient; -import com.njcn.device.pms.service.IPowerClientService; +import com.njcn.device.pms.service.majornetwork.IPowerClientService; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerDistributionareaController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerDistributionareaController.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerDistributionareaController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerDistributionareaController.java index a5ac06387..aafe3f8b7 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerDistributionareaController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerDistributionareaController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -12,9 +12,7 @@ import com.njcn.common.utils.LogUtil; import com.njcn.device.pms.pojo.param.PowerDistributionareaParam; import com.njcn.device.pms.pojo.po.PowerDistributionarea; import com.njcn.device.pms.pojo.vo.PowerDistributionareaVO; -import com.njcn.device.pms.service.IPowerDistributionareaService; -import com.njcn.system.pojo.param.EventTemplateParam; -import com.njcn.system.pojo.po.EventTemplate; +import com.njcn.device.pms.service.majornetwork.IPowerDistributionareaService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerGenerationUserController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerGenerationUserController.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerGenerationUserController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerGenerationUserController.java index 04c1d9345..12594563e 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerGenerationUserController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerGenerationUserController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; @@ -9,7 +9,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.PowerGenerationUserParam; import com.njcn.device.pms.pojo.po.PowerGenerationUser; -import com.njcn.device.pms.service.IPowerGenerationUserService; +import com.njcn.device.pms.service.majornetwork.IPowerGenerationUserService; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerQualityMatterController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerQualityMatterController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerQualityMatterController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerQualityMatterController.java index dfeb8c1be..f488b1df6 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/PowerQualityMatterController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/PowerQualityMatterController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RMpMonitorAlarmCountMController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RMpMonitorAlarmCountMController.java similarity index 79% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RMpMonitorAlarmCountMController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RMpMonitorAlarmCountMController.java index d5d584d24..91d8d5ab3 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RMpMonitorAlarmCountMController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RMpMonitorAlarmCountMController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; @@ -6,10 +6,8 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.RMpMonitorAlarmCountMParam; -import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; import com.njcn.device.pms.pojo.vo.RMpMonitorAlarmCountMVO; -import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; -import com.njcn.device.pms.service.RMpMonitorAlarmCountMService; +import com.njcn.device.pms.service.majornetwork.RMpMonitorAlarmCountMService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -37,9 +35,16 @@ public class RMpMonitorAlarmCountMController extends BaseController { private final RMpMonitorAlarmCountMService rMpMonitorAlarmCountMService; + /*** + * 根据条件查询监测点告警统计(月)(主网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return com.njcn.common.pojo.response.HttpResult> + */ @PostMapping("/getRMpMonitorAlarmCountMList") @OperateInfo(info = LogEnum.BUSINESS_COMMON) - @ApiOperation("根据条件查询监测点告警统计(月)") + @ApiOperation("查询监测点告警统计(月)(主网)") public HttpResult> getAllRStatAreaAlarmCountMList(@RequestBody RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam) { String methodDescribe = getMethodDescribe("getAllRStatAreaAlarmCountMList"); List list = rMpMonitorAlarmCountMService.getRMpMonitorAlarmCountMList(rMpMonitorAlarmCountMParam); diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/ROperatingIndexController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/ROperatingIndexController.java new file mode 100644 index 000000000..ae4dd54df --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/ROperatingIndexController.java @@ -0,0 +1,65 @@ +package com.njcn.device.pms.controller.majornetwork; + +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.constant.BizParamConstant; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.device.pms.pojo.param.ROperatingIndexParam; +import com.njcn.device.pms.pojo.vo.ROperatingIndexCommonVO; +import com.njcn.device.pms.service.majornetwork.ROperatingIndexMService; +import com.njcn.device.pms.service.majornetwork.ROperatingIndexYService; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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; + +/** + * @Title ROperatingIndexController + * @Package com.njcn.device.pms.controller.majornetwork + * @Author jianghaifei + * @Date 2022-11-09 16:18 + * @Version V1.0 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/rOperatingIndex") +@Api(tags = "主网-运行指标统计") +public class ROperatingIndexController extends BaseController { + + private final ROperatingIndexMService rOperatingIndexMService; //月 + + private final ROperatingIndexYService rOperatingIndexYService; //年 + + @PostMapping("/getOperatingList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("查询运行指标统计(主网)") + public HttpResult> getOperatingList(@RequestBody ROperatingIndexParam rOperatingIndexParam) { + String methodDescribe = getMethodDescribe("getOperatingList"); + Integer type = rOperatingIndexParam.getType(); + if (type == null) { + throw new BusinessException(CommonResponseEnum.INVALID_PARAMETER, "参数日期维度【type】非法"); + } + List list; + + if (BizParamConstant.STAT_BIZ_YEAR.equals(type.toString())) { + //年 + list = rOperatingIndexYService.getOperatingList(rOperatingIndexParam); + } else if (BizParamConstant.STAT_BIZ_MONTH.equals(type.toString())) { + //月 + list = rOperatingIndexMService.getOperatingList(rOperatingIndexParam); + } else { + throw new BusinessException(CommonResponseEnum.INVALID_PARAMETER, "参数日期维度【type】非法"); + } + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatAreaAlarmCountMController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatAreaAlarmCountMController.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatAreaAlarmCountMController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatAreaAlarmCountMController.java index 538e56dfd..21bdd8df3 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatAreaAlarmCountMController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatAreaAlarmCountMController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; @@ -6,10 +6,8 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; -import com.njcn.device.pms.pojo.param.RStatZwAlarmCountWParam; import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; -import com.njcn.device.pms.pojo.vo.RStatZwAlarmCountWVO; -import com.njcn.device.pms.service.RStatAreaAlarmCountMService; +import com.njcn.device.pms.service.majornetwork.RStatAreaAlarmCountMService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -39,10 +37,11 @@ public class RStatAreaAlarmCountMController extends BaseController { @PostMapping("getAllRStatAreaAlarmCountMList") @OperateInfo(info = LogEnum.BUSINESS_COMMON) - @ApiOperation("根据条件查询所有区域告警统计(月)") + @ApiOperation("查询区域告警统计(月)(主网)") public HttpResult> getAllRStatAreaAlarmCountMList(@RequestBody RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam) { String methodDescribe = getMethodDescribe("getAllRStatAreaAlarmCountMList"); List list = rStatAreaAlarmCountMService.getAllRStatAreaAlarmCountMList(rStatAreaAlarmCountMParam); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); } + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatBusbarHarmonicController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatBusbarHarmonicController.java similarity index 91% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatBusbarHarmonicController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatBusbarHarmonicController.java index 3de8f923a..f3281b12f 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatBusbarHarmonicController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatBusbarHarmonicController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; @@ -8,7 +8,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.UniversalFrontEndParam; import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO; -import com.njcn.device.pms.service.RStatBusbarHarmonicService; +import com.njcn.device.pms.service.majornetwork.RStatBusbarHarmonicService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -43,7 +43,7 @@ public class RStatBusbarHarmonicController extends BaseController { * @return 变电站母线电压指标年报 */ @PostMapping("/getRStatBusbarHarmonic") - @OperateInfo(info = LogEnum.SYSTEM_COMMON) + @OperateInfo(info = LogEnum.BUSINESS_COMMON) @ApiOperation("获取变电站母线电压指标年报") @ApiImplicitParam(name = "param", value = "条件参数", required = true) public HttpResult> getRStatBusbarHarmonic(@RequestBody UniversalFrontEndParam param) { diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatZwAlarmCountWController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatZwAlarmCountWController.java similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatZwAlarmCountWController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatZwAlarmCountWController.java index 635742de2..db575fe67 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RStatZwAlarmCountWController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RStatZwAlarmCountWController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; @@ -8,7 +8,7 @@ import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.RStatZwAlarmCountWParam; import com.njcn.device.pms.pojo.vo.ProblemMonitorDetailVO; import com.njcn.device.pms.pojo.vo.RStatZwAlarmCountWVO; -import com.njcn.device.pms.service.RStatZwAlarmCountWService; +import com.njcn.device.pms.service.majornetwork.RStatZwAlarmCountWService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RmpEventDetailController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RmpEventDetailController.java similarity index 91% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RmpEventDetailController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RmpEventDetailController.java index 12f0da08f..2cbeb64c0 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/RmpEventDetailController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/RmpEventDetailController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; @@ -7,7 +7,7 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.device.pms.pojo.param.UniversalFrontEndParam; import com.njcn.device.pms.pojo.vo.RmpEventDetailVO; -import com.njcn.device.pms.service.RmpEventDetailService; +import com.njcn.device.pms.service.majornetwork.RmpEventDetailService; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -42,7 +42,7 @@ public class RmpEventDetailController extends BaseController { * @return 暂态事件明细 */ @PostMapping("/getDetailsOfTransientEvents") - @OperateInfo(info = LogEnum.SYSTEM_COMMON) + @OperateInfo(info = LogEnum.BUSINESS_COMMON) @ApiOperation("获取区域暂态指标统计") @ApiImplicitParam(name = "param", value = "前端参数", required = true) public HttpResult> getRmpEventDetail(@RequestBody UniversalFrontEndParam param) { diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/SourceManagementController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/SourceManagementController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/SourceManagementController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/SourceManagementController.java index 1e5303294..eae7ea779 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/SourceManagementController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/SourceManagementController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatationStatController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatationStatController.java similarity index 98% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatationStatController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatationStatController.java index 136621df1..09fc556b4 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatationStatController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatationStatController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.annotation.OperateInfo; @@ -11,7 +11,7 @@ import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO; import com.njcn.device.pms.pojo.param.StatationStatParam; import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam; import com.njcn.device.pms.pojo.po.StatationStat; -import com.njcn.device.pms.service.IStatationStatService; +import com.njcn.device.pms.service.majornetwork.IStatationStatService; import com.njcn.web.controller.BaseController; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatisticsRunMonitorController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatisticsRunMonitorController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatisticsRunMonitorController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatisticsRunMonitorController.java index 9a048d0e3..2231c2734 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/StatisticsRunMonitorController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/StatisticsRunMonitorController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalController.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalController.java index f2f61429d..bb2626781 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -10,10 +10,10 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.common.utils.LogUtil; import com.njcn.device.pms.pojo.param.PmsTerminalParam; -import com.njcn.device.pms.pojo.po.Terminal; +import com.njcn.device.pms.pojo.po.PmsTerminal; import com.njcn.device.pms.pojo.vo.PmsTerminalVO; -import com.njcn.device.pms.service.ITerminalService; -import com.njcn.device.pq.pojo.param.TerminalParam; +import com.njcn.device.pms.service.majornetwork.ITerminalService; +import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -48,11 +48,11 @@ public class TerminalController extends BaseController { @OperateInfo(info = LogEnum.BUSINESS_COMMON) @PostMapping("getTerminalList") @ApiOperation("查询监测终端台账所有信息") - @ApiImplicitParam(name = "queryParam",value = "查询监测终端台账信息",required = true) - public HttpResult> getTerminalList(@RequestBody @Validated PmsTerminalParam.QueryParam queryParam){ + @ApiImplicitParam(name = "baseParam",value = "查询监测终端台账信息",required = true) + public HttpResult> getTerminalList(@RequestBody @Validated BaseParam baseParam){ String methodDescribe = getMethodDescribe("getTerminalList"); - LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam); - Page res = iTerminalService.getTerminalList(queryParam); + LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, baseParam); + Page res = iTerminalService.getTerminalList(baseParam); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,res,methodDescribe); } @@ -60,11 +60,11 @@ public class TerminalController extends BaseController { @GetMapping("/getTerminalById") @ApiOperation("根据ID查询监测终端台账数据") @ApiImplicitParam(name = "id",value = "id",required = true) - public HttpResult getTerminalById(@RequestParam("id") String id){ + public HttpResult getTerminalById(@RequestParam("id") String id){ String methodDescribe = getMethodDescribe("getTerminalById"); - Terminal terminal = iTerminalService.getTerminalById(id); - if (Objects.nonNull(terminal)){ - return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, terminal, methodDescribe); + PmsTerminal pmsTerminal = iTerminalService.getTerminalById(id); + if (Objects.nonNull(pmsTerminal)){ + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pmsTerminal, methodDescribe); } else { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalEliminateDataController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalEliminateDataController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalEliminateDataController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalEliminateDataController.java index dbdb9bb4b..5bfc939b1 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TerminalEliminateDataController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TerminalEliminateDataController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TractionStationController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TractionStationController.java similarity index 73% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TractionStationController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TractionStationController.java index ce8331386..6d5793333 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TractionStationController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TractionStationController.java @@ -1,15 +1,17 @@ -package com.njcn.device.pms.controller; - +package com.njcn.device.pms.controller.majornetwork; +import cn.hutool.core.collection.CollUtil; 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.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; import com.njcn.device.pms.pojo.param.TractionStationParam; import com.njcn.device.pms.pojo.po.TractionStation; -import com.njcn.device.pms.service.ITractionStationService; +import com.njcn.device.pms.service.majornetwork.ITractionStationService; import com.njcn.web.pojo.param.BaseParam; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -26,7 +28,7 @@ import java.util.Objects; /** *

- * 牵引站信息 + * 牵引站信息 *

* * @author hongawen @@ -59,7 +61,7 @@ public class TractionStationController extends BaseController { public HttpResult getTractionStationById(@RequestParam("tractionStationId") String tractionStationId) { String methodDescribe = getMethodDescribe("getTractionStationById"); TractionStation res = iTractionStationService.getTractionStationById(tractionStationId); - if(Objects.nonNull(res)){ + if (Objects.nonNull(res)) { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe); } return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe); @@ -68,14 +70,15 @@ public class TractionStationController extends BaseController { /** * 新增牵引站信息 + * * @author hany * @date 2022/10/28 */ @PostMapping("/addTractionStation") - @OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType= OperateType.ADD) + @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD) @ApiOperation("新增牵引站信息") @ApiImplicitParam(name = "tractionStationParam", value = "新增实体", required = true) - public HttpResult add(@RequestBody @Validated TractionStationParam tractionStationParam){ + public HttpResult add(@RequestBody @Validated TractionStationParam tractionStationParam) { String methodDescribe = getMethodDescribe("add"); boolean result = iTractionStationService.add(tractionStationParam); if (result) { @@ -87,14 +90,15 @@ public class TractionStationController extends BaseController { /** * 修改牵引站信息 + * * @author hany * @date 2022/10/28 */ @PostMapping("/updateTractionStation") - @OperateInfo(info = LogEnum.SYSTEM_COMMON,operateType = OperateType.UPDATE) + @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.UPDATE) @ApiOperation("修改牵引站信息") @ApiImplicitParam(name = "updateParam", value = "更新实体", required = true) - public HttpResult update(@RequestBody @Validated TractionStationParam updateParam){ + public HttpResult update(@RequestBody @Validated TractionStationParam updateParam) { String methodDescribe = getMethodDescribe("update"); boolean result = iTractionStationService.update(updateParam); if (result) { @@ -106,6 +110,7 @@ public class TractionStationController extends BaseController { /** * 删除牵引站信息 + * * @param ids id * @author hany * @date 2022/10/28 @@ -114,15 +119,37 @@ public class TractionStationController extends BaseController { @OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE) @ApiOperation("删除牵引站信息") @ApiImplicitParam(name = "ids", value = "ID索引", required = true) - public HttpResult delete(@RequestBody List ids){ + public HttpResult delete(@RequestBody List ids) { String methodDescribe = getMethodDescribe("delete"); boolean result = iTractionStationService.delete(ids); - if(result){ + if (result) { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); - }else { + } else { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe); } } + /** + * 获取牵引站详细信息 + * + * @param param 条件参数 + * @return com.njcn.common.pojo.response.HttpResult> + * @author yzh + * @date 2022/11/8 + */ + @PostMapping("/getPmsTractionStationInfo") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("获取牵引站详细信息") + @ApiImplicitParam(name = "param", value = "条件参数", required = true) + public HttpResult> getPmsTractionStationInfo(@RequestBody PmsTractionStationParam param) { + String methodDescribe = getMethodDescribe("getPmsTractionStationInfo"); + List result = iTractionStationService.getPmsTractionStationInfo(param); + if (CollUtil.isEmpty(result)) { + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe); + } else { + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe); + } + } + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TransientStasticDataController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TransientStasticDataController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TransientStasticDataController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TransientStasticDataController.java index 9ab9ab690..6afd1a670 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TransientStasticDataController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TransientStasticDataController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TreatTransientDetailDataController.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TreatTransientDetailDataController.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TreatTransientDetailDataController.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TreatTransientDetailDataController.java index 2ab5a6d70..061dffc9d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/TreatTransientDetailDataController.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/controller/majornetwork/TreatTransientDetailDataController.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.controller; +package com.njcn.device.pms.controller.majornetwork; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DeptLineMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DeptLineMapper.java new file mode 100644 index 000000000..12d8fa1f0 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DeptLineMapper.java @@ -0,0 +1,69 @@ +package com.njcn.device.pms.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pq.pojo.po.DeptLine; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + *

+ * Mapper 接口 + *

+ * + * @author denghuajun + * @since 2022-01-12 18:04 + */ +public interface DeptLineMapper extends BaseMapper { + /** + * 换绑监测点 + * @param id 部门id + * @param lineId 监测点id + * @return + */ + int deptChangeBindLine(@Param("id")String id,@Param("lineId")String lineId); + + + /** + * 查询所有绑定的监测点 + */ + List getAllBindLine(); + + /** + * 查询其他绑定的监测点 + * @param deptId + * @return + */ + List getOtherBindLine(@Param("deptId")String deptId); + + /** + * 查询自己绑定的监测点 + * @param deptId + * @return + */ + List getMyselfBindLine(@Param("deptId")String deptId); + + @Select ("SELECT\n" + + "\tpq_dept_line.Id,\n" + + "\tpq_dept_line.Line_Id\n" + + "FROM\n" + + "\tpq_dept_line\n" + + "WHERE\n" + + "\tEXISTS (\n" + + "\t\tSELECT\n" + + "\t\t\t1\n" + + "\t\tFROM\n" + + "\t\t\tpq_device,\n" + + "\t\t\tpq_line\n" + + "\t\tWHERE\n" + + "\t\t\tSUBSTRING_INDEX(\n" + + "\t\t\t\tSUBSTRING_INDEX(pq_line.Pids, ',', 5),\n" + + "\t\t\t\t',',\n" + + "\t\t\t\t- 1\n" + + "\t\t\t) = pq_device.Id\n" + + "\t\tAND pq_line.Id = pq_dept_line.Line_Id and (pq_device.Dev_Data_Type= 2 or pq_device.Dev_Data_Type = #{devDataType})\n" + + "\t)") + List getLineByDeptRelation(@Param("devDataType")Integer devDataType); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TractionStationMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TractionStationMapper.java deleted file mode 100644 index 37b4228a0..000000000 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TractionStationMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.njcn.device.pms.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.njcn.device.pms.pojo.po.TractionStation; - -/** - *

- * Mapper 接口 - *

- * - * @author hongawen - * @since 2022-10-14 - */ -public interface TractionStationMapper extends BaseMapper { - -} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwDataQualityCheckMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwDataQualityCheckMapper.java new file mode 100644 index 000000000..9f24390c4 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwDataQualityCheckMapper.java @@ -0,0 +1,59 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.PwRStatAccountCheckDataVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author yzh + * @date 2022/11/8 + */ + +@Mapper +public interface PwDataQualityCheckMapper { + + /** + * 获取配网数据质量-台帐类数据质量核查(年) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getYearInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); + + /** + * 获取配网数据质量-台帐类数据质量核查(季) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getSeasonInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); + + /** + * 获取配网数据质量-台帐类数据质量核查(月) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getMonthInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PwMonitorMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwMonitorMapper.java similarity index 93% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PwMonitorMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwMonitorMapper.java index 1972f0142..f0c22b434 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PwMonitorMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwMonitorMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.distribution; import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRMpMonitorAlarmCountMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRMpMonitorAlarmCountMMapper.java new file mode 100644 index 000000000..51d4d5aa5 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRMpMonitorAlarmCountMMapper.java @@ -0,0 +1,15 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM; + +/** +* @author jianghf +* @description 针对表【r_mp_monitor_alarm_count_m】的数据库操作Mapper +* @createDate 2022-10-12 20:08:33 +* @Entity com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM +*/ +public interface PwRMpMonitorAlarmCountMMapper extends BaseMapper { + + +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwROperatingIndexMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwROperatingIndexMapper.java new file mode 100644 index 000000000..6337fa2b0 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwROperatingIndexMapper.java @@ -0,0 +1,55 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 获取配网数据质量-监测指标数据质量统计 + * + * @author yzh + * @date 2022/11/7 + */ + +@Mapper +public interface PwROperatingIndexMapper { + + /** + * 获取配网数据质量-监测指标数据质量统计(年) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + List getYearInfo(@Param(("param")) StatisticsBizBaseParam param, + @Param(("deptIdList")) List deptIdList); + + /** + * 获取配网数据质量-监测指标数据质量统计(季) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + List getSeasonInfo(@Param(("param")) StatisticsBizBaseParam param, + @Param(("deptIdList")) List deptIdList); + + /** + * 获取配网数据质量-监测指标数据质量统计(月) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + List getMonthInfo(@Param(("param")) StatisticsBizBaseParam param, + @Param(("deptIdList")) List deptIdList); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatAreaAlarmCountMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatAreaAlarmCountMMapper.java new file mode 100644 index 000000000..680e0a3c0 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatAreaAlarmCountMMapper.java @@ -0,0 +1,15 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; + +/** +* @author jianghf +* @description 针对表【r_stat_area_alarm_count_m】的数据库操作Mapper +* @createDate 2022-10-10 14:36:46 +* @Entity com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM +*/ +public interface PwRStatAreaAlarmCountMMapper extends BaseMapper { + + +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatTargetCheckDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatTargetCheckDataMapper.java new file mode 100644 index 000000000..102d35f15 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/PwRStatTargetCheckDataMapper.java @@ -0,0 +1,59 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author yzh + * @date 2022/11/8 + */ + +@Mapper +public interface PwRStatTargetCheckDataMapper { + + /** + * 获取配网数据质量-监测指标数据质量核查(年) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getYearInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); + + /** + * 获取配网数据质量-监测指标数据质量核查(季) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getSeasonInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); + + /** + * 获取配网数据质量-监测指标数据质量核查(月) + * + * @param deptIds 单位id + * @param param 条件参数 + * @param distributionPoint 配网字典id + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getMonthInfo(@Param("deptIds") List deptIds, + @Param("param") StatisticsBizBaseParam param, + @Param("distributionPoint") String distributionPoint); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingIndexMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingIndexMMapper.java new file mode 100644 index 000000000..e7c6640aa --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingIndexMMapper.java @@ -0,0 +1,23 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.po.RDnOperatingIndexM; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; + +import java.util.List; +import java.util.Map; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_index_m(配网运行指标统计-月表,配网监测指标数据质量统计-月表 )】的数据库操作Mapper +* @createDate 2022-11-10 10:21:46 +* @Entity com.njcn.device.pms.pojo.po.RDnOperatingIndexM +*/ +public interface RDnOperatingIndexMMapper extends BaseMapper { + + List getOperatingList(Map condMap); +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingYMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingYMapper.java new file mode 100644 index 000000000..76c98e203 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RDnOperatingYMapper.java @@ -0,0 +1,23 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.po.RDnOperatingY; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; + +import java.util.List; +import java.util.Map; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_y(配网运行指标统计-年表,配网监测指标数据质量统计-年表)】的数据库操作Mapper +* @createDate 2022-11-10 10:21:46 +* @Entity com.njcn.device.pms.pojo.po.RDnOperatingY +*/ +public interface RDnOperatingYMapper extends BaseMapper { + + List getOperatingList(Map condMap); +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpPwAlarmDetailDMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RMpPwAlarmDetailDMapper.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpPwAlarmDetailDMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RMpPwAlarmDetailDMapper.java index e44f0b8ba..ae7146cf7 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpPwAlarmDetailDMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RMpPwAlarmDetailDMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.distribution; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.RMpPwAlarmDetailD; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RStatPwAlarmCountWMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RStatPwAlarmCountWMapper.java new file mode 100644 index 000000000..9ed4ce9ee --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/RStatPwAlarmCountWMapper.java @@ -0,0 +1,23 @@ +package com.njcn.device.pms.mapper.distribution; + +import com.njcn.device.pms.pojo.po.RStatPwAlarmCountW; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmCountWVO; + +import java.util.List; +import java.util.Map; + +/** +* @author jianghf +* @description 针对表【r_stat_pw_alarm_count_w】的数据库操作Mapper +* @createDate 2022-11-02 15:42:29 +* @Entity com.njcn.device.pms.pojo.po.RStatPwAlarmCountW +*/ +public interface RStatPwAlarmCountWMapper extends BaseMapper { + + List getRStatPwAlarmCountVOList(Map condMap); +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwDataQualityCheckMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwDataQualityCheckMapper.xml new file mode 100644 index 000000000..ebd6ac920 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwDataQualityCheckMapper.xml @@ -0,0 +1,69 @@ + + + + + + org_no AS orgNo, + data_date AS dataDate, + dev_field_null AS devFieldNull, + dev_run_time_abnormal AS devRunTimeAbnormal, + dev_type_error AS devTypeError, + dev_check_time_abnormal AS devCheckTimeAbnormal, + dev_ip_error AS devIpError, + measurement_field_null AS measurementFieldNull, + measurement_name_abnormal AS measurementNameAbnormal, + measurement_type_abnormal AS measurementTypeAbnormal, + measurement_capacity_error AS measurementCapacityError, + measurement_dev_not_match AS measurementDevNotMatch, + measurement_type_error AS measurementTypeError, + traction_station_measurement_redundancy AS tractionStationMeasurementRedundancy, + railway_capacity_error AS railwayCapacityError, + traction_station_measurement_missing AS tractionStationMeasurementMissing, + data_type AS dataType + + + org_no IN + + #{item} + + + AND data_type = #{distributionPoint} + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d') + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d') + + + + + + + + + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PwMonitorMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml similarity index 54% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PwMonitorMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml index f9def7d1f..46409a8b6 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PwMonitorMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml @@ -1,14 +1,18 @@ - + - + + SELECT + z.org_no AS orgNo, + z.data_date AS dataDate, + z.measurement_run_points AS measurementCount, + z.effective_access_measurement_count AS effectiveAccessMeasurementCount, + IFNULL(( + SELECT + a.effective_access_measurement_count + FROM + r_dn_operating_y AS a + WHERE + a.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS effectiveAccessMeasurementCountYearOnYear, + IFNULL(( + SELECT + b.effective_access_measurement_count + FROM + r_dn_operating_y AS b + WHERE + b.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS effectiveAccessMeasurementCountRingRatio, + TRUNCATE ( z.effective_access_measurement_count / z.measurement_run_points, 2 ) AS effectiveAccessRate, + IFNULL(( + SELECT TRUNCATE + ( c.effective_access_measurement_count / c.measurement_run_points, 2 ) + FROM + r_dn_operating_y AS c + WHERE + c.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS effectiveAccessRateYearOnYear, + IFNULL(( + SELECT TRUNCATE + ( d.effective_access_measurement_count / d.measurement_run_points, 2 ) + FROM + r_dn_operating_y AS d + WHERE + d.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS effectiveAccessRateRingRatio, + z.data_integrity_rate AS dataIntegrityRate, + IFNULL(( + SELECT + e.data_integrity_rate + FROM + r_dn_operating_y AS e + WHERE + e.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS dataIntegrityRateYearOnYear, + IFNULL(( + SELECT + f.data_integrity_rate + FROM + r_dn_operating_y AS f + WHERE + f.org_no = z.org_no + AND ( + z.data_date >= date( + DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR ))) + AND ( + z.data_date <= date( + DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR ))) + ), + 3.14159 + ) AS dataIntegrityRateRingRatio, + z.index_integrity_rate AS indexIntegrityRate, + z.is_unusual AS isUnusual + FROM + r_dn_operating_y AS z + WHERE + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatAreaAlarmCountMMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatAreaAlarmCountMMapper.xml new file mode 100644 index 000000000..7ee8e911b --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatAreaAlarmCountMMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + org_no,data_date,data_type, + vdev_alarm_info,vdev_alarm_ratio,freq_alarm_info, + freq_alarm_ratio,unbalance_alarm_info,unbalance_alarm_ratio, + v_alarm_info,v_alarm_ratio,flicker_alarm_info, + flicker_alarm_ratio,sag_alarm_info,sag_alarm_avg_count, + interrupt_alarm_info,interrupt_alarm_avg_count,harmonic_type_grade, + event_type_grade + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatTargetCheckDataMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatTargetCheckDataMapper.xml new file mode 100644 index 000000000..5c24009cd --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwRStatTargetCheckDataMapper.xml @@ -0,0 +1,77 @@ + + + + + + org_no AS orgNo, + data_date AS dataDate, + fundamental_voltage_abnormal AS fundamentalVoltageAbnormal, + frequency_abnormal AS frequencyAbnormal, + v_dev_abnormal AS vDevAbnormal, + harmonic_voltage_abnormal AS harmonicVoltageAbnormal, + centre_harmonic_voltage AS centreHarmonicVoltage, + tp_voltage_unbalance AS tpVoltageUnbalance, + v_dev_last_overlimit AS vDevLastOverlimit, + traction_station_measurement_none AS tractionStationMeasurementNone, + railway_fundamental_voltage_abnormal AS railwayFundamentalVoltageAbnormal, + railway_fundamental_current_abnormal AS railwayFundamentalCurrentAbnormal, + railway_total_active_power_abnormal AS railwayTotalActivePowerAbnormal, + railway_harmonic_voltage_content_abnormal AS railwayHarmonicVoltageContentAbnormal, + freq_upload_event AS freqUploadEvent, + wave_upload_error AS waveUploadError, + event_last_time_abnormal AS eventLastTimeAbnormal, + event_type_amplitude_atypism AS eventTypeAmplitudeAtypism, + event_type_amplitude_abnormal AS eventTypeAmplitudeAbnormal, + event_phase_none AS eventPhaseNone, + run_volatge_up AS runVolatgeUp, + run_volatge_low AS runVolatgeLow, + data_type AS dataType + + + org_no IN + + #{item} + + + AND data_type = #{distributionPoint} + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d') + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d') + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingIndexMMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingIndexMMapper.xml new file mode 100644 index 000000000..aff075b1c --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingIndexMMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + org_no,data_date,measurement_point_type, + measurement_run_points,transit_measurement_points,effective_access_measurement_count, + effective_access_rate,should_count,should_point_coverage, + data_integrity_rate,data_right_rate,index_integrity_rate, + is_unusual + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingYMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingYMapper.xml new file mode 100644 index 000000000..2d446b568 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RDnOperatingYMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + org_no,data_date,measurement_point_type, + measurement_run_points,transit_measurement_points,effective_access_measurement_count, + effective_access_rate,should_count,should_point_coverage, + data_integrity_rate,data_right_rate,index_integrity_rate, + is_unusual + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RMpPwAlarmDetailDMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RMpPwAlarmDetailDMapper.xml similarity index 91% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RMpPwAlarmDetailDMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RMpPwAlarmDetailDMapper.xml index ecbf73b96..4957ed236 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RMpPwAlarmDetailDMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RMpPwAlarmDetailDMapper.xml @@ -2,7 +2,7 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RStatPwAlarmCountWMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RStatPwAlarmCountWMapper.xml new file mode 100644 index 000000000..0a134c154 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/RStatPwAlarmCountWMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + org_no,data_date,online_monitor_count, + alarm_monitor_count + + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DistributionMonitorMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/DistributionMonitorMapper.java similarity index 72% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DistributionMonitorMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/DistributionMonitorMapper.java index e6d53fd4c..aea0a912b 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/DistributionMonitorMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/DistributionMonitorMapper.java @@ -1,9 +1,10 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.po.DistributionMonitor; +import com.njcn.device.pms.pojo.vo.DoubleUserVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -25,5 +26,12 @@ public interface DistributionMonitorMapper extends BaseMapper getIdByOrgId(@Param("orgIds")List orgIds, @Param("pmsDeviceInfoParam") PmsDeviceInfoParam pmsDeviceInfoParam); + /** + * 获取指定部门下的用电发电用户 + * @author cdf + * @date 2022/11/15 + */ + List getDoubleUserByDept(@Param("orgId")String orgId); + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/GeneratrixWireMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/GeneratrixWireMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/GeneratrixWireMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/GeneratrixWireMapper.java index 0422b92c4..5caef3d92 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/GeneratrixWireMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/GeneratrixWireMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.GeneratrixWire; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementDataMapper.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementDataMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementDataMapper.java index 6f3f10cc4..7159ee153 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementDataMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementDataMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementMapper.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementMapper.java index 1c31cb120..67ca7e1ba 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/HarmonicGeneralManagementMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/HarmonicGeneralManagementMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.HarmonicGeneralManagement; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/MonitorMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/MonitorMapper.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/MonitorMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/MonitorMapper.java index 608c6fcbb..ca3fe804b 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/MonitorMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/MonitorMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.common.pojo.dto.SimpleDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/OverlimitMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/OverlimitMapper.java similarity index 83% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/OverlimitMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/OverlimitMapper.java index eb3ebdbd6..f4b07066c 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/OverlimitMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/OverlimitMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PmsGeneratrixMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PmsGeneratrixMapper.java similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PmsGeneratrixMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PmsGeneratrixMapper.java index 790e3cc0a..4cd84c4d0 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PmsGeneratrixMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PmsGeneratrixMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerClientMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerClientMapper.java similarity index 84% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerClientMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerClientMapper.java index 511b59ae2..f13158e21 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerClientMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerClientMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.PowerClient; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerDistributionareaMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerDistributionareaMapper.java similarity index 93% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerDistributionareaMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerDistributionareaMapper.java index e16032153..630ad1bd9 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerDistributionareaMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerDistributionareaMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerGenerationUserMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerGenerationUserMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerGenerationUserMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerGenerationUserMapper.java index 72a856bce..4eff14a14 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerGenerationUserMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerGenerationUserMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.PowerGenerationUser; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerQualityMatterMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerQualityMatterMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerQualityMatterMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerQualityMatterMapper.java index af3564b95..095349fb8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/PowerQualityMatterMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/PowerQualityMatterMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.PowerQualityMatter; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpMonitorAlarmCountMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpMonitorAlarmCountMMapper.java similarity index 89% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpMonitorAlarmCountMMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpMonitorAlarmCountMMapper.java index 81dc73a37..419f2cd02 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpMonitorAlarmCountMMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpMonitorAlarmCountMMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpTargetWarnDMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpTargetWarnDMapper.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpTargetWarnDMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpTargetWarnDMapper.java index f5d3c4948..59d5863de 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RMpTargetWarnDMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RMpTargetWarnDMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.RMpTargetWarnD; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMMapper.java new file mode 100644 index 000000000..46d01059a --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMMapper.java @@ -0,0 +1,18 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.device.pms.pojo.po.ROperatingIndexM; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author jianghf +* @description 针对表【r_operating_index_m(主网运行指标统计-月表,主网监测指标数据质量统计-月表 )】的数据库操作Mapper +* @createDate 2022-11-09 19:56:01 +* @Entity com.njcn.device.pms.pojo.po.ROperatingIndexM +*/ +public interface ROperatingIndexMMapper extends BaseMapper { + +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMapper.java new file mode 100644 index 000000000..6089fc02f --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexMapper.java @@ -0,0 +1,54 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.ROperatingIndexVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 主网数据质量-监测指标数据质量统计 + * + * @author yzh + * @date 2022/11/2 + */ +@Mapper +public interface ROperatingIndexMapper { + + /** + * 获取主网数据质量-监测指标数据质量统计(年) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getYearInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-监测指标数据质量统计(季) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getSeasonInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-监测指标数据质量统计(月) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getMonthInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexYMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexYMapper.java new file mode 100644 index 000000000..a3e90cdc5 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/ROperatingIndexYMapper.java @@ -0,0 +1,18 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.device.pms.pojo.po.ROperatingIndexY; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author jianghf +* @description 针对表【r_operating_index_y(主网运行指标统计-年表,主网监测指标数据质量统计-年表 )】的数据库操作Mapper +* @createDate 2022-11-09 19:56:01 +* @Entity com.njcn.device.pms.pojo.po.ROperatingIndexY +*/ +public interface ROperatingIndexYMapper extends BaseMapper { + +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RQualityParameterMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RQualityParameterMapper.java new file mode 100644 index 000000000..2ee003689 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RQualityParameterMapper.java @@ -0,0 +1,33 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.po.RQualityParameterPO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 主网数据质量-台账数据质量统计 + * + * @author yzh + * @date 2022/11/1 + */ +@Mapper +public interface RQualityParameterMapper { + + /** + * 获取主网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @param deptIdList 单位id + * @param dataType 主网测点 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getLedgerDataQualityStat(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList, + @Param("dataType") String dataType); + +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAccountCheckDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAccountCheckDataMapper.java new file mode 100644 index 000000000..7f80918e4 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAccountCheckDataMapper.java @@ -0,0 +1,54 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 主网数据质量-台帐类数据质量核查 + * + * @author yzh + * @date 2022/11/2 + */ + +@Mapper +public interface RStatAccountCheckDataMapper { + /** + * 获取主网数据质量-台帐类数据质量核查(年) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getYearInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-台帐类数据质量核查(季) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getSeasonInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-台帐类数据质量核查(月) + * + * @param param 单位id + * @param deptIdList 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getMonthInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatAreaAlarmCountMMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAreaAlarmCountMMapper.java similarity index 89% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatAreaAlarmCountMMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAreaAlarmCountMMapper.java index 0f62abe07..c799a375a 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatAreaAlarmCountMMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatAreaAlarmCountMMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatBusbarHarmonicMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatBusbarHarmonicMapper.java similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatBusbarHarmonicMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatBusbarHarmonicMapper.java index 4accaf9a3..3113bfa93 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatBusbarHarmonicMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatBusbarHarmonicMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.RStatBusbarHarmonicYPO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatEventOrgMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatEventOrgMapper.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatEventOrgMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatEventOrgMapper.java index 4c63c32d1..29370ec0b 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatEventOrgMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatEventOrgMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.njcn.device.pms.pojo.po.RStatEventOrgPO; import com.njcn.device.pms.pojo.vo.RStatEventOrgVO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatMeasurementAccountDetailMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatMeasurementAccountDetailMapper.java new file mode 100644 index 000000000..256c45caf --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatMeasurementAccountDetailMapper.java @@ -0,0 +1,30 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.po.RStatMeasurementAccountDetailPO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author yzh + * @date 2022/11/7 + */ + +@Mapper +public interface RStatMeasurementAccountDetailMapper { + + /** + * 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * + * @param monitorIdList + * @param param 前端参数 + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + List getQualityProblemsOfMonitoringPointAccountData(@Param("monitorIdList") List monitorIdList, + @Param("param") DataQualityDetailsParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatOrgMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatOrgMapper.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatOrgMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatOrgMapper.java index 3d1aed2a7..c988c2216 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatOrgMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatOrgMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.vo.RStatOrgVO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatSubstationMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatSubstationMapper.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatSubstationMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatSubstationMapper.java index 595736189..c7f3168c5 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatSubstationMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatSubstationMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.njcn.device.pms.pojo.po.PmsMonitorPO; import com.njcn.device.pms.pojo.vo.RStatSubstationVO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetCheckDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetCheckDataMapper.java new file mode 100644 index 000000000..2bb66b516 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetCheckDataMapper.java @@ -0,0 +1,54 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 主网数据质量-监测指标数据质量核查 + * + * @author yzh + * @date 2022/11/2 + */ +@Mapper +public interface RStatTargetCheckDataMapper { + + /** + * 获取主网数据质量-台帐类数据质量核查(年) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getYearInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-台帐类数据质量核查(季) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getSeasonInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); + + /** + * 获取主网数据质量-台帐类数据质量核查(月) + * + * @param param 条件参数 + * @param deptIdList 单位id + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getMonthInfo(@Param("param") StatisticsBizBaseParam param, + @Param("deptIdList") List deptIdList); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetDetailMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetDetailMapper.java new file mode 100644 index 000000000..3f40218e0 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTargetDetailMapper.java @@ -0,0 +1,31 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.po.RStatTargetDetailPO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 获取主网数据质量-稳态指标类数据质量问题查询 + * + * @author yzh + * @date 2022/11/9 + */ + +@Mapper +public interface RStatTargetDetailMapper { + + /** + * 获取主网数据质量-稳态指标类数据质量问题查询 + * + * @param param 前端条件 + * @param monitorIds 监测点id + * @return java.util.List + * @author yzh + * @date 2022/11/9 + */ + List getRStatTargetDetail(@Param("param") DataQualityDetailsParam param, + @Param("monitorIds") List monitorIds); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTractionStationAccountDetailMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTractionStationAccountDetailMapper.java new file mode 100644 index 000000000..e4e3a88b8 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatTractionStationAccountDetailMapper.java @@ -0,0 +1,31 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.po.RStatTractionStationAccountDetailPO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + * + * @author yzh + * @date 2022/11/9 + */ + +@Mapper +public interface RStatTractionStationAccountDetailMapper { + + /** + * 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + * + * @param param 条件参数 + * @param substationIds 牵引站id + * @return java.util.List + * @author yzh + * @date 2022/11/9 + */ + List getTractionPlatformAccountDataQualityProblem(@Param("param") DataQualityDetailsParam param, + @Param("substationIds") List substationIds); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatZwAlarmCountWMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatZwAlarmCountWMapper.java similarity index 94% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatZwAlarmCountWMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatZwAlarmCountWMapper.java index ef00b3fef..748d2e8f6 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RStatZwAlarmCountWMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RStatZwAlarmCountWMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RmpEventDetailMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RmpEventDetailMapper.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RmpEventDetailMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RmpEventDetailMapper.java index e556c3a67..41faf52ef 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/RmpEventDetailMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/RmpEventDetailMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.vo.RmpEventDetailVO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SourceManagementMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/SourceManagementMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SourceManagementMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/SourceManagementMapper.java index 678f190ba..0ea5198ba 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/SourceManagementMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/SourceManagementMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatationStatMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatationStatMapper.java similarity index 94% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatationStatMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatationStatMapper.java index 19dabb8b2..2e7363457 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatationStatMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatationStatMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatisticsRunMonitorMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatisticsRunMonitorMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatisticsRunMonitorMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatisticsRunMonitorMapper.java index 9a2c2fc45..b48dffa9d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/StatisticsRunMonitorMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/StatisticsRunMonitorMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.StatisticsRunMonitor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalEliminateDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalEliminateDataMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalEliminateDataMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalEliminateDataMapper.java index 1a8dde5a8..d0b2167f5 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalEliminateDataMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalEliminateDataMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.TerminalEliminateData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalMapper.java similarity index 75% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalMapper.java index 1058a4f0a..dc74d6286 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TerminalMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TerminalMapper.java @@ -1,9 +1,9 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; 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.device.pms.pojo.po.Terminal; +import com.njcn.device.pms.pojo.po.PmsTerminal; import com.njcn.device.pms.pojo.vo.PmsTerminalVO; import org.apache.ibatis.annotations.Param; @@ -15,7 +15,7 @@ import org.apache.ibatis.annotations.Param; * @author hongawen * @since 2022-10-14 */ -public interface TerminalMapper extends BaseMapper { +public interface TerminalMapper extends BaseMapper { Page page(@Param("page")Page page, @Param("ew") QueryWrapper queryWrapper); } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TractionStationMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TractionStationMapper.java new file mode 100644 index 000000000..0322569c7 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TractionStationMapper.java @@ -0,0 +1,30 @@ +package com.njcn.device.pms.mapper.majornetwork; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; +import com.njcn.device.pms.pojo.po.TractionStation; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + *

+ * Mapper 接口 + *

+ * + * @author hongawen + * @since 2022-10-14 + */ +public interface TractionStationMapper extends BaseMapper { + + /** + * 获取牵引站详细信息 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPmsTractionStationInfo(@Param("param") PmsTractionStationParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TransientStasticDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TransientStasticDataMapper.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TransientStasticDataMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TransientStasticDataMapper.java index b4b922d53..4bcf95121 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TransientStasticDataMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TransientStasticDataMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.TransientStasticData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TreatTransientDetailDataMapper.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TreatTransientDetailDataMapper.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TreatTransientDetailDataMapper.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TreatTransientDetailDataMapper.java index 3d72157c0..0ca0401ea 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/TreatTransientDetailDataMapper.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/TreatTransientDetailDataMapper.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.mapper; +package com.njcn.device.pms.mapper.majornetwork; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.njcn.device.pms.pojo.po.TreatTransientDetailData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DistributionMonitorMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/DistributionMonitorMapper.xml similarity index 65% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DistributionMonitorMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/DistributionMonitorMapper.xml index 85a416763..a4f765dcb 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DistributionMonitorMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/DistributionMonitorMapper.xml @@ -1,9 +1,9 @@ - + - SELECT t.Operation_Id operationId,t.Power_Station_Id powerrId,t.Line_Id lineId,t.id monitorId FROM @@ -31,4 +31,25 @@ ) t INNER JOIN pms_distribution_monitor b ON t.id = b.Monitor_Id + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementDataMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementDataMapper.xml similarity index 61% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementDataMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementDataMapper.xml index cdde9fbff..a5e8e906f 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementDataMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementDataMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementMapper.xml similarity index 62% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementMapper.xml index 10584f1df..c7ad53411 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/HarmonicGeneralManagementMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/HarmonicGeneralManagementMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/MonitorMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/MonitorMapper.xml similarity index 98% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/MonitorMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/MonitorMapper.xml index 207f77971..e28e3f331 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/MonitorMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/MonitorMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerClientMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerClientMapper.xml similarity index 66% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerClientMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerClientMapper.xml index 370322afa..9522b734a 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerClientMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerClientMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerDistributionareaMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerDistributionareaMapper.xml similarity index 81% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerDistributionareaMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerDistributionareaMapper.xml index 0e9dbf6c0..808a8f7fc 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/PowerDistributionareaMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/PowerDistributionareaMapper.xml @@ -1,6 +1,6 @@ - + + SELECT + + FROM + r_operating_index_y + WHERE + + + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/ROperatingIndexYMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/ROperatingIndexYMapper.xml new file mode 100644 index 000000000..6813c124d --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/ROperatingIndexYMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + org_no,data_date,measurement_run_points, + transit_measurement_points,effective_access_measurement_count,online_measurement_points, + online_measurement_count,should_count,should_point_coverage, + data_integrity_rate,data_right_rate,index_integrity_rate, + is_unusual + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RQualityParameterMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RQualityParameterMapper.xml new file mode 100644 index 000000000..3144eeb24 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RQualityParameterMapper.xml @@ -0,0 +1,47 @@ + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAccountCheckDataMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAccountCheckDataMapper.xml new file mode 100644 index 000000000..4f7578c92 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAccountCheckDataMapper.xml @@ -0,0 +1,67 @@ + + + + + + org_no AS orgNO, + data_date AS dataDate, + dev_field_null AS devFieldNull, + dev_run_time_abnormal AS devRunTimeAbnormal, + dev_type_error AS devTypeError, + dev_check_time_abnormal AS devCheckTimeAbnormal, + dev_ip_error AS devIpError, + measurement_field_null AS measurementFieldNull, + measurement_limit_abnormal AS measurementLimitAbnormal, + measurement_name_abnormal AS measurementNameAbnormal, + measurement_type_abnormal AS measurementTypeAbnormal, + measurement_capacity_error AS measurementCapacityError, + measurement_dev_not_match AS measurementDevNotMatch, + measurement_type_error AS measurementTypeError, + traction_station_measurement_missing AS tractionStationMeasurementMissing, + traction_station_measurement_redundancy AS tractionStationMeasurementRedundancy, + railway_capacity_error AS railwayCapacityError, + traction_station_field_null AS tractionStationFieldNull, + traction_station_capacity_error AS tractionStationCapacityError, + traction_station_Info_redundancy AS tractionStationInfoRedundancy, + data_type AS dataType + + + org_no IN + + #{item} + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d') + + + AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d') + + + + + + + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatAreaAlarmCountMMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAreaAlarmCountMMapper.xml similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatAreaAlarmCountMMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAreaAlarmCountMMapper.xml index e6353dd24..c544d786d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatAreaAlarmCountMMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatAreaAlarmCountMMapper.xml @@ -2,7 +2,7 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatBusbarHarmonicMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatBusbarHarmonicMapper.xml similarity index 94% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatBusbarHarmonicMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatBusbarHarmonicMapper.xml index df00f0865..3a8b2f5d9 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatBusbarHarmonicMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatBusbarHarmonicMapper.xml @@ -1,6 +1,6 @@ - + + SELECT + data_date AS dataDate, + check_rules AS checkRules, + measurement_point_id AS measurementPointId + FROM + r_stat_measurement_account_detail + WHERE + measurement_point_id IN + + #{item} + + + AND check_rules IN + + #{item} + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatOrgMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatOrgMapper.xml similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatOrgMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatOrgMapper.xml index ccc4b0aad..b1fe28c03 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatOrgMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatOrgMapper.xml @@ -1,6 +1,6 @@ - + org_no IN diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatSubstationMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatSubstationMapper.xml similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatSubstationMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatSubstationMapper.xml index 7efaef6fa..8bd8f24d8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatSubstationMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatSubstationMapper.xml @@ -1,6 +1,6 @@ - + + SELECT + + FROM + r_stat_target_check_data_Y + WHERE + + + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTargetDetailMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTargetDetailMapper.xml new file mode 100644 index 000000000..0adc749b9 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTargetDetailMapper.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTractionStationAccountDetailMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTractionStationAccountDetailMapper.xml new file mode 100644 index 000000000..61590a79e --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatTractionStationAccountDetailMapper.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatZwAlarmCountWMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatZwAlarmCountWMapper.xml similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatZwAlarmCountWMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatZwAlarmCountWMapper.xml index ebe4d382a..ecb1fa641 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RStatZwAlarmCountWMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RStatZwAlarmCountWMapper.xml @@ -2,7 +2,7 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RmpEventDetailMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RmpEventDetailMapper.xml similarity index 59% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RmpEventDetailMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RmpEventDetailMapper.xml index 9a12ffff9..ddea53344 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/RmpEventDetailMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/RmpEventDetailMapper.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SourceManagementMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/SourceManagementMapper.xml similarity index 65% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SourceManagementMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/SourceManagementMapper.xml index 606c70ab5..754fccae5 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/SourceManagementMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/SourceManagementMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/StatationStatMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/StatationStatMapper.xml similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/StatationStatMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/StatationStatMapper.xml index dd40bb65a..17ab14787 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/StatationStatMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/StatationStatMapper.xml @@ -1,6 +1,6 @@ - + SELECT pms_terminal.* diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TractionStationMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TractionStationMapper.xml new file mode 100644 index 000000000..5254d6437 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TractionStationMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TransientStasticDataMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TransientStasticDataMapper.xml similarity index 64% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TransientStasticDataMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TransientStasticDataMapper.xml index 6fbbd6e8e..92fe82e49 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TransientStasticDataMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TransientStasticDataMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TreatTransientDetailDataMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TreatTransientDetailDataMapper.xml similarity index 63% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TreatTransientDetailDataMapper.xml rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TreatTransientDetailDataMapper.xml index 6c3c4ccac..b698b7be5 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TreatTransientDetailDataMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/majornetwork/mapping/TreatTransientDetailDataMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DeptLineMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DeptLineMapper.xml new file mode 100644 index 000000000..25f2e3093 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/DeptLineMapper.xml @@ -0,0 +1,20 @@ + + + + + + update pq_dept_line set id = #{id} where Line_Id = #{lineId} + + + + + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TractionStationMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TractionStationMapper.xml deleted file mode 100644 index e839ffba2..000000000 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/mapping/TractionStationMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/DeptLineService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/DeptLineService.java new file mode 100644 index 000000000..fc0f1e1dd --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/DeptLineService.java @@ -0,0 +1,64 @@ +package com.njcn.device.pms.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pq.pojo.po.DeptLine; +import com.njcn.web.pojo.param.DeptLineParam; + +import java.util.List; +import java.util.Map; + +/** + * @author denghuajun + * @date 2022/1/12 17:30 + * + */ +public interface DeptLineService extends IService { + + /** + * 部门绑定监测点 + * @param deptLineParam 部门监测点的实体类 + * @return 绑定结果 + */ + void deptBindLine(DeptLineParam deptLineParam); + + + /** + * 部门解绑监测点 + * @param deptLineParam 部门监测点的实体类 + * @return 解绑结果 + */ + void deptDeleteBindLine(DeptLineParam deptLineParam); + + + /** + * 根据部门ids集合查询是否绑定监测点 + * @param ids 部门ids + * @return 查询结果 + */ + List selectDeptBindLines(List ids); + + /** + * 部门解除绑定监测点 + * @param id 部门id + * @return 解绑结果 + */ + int removeBind(String id); + + /** + * 功能描述: 根据部门id获取绑定的监测点 + * + * @param id + * @return java.util.List + * @author xy + * @date 2022/1/25 9:28 + */ + List getLineByDeptId(String id); + /** + * @Description: 获取部门和监测点的关系(分稳态暂态) + * @Param: [devDataType] + * @return: java.util.Map> + * @Author: clam + * @Date: 2022/10/19 + */ + Map> getLineByDeptRelation(Integer devDataType); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPwMonitorService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/IPwMonitorService.java similarity index 90% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPwMonitorService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/IPwMonitorService.java index 748d3ec7d..a2bd27854 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPwMonitorService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/IPwMonitorService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.distribution; import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityCheckService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityCheckService.java new file mode 100644 index 000000000..28c91ba49 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityCheckService.java @@ -0,0 +1,37 @@ +package com.njcn.device.pms.service.distribution; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.PwRStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; + +import java.util.List; + +/** + * 配网数据质量-数据质量核查 + * + * @author yzh + * @date 2022/11/8 + */ + +public interface PwDataQualityCheckService { + + /** + * 获取配网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPwQualityCheckOfAccountData(StatisticsBizBaseParam param); + + /** + * 获取配网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPwMonitoringIndexDataQualityVerification(StatisticsBizBaseParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityDetailsService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityDetailsService.java new file mode 100644 index 000000000..d847f4f19 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityDetailsService.java @@ -0,0 +1,35 @@ +package com.njcn.device.pms.service.distribution; + +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.vo.PwRStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.PwRStatTargetDetailVO; + +import java.util.List; + +/** + * @author yzh + * @date 2022/11/8 + */ + +public interface PwDataQualityDetailsService { + + /** + * 获取配网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPwQualityProblemsOfMonitoringPointAccountData(DataQualityDetailsParam param); + + /** + * 获取配网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPwRStatTargetDetail(DataQualityDetailsParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityStatService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityStatService.java new file mode 100644 index 000000000..d91923737 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwDataQualityStatService.java @@ -0,0 +1,48 @@ +package com.njcn.device.pms.service.distribution; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingVO; +import com.njcn.device.pms.pojo.vo.PwRQualityParameterVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; + +import java.util.List; + +/** + * 配网数据质量-数据质量统计 + * + * @author yzh + * @date 2022/11/4 + */ + +public interface PwDataQualityStatService { + + /** + * 获取配网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + List getPwLedgerDataQualityStat(StatisticsBizBaseParam param); + + /** + * 获取配网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + List getPwMonitoringIndexDataQualityStat(StatisticsBizBaseParam param); + + /** + * 获取配网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + List getPwSummaryStatOfMonitoringIndexDataQualityProblems(StatisticsBizBaseParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRMpMonitorAlarmCountMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRMpMonitorAlarmCountMService.java new file mode 100644 index 000000000..3b1352947 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRMpMonitorAlarmCountMService.java @@ -0,0 +1,25 @@ +package com.njcn.device.pms.service.distribution; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.param.RMpMonitorAlarmCountMParam; +import com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM; +import com.njcn.device.pms.pojo.vo.PwRMpMonitorAlarmCountMVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_mp_monitor_alarm_count_m】的数据库操作Service +* @createDate 2022-10-12 20:08:33 +*/ +public interface PwRMpMonitorAlarmCountMService extends IService { + + /*** + * 根据条件查询监测点告警统计(月)(配网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return java.util.List + */ + List getPwRMpMonitorAlarmCountMList(RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRStatAreaAlarmCountMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRStatAreaAlarmCountMService.java new file mode 100644 index 000000000..b82d74ede --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/PwRStatAreaAlarmCountMService.java @@ -0,0 +1,25 @@ +package com.njcn.device.pms.service.distribution; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; +import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; +import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_stat_area_alarm_count_m】的数据库操作Service +* @createDate 2022-10-10 14:36:46 +*/ +public interface PwRStatAreaAlarmCountMService extends IService { + + /*** + * 根据条件查询所有区域告警统计(月)(配网) + * @author jianghaifei + * @date 2022-11-1 14:33 + * @param rStatAreaAlarmCountMParam + * @return java.util.List + */ + List getPwAllRStatAreaAlarmCountMList(RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingIndexMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingIndexMService.java new file mode 100644 index 000000000..f1fdb4f8b --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingIndexMService.java @@ -0,0 +1,18 @@ +package com.njcn.device.pms.service.distribution; + +import com.njcn.device.pms.pojo.param.PwRDnOperatingParam; +import com.njcn.device.pms.pojo.po.RDnOperatingIndexM; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_index_m(配网运行指标统计-月表,配网监测指标数据质量统计-月表 )】的数据库操作Service +* @createDate 2022-11-10 10:21:46 +*/ +public interface RDnOperatingIndexMService extends IService { + + List getOperatingList(PwRDnOperatingParam pwRDnOperatingParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingYService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingYService.java new file mode 100644 index 000000000..dedb2fc4e --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RDnOperatingYService.java @@ -0,0 +1,18 @@ +package com.njcn.device.pms.service.distribution; + +import com.njcn.device.pms.pojo.param.PwRDnOperatingParam; +import com.njcn.device.pms.pojo.po.RDnOperatingY; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_y(配网运行指标统计-年表,配网监测指标数据质量统计-年表)】的数据库操作Service +* @createDate 2022-11-10 10:21:46 +*/ +public interface RDnOperatingYService extends IService { + + List getOperatingList(PwRDnOperatingParam pwRDnOperatingParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpPwAlarmDetailDService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RMpPwAlarmDetailDService.java similarity index 87% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpPwAlarmDetailDService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RMpPwAlarmDetailDService.java index 0f82dcb0c..cd50fe63f 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpPwAlarmDetailDService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RMpPwAlarmDetailDService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.distribution; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.RMpPwAlarmDetailD; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RStatPwAlarmCountWService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RStatPwAlarmCountWService.java new file mode 100644 index 000000000..386714cc7 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/RStatPwAlarmCountWService.java @@ -0,0 +1,22 @@ +package com.njcn.device.pms.service.distribution; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.param.RStatPwAlarmCountWParam; +import com.njcn.device.pms.pojo.param.RStatPwAlarmDetailParam; +import com.njcn.device.pms.pojo.po.RStatPwAlarmCountW; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmCountWVO; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmDetailVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_stat_pw_alarm_count_w】的数据库操作Service +* @createDate 2022-11-02 15:42:29 +*/ +public interface RStatPwAlarmCountWService extends IService { + + List getAllRStatPwAlarmCountList(RStatPwAlarmCountWParam rStatPwAlarmCountWParam); + + List getAlarmDetailList(RStatPwAlarmDetailParam rStatPwAlarmDetailParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/IPwMonitorServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/IPwMonitorServiceImpl.java similarity index 94% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/IPwMonitorServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/IPwMonitorServiceImpl.java index 54c6a52db..bd5f708b2 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/IPwMonitorServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/IPwMonitorServiceImpl.java @@ -1,12 +1,11 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.distribution.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; -import com.njcn.device.pms.mapper.PwMonitorMapper; -import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.mapper.distribution.PwMonitorMapper; import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; -import com.njcn.device.pms.service.IPwMonitorService; +import com.njcn.device.pms.service.distribution.IPwMonitorService; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.pojo.dto.DeptDTO; import lombok.RequiredArgsConstructor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityCheckServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityCheckServiceImpl.java new file mode 100644 index 000000000..e5d261621 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityCheckServiceImpl.java @@ -0,0 +1,162 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.njcn.common.pojo.dto.SimpleDTO; +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.mapper.distribution.PwDataQualityCheckMapper; +import com.njcn.device.pms.mapper.distribution.PwRStatTargetCheckDataMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.vo.PwRStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import com.njcn.device.pms.service.distribution.PwDataQualityCheckService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 配网数据质量-数据质量核查 + * + * @author yzh + * @date 2022/11/8 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class PwDataQualityCheckServiceImpl implements PwDataQualityCheckService { + + private final IPmsGeneralDeviceService iPmsGeneralDeviceService; + + private final DicDataFeignClient dicDataFeignClient; + + private final PwDataQualityCheckMapper pwDataQualityCheckMapper; + + private final PwRStatTargetCheckDataMapper pwRStatTargetCheckDataMapper; + + /** + * 获取配网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getPwQualityCheckOfAccountData(StatisticsBizBaseParam param) { + // 获取单位的子单位id + List data = getDeptIds(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 取出单位id + List deptIds = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 获取配网字典信息 + String distributionPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + // 创建集合封装返回数据 + List result = new ArrayList<>(); + // 获取配网数据质量-台帐类数据质量核查 + switch (param.getType()) { + // 年 + case 1: + result = pwDataQualityCheckMapper.getYearInfo(deptIds, param, distributionPoint); + break; + // 季 + case 2: + result = pwDataQualityCheckMapper.getSeasonInfo(deptIds, param, distributionPoint); + break; + // 月 + case 3: + result = pwDataQualityCheckMapper.getMonthInfo(deptIds, param, distributionPoint); + break; + default: + break; + } + if (CollUtil.isEmpty(result)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + }).collect(Collectors.toList()); + } + + /** + * 获取配网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getPwMonitoringIndexDataQualityVerification(StatisticsBizBaseParam param) { + // 获取单位的子单位id + List data = getDeptIds(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 取出单位id + List deptIds = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 获取配网字典信息 + String distributionPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + // 创建集合封装返回数据 + List result = new ArrayList<>(); + // 获取配网数据质量-监测指标数据质量核查 + switch (param.getType()) { + // 年 + case 1: + result = pwRStatTargetCheckDataMapper.getYearInfo(deptIds, param, distributionPoint); + break; + // 季 + case 2: + result = pwRStatTargetCheckDataMapper.getSeasonInfo(deptIds, param, distributionPoint); + break; + // 月 + case 3: + result = pwRStatTargetCheckDataMapper.getMonthInfo(deptIds, param, distributionPoint); + break; + default: + break; + } + if (CollUtil.isEmpty(result)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + }).collect(Collectors.toList()); + } + + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List data) { + return data + .stream() + .collect(Collectors.toMap(PmsGeneralDeviceDTO::getIndex, PmsGeneralDeviceDTO -> PmsGeneralDeviceDTO)); + } + + /** + * 获取单位的子单位id + */ + private List getDeptIds(StatisticsBizBaseParam param) { + PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam(); + pmsDeviceInfoParam.setDeptIndex(param.getId()); + pmsDeviceInfoParam.setStatisticalType(new SimpleDTO()); + return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityDetailsServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityDetailsServiceImpl.java new file mode 100644 index 000000000..fd1f6bc22 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityDetailsServiceImpl.java @@ -0,0 +1,163 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.njcn.device.pms.mapper.majornetwork.RStatMeasurementAccountDetailMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatTargetDetailMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; +import com.njcn.device.pms.pojo.po.RStatMeasurementAccountDetailPO; +import com.njcn.device.pms.pojo.po.RStatTargetDetailPO; +import com.njcn.device.pms.pojo.vo.PwRStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.PwRStatTargetDetailVO; +import com.njcn.device.pms.service.distribution.IPwMonitorService; +import com.njcn.device.pms.service.distribution.PwDataQualityDetailsService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.system.pojo.po.DictData; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author yzh + * @date 2022/11/8 + */ + +@Slf4j +@Service +@RequiredArgsConstructor +public class PwDataQualityDetailsServiceImpl implements PwDataQualityDetailsService { + + private final IPwMonitorService iPwMonitorService; + + private final RStatMeasurementAccountDetailMapper rStatMeasurementAccountDetailMapper; + + private final RStatTargetDetailMapper rStatTargetDetailMapper; + + private final IMonitorService iMonitorService; + + private final DicDataFeignClient dicDataFeignClient; + + /** + * 获取配网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getPwQualityProblemsOfMonitoringPointAccountData(DataQualityDetailsParam param) { + // 获取配网监测点id + List data = getPwmonitorInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + List pos = + rStatMeasurementAccountDetailMapper + .getQualityProblemsOfMonitoringPointAccountData(data.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList()), + param); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + + // 查询二类监测点字典 + DictData twoLine = dicDataFeignClient.getDicDataByCode(DicDataEnum.TWO_LINE.getCode()).getData(); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return pos.stream().map(po -> { + PwRStatMeasurementAccountDetailVO vo = new PwRStatMeasurementAccountDetailVO(); + BeanUtils.copyProperties(po, vo); + vo.setMonitorId(po.getMeasurementPointId()); + vo.setOrgName(dataMap.get(vo.getMonitorId()).getOrgName()); + vo.setMonitorName(dataMap.get(vo.getMonitorId()).getMonitorName()); + vo.setMonitorVoltageLevel(dataMap.get(vo.getMonitorId()).getVoltageLevel()); + vo.setPowerName(dataMap.get(vo.getMonitorId()).getPowerName()); + // TODO 线路 + vo.setMediumVoltageLine(dataMap.get(vo.getMonitorId()).getLineName()); + if (dataMap.get(vo.getMonitorId()).getMonitorSort().equals(twoLine.getId())) { + vo.setPlatformAreaName(twoLine.getName()); + } else { + vo.setPlatformAreaName("/"); + } + return vo; + }).collect(Collectors.toList()); + } + + /** + * 获取配网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getPwRStatTargetDetail(DataQualityDetailsParam param) { + // 获取配网监测点id + List data = getPwmonitorInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 取配网数据质量-稳态指标类数据质量问题查询 + List pos = rStatTargetDetailMapper.getRStatTargetDetail(param, data.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList())); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + // 查询二类监测点字典 + DictData twoLine = dicDataFeignClient.getDicDataByCode(DicDataEnum.TWO_LINE.getCode()).getData(); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return pos.stream().map(po -> { + PwRStatTargetDetailVO vo = new PwRStatTargetDetailVO(); + BeanUtils.copyProperties(po,vo); + vo.setMonitorId(po.getMeasurementPointId()); + vo.setMonitorName(dataMap.get(vo.getMonitorId()).getMonitorName()); + vo.setMonitorVoltageLevel(dataMap.get(vo.getMonitorId()).getVoltageLevel()); + vo.setPowerName(dataMap.get(vo.getMonitorId()).getPowerName()); + vo.setMediumVoltageLine(dataMap.get(vo.getMonitorId()).getLineName()); + if (dataMap.get(vo.getMonitorId()).getMonitorSort().equals(twoLine.getId())) { + vo.setPlatformAreaName(twoLine.getName()); + } else { + vo.setPlatformAreaName("/"); + } + // TODO 地市公司 + vo.setCityCompany("南京"); + return vo; + }).collect(Collectors.toList()); + } + + /** + * 获取配网监测点id + * + * @param param 条件参数 + * @return List + */ + private List getPwmonitorInfo(DataQualityDetailsParam param) { + PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam(); + pwPmsMonitorParam.setOrgId(param.getId()); + return iPwMonitorService.getPwMonitorList(pwPmsMonitorParam); + } + + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List data) { + return data + .stream() + .collect(Collectors.toMap(PwPmsMonitorDTO::getMonitorId, PwPmsMonitorDTO -> PwPmsMonitorDTO)); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityStatServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityStatServiceImpl.java new file mode 100644 index 000000000..1177ae034 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwDataQualityStatServiceImpl.java @@ -0,0 +1,199 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.njcn.common.pojo.dto.SimpleDTO; +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient; +import com.njcn.device.pms.mapper.distribution.PwROperatingIndexMapper; +import com.njcn.device.pms.mapper.majornetwork.RQualityParameterMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.po.RQualityParameterPO; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingVO; +import com.njcn.device.pms.pojo.vo.PwRQualityParameterVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; +import com.njcn.device.pms.service.distribution.PwDataQualityStatService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 配网数据质量-数据质量统计 + * + * @author yzh + * @date 2022/11/4 + */ + +@Service +@Slf4j +@RequiredArgsConstructor +public class PwDataQualityStatServiceImpl implements PwDataQualityStatService { + + private final IPmsGeneralDeviceService iPmsGeneralDeviceService; + + private final DicDataFeignClient dicDataFeignClient; + + private final PwROperatingIndexMapper rOperatingIndexMapper; + + private final RQualityParameterMapper rQualityParameterMapper; + + private final DecimalFormat df = new DecimalFormat("###.00"); + + /** + * 获取配网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + @Override + public List getPwLedgerDataQualityStat(StatisticsBizBaseParam param) { + // 获取单位的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 获取配网字典id + String distributionPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + // 获取单位id + List deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 获取配网数据质量-台账数据质量统计 + List pos = rQualityParameterMapper.getLedgerDataQualityStat(param, deptIdList, distributionPoint); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return pos.stream().map(po -> { + PwRQualityParameterVO vo = new PwRQualityParameterVO(); + BeanUtils.copyProperties(po, vo); + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + vo.setMeasurementCompleteQuantity(Double.toString( + Integer.parseInt(po.getMeasurementCount()) * Double.parseDouble(po.getMonitoringIntegrityRate()) + )); + return vo; + }).collect(Collectors.toList()); + } + + /** + * 获取配网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + @Override + public List getPwMonitoringIndexDataQualityStat(StatisticsBizBaseParam param) { + // 获取单位的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 创建集合封装数据 + List result = new ArrayList<>(); + // 日期条件 + switch (param.getType()) { + // 年 + case 1: + result = rOperatingIndexMapper.getYearInfo(param, + data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList())); + break; + // 季 + case 2: + result = rOperatingIndexMapper.getSeasonInfo(param, + data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList())); + break; + // 月 + case 3: + result = rOperatingIndexMapper.getMonthInfo(param, + data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList())); + break; + default: + break; + } + if (CollUtil.isEmpty(result)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + }).collect(Collectors.toList()); + + } + + /** + * 获取配网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/7 + */ + @Override + public List getPwSummaryStatOfMonitoringIndexDataQualityProblems(StatisticsBizBaseParam param) { + // 获取单位的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 取出单位id + List deptIds = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 获取配网字典id + String distributionPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + // 获取配网数据质量-监测指标数据质量问题汇总统计 + List pos = rQualityParameterMapper.getLedgerDataQualityStat(param, deptIds, distributionPoint); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + return pos.stream().map(po -> { + RQualityParameterPollVO vo = new RQualityParameterPollVO(); + BeanUtils.copyProperties(po, vo); + vo.setOrgId(po.getOrgNo()); + vo.setOrgName(dataMap.get(vo.getOrgId()).getName()); + vo.setProblemProportion(Double.parseDouble(df.format((po.getProblem() * 1.0) / (po.getEffectiveAccessMeasurementCount() * 1.0))) * 100); + if (po.getProblemYearOnYear() == null) { + vo.setProblemYearOnYear("3.14159"); + } else { + vo.setProblemYearOnYear(po.getProblemYearOnYear()); + } + return vo; + }).collect(Collectors.toList()); + } + + /** + * 获取单位的子单位信息 + */ + private List getDeptInfo(StatisticsBizBaseParam param) { + PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam(); + pmsDeviceInfoParam.setDeptIndex(param.getId()); + pmsDeviceInfoParam.setStatisticalType(new SimpleDTO()); + return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam); + } + + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List data) { + return data + .stream() + .collect(Collectors.toMap(PmsGeneralDeviceDTO::getIndex, PmsGeneralDeviceDTO -> PmsGeneralDeviceDTO)); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java new file mode 100644 index 000000000..927abe944 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java @@ -0,0 +1,171 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.mapper.distribution.PwRMpMonitorAlarmCountMMapper; +import com.njcn.device.pms.pojo.dto.PmsMonitorDTO; +import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; +import com.njcn.device.pms.pojo.param.PmsMonitorParam; +import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; +import com.njcn.device.pms.pojo.param.RMpMonitorAlarmCountMParam; +import com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM; +import com.njcn.device.pms.pojo.vo.PwRMpMonitorAlarmCountMVO; +import com.njcn.device.pms.service.distribution.PwRMpMonitorAlarmCountMService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.system.enums.DicDataTypeEnum; +import com.njcn.system.pojo.po.DictData; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 监测点告警统计service +* @author jianghf +* @description 针对表【r_mp_monitor_alarm_count_m】的数据库操作Service实现 +* @createDate 2022-10-12 20:08:33 +*/ +@Service +@RequiredArgsConstructor +public class PwRMpMonitorAlarmCountMServiceImpl extends ServiceImpl +implements PwRMpMonitorAlarmCountMService { + + private final DeptFeignClient deptFeignClient; + + private final DicDataFeignClient dicDataFeignClient; + + private final IMonitorService iMonitorService; //【主网监测点】服务类 + + private final IPwMonitorServiceImpl iPwMonitorService; //【配网监测点】服务类 + + /*** + * 根据条件查询监测点告警统计(月)(配网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return java.util.List + */ + @Override + public List getPwRMpMonitorAlarmCountMList(RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam) { + //提取查询条件 + String id = rMpMonitorAlarmCountMParam.getId(); //单位id + if (StringUtils.isBlank(id)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "单位id不可为空"); + } + String startTime = rMpMonitorAlarmCountMParam.getStartTime(); //开始时间 + String endTime = rMpMonitorAlarmCountMParam.getEndTime(); //结束时间 +// String monitorObjectType = rMpMonitorAlarmCountMParam.getMonitorObjectType(); //监测点对象类型id +// List voltageLevelParamList = StringUtils.isNotBlank(rMpMonitorAlarmCountMParam.getVoltageLevel()) ? Arrays.asList(rMpMonitorAlarmCountMParam.getVoltageLevel().split(",")) : null; //电压等级 + String monitorName = rMpMonitorAlarmCountMParam.getMeasurementPointName(); //监测点名称 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //获取配网id + String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + //获取监测点类别字典 + List lineSortDict = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_SORT.getCode()).getData(); + Map lineSortIdMap = lineSortDict.stream().collect(Collectors.toMap(DictData::getCode, DictData::getId)); + + //根据条件查询单位下面的所有配网监测点 + PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam(); + pwPmsMonitorParam.setOrgId(id); //单位id + pwPmsMonitorParam.setMonitorName(monitorName); //监测点名称 + List pwMonitorList = iPwMonitorService.getPwMonitorList(pwPmsMonitorParam); + //监测点id集合 + List monitorIdList = pwMonitorList.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList()); + if (CollUtil.isEmpty(monitorIdList)) { + return new ArrayList<>(); + } + //监测点map key:监测点id value:监测点实体 + Map monitorMap = pwMonitorList.stream().collect(Collectors.toMap(PwPmsMonitorDTO::getMonitorId, monitor -> monitor)); + + //根据监测点idList等条件查询【监测点告警月统计】表数据 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(RMpMonitorAlarmCountM::getMeasurementPointId, monitorIdList) + .ge(RMpMonitorAlarmCountM::getDataDate, startTime) + .le(RMpMonitorAlarmCountM::getDataDate, endTime) + .eq(RMpMonitorAlarmCountM::getDataType, dataType); + List alarmCountMList = this.list(lambdaQueryWrapper); + List resultList; + if (CollUtil.isNotEmpty(alarmCountMList)) { + //封装前端展示的数据 + resultList = alarmCountMList.stream().map(item -> { + PwRMpMonitorAlarmCountMVO pwRMpMonitorAlarmCountMVO = new PwRMpMonitorAlarmCountMVO(); + BeanUtils.copyProperties(item, pwRMpMonitorAlarmCountMVO); + //单位信息 + pwRMpMonitorAlarmCountMVO.setOrgName(deptDTOMap.get(item.getOrgNo()).getName()); //所属单位名称 + //监测点信息 + pwRMpMonitorAlarmCountMVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getMonitorName());//监测点名称 +// pwRMpMonitorAlarmCountMVO.setMonitorTypeName(monitorTypeMap.get(monitorMap.get(item.getMeasurementPointId()).getMonitorType()));//监测点类型名称 + pwRMpMonitorAlarmCountMVO.setMonitorSort(monitorMap.get(item.getMeasurementPointId()).getMonitorSort());//监测点类别id + pwRMpMonitorAlarmCountMVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel()); //电压等级id +// pwRMpMonitorAlarmCountMVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel())); //电压等级 + + //监测点类别信息(I类监测点) + if (lineSortIdMap.get(DicDataEnum.ONE_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + pwRMpMonitorAlarmCountMVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + pwRMpMonitorAlarmCountMVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaId("/"); //台区 + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaName("/"); + + pwRMpMonitorAlarmCountMVO.setPowerClientId("/"); //用户 + pwRMpMonitorAlarmCountMVO.setPowerClientName("/"); + } + //监测点类别信息(II类监测点) + if (lineSortIdMap.get(DicDataEnum.TWO_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + pwRMpMonitorAlarmCountMVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + pwRMpMonitorAlarmCountMVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + + //台区 + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaId(monitorMap.get(item.getMeasurementPointId()).getMonitorId()); + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); + + pwRMpMonitorAlarmCountMVO.setPowerClientId("/"); //用户 + pwRMpMonitorAlarmCountMVO.setPowerClientName("/"); + } + //监测点类别信息(III类监测点) + if (lineSortIdMap.get(DicDataEnum.THREE_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + pwRMpMonitorAlarmCountMVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + pwRMpMonitorAlarmCountMVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + //台区 + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaId("/"); + pwRMpMonitorAlarmCountMVO.setPowerDistributionAreaName("/"); + //用户 + pwRMpMonitorAlarmCountMVO.setPowerClientId(monitorMap.get(item.getMeasurementPointId()).getMonitorId()); + pwRMpMonitorAlarmCountMVO.setPowerClientName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); + + } + return pwRMpMonitorAlarmCountMVO; + }).collect(Collectors.toList()); + + } else { + resultList = new ArrayList<>(); + } + return resultList; + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRStatAreaAlarmCountMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRStatAreaAlarmCountMServiceImpl.java new file mode 100644 index 000000000..acc8ee92f --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRStatAreaAlarmCountMServiceImpl.java @@ -0,0 +1,96 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.mapper.distribution.PwRStatAreaAlarmCountMMapper; +import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; +import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; +import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; +import com.njcn.device.pms.service.distribution.PwRStatAreaAlarmCountMService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_stat_area_alarm_count_m】的数据库操作Service实现 +* @createDate 2022-10-10 14:36:46 +*/ +@Service +@RequiredArgsConstructor +public class PwRStatAreaAlarmCountMServiceImpl extends ServiceImpl +implements PwRStatAreaAlarmCountMService{ + + private final DeptFeignClient deptFeignClient; + + private final DicDataFeignClient dicDataFeignClient; + + /*** + * 根据条件查询所有区域告警统计(月)(配网) + * @author jianghaifei + * @date 2022-11-1 14:33 + * @param rStatAreaAlarmCountMParam + * @return java.util.List + */ + @Override + public List getPwAllRStatAreaAlarmCountMList(RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam) { + //获取查询条件 + String id = rStatAreaAlarmCountMParam.getId(); //单位id + if (StringUtils.isBlank(id)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "单位id不可为空"); + } + String startTime = rStatAreaAlarmCountMParam.getStartTime(); //开始时间 yyyy-MM-dd + String endTime = rStatAreaAlarmCountMParam.getEndTime(); //截止时间 yyyy-MM-dd + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + //获取配网id + String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId(); + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + //条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime + lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgNoList), RStatAreaAlarmCountM::getOrgNo, orgNoList) + .ge(StringUtils.isNotBlank(startTime), RStatAreaAlarmCountM::getDataDate, startTime) + .le(StringUtils.isNotBlank(endTime), RStatAreaAlarmCountM::getDataDate, endTime) + .eq(RStatAreaAlarmCountM::getDataType, dataType); + + //查询区域告警统计(月)集合 + List records = this.list(lambdaQueryWrapper); + + List resultList; + if (CollUtil.isNotEmpty(records)) { + //填充返回数据 + resultList = records.stream().map(item -> { + RStatAreaAlarmCountMVO rStatAreaAlarmCountMVO = new RStatAreaAlarmCountMVO(); + BeanUtils.copyProperties(item, rStatAreaAlarmCountMVO); + //设置单位名称 + rStatAreaAlarmCountMVO.setOrgName(deptDTOMap.get(rStatAreaAlarmCountMVO.getOrgNo()).getName()); + + return rStatAreaAlarmCountMVO; + }).collect(Collectors.toList()); + } else { + resultList = new ArrayList<>(); + } + return resultList; + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingIndexMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingIndexMServiceImpl.java new file mode 100644 index 000000000..f7888dadb --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingIndexMServiceImpl.java @@ -0,0 +1,85 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; +import com.njcn.device.pms.pojo.param.PwRDnOperatingParam; +import com.njcn.device.pms.pojo.po.RDnOperatingIndexM; +import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; +import com.njcn.device.pms.service.distribution.IPwMonitorService; +import com.njcn.device.pms.service.distribution.RDnOperatingIndexMService; +import com.njcn.device.pms.mapper.distribution.RDnOperatingIndexMMapper; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.system.enums.DicDataTypeEnum; +import com.njcn.system.pojo.po.DictData; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_index_m(配网运行指标统计-月表,配网监测指标数据质量统计-月表 )】的数据库操作Service实现 +* @createDate 2022-11-10 10:21:46 +*/ +@Service +@RequiredArgsConstructor +public class RDnOperatingIndexMServiceImpl extends ServiceImpl + implements RDnOperatingIndexMService{ + + private final DicDataFeignClient dicDataFeignClient; + + private final DeptFeignClient deptFeignClient; + + @Override + public List getOperatingList(PwRDnOperatingParam pwRDnOperatingParam) { + //提取参数 + String id = pwRDnOperatingParam.getId(); //单位id + String startTime = pwRDnOperatingParam.getStartTime(); //开始时间 + String endTime = pwRDnOperatingParam.getEndTime(); //结束时间 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //获取监测点类别字典id + String monitorSortOne = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONE_LINE.getCode()).getData().getId(); // I类 + String monitorSortTwo = dicDataFeignClient.getDicDataByCode(DicDataEnum.TWO_LINE.getCode()).getData().getId(); // II类 + String monitorSortThree = dicDataFeignClient.getDicDataByCode(DicDataEnum.THREE_LINE.getCode()).getData().getId(); // III类 + + HashMap condMap = new HashMap<>(); + condMap.put("orgIdList", orgNoList); + condMap.put("startTime", startTime); + condMap.put("endTime", endTime); + condMap.put("monitorSortOne", monitorSortOne); + condMap.put("monitorSortTwo", monitorSortTwo); + condMap.put("monitorSortThree", monitorSortThree); + List list = this.baseMapper.getOperatingList(condMap); + list = list.stream().peek(item -> { + item.setOrgName(deptDTOMap.get(item.getOrgNo()).getName()); //单位名称 + }).collect(Collectors.toList()); + return list; + } +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingYServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingYServiceImpl.java new file mode 100644 index 000000000..6ef79bef4 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RDnOperatingYServiceImpl.java @@ -0,0 +1,78 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.pojo.param.PwRDnOperatingParam; +import com.njcn.device.pms.pojo.po.RDnOperatingY; +import com.njcn.device.pms.pojo.vo.PwRDnOperatingIndexCommonVO; +import com.njcn.device.pms.service.distribution.RDnOperatingYService; +import com.njcn.device.pms.mapper.distribution.RDnOperatingYMapper; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_dn_operating_y(配网运行指标统计-年表,配网监测指标数据质量统计-年表)】的数据库操作Service实现 +* @createDate 2022-11-10 10:21:46 +*/ +@Service +@RequiredArgsConstructor +public class RDnOperatingYServiceImpl extends ServiceImpl + implements RDnOperatingYService{ + + private final DicDataFeignClient dicDataFeignClient; + + private final DeptFeignClient deptFeignClient; + + @Override + public List getOperatingList(PwRDnOperatingParam pwRDnOperatingParam) { + //提取参数 + String id = pwRDnOperatingParam.getId(); //单位id + String startTime = pwRDnOperatingParam.getStartTime(); //开始时间 + String endTime = pwRDnOperatingParam.getEndTime(); //结束时间 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //获取监测点类别字典id + String monitorSortOne = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONE_LINE.getCode()).getData().getId(); // I类 + String monitorSortTwo = dicDataFeignClient.getDicDataByCode(DicDataEnum.TWO_LINE.getCode()).getData().getId(); // II类 + String monitorSortThree = dicDataFeignClient.getDicDataByCode(DicDataEnum.THREE_LINE.getCode()).getData().getId(); // III类 + + HashMap condMap = new HashMap<>(); + condMap.put("orgIdList", orgNoList); + condMap.put("startTime", startTime); + condMap.put("endTime", endTime); + condMap.put("monitorSortOne", monitorSortOne); + condMap.put("monitorSortTwo", monitorSortTwo); + condMap.put("monitorSortThree", monitorSortThree); + List list = this.baseMapper.getOperatingList(condMap); + list = list.stream().peek(item -> { + item.setOrgName(deptDTOMap.get(item.getOrgNo()).getName()); //单位名称 + }).collect(Collectors.toList()); + return list; + } +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpPwAlarmDetailDServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RMpPwAlarmDetailDServiceImpl.java similarity index 70% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpPwAlarmDetailDServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RMpPwAlarmDetailDServiceImpl.java index 6340287c6..05758b981 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpPwAlarmDetailDServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RMpPwAlarmDetailDServiceImpl.java @@ -1,9 +1,9 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.distribution.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.RMpPwAlarmDetailDMapper; +import com.njcn.device.pms.mapper.distribution.RMpPwAlarmDetailDMapper; import com.njcn.device.pms.pojo.po.RMpPwAlarmDetailD; -import com.njcn.device.pms.service.RMpPwAlarmDetailDService; +import com.njcn.device.pms.service.distribution.RMpPwAlarmDetailDService; import org.springframework.stereotype.Service; /** diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RStatPwAlarmCountWServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RStatPwAlarmCountWServiceImpl.java new file mode 100644 index 000000000..8d43a9d99 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/RStatPwAlarmCountWServiceImpl.java @@ -0,0 +1,225 @@ +package com.njcn.device.pms.service.distribution.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.mapper.distribution.RStatPwAlarmCountWMapper; +import com.njcn.device.pms.pojo.dto.PmsMonitorDTO; +import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO; +import com.njcn.device.pms.pojo.param.PmsMonitorParam; +import com.njcn.device.pms.pojo.param.PwPmsMonitorParam; +import com.njcn.device.pms.pojo.param.RStatPwAlarmCountWParam; +import com.njcn.device.pms.pojo.param.RStatPwAlarmDetailParam; +import com.njcn.device.pms.pojo.po.RMpPwAlarmDetailD; +import com.njcn.device.pms.pojo.po.RStatPwAlarmCountW; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmCountWVO; +import com.njcn.device.pms.pojo.vo.RStatPwAlarmDetailVO; +import com.njcn.device.pms.service.distribution.IPwMonitorService; +import com.njcn.device.pms.service.distribution.RMpPwAlarmDetailDService; +import com.njcn.device.pms.service.distribution.RStatPwAlarmCountWService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import com.njcn.system.enums.DicDataTypeEnum; +import com.njcn.system.pojo.po.DictData; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_stat_pw_alarm_count_w】的数据库操作Service实现 +* @createDate 2022-11-02 15:42:29 +*/ +@Service +@RequiredArgsConstructor +public class RStatPwAlarmCountWServiceImpl extends ServiceImpl + implements RStatPwAlarmCountWService { + + private final DeptFeignClient deptFeignClient; + + private final DicDataFeignClient dicDataFeignClient; + + private final IPwMonitorService iPwMonitorService; + + private final IMonitorService iMonitorService; + + private final RMpPwAlarmDetailDService rMpPwAlarmDetailDService; + + /*** + * 查询各单位告警监测点总数、占比、占比同比信息 + * @author jianghaifei + * @date 2022-11-03 09:06 + * @param rStatPwAlarmCountWParam + * @return java.util.List + */ + @Override + public List getAllRStatPwAlarmCountList(RStatPwAlarmCountWParam rStatPwAlarmCountWParam) { + //提取查询条件 + String id = rStatPwAlarmCountWParam.getId(); //单位id + if (StringUtils.isBlank(id)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "单位id不可为空"); + } + String startTime = rStatPwAlarmCountWParam.getStartTime(); //开始时间 + String endTime = rStatPwAlarmCountWParam.getEndTime(); //结束时间 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptNameMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, DeptDTO::getName)); + + //设置数据库查询条件 + Map condMap = new HashMap<>(); + condMap.put("orgIdList", orgNoList); + condMap.put("startTime", startTime); + condMap.put("endTime", endTime); + List list = this.baseMapper.getRStatPwAlarmCountVOList(condMap); + + //封装返回结果 + List resultList = list.stream().map(item -> { + item.setOrgName(deptNameMap.get(item.getOrgNo())); + return item; + }).collect(Collectors.toList()); + return resultList; + } + + /*** + * 告警明细查看 + * @author jianghaifei + * @date 2022-11-03 13:56 + * @param rStatPwAlarmDetailParam + * @return java.util.List + */ + @Override + public List getAlarmDetailList(RStatPwAlarmDetailParam rStatPwAlarmDetailParam) { + //提取查询条件 + String id = rStatPwAlarmDetailParam.getId(); //单位id + if (StringUtils.isBlank(id)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "单位id不可为空"); + } + String startTime = rStatPwAlarmDetailParam.getStartTime(); //开始时间 + String endTime = rStatPwAlarmDetailParam.getEndTime(); //结束时间 + String monitorName = rStatPwAlarmDetailParam.getMonitorName(); //监测点名称 + //告警类型 + List alarmTypeList = StringUtils.isNotBlank(rStatPwAlarmDetailParam.getAlarmType()) ? Arrays.asList(rStatPwAlarmDetailParam.getAlarmType().split(",")) : null; + //监测点类型 + List monitorSortList = StringUtils.isNotBlank(rStatPwAlarmDetailParam.getMonitorSort()) ? Arrays.asList(rStatPwAlarmDetailParam.getMonitorSort().split(",")) : null; + + //获取监测点类别字典 + List lineSortDict = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_SORT.getCode()).getData(); + Map lineSortIdMap = lineSortDict.stream().collect(Collectors.toMap(DictData::getCode, DictData::getId)); + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //monitor表自身信息(后面I类监测点设置信息要用到) + PmsMonitorParam pmsMonitorParam = new PmsMonitorParam(); + pmsMonitorParam.setOrgIds(orgNoList); + pmsMonitorParam.setMonitorName(monitorName); + List mainMonitorList = iMonitorService.getMonitorInfoListByCond(pmsMonitorParam); + Map mainMonitorMap = mainMonitorList.stream().collect(Collectors.toMap(PmsMonitorDTO::getId, monitor -> monitor)); + + //根据条件查询单位下面的所有配网监测点 + PwPmsMonitorParam pwPmsMonitorParam = new PwPmsMonitorParam(); + pwPmsMonitorParam.setOrgId(id); //单位id + pwPmsMonitorParam.setMonitorName(monitorName); //监测点名称 + pwPmsMonitorParam.setMonitorSort(monitorSortList); //监测点类别 + List pwMonitorList = iPwMonitorService.getPwMonitorList(pwPmsMonitorParam); + + //配网监测点id集合 + List monitorIdList = pwMonitorList.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList()); + if (CollUtil.isEmpty(monitorIdList)) { + return new ArrayList<>(); + } + //监测点map key:监测点id value:监测点实体 + Map monitorMap = pwMonitorList.stream().collect(Collectors.toMap(PwPmsMonitorDTO::getMonitorId, monitor -> monitor)); + + //查询监测点的告警明细 + LambdaQueryWrapper alarmDetailWrapper = new LambdaQueryWrapper<>(); + alarmDetailWrapper.in(RMpPwAlarmDetailD::getMeasurementPointId, monitorIdList) + .in(CollUtil.isNotEmpty(alarmTypeList), RMpPwAlarmDetailD::getAlarmType, alarmTypeList) + .ge(StringUtils.isNotBlank(startTime), RMpPwAlarmDetailD::getDataDate, startTime) + .le(StringUtils.isNotBlank(endTime), RMpPwAlarmDetailD::getDataDate, endTime); + List alarmDetailList = rMpPwAlarmDetailDService.list(alarmDetailWrapper); + + List resultList = alarmDetailList.stream().map(item -> { + RStatPwAlarmDetailVO rStatPwAlarmDetailVO = new RStatPwAlarmDetailVO(); + rStatPwAlarmDetailVO.setAlarmType(item.getAlarmType()); //告警类型 + rStatPwAlarmDetailVO.setAlarmInfo(item.getAlarmInfo()); //告警描述 + rStatPwAlarmDetailVO.setDataDate(item.getDataDate()); //告警时间 + + rStatPwAlarmDetailVO.setMeasurementPointId(item.getMeasurementPointId()); //监测点id + rStatPwAlarmDetailVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); //监测点名称 + rStatPwAlarmDetailVO.setOrgId(monitorMap.get(item.getMeasurementPointId()).getOrgId()); //单位id + rStatPwAlarmDetailVO.setOrgName(monitorMap.get(item.getMeasurementPointId()).getOrgName());//单位名称 + rStatPwAlarmDetailVO.setMonitorSort(monitorMap.get(item.getMeasurementPointId()).getMonitorSort());//监测点类别 + rStatPwAlarmDetailVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel()); //电压等级 + + //监测点类别信息(I类监测点) + if (lineSortIdMap.get(DicDataEnum.ONE_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + rStatPwAlarmDetailVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + rStatPwAlarmDetailVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + + rStatPwAlarmDetailVO.setPowerDistributionAreaId("/"); //台区 + rStatPwAlarmDetailVO.setPowerDistributionAreaName("/"); + + rStatPwAlarmDetailVO.setPowerClientId("/"); //用户 + rStatPwAlarmDetailVO.setPowerClientName("/"); + } + //监测点类别信息(II类监测点) + if (lineSortIdMap.get(DicDataEnum.TWO_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + rStatPwAlarmDetailVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + rStatPwAlarmDetailVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + //台区 + rStatPwAlarmDetailVO.setPowerDistributionAreaId(monitorMap.get(item.getMeasurementPointId()).getMonitorId()); + rStatPwAlarmDetailVO.setPowerDistributionAreaName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); + //用户 + rStatPwAlarmDetailVO.setPowerClientId("/"); + rStatPwAlarmDetailVO.setPowerClientName("/"); + } + //监测点类别信息(III类监测点) + if (lineSortIdMap.get(DicDataEnum.THREE_LINE.getCode()).equals(monitorMap.get(item.getMeasurementPointId()).getMonitorSort())) { + //变电站信息 + rStatPwAlarmDetailVO.setPowerId(monitorMap.get(item.getMeasurementPointId()).getPowerId()); + rStatPwAlarmDetailVO.setPowerName(monitorMap.get(item.getMeasurementPointId()).getPowerName()); + //台区 + rStatPwAlarmDetailVO.setPowerDistributionAreaId("/"); + rStatPwAlarmDetailVO.setPowerDistributionAreaName("/"); + //用户 + rStatPwAlarmDetailVO.setPowerClientId(monitorMap.get(item.getMeasurementPointId()).getMonitorId()); + rStatPwAlarmDetailVO.setPowerClientName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); + + } + + return rStatPwAlarmDetailVO; + }).collect(Collectors.toList()); + + return resultList; + } +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DeptLineServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DeptLineServiceImpl.java new file mode 100644 index 000000000..77cde2fa9 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DeptLineServiceImpl.java @@ -0,0 +1,94 @@ +package com.njcn.device.pms.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.device.pms.mapper.DeptLineMapper; +import com.njcn.device.pq.pojo.po.DeptLine; +import com.njcn.device.pms.service.DeptLineService; +import com.njcn.web.pojo.param.DeptLineParam; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author denghuajun + * @date 2022/1/12 17:32 + * + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class DeptLineServiceImpl extends ServiceImpl implements DeptLineService { + + private final DeptLineMapper deptLineMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void deptBindLine(DeptLineParam deptLineParam) { + //先解绑,再进行绑定 + QueryWrapper deptLineQueryWrapper = new QueryWrapper<>(); + deptLineQueryWrapper.eq("pq_dept_line.id", deptLineParam.getId()); + this.baseMapper.delete(deptLineQueryWrapper); + List deptLines = deptLineParam.getIds().stream().map(id -> { + DeptLine deptLine = new DeptLine(); + deptLine.setId(deptLineParam.getId()); + deptLine.setLineId(id); + return deptLine; + }).collect(Collectors.toList()); + this.saveBatch(deptLines); + } + + @Override + public void deptDeleteBindLine(DeptLineParam deptLineParam) { + for (int i = 0; i < deptLineParam.getIds().size(); i++) { + QueryWrapper deptLineQueryWrapper = new QueryWrapper<>(); + deptLineQueryWrapper.eq("pq_dept_line.id", deptLineParam.getId()); + deptLineQueryWrapper.eq("pq_dept_line.Line_Id", deptLineParam.getIds().get(i)); + this.baseMapper.delete(deptLineQueryWrapper); + } + } + + @Override + public List selectDeptBindLines(List ids) { + return this.lambdaQuery().in(DeptLine::getId, ids).list(); + } + + @Override + public int removeBind(String id) { + QueryWrapper deptLineQueryWrapper = new QueryWrapper<>(); + deptLineQueryWrapper.eq("pq_dept_line.id", id); + return this.baseMapper.delete(deptLineQueryWrapper); + } + + @Override + public List getLineByDeptId(String id) { + return this.lambdaQuery().in(DeptLine::getId, id).list().stream().map(DeptLine::getLineId).distinct().collect(Collectors.toList()); + } + + /** + * @param devDataType + * @Description: 获取部门和监测点的关系(分稳态暂态) + * @Param: [devDataType] + * @return: java.util.Map> + * @Author: clam + * @Date: 2022/10/19 + */ + @Override + public Map> getLineByDeptRelation(Integer devDataType) { + + Map> map = new HashMap<> (); + + List deptLines = deptLineMapper.getLineByDeptRelation(devDataType); + Map> collect = deptLines.stream ( ).collect (Collectors.groupingBy (DeptLine::getId, Collectors.mapping (DeptLine::getLineId,Collectors.toList ()))); + + return collect; + } + + +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityCheckService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityCheckService.java new file mode 100644 index 000000000..6d0fb0166 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityCheckService.java @@ -0,0 +1,37 @@ +package com.njcn.device.pms.service.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; + +import java.util.List; + +/** + * 主网数据质量-数据质量核查 + * + * @author yzh + * @date 2022/11/2 + */ + +public interface DataQualityCheckService { + + /** + * 获取主网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getQualityCheckOfAccountData(StatisticsBizBaseParam param); + + /** + * 获取主网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + List getMonitoringIndexDataQualityVerification(StatisticsBizBaseParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityDetailsService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityDetailsService.java new file mode 100644 index 000000000..7079883cd --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityDetailsService.java @@ -0,0 +1,47 @@ +package com.njcn.device.pms.service.majornetwork; + +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTargetDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTractionStationAccountDetailVO; + +import java.util.List; + +/** + * @author yzh + * @date 2022/11/4 + */ + +public interface DataQualityDetailsService { + + /** + * 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + List getQualityProblemsOfMonitoringPointAccountData(DataQualityDetailsParam param); + + /** + * 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + List getTractionPlatformAccountDataQualityProblem(DataQualityDetailsParam param); + + /** + * 获取主网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getRStatTargetDetail(DataQualityDetailsParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityStatService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityStatService.java new file mode 100644 index 000000000..039505a15 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/DataQualityStatService.java @@ -0,0 +1,48 @@ +package com.njcn.device.pms.service.majornetwork; + +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.pojo.vo.ROperatingIndexVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterVO; + +import java.util.List; + +/** + * 主网数据质量-数据质量统计 + * + * @author yzh + * @date 2022/11/1 + */ + +public interface DataQualityStatService { + + /** + * 获取主网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + List getLedgerDataQualityStat(StatisticsBizBaseParam param); + + /** + * 获取主网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + List getMonitoringIndexDataQualityStat(StatisticsBizBaseParam param); + + /** + * 获取主网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + List getSummaryStatOfMonitoringIndexDataQualityProblems(StatisticsBizBaseParam param); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IDistributionMonitorService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IDistributionMonitorService.java similarity index 71% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IDistributionMonitorService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IDistributionMonitorService.java index 7826efe0c..2ce853e26 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IDistributionMonitorService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IDistributionMonitorService.java @@ -1,9 +1,10 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.po.DistributionMonitor; +import com.njcn.device.pms.pojo.vo.DoubleUserVO; import java.util.List; @@ -26,4 +27,11 @@ public interface IDistributionMonitorService extends IService getMonitorByCondition(List deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam); + + /** + * 获取指定组装下的发电用电用户 + * @author cdf + * @date 2022/11/15 + */ + List getDoubleUserByDept(String orgId); } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IGeneratrixWireService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IGeneratrixWireService.java similarity index 90% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IGeneratrixWireService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IGeneratrixWireService.java index 07666138d..21009a5d0 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IGeneratrixWireService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IGeneratrixWireService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.GeneratrixWireParam; @@ -31,7 +31,7 @@ public interface IGeneratrixWireService extends IService { * @param generatrixWireParam 线路 * @return boolean */ - boolean updateGeneratrixWire(GeneratrixWireParam.UpdateGeneratrixWireParam generatrixWireParam); + boolean updateGeneratrixWire(GeneratrixWireParam generatrixWireParam); /** * 删除线路 diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementDataService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementDataService.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementDataService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementDataService.java index 26fc3a073..ade60114d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementDataService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementDataService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.HarmonicGeneralManagementData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementService.java index a577b78e2..0c2cc4b3d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IHarmonicGeneralManagementService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IHarmonicGeneralManagementService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.HarmonicGeneralManagement; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IMonitorService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IMonitorService.java similarity index 98% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IMonitorService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IMonitorService.java index bdba90059..8e7611130 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IMonitorService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IMonitorService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.common.pojo.dto.SimpleDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneralDeviceService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneralDeviceService.java similarity index 94% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneralDeviceService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneralDeviceService.java index 7cf497a6d..ccab4bc82 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneralDeviceService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneralDeviceService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.njcn.common.pojo.dto.SimpleDTO; import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneratrixService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneratrixService.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneratrixService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneratrixService.java index 594bdda15..39bc684f0 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPmsGeneratrixService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPmsGeneratrixService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerClientService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerClientService.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerClientService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerClientService.java index 492cc9f00..9fd8da52c 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerClientService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerClientService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.PowerClientParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerDistributionareaService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerDistributionareaService.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerDistributionareaService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerDistributionareaService.java index 8b12881c1..44bdd4862 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerDistributionareaService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerDistributionareaService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerGenerationUserService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerGenerationUserService.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerGenerationUserService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerGenerationUserService.java index 4ef4f8db9..c199b1049 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerGenerationUserService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerGenerationUserService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.PowerGenerationUserParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerQualityMatterService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerQualityMatterService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerQualityMatterService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerQualityMatterService.java index 554f67ff8..3e26c7c03 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IPowerQualityMatterService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IPowerQualityMatterService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.PowerQualityMatter; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ISourceManagementService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ISourceManagementService.java similarity index 84% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ISourceManagementService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ISourceManagementService.java index b708714bc..fa8dab326 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ISourceManagementService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ISourceManagementService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.SourceManagement; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatationStatService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatationStatService.java similarity index 97% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatationStatService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatationStatService.java index 70507e5cb..38e0a3d39 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatationStatService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatationStatService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatisticsRunMonitorService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatisticsRunMonitorService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatisticsRunMonitorService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatisticsRunMonitorService.java index b0570ae80..3024d6608 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/IStatisticsRunMonitorService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/IStatisticsRunMonitorService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.StatisticsRunMonitor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalEliminateDataService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalEliminateDataService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalEliminateDataService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalEliminateDataService.java index 9c0827e35..83dd84d52 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalEliminateDataService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalEliminateDataService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.TerminalEliminateData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalService.java similarity index 66% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalService.java index 3fcb9be6c..37e62cf84 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITerminalService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITerminalService.java @@ -1,10 +1,10 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.PmsTerminalParam; -import com.njcn.device.pms.pojo.po.Terminal; -import com.njcn.device.pms.pojo.vo.PmsTerminalVO; +import com.njcn.device.pms.pojo.po.PmsTerminal; +import com.njcn.web.pojo.param.BaseParam; import java.util.List; @@ -16,20 +16,20 @@ import java.util.List; * @author hongawen * @since 2022-10-14 */ -public interface ITerminalService extends IService { +public interface ITerminalService extends IService { /** * 查询所有 - * @param queryParam + * @param baseParam * @return */ - Page getTerminalList(PmsTerminalParam.QueryParam queryParam); + Page getTerminalList(BaseParam baseParam); /** * 根据id查询 * @return */ - Terminal getTerminalById(String id); + PmsTerminal getTerminalById(String id); /** * 新增 diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITractionStationService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITractionStationService.java similarity index 64% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITractionStationService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITractionStationService.java index 9c3bd1254..1f10651dd 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITractionStationService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITractionStationService.java @@ -1,6 +1,8 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; import com.njcn.device.pms.pojo.param.TractionStationParam; import com.njcn.device.pms.pojo.po.TractionStation; import com.njcn.web.pojo.param.BaseParam; @@ -9,7 +11,7 @@ import java.util.List; /** *

- * 服务类 + * 服务类 *

* * @author hongawen @@ -19,12 +21,14 @@ public interface ITractionStationService extends IService { /** * 查询牵引站列表 + * * @return boolean */ List getTractionStationList(BaseParam baseParam); /** * 查询牵引站 + * * @return boolean */ TractionStation getTractionStationById(String tractionStationId); @@ -36,14 +40,25 @@ public interface ITractionStationService extends IService { /** * 修改 + * * @param */ boolean update(TractionStationParam updateParam); /** * 删除 + * * @param ids ids */ boolean delete(List ids); + /** + * 获取牵引站详细信息 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + List getPmsTractionStationInfo(PmsTractionStationParam param); } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITransientStasticDataService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITransientStasticDataService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITransientStasticDataService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITransientStasticDataService.java index b097fa90f..136dda309 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITransientStasticDataService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITransientStasticDataService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.TransientStasticData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITreatTransientDetailDataService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITreatTransientDetailDataService.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITreatTransientDetailDataService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITreatTransientDetailDataService.java index 90ed93dad..024d0b1c8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/ITreatTransientDetailDataService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ITreatTransientDetailDataService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.TreatTransientDetailData; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpMonitorAlarmCountMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpMonitorAlarmCountMService.java similarity index 63% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpMonitorAlarmCountMService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpMonitorAlarmCountMService.java index f04661dca..ada82efea 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpMonitorAlarmCountMService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpMonitorAlarmCountMService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.RMpMonitorAlarmCountMParam; @@ -14,5 +14,14 @@ import java.util.List; */ public interface RMpMonitorAlarmCountMService extends IService { + + /*** + * 根据条件查询监测点告警统计(月)(主网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return com.njcn.common.pojo.response.HttpResult> + */ List getRMpMonitorAlarmCountMList(RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam); + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpTargetWarnDService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpTargetWarnDService.java similarity index 86% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpTargetWarnDService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpTargetWarnDService.java index 0a65aa046..dc8976659 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RMpTargetWarnDService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RMpTargetWarnDService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.po.RMpTargetWarnD; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexMService.java new file mode 100644 index 000000000..5beef638b --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexMService.java @@ -0,0 +1,25 @@ +package com.njcn.device.pms.service.majornetwork; + +import com.njcn.device.pms.pojo.param.ROperatingIndexParam; +import com.njcn.device.pms.pojo.po.ROperatingIndexM; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.vo.RMpMonitorAlarmCountMVO; +import com.njcn.device.pms.pojo.vo.ROperatingIndexCommonVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_operating_index_m(主网运行指标统计-月表,主网监测指标数据质量统计-月表 )】的数据库操作Service +* @createDate 2022-11-09 19:56:01 +*/ +public interface ROperatingIndexMService extends IService { + + /*** + * 查询运行指标统计(主网) + * @author jianghaifei + * @date 2022-11-09 19:04 + * @param rOperatingIndexParam + */ + List getOperatingList(ROperatingIndexParam rOperatingIndexParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexYService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexYService.java new file mode 100644 index 000000000..f921d4b15 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/ROperatingIndexYService.java @@ -0,0 +1,25 @@ +package com.njcn.device.pms.service.majornetwork; + +import com.njcn.device.pms.pojo.param.ROperatingIndexParam; +import com.njcn.device.pms.pojo.po.ROperatingIndexY; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.device.pms.pojo.vo.RMpMonitorAlarmCountMVO; +import com.njcn.device.pms.pojo.vo.ROperatingIndexCommonVO; + +import java.util.List; + +/** +* @author jianghf +* @description 针对表【r_operating_index_y(主网运行指标统计-年表,主网监测指标数据质量统计-年表 )】的数据库操作Service +* @createDate 2022-11-09 19:56:01 +*/ +public interface ROperatingIndexYService extends IService { + + /*** + * 查询运行指标统计(主网) + * @author jianghaifei + * @date 2022-11-09 19:04 + * @param rOperatingIndexParam + */ + List getOperatingList(ROperatingIndexParam rOperatingIndexParam); +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatAreaAlarmCountMService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatAreaAlarmCountMService.java similarity index 87% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatAreaAlarmCountMService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatAreaAlarmCountMService.java index ddddfdcdf..1e78a1764 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatAreaAlarmCountMService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatAreaAlarmCountMService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; @@ -15,11 +15,12 @@ import java.util.List; public interface RStatAreaAlarmCountMService extends IService { /*** - * 根据条件查询所有区域告警统计(月) + * 根据条件查询所有区域告警统计(月)(主网) * @author jianghaifei * @date 2022-10-10 15:20 * @param rStatAreaAlarmCountMParam * @return java.util.List */ List getAllRStatAreaAlarmCountMList(RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam); + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatBusbarHarmonicService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatBusbarHarmonicService.java similarity index 92% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatBusbarHarmonicService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatBusbarHarmonicService.java index e1e433fcf..3072688e3 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatBusbarHarmonicService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatBusbarHarmonicService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatZwAlarmCountWService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatZwAlarmCountWService.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatZwAlarmCountWService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatZwAlarmCountWService.java index 23ca1ed5b..76c101cf7 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RStatZwAlarmCountWService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RStatZwAlarmCountWService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RmpEventDetailService.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RmpEventDetailService.java similarity index 91% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RmpEventDetailService.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RmpEventDetailService.java index 1226f7ade..9cc40b8c0 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/RmpEventDetailService.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/RmpEventDetailService.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service; +package com.njcn.device.pms.service.majornetwork; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.device.pms.pojo.param.UniversalFrontEndParam; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityCheckServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityCheckServiceImpl.java new file mode 100644 index 000000000..ee2f59b24 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityCheckServiceImpl.java @@ -0,0 +1,155 @@ +package com.njcn.device.pms.service.majornetwork.impl; + +import cn.hutool.core.collection.CollUtil; +import com.njcn.common.pojo.dto.SimpleDTO; +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.mapper.majornetwork.RStatAccountCheckDataMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatTargetCheckDataMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO; +import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO; +import com.njcn.device.pms.service.majornetwork.DataQualityCheckService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 主网数据质量-数据质量核查 + * + * @author yzh + * @date 2022/11/2 + */ +@Service +@Slf4j +@RequiredArgsConstructor +public class DataQualityCheckServiceImpl implements DataQualityCheckService { + + private final IPmsGeneralDeviceService iPmsGeneralDeviceService; + + private final RStatAccountCheckDataMapper rStatAccountCheckDataMapper; + + private final RStatTargetCheckDataMapper rStatTargetCheckDataMapper; + + /** + * 获取主网数据质量-台帐类数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + @Override + public List getQualityCheckOfAccountData(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + List data = getPmsGeneralDeviceDTOList(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + List deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 创建集合封装查询数据 + List result = new ArrayList<>(); + // 获取主网数据质量-台帐类数据质量核查 + switch (param.getType()) { + // 年 + case 1: + result = rStatAccountCheckDataMapper.getYearInfo(param, deptIdList); + break; + // 季 + case 2: + result = rStatAccountCheckDataMapper.getSeasonInfo(param, deptIdList); + break; + // 月 + case 3: + result = rStatAccountCheckDataMapper.getMonthInfo(param, deptIdList); + break; + default: + break; + } + if (CollUtil.isEmpty(result)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + }).collect(Collectors.toList()); + } + + /** + * 获取主网数据质量-监测指标数据质量核查 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + @Override + public List getMonitoringIndexDataQualityVerification(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + List data = getPmsGeneralDeviceDTOList(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + List deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 创建集合封装数据 + List result = new ArrayList<>(); + // 获取主网数据质量-台帐类数据质量核查 + switch (param.getType()) { + // 年 + case 1: + result = rStatTargetCheckDataMapper.getYearInfo(param, deptIdList); + break; + // 季 + case 2: + result = rStatTargetCheckDataMapper.getSeasonInfo(param, deptIdList); + break; + // 月 + case 3: + result = rStatTargetCheckDataMapper.getMonthInfo(param, deptIdList); + break; + default: + break; + } + if (CollUtil.isEmpty(result)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + }).collect(Collectors.toList()); + } + + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List data) { + return data + .stream() + .collect(Collectors.toMap(PmsGeneralDeviceDTO::getIndex, PmsGeneralDeviceDTO -> PmsGeneralDeviceDTO)); + } + + /** + * 获取当前用户的部门的子部门信息 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + private List getPmsGeneralDeviceDTOList(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam(); + pmsDeviceInfoParam.setDeptIndex(param.getId()); + pmsDeviceInfoParam.setStatisticalType(new SimpleDTO()); + return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityDetailsServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityDetailsServiceImpl.java new file mode 100644 index 000000000..c725c3ed3 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityDetailsServiceImpl.java @@ -0,0 +1,241 @@ +package com.njcn.device.pms.service.majornetwork.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import com.njcn.common.pojo.dto.SimpleDTO; +import com.njcn.device.pms.mapper.majornetwork.RStatMeasurementAccountDetailMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatTargetDetailMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatTractionStationAccountDetailMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.DataQualityDetailsParam; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; +import com.njcn.device.pms.pojo.po.RStatMeasurementAccountDetailPO; +import com.njcn.device.pms.pojo.po.RStatTargetDetailPO; +import com.njcn.device.pms.pojo.po.RStatTractionStationAccountDetailPO; +import com.njcn.device.pms.pojo.vo.RStatMeasurementAccountDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTargetDetailVO; +import com.njcn.device.pms.pojo.vo.RStatTractionStationAccountDetailVO; +import com.njcn.device.pms.service.majornetwork.DataQualityDetailsService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; +import com.njcn.device.pms.service.majornetwork.ITractionStationService; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 主网数据质量-数据质量核查详情 + * + * @author yzh + * @date 2022/11/4 + */ + +@Service +@Slf4j +@RequiredArgsConstructor +public class DataQualityDetailsServiceImpl implements DataQualityDetailsService { + + private final IPmsGeneralDeviceService iPmsGeneralDeviceService; + + private final RStatMeasurementAccountDetailMapper rStatMeasurementAccountDetailMapper; + + private final IMonitorService iMonitorService; + + private final ITractionStationService iTractionStationService; + + private final RStatTractionStationAccountDetailMapper rStatTractionStationAccountDetailMapper; + + private final RStatTargetDetailMapper rStatTargetDetailMapper; + + /** + * 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + @Override + public List getQualityProblemsOfMonitoringPointAccountData(DataQualityDetailsParam param) { + // 获取单位下的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 创建集合封装返回数据 + List result = new ArrayList<>(); + for (PmsGeneralDeviceDTO dto : data) { + if (CollUtil.isEmpty(dto.getMonitorIdList())) { + continue; + } + // 获取主网数据质量-台账类数据指标核查详情-监测点台账数据质量问题 + List pos = + rStatMeasurementAccountDetailMapper + .getQualityProblemsOfMonitoringPointAccountData(dto.getMonitorIdList(), param); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + // 获取监测点信息 + PmsMonitorInfoParam pmsMonitorInfoParam = new PmsMonitorInfoParam(); + pmsMonitorInfoParam.setMonitorIds(pos + .stream() + .map(RStatMeasurementAccountDetailPO::getMeasurementPointId) + .collect(Collectors.toList())); + List monitorInfoDTOS = iMonitorService.getMonitorInfo(pmsMonitorInfoParam); + // //将单位信息转为map集合 key: 单位id value: 单位实体 + Map monitorInfoMap = monitorInfoDTOS + .stream().collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, PmsMonitorInfoDTO -> PmsMonitorInfoDTO)); + // 属性赋值 + for (RStatMeasurementAccountDetailPO po : pos) { + for (PmsMonitorInfoDTO monitorInfoDTO : monitorInfoDTOS) { + if (po.getMeasurementPointId().equals(monitorInfoDTO.getMonitorId())) { + RStatMeasurementAccountDetailVO vo = new RStatMeasurementAccountDetailVO(); + vo.setOrgId(dto.getIndex()); + vo.setOrgName(dto.getName()); + vo.setDataDate(po.getDataDate()); + vo.setPowerId(monitorInfoDTO.getPowerId()); + vo.setPowerName(monitorInfoDTO.getPowerName()); + vo.setMonitorId(po.getMeasurementPointId()); + vo.setMonitorName(monitorInfoDTO.getMonitorName()); + vo.setCheckRules(po.getCheckRules()); + vo.setMonitorVoltageLevel(monitorInfoDTO.getMonitorVoltageLevel()); + result.add(vo); + } + } + } + } + return result; + } + + /** + * 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/4 + */ + @Override + public List getTractionPlatformAccountDataQualityProblem(DataQualityDetailsParam param) { + // 获取单位下的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 获取牵引站信息 + PmsTractionStationParam pmsTractionStationParam = new PmsTractionStationParam(); + pmsTractionStationParam.setOrgIds(data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList())); + List tractionStationInfo = iTractionStationService.getPmsTractionStationInfo(pmsTractionStationParam); + if (CollUtil.isEmpty(tractionStationInfo)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map tractionStationInfoMap = getDataMap(tractionStationInfo); + // 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题 + List pos = rStatTractionStationAccountDetailMapper.getTractionPlatformAccountDataQualityProblem(param, + tractionStationInfo.stream().map(PmsTractionStationDTO::getId).collect(Collectors.toList())); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + // 属性赋值 + return pos.stream().map(po -> { + RStatTractionStationAccountDetailVO vo = new RStatTractionStationAccountDetailVO(); + BeanUtils.copyProperties(po, vo); + vo.setSubstationName(tractionStationInfoMap.get(vo.getSubstationId()).getName()); + vo.setElectricRailwayLineName(tractionStationInfoMap.get(vo.getSubstationId()).getRailwayLineName()); + vo.setPowerName((tractionStationInfoMap.get(vo.getSubstationId()).getPowerName())); + vo.setPowerVoltageLevel((tractionStationInfoMap.get(vo.getSubstationId()).getPowerVoltageLevel())); + // TODO 铁路类型 + String railwayLineId = tractionStationInfoMap + .get(vo.getSubstationId()) + .getRailwayLineId() + .substring(0, tractionStationInfoMap.get(vo.getSubstationId()).getRailwayLineId().length() - 1); + if (!railwayLineId.equals("1") && !railwayLineId.equals("2")) { + vo.setTypeOfRailway("0"); + } else { + vo.setTypeOfRailway(railwayLineId); + } + return vo; + }).collect(Collectors.toList()); + } + + + + /** + * 获取主网数据质量-稳态指标类数据质量问题查询 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getRStatTargetDetail(DataQualityDetailsParam param) { + // 获取单位下的子单位信息 + List data = getDeptInfo(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 获取主网数据质量-稳态指标类数据质量问题查询 + List pos = rStatTargetDetailMapper.getRStatTargetDetail(param, data.stream() + .flatMap(pmsGeneralDeviceDTO -> pmsGeneralDeviceDTO.getMonitorIdList().stream()) + .collect(Collectors.toList())); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + // 取出监测点id + List measurementPointId = pos.stream().map(RStatTargetDetailPO::getMeasurementPointId).collect(Collectors.toList()); + PmsMonitorInfoParam pmsMonitorInfoParam = new PmsMonitorInfoParam(); + pmsMonitorInfoParam.setMonitorIds(measurementPointId); + List pmsMonitorInfoList = iMonitorService.getMonitorInfo(pmsMonitorInfoParam); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map pmsMonitorInfoMap = pmsMonitorInfoList + .stream() + .collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, PmsMonitorInfoDTO -> PmsMonitorInfoDTO)); + // 创建集合封装返回数据 + return pos.stream().map(po -> { + RStatTargetDetailVO vo = new RStatTargetDetailVO(); + BeanUtils.copyProperties(po, vo); + vo.setMonitorId(po.getMeasurementPointId()); + vo.setPowerName(pmsMonitorInfoMap.get(vo.getMonitorId()).getPowerName()); + vo.setMonitorName(pmsMonitorInfoMap.get(vo.getMonitorId()).getMonitorName()); + vo.setMonitorVoltageLevel(pmsMonitorInfoMap.get(vo.getMonitorId()).getMonitorVoltageLevel()); + // TODO 地市公司 + vo.setCityCompany("南京"); + return vo; + }).collect(Collectors.toList()); + } + + + /** + * 获取单位下的子单位信息 + */ + private List getDeptInfo(DataQualityDetailsParam param) { + PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam(); + pmsDeviceInfoParam.setDeptIndex(param.getId()); + pmsDeviceInfoParam.setStatisticalType(new SimpleDTO()); + return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam); + + } + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List tractionStationInfo) { + return tractionStationInfo + .stream() + .collect(Collectors.toMap(PmsTractionStationDTO::getId, PmsTractionStationDTO -> PmsTractionStationDTO)); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityStatServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityStatServiceImpl.java new file mode 100644 index 000000000..321598763 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DataQualityStatServiceImpl.java @@ -0,0 +1,205 @@ +package com.njcn.device.pms.service.majornetwork.impl; + +import cn.hutool.core.collection.CollUtil; +import com.njcn.common.pojo.dto.SimpleDTO; +import com.njcn.common.pojo.param.StatisticsBizBaseParam; +import com.njcn.device.pms.mapper.majornetwork.ROperatingIndexMapper; +import com.njcn.device.pms.mapper.majornetwork.RQualityParameterMapper; +import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; +import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO; +import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; +import com.njcn.device.pms.pojo.po.RQualityParameterPO; +import com.njcn.device.pms.pojo.vo.ROperatingIndexVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterPollVO; +import com.njcn.device.pms.pojo.vo.RQualityParameterVO; +import com.njcn.device.pms.service.majornetwork.DataQualityStatService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.enums.DicDataEnum; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 主网数据质量-数据质量统计 + * + * @author yzh + * @date 2022/11/1 + */ +@Service +@Slf4j +@RequiredArgsConstructor +public class DataQualityStatServiceImpl implements DataQualityStatService { + + private final IPmsGeneralDeviceService iPmsGeneralDeviceService; + + private final DicDataFeignClient dicDataFeignClient; + + private final RQualityParameterMapper rQualityParameterMapper; + + private final ROperatingIndexMapper rOperatingIndexMapper; + + private final DecimalFormat df = new DecimalFormat("###.00"); + + /** + * 获取主网数据质量-台账数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + @Override + public List getLedgerDataQualityStat(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + List data = getPmsGeneralDeviceDTOList(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 获取配网字典id + String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId(); + // 获取主网数据质量-台账数据质量统计 + List pos = rQualityParameterMapper.getLedgerDataQualityStat( + param, + data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()), + mainnetPoint + ); + if (CollUtil.isEmpty(pos)) { + return Collections.emptyList(); + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return pos.stream().map(po -> { + RQualityParameterVO vo = new RQualityParameterVO(); + BeanUtils.copyProperties(po, vo); + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + return vo; + }).collect(Collectors.toList()); + } + + /** + * 获取主网数据质量-监测指标数据质量统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + @Override + public List getMonitoringIndexDataQualityStat(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + List data = getPmsGeneralDeviceDTOList(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + // 取出单位id + List deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 创建集合封装返回数据 + List result = new ArrayList<>(); + // 获取主网数据质量-监测指标数据质量统计 + switch (param.getType()) { + // 年 + case 1: + result = rOperatingIndexMapper.getYearInfo(param, deptIdList); + break; + // 季 + case 2: + result = rOperatingIndexMapper.getSeasonInfo(param, deptIdList); + break; + // 月 + case 3: + result = rOperatingIndexMapper.getMonthInfo(param, deptIdList); + break; + default: + break; + } + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 处理数据 + // 计算有效接入率【有效接入监测点数量/在运监测点数】 + return result.stream().peek(vo -> { + vo.setOrgName(dataMap.get(vo.getOrgNo()).getName()); + vo.setEffectiveAccessRate( + Double.parseDouble( + df.format((vo.getEffectiveAccessMeasurementCount() * 1.0) + / (vo.getMeasurementCount() * 1.0)) + ) * 100); + }).collect(Collectors.toList()); + } + + /** + * 获取主网数据质量-监测指标数据质量问题汇总统计 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/1 + */ + @Override + public List getSummaryStatOfMonitoringIndexDataQualityProblems(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + List data = getPmsGeneralDeviceDTOList(param); + if (CollUtil.isEmpty(data)) { + return Collections.emptyList(); + } + List deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList()); + // 获取配网字典id + String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId(); + // 获取主网数据质量-监测指标数据质量问题汇总统计 + List pos = rQualityParameterMapper.getLedgerDataQualityStat(param, deptIdList, mainnetPoint); + // 将单位信息转为map集合 key: 单位id value: 单位实体 + Map dataMap = getDataMap(data); + // 属性赋值 + return pos.stream().map(po -> { + RQualityParameterPollVO vo = new RQualityParameterPollVO(); + BeanUtils.copyProperties(po, vo); + vo.setOrgId(po.getOrgNo()); + vo.setOrgName(dataMap.get(vo.getOrgId()).getName()); + vo.setProblemProportion( + Double.parseDouble( + df.format((po.getProblem() * 1.0) + / (po.getEffectiveAccessMeasurementCount() * 1.0)) + ) * 100); + if (po.getProblemYearOnYear() == null) { + vo.setProblemYearOnYear("3.14159"); + } else { + vo.setProblemYearOnYear(po.getProblemYearOnYear()); + } + return vo; + }).collect(Collectors.toList()); + } + + /** + * 将单位信息转为map集合 key: 单位id value: 单位实体 + */ + private Map getDataMap(List data) { + return data + .stream() + .collect(Collectors.toMap(PmsGeneralDeviceDTO::getIndex, PmsGeneralDeviceDTO -> PmsGeneralDeviceDTO)); + } + + /** + * 获取当前用户的部门的子部门信息 + * + * @param param 条件参数 + * @return java.util.List + * @author yzh + * @date 2022/11/2 + */ + private List getPmsGeneralDeviceDTOList(StatisticsBizBaseParam param) { + // 获取当前用户的部门的子部门信息 + PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam(); + pmsDeviceInfoParam.setDeptIndex(param.getId()); + pmsDeviceInfoParam.setStatisticalType(new SimpleDTO()); + return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam); + } +} diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DistributionMonitorServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DistributionMonitorServiceImpl.java similarity index 56% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DistributionMonitorServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DistributionMonitorServiceImpl.java index dea2ac10d..d84e613b4 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/DistributionMonitorServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/DistributionMonitorServiceImpl.java @@ -1,16 +1,22 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.*; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.enums.PmsDeviceResponseEnum; +import com.njcn.device.pms.mapper.majornetwork.DistributionMonitorMapper; import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.po.DistributionMonitor; -import com.njcn.device.pms.service.IDistributionMonitorService; +import com.njcn.device.pms.pojo.vo.DoubleUserVO; +import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService; +import com.njcn.system.api.DicDataFeignClient; +import com.njcn.system.pojo.po.DictData; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Objects; /** *

@@ -25,9 +31,16 @@ import java.util.List; @Slf4j public class DistributionMonitorServiceImpl extends ServiceImpl implements IDistributionMonitorService { + private final DicDataFeignClient dicDataFeignClient; + @Override public List getMonitorByCondition(List deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam) { return this.baseMapper.getIdByOrgId(deptIdList,pmsDeviceInfoParam); } + + @Override + public List getDoubleUserByDept(String orgId) { + return this.baseMapper.getDoubleUserByDept(orgId); + } } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/GeneratrixWireImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/GeneratrixWireImpl.java similarity index 76% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/GeneratrixWireImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/GeneratrixWireImpl.java index df1f7caee..3bf16f8ec 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/GeneratrixWireImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/GeneratrixWireImpl.java @@ -1,11 +1,12 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.GeneratrixWireMapper; +import com.njcn.common.pojo.enums.common.DataStateEnum; +import com.njcn.device.pms.mapper.majornetwork.GeneratrixWireMapper; import com.njcn.device.pms.pojo.param.GeneratrixWireParam; import com.njcn.device.pms.pojo.po.GeneratrixWire; -import com.njcn.device.pms.service.IGeneratrixWireService; +import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService; import com.njcn.web.pojo.param.BaseParam; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; @@ -26,14 +27,15 @@ public class GeneratrixWireImpl extends ServiceImpl diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneralDeviceServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneralDeviceServiceImpl.java similarity index 96% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneralDeviceServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneralDeviceServiceImpl.java index 7b36b8522..a78815af1 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneralDeviceServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneralDeviceServiceImpl.java @@ -1,14 +1,13 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollectionUtil; import com.njcn.common.pojo.dto.SimpleDTO; import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; -import com.njcn.device.pms.pojo.po.Monitor; -import com.njcn.device.pms.service.IDistributionMonitorService; -import com.njcn.device.pms.service.IMonitorService; -import com.njcn.device.pms.service.IPmsGeneralDeviceService; +import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.pojo.dto.DeptDTO; import lombok.RequiredArgsConstructor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneratrixServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneratrixServiceImpl.java similarity index 92% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneratrixServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneratrixServiceImpl.java index 09d981f85..70f056584 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PmsGeneratrixServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsGeneratrixServiceImpl.java @@ -1,14 +1,14 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.PmsGeneratrixMapper; +import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper; import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO; import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO; import com.njcn.device.pms.pojo.param.GeneratrixParam; import com.njcn.device.pms.pojo.param.PmsGeneratrixParam; import com.njcn.device.pms.pojo.po.Generatrix; -import com.njcn.device.pms.service.IPmsGeneratrixService; +import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService; import com.njcn.web.pojo.param.BaseParam; import lombok.RequiredArgsConstructor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerClientServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerClientServiceImpl.java similarity index 87% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerClientServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerClientServiceImpl.java index bb3ee6a88..5caf95221 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerClientServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerClientServiceImpl.java @@ -1,10 +1,9 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.PowerClientMapper; +import com.njcn.device.pms.mapper.majornetwork.PowerClientMapper; import com.njcn.device.pms.pojo.param.PowerClientParam; import com.njcn.device.pms.pojo.po.PowerClient; -import com.njcn.device.pms.pojo.po.PowerClient; -import com.njcn.device.pms.service.IPowerClientService; +import com.njcn.device.pms.service.majornetwork.IPowerClientService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.web.pojo.param.BaseParam; import org.springframework.beans.BeanUtils; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerDistributionareaServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerDistributionareaServiceImpl.java similarity index 92% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerDistributionareaServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerDistributionareaServiceImpl.java index 2b20cce84..57a3267e2 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerDistributionareaServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerDistributionareaServiceImpl.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -6,15 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.device.pms.enums.PmsDeviceResponseEnum; -import com.njcn.device.pms.mapper.PowerDistributionareaMapper; +import com.njcn.device.pms.mapper.majornetwork.PowerDistributionareaMapper; import com.njcn.device.pms.pojo.param.PowerDistributionareaParam; import com.njcn.device.pms.pojo.po.PowerDistributionarea; import com.njcn.device.pms.pojo.vo.PowerDistributionareaVO; -import com.njcn.device.pms.service.IPowerDistributionareaService; +import com.njcn.device.pms.service.majornetwork.IPowerDistributionareaService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.system.enums.EventResponseEnum; -import com.njcn.system.pojo.param.EventTemplateParam; -import com.njcn.system.pojo.po.EventTemplate; import com.njcn.web.factory.PageFactory; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerGenerationUserServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerGenerationUserServiceImpl.java similarity index 88% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerGenerationUserServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerGenerationUserServiceImpl.java index 88f164578..1987519e8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerGenerationUserServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerGenerationUserServiceImpl.java @@ -1,10 +1,9 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.PowerGenerationUserMapper; +import com.njcn.device.pms.mapper.majornetwork.PowerGenerationUserMapper; import com.njcn.device.pms.pojo.param.PowerGenerationUserParam; import com.njcn.device.pms.pojo.po.PowerGenerationUser; -import com.njcn.device.pms.pojo.po.PowerGenerationUser; -import com.njcn.device.pms.service.IPowerGenerationUserService; +import com.njcn.device.pms.service.majornetwork.IPowerGenerationUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.web.pojo.param.BaseParam; import org.springframework.beans.BeanUtils; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerQualityMatterServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerQualityMatterServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerQualityMatterServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerQualityMatterServiceImpl.java index c51bff16e..313c6145d 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/PowerQualityMatterServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PowerQualityMatterServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.PowerQualityMatterMapper; +import com.njcn.device.pms.mapper.majornetwork.PowerQualityMatterMapper; import com.njcn.device.pms.pojo.po.PowerQualityMatter; -import com.njcn.device.pms.service.IPowerQualityMatterService; +import com.njcn.device.pms.service.majornetwork.IPowerQualityMatterService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpMonitorAlarmCountMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpMonitorAlarmCountMServiceImpl.java similarity index 89% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpMonitorAlarmCountMServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpMonitorAlarmCountMServiceImpl.java index ae9cd80fe..725a74c79 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpMonitorAlarmCountMServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpMonitorAlarmCountMServiceImpl.java @@ -1,17 +1,17 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.exception.BusinessException; -import com.njcn.device.pms.mapper.RMpMonitorAlarmCountMMapper; +import com.njcn.device.pms.mapper.majornetwork.RMpMonitorAlarmCountMMapper; import com.njcn.device.pms.pojo.param.RMpMonitorAlarmCountMParam; import com.njcn.device.pms.pojo.po.Monitor; import com.njcn.device.pms.pojo.po.RMpMonitorAlarmCountM; import com.njcn.device.pms.pojo.vo.RMpMonitorAlarmCountMVO; -import com.njcn.device.pms.service.IMonitorService; -import com.njcn.device.pms.service.RMpMonitorAlarmCountMService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.device.pms.service.majornetwork.RMpMonitorAlarmCountMService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataEnum; import com.njcn.system.enums.DicDataTypeEnum; @@ -39,14 +39,21 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor public class RMpMonitorAlarmCountMServiceImpl extends ServiceImpl -implements RMpMonitorAlarmCountMService{ +implements RMpMonitorAlarmCountMService { private final DeptFeignClient deptFeignClient; private final DicDataFeignClient dicDataFeignClient; - private final IMonitorService iMonitorService; //【监测点】服务类 + private final IMonitorService iMonitorService; //【主网监测点】服务类 + /*** + * 根据条件查询监测点告警统计(月)(主网) + * @author jianghaifei + * @date 2022-11-01 15:21 + * @param rMpMonitorAlarmCountMParam + * @return java.util.List + */ @Override public List getRMpMonitorAlarmCountMList(RMpMonitorAlarmCountMParam rMpMonitorAlarmCountMParam) { //提取查询条件 @@ -79,7 +86,7 @@ implements RMpMonitorAlarmCountMService{ //将监测点类型字典信息转为map集合 key: 字典id value: 字典名称 Map monitorTypeMap = monitorTypeList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName)); //获取主网id - DictData mainId = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData(); + String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId(); //根据条件查询单位下面的所有监测点 LambdaQueryWrapper monitorLambdaQueryWrapper = new LambdaQueryWrapper<>(); @@ -101,7 +108,7 @@ implements RMpMonitorAlarmCountMService{ lambdaQueryWrapper.in(RMpMonitorAlarmCountM::getMeasurementPointId, monitorIdList) .ge(RMpMonitorAlarmCountM::getDataDate, startTime) .le(RMpMonitorAlarmCountM::getDataDate, endTime) - .eq(RMpMonitorAlarmCountM::getDataType, mainId); + .eq(RMpMonitorAlarmCountM::getDataType, dataType); List alarmCountMList = this.list(lambdaQueryWrapper); List resultList; if (CollUtil.isNotEmpty(alarmCountMList)) { @@ -124,4 +131,5 @@ implements RMpMonitorAlarmCountMService{ } return resultList; } + } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpTargetWarnDServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpTargetWarnDServiceImpl.java similarity index 69% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpTargetWarnDServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpTargetWarnDServiceImpl.java index 78e689829..66485de72 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RMpTargetWarnDServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RMpTargetWarnDServiceImpl.java @@ -1,9 +1,9 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.RMpTargetWarnDMapper; +import com.njcn.device.pms.mapper.majornetwork.RMpTargetWarnDMapper; import com.njcn.device.pms.pojo.po.RMpTargetWarnD; -import com.njcn.device.pms.service.RMpTargetWarnDService; +import com.njcn.device.pms.service.majornetwork.RMpTargetWarnDService; import org.springframework.stereotype.Service; /** diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexMServiceImpl.java new file mode 100644 index 000000000..e33f833ac --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexMServiceImpl.java @@ -0,0 +1,84 @@ +package com.njcn.device.pms.service.majornetwork.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.mapper.majornetwork.ROperatingIndexMMapper; +import com.njcn.device.pms.pojo.param.ROperatingIndexParam; +import com.njcn.device.pms.pojo.po.ROperatingIndexM; +import com.njcn.device.pms.pojo.vo.ROperatingIndexCommonVO; +import com.njcn.device.pms.service.majornetwork.ROperatingIndexMService; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.text.DecimalFormat; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_operating_index_m(主网运行指标统计-月表,主网监测指标数据质量统计-月表 )】的数据库操作Service实现 +* @createDate 2022-11-09 19:56:01 +*/ +@Service +@RequiredArgsConstructor +public class ROperatingIndexMServiceImpl extends ServiceImpl + implements ROperatingIndexMService{ + + private final DeptFeignClient deptFeignClient; + + @Override + public List getOperatingList(ROperatingIndexParam rOperatingIndexParam) { + //提取参数 + String id = rOperatingIndexParam.getId(); //单位id + String startTime = rOperatingIndexParam.getStartTime(); //开始时间 + String endTime = rOperatingIndexParam.getEndTime(); //结束时间 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //组装查询条件 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(ROperatingIndexM::getOrgNo, orgNoList) + .ge(StringUtils.isNotBlank(startTime), ROperatingIndexM::getDataDate, startTime) + .le(StringUtils.isNotBlank(endTime), ROperatingIndexM::getDataDate, endTime); + //查询数据 + List list = this.list(lambdaQueryWrapper); + + //封装返回数据 + DecimalFormat df = new DecimalFormat("###.00"); + List resultList = list.stream().map(item -> { + ROperatingIndexCommonVO rOperatingIndexCommonVO = new ROperatingIndexCommonVO(); + BeanUtils.copyProperties(item, rOperatingIndexCommonVO); + + rOperatingIndexCommonVO.setOrgName(deptDTOMap.get(item.getOrgNo()).getName()); //单位名称 + //在线监测率 + Integer measurementRunPoints = item.getMeasurementRunPoints(); //监测点数 + Integer transitMeasurementPoints = item.getTransitMeasurementPoints(); //在线监测点数 + Double transitMeasurementRate = Double.parseDouble(df.format(transitMeasurementPoints / (measurementRunPoints * 1.0) * 100)); + rOperatingIndexCommonVO.setTransitMeasurementRate(transitMeasurementRate); //在线监测率 + + return rOperatingIndexCommonVO; + }).collect(Collectors.toList()); + return resultList; + } +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexYServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexYServiceImpl.java new file mode 100644 index 000000000..a04f9e9f8 --- /dev/null +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/ROperatingIndexYServiceImpl.java @@ -0,0 +1,84 @@ +package com.njcn.device.pms.service.majornetwork.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.device.pms.pojo.param.ROperatingIndexParam; +import com.njcn.device.pms.pojo.po.ROperatingIndexY; +import com.njcn.device.pms.pojo.vo.ROperatingIndexCommonVO; +import com.njcn.device.pms.service.majornetwork.ROperatingIndexYService; +import com.njcn.device.pms.mapper.majornetwork.ROperatingIndexYMapper; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.text.DecimalFormat; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author jianghf +* @description 针对表【r_operating_index_y(主网运行指标统计-年表,主网监测指标数据质量统计-年表 )】的数据库操作Service实现 +* @createDate 2022-11-09 19:56:01 +*/ +@Service +@RequiredArgsConstructor +public class ROperatingIndexYServiceImpl extends ServiceImpl + implements ROperatingIndexYService{ + + private final DeptFeignClient deptFeignClient; + + @Override + public List getOperatingList(ROperatingIndexParam rOperatingIndexParam) { + //提取参数 + String id = rOperatingIndexParam.getId(); //单位id + String startTime = rOperatingIndexParam.getStartTime(); //开始时间 + String endTime = rOperatingIndexParam.getEndTime(); //结束时间 + + //获取所有子部门信息 + List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); + if (CollUtil.isEmpty(deptDTOList)) { + throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); + } + //单位id集合 + List orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList()); + //将单位信息转为map集合 key: 单位id value: 单位实体 + Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); + + //组装查询条件 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(ROperatingIndexY::getOrgNo, orgNoList) + .ge(StringUtils.isNotBlank(startTime), ROperatingIndexY::getDataDate, startTime) + .le(StringUtils.isNotBlank(endTime), ROperatingIndexY::getDataDate, endTime); + //查询数据 + List list = this.list(lambdaQueryWrapper); + + //封装返回数据 + DecimalFormat df = new DecimalFormat("###.00"); + List resultList = list.stream().map(item -> { + ROperatingIndexCommonVO rOperatingIndexCommonVO = new ROperatingIndexCommonVO(); + BeanUtils.copyProperties(item, rOperatingIndexCommonVO); + + rOperatingIndexCommonVO.setOrgName(deptDTOMap.get(item.getOrgNo()).getName()); //单位名称 + //在线监测率 + Integer measurementRunPoints = item.getMeasurementRunPoints(); //监测点数 + Integer transitMeasurementPoints = item.getTransitMeasurementPoints(); //在线监测点数 + Double transitMeasurementRate = Double.parseDouble(df.format(transitMeasurementPoints / (measurementRunPoints * 1.0) * 100)); + rOperatingIndexCommonVO.setTransitMeasurementRate(transitMeasurementRate); //在线监测率 + + return rOperatingIndexCommonVO; + }).collect(Collectors.toList()); + return resultList; + } +} + + + + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatAreaAlarmCountMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatAreaAlarmCountMServiceImpl.java similarity index 85% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatAreaAlarmCountMServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatAreaAlarmCountMServiceImpl.java index f8393190b..977450a49 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatAreaAlarmCountMServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatAreaAlarmCountMServiceImpl.java @@ -1,18 +1,17 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.exception.BusinessException; -import com.njcn.device.pms.mapper.RStatAreaAlarmCountMMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatAreaAlarmCountMMapper; import com.njcn.device.pms.pojo.param.RStatAreaAlarmCountMParam; import com.njcn.device.pms.pojo.po.RStatAreaAlarmCountM; import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO; -import com.njcn.device.pms.service.RStatAreaAlarmCountMService; +import com.njcn.device.pms.service.majornetwork.RStatAreaAlarmCountMService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataEnum; -import com.njcn.system.pojo.po.DictData; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.pojo.dto.DeptDTO; import com.njcn.web.utils.WebUtil; @@ -22,7 +21,6 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -41,6 +39,13 @@ implements RStatAreaAlarmCountMService{ private final DicDataFeignClient dicDataFeignClient; + /*** + * 根据条件查询所有区域告警统计(月)(主网) + * @author jianghaifei + * @date 2022-10-10 15:20 + * @param rStatAreaAlarmCountMParam + * @return java.util.List + */ @Override public List getAllRStatAreaAlarmCountMList(RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam) { //获取查询条件 @@ -60,14 +65,14 @@ implements RStatAreaAlarmCountMService{ //将单位信息转为map集合 key: 单位id value: 单位实体 Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO)); //获取主网id - DictData mainId = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData(); + String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId(); LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); //条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgNoList), RStatAreaAlarmCountM::getOrgNo, orgNoList) .ge(StringUtils.isNotBlank(startTime), RStatAreaAlarmCountM::getDataDate, startTime) .le(StringUtils.isNotBlank(endTime), RStatAreaAlarmCountM::getDataDate, endTime) - .eq(RStatAreaAlarmCountM::getDataType, mainId); + .eq(RStatAreaAlarmCountM::getDataType, dataType); //查询区域告警统计(月)集合 List records = this.list(lambdaQueryWrapper); diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatBusbarHarmonicServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatBusbarHarmonicServiceImpl.java similarity index 95% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatBusbarHarmonicServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatBusbarHarmonicServiceImpl.java index 85369b56a..681b2bbd8 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatBusbarHarmonicServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatBusbarHarmonicServiceImpl.java @@ -1,20 +1,19 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.common.pojo.dto.SimpleDTO; import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient; import com.njcn.device.pms.api.PmsGeneratrixClient; -import com.njcn.device.pms.mapper.RStatBusbarHarmonicMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatBusbarHarmonicMapper; import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO; import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO; -import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.param.PmsGeneratrixParam; import com.njcn.device.pms.pojo.param.UniversalFrontEndParam; import com.njcn.device.pms.pojo.po.RStatBusbarHarmonicYPO; import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO; -import com.njcn.device.pms.service.RStatBusbarHarmonicService; +import com.njcn.device.pms.service.majornetwork.RStatBusbarHarmonicService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -22,7 +21,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatZwAlarmCountWServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatZwAlarmCountWServiceImpl.java similarity index 78% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatZwAlarmCountWServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatZwAlarmCountWServiceImpl.java index f9afb4557..4e78b8817 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RStatZwAlarmCountWServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RStatZwAlarmCountWServiceImpl.java @@ -1,4 +1,4 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; @@ -7,12 +7,19 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.exception.BusinessException; -import com.njcn.device.pms.mapper.RStatZwAlarmCountWMapper; +import com.njcn.device.pms.mapper.majornetwork.RStatZwAlarmCountWMapper; import com.njcn.device.pms.pojo.param.RStatZwAlarmCountWParam; -import com.njcn.device.pms.pojo.po.*; +import com.njcn.device.pms.pojo.po.Monitor; +import com.njcn.device.pms.pojo.po.RMpTargetWarnD; +import com.njcn.device.pms.pojo.po.RStatZwAlarmCountW; +import com.njcn.device.pms.pojo.po.StatationStat; import com.njcn.device.pms.pojo.vo.ProblemMonitorDetailVO; import com.njcn.device.pms.pojo.vo.RStatZwAlarmCountWVO; -import com.njcn.device.pms.service.*; +import com.njcn.device.pms.service.distribution.RMpPwAlarmDetailDService; +import com.njcn.device.pms.service.majornetwork.IMonitorService; +import com.njcn.device.pms.service.majornetwork.IStatationStatService; +import com.njcn.device.pms.service.majornetwork.RMpTargetWarnDService; +import com.njcn.device.pms.service.majornetwork.RStatZwAlarmCountWService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataTypeEnum; import com.njcn.system.pojo.po.DictData; @@ -134,21 +141,41 @@ implements RStatZwAlarmCountWService { LambdaQueryWrapper monitorLambdaQueryWrapper = new LambdaQueryWrapper<>(); monitorLambdaQueryWrapper.eq(Monitor::getOrgId, id); List orgMeasurementPointIdList = iMonitorService.list(monitorLambdaQueryWrapper).stream().map(Monitor::getId).collect(Collectors.toList()); - //以周为时间段,查询告警超过四次的监测点信息 - LambdaQueryWrapper alarmDetailWrapper = new LambdaQueryWrapper<>(); + //以周为时间段,查询告警超过四次的监测点信息 todo + LambdaQueryWrapper targetWarnWrapper = new LambdaQueryWrapper<>(); + targetWarnWrapper.select(RMpTargetWarnD::getMeasurementPointId) + .in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList) + .ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTime) + .le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTime) + .groupBy(RMpTargetWarnD::getMeasurementPointId) + .or() //拼接or条件 + .eq(RMpTargetWarnD::getIsEffective, 1) //是否是有效接入监测点(0:否 1:是) + .eq(RMpTargetWarnD::getIsHarmonic, 1) //是否是稳态超标监测点(0:否 1:是) + .eq(RMpTargetWarnD::getIsEvent, 1) //是否是发生暂态的监测点(0:否 1:是) + .eq(RMpTargetWarnD::getIsWarn, 1) //是否是告警监测点数(0:否 1:是) + .eq(RMpTargetWarnD::getIsVDevWarn, 1) //电压偏差是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsFreqWarn, 1) //频率偏差是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsUnbalanceWarn, 1) //三相电压不平衡度是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsVWarn, 1) //谐波电压是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsFlickerWarn, 1) //闪变是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsSagWarn, 1) //电压暂降是否告警(0:否 1:是) + .eq(RMpTargetWarnD::getIsInterruptWarn, 1) //短时中断是否告警(0:否 1:是) + .having("count(measurement_point_id) >= {0}", 4); + +// LambdaQueryWrapper alarmDetailWrapper = new LambdaQueryWrapper<>(); /* 组装查询条件:select count(1) from r_mp_pw_alarm_detail_d where data_date <= '2022-10-23' and data_date >= '2022-10-17' and measurement_point_id in (orgMeasurementPointIdList) group by measurement_point_id having count(measurement_point_id) >= 4 */ - alarmDetailWrapper.select(RMpPwAlarmDetailD::getMeasurementPointId) - .in(RMpPwAlarmDetailD::getMeasurementPointId, orgMeasurementPointIdList) - .ge(StringUtils.isNotBlank(startTime), RMpPwAlarmDetailD::getDataDate, startTime) - .le(StringUtils.isNotBlank(endTime), RMpPwAlarmDetailD::getDataDate, endTime) - .groupBy(RMpPwAlarmDetailD::getMeasurementPointId) - .having("count(measurement_point_id) >= {0}", 4); +// alarmDetailWrapper.select(RMpPwAlarmDetailD::getMeasurementPointId) +// .in(RMpPwAlarmDetailD::getMeasurementPointId, orgMeasurementPointIdList) +// .ge(StringUtils.isNotBlank(startTime), RMpPwAlarmDetailD::getDataDate, startTime) +// .le(StringUtils.isNotBlank(endTime), RMpPwAlarmDetailD::getDataDate, endTime) +// .groupBy(RMpPwAlarmDetailD::getMeasurementPointId) +// .having("count(measurement_point_id) >= {0}", 4); //告警超过四次的监测点idList - List measurementPointIdList = rMpPwAlarmDetailDService.listObjs(alarmDetailWrapper, Object::toString); + List measurementPointIdList = rMpTargetWarnDService.listObjs(targetWarnWrapper, Object::toString); // 计算问题严重的监测点 // 获取查询条件:月份开始时间、结束时间 @@ -159,12 +186,18 @@ implements RStatZwAlarmCountWService { int monthDay = Month.of(DateUtil.month(date)).getLastDay(DateUtil.isLeapYear(DateUtil.year(date))); //根据单位下监测点idList、月份条件查询监测点告警信息 - LambdaQueryWrapper targetWarnWrapper = new LambdaQueryWrapper<>(); - //组装查询条件: - targetWarnWrapper.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList) - .ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTimeOfMonth) - .le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTimeOfMonth); - List targetWarnDList = rMpTargetWarnDService.list(targetWarnWrapper); + List targetWarnDList; //告警超过四次 + if (CollUtil.isEmpty(measurementPointIdList)) { + targetWarnDList = new ArrayList<>(); + } else { + targetWarnWrapper.clear(); + //组装查询条件: + targetWarnWrapper.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList) + .ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTimeOfMonth) + .le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTimeOfMonth); + targetWarnDList = rMpTargetWarnDService.list(targetWarnWrapper); + } + //使用stream的分组方法(Collectors.partitioningBy())对告警记录和没有告警的记录进行分组 true:有告警的记录 false:没有告警的记录 // Map> booleanListMap = targetWarnDList.stream().collect(Collectors.groupingBy( // item -> item.getIsEffective() == 1 || item.getIsHarmonic() == 1 || item.getIsEvent() == 1 || item.getIsWarn() == 1 @@ -203,6 +236,10 @@ implements RStatZwAlarmCountWService { .limit((int)Math.ceil(severityMap.size() * 0.3)).map(Map.Entry::getKey).collect(Collectors.toList()); //合并告警超过四次的监测点ids和严重程度前30%监测点dis measurementPointIdList.addAll(severity); + //如果问题严重监测点id集合是空的,那直接返回空集合 + if (CollUtil.isEmpty(measurementPointIdList)) { + return new ArrayList<>(); + } //去除集合中重复的监测点id,得到最终的有严重问题的监测点id集合 List lastMeasurementPointList = measurementPointIdList.stream().distinct().collect(Collectors.toList()); //根据监测点ids查询监测点信息 diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RmpEventDetailServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RmpEventDetailServiceImpl.java similarity index 81% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RmpEventDetailServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RmpEventDetailServiceImpl.java index db093e70a..7bad6a777 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/RmpEventDetailServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/RmpEventDetailServiceImpl.java @@ -1,10 +1,10 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.njcn.device.pms.mapper.RmpEventDetailMapper; +import com.njcn.device.pms.mapper.majornetwork.RmpEventDetailMapper; import com.njcn.device.pms.pojo.param.UniversalFrontEndParam; import com.njcn.device.pms.pojo.vo.RmpEventDetailVO; -import com.njcn.device.pms.service.RmpEventDetailService; +import com.njcn.device.pms.service.majornetwork.RmpEventDetailService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/SourceManagementServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/SourceManagementServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/SourceManagementServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/SourceManagementServiceImpl.java index 2718245e1..2350b0fa4 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/SourceManagementServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/SourceManagementServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.SourceManagementMapper; +import com.njcn.device.pms.mapper.majornetwork.SourceManagementMapper; import com.njcn.device.pms.pojo.po.SourceManagement; -import com.njcn.device.pms.service.ISourceManagementService; +import com.njcn.device.pms.service.majornetwork.ISourceManagementService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatationStatServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatationStatServiceImpl.java similarity index 91% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatationStatServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatationStatServiceImpl.java index 0dea3b711..81eff5416 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatationStatServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatationStatServiceImpl.java @@ -1,12 +1,11 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.StatationStatMapper; +import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper; import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO; import com.njcn.device.pms.pojo.param.StatationStatParam; import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam; import com.njcn.device.pms.pojo.po.StatationStat; -import com.njcn.device.pms.pojo.po.StatationStat; -import com.njcn.device.pms.service.IStatationStatService; +import com.njcn.device.pms.service.majornetwork.IStatationStatService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.web.pojo.param.BaseParam; import lombok.RequiredArgsConstructor; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatisticsRunMonitorServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatisticsRunMonitorServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatisticsRunMonitorServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatisticsRunMonitorServiceImpl.java index 936a1aa5e..768f681a9 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/StatisticsRunMonitorServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/StatisticsRunMonitorServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.StatisticsRunMonitorMapper; +import com.njcn.device.pms.mapper.majornetwork.StatisticsRunMonitorMapper; import com.njcn.device.pms.pojo.po.StatisticsRunMonitor; -import com.njcn.device.pms.service.IStatisticsRunMonitorService; +import com.njcn.device.pms.service.majornetwork.IStatisticsRunMonitorService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalEliminateDataServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalEliminateDataServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalEliminateDataServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalEliminateDataServiceImpl.java index 907521cc2..f061e7281 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalEliminateDataServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalEliminateDataServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.TerminalEliminateDataMapper; +import com.njcn.device.pms.mapper.majornetwork.TerminalEliminateDataMapper; import com.njcn.device.pms.pojo.po.TerminalEliminateData; -import com.njcn.device.pms.service.ITerminalEliminateDataService; +import com.njcn.device.pms.service.majornetwork.ITerminalEliminateDataService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalServiceImpl.java similarity index 55% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalServiceImpl.java index 59cf3002d..5dba48a52 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TerminalServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TerminalServiceImpl.java @@ -1,18 +1,17 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.device.pms.enums.PmsDeviceResponseEnum; -import com.njcn.device.pms.mapper.TerminalMapper; +import com.njcn.device.pms.mapper.majornetwork.TerminalMapper; import com.njcn.device.pms.pojo.param.PmsTerminalParam; -import com.njcn.device.pms.pojo.po.Terminal; -import com.njcn.device.pms.pojo.vo.PmsTerminalVO; -import com.njcn.device.pms.service.ITerminalService; +import com.njcn.device.pms.pojo.po.PmsTerminal; +import com.njcn.device.pms.service.majornetwork.ITerminalService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.web.factory.PageFactory; +import com.njcn.web.pojo.param.BaseParam; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -27,17 +26,15 @@ import java.util.List; * @since 2022-10-14 */ @Service -public class TerminalServiceImpl extends ServiceImpl implements ITerminalService { +public class TerminalServiceImpl extends ServiceImpl implements ITerminalService { @Override - public Page getTerminalList(PmsTerminalParam.QueryParam queryParam) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.ne("pms_terminal.status", DataStateEnum.DELETED.getCode()); - if(queryParam.getStatus().equals(1)){ - queryWrapper.eq("pms_terminal.status",1); - } + public Page getTerminalList(BaseParam baseParam) { + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + //初始化分页数据 - return this.baseMapper.page(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper); + return this.page(new Page<>(PageFactory.getPageNum(baseParam), PageFactory.getPageSize(baseParam)), lambdaQueryWrapper); } /** @@ -46,7 +43,7 @@ public class TerminalServiceImpl extends ServiceImpl i * @date 2022/10/27 */ @Override - public Terminal getTerminalById(String id) { + public PmsTerminal getTerminalById(String id) { return this.getById(id); } @@ -58,11 +55,11 @@ public class TerminalServiceImpl extends ServiceImpl i @Override public boolean add(PmsTerminalParam terminalParam) { checkName(terminalParam,true); - Terminal terminal = new Terminal(); - BeanUtils.copyProperties(terminalParam,terminal); + PmsTerminal pmsTerminal = new PmsTerminal(); + BeanUtils.copyProperties(terminalParam, pmsTerminal); //设为正常状态 - terminal.setStatus(DataStateEnum.ENABLE.getCode()); - return this.save(terminal); + pmsTerminal.setStatus(DataStateEnum.ENABLE.getCode()); + return this.save(pmsTerminal); } /** @@ -73,9 +70,9 @@ public class TerminalServiceImpl extends ServiceImpl i @Override public boolean update(PmsTerminalParam updateParam) { checkName(updateParam,false); - Terminal terminal = new Terminal(); - BeanUtils.copyProperties(updateParam,terminal); - return this.updateById(terminal); + PmsTerminal pmsTerminal = new PmsTerminal(); + BeanUtils.copyProperties(updateParam, pmsTerminal); + return this.updateById(pmsTerminal); } /** @@ -84,19 +81,19 @@ public class TerminalServiceImpl extends ServiceImpl i */ @Override public boolean delete(List ids) { - return this.lambdaUpdate().set(Terminal::getStatus, DataStateEnum.DELETED.getCode()).in(Terminal::getId, ids).update(); + return this.lambdaUpdate().set(PmsTerminal::getStatus, DataStateEnum.DELETED.getCode()).in(PmsTerminal::getId, ids).update(); } /** * 名称重复校验 */ private void checkName(PmsTerminalParam terminalParam, boolean flag){ - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(Terminal::getName,terminalParam.getName()); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(PmsTerminal::getName,terminalParam.getName()); //修改 if(!flag){ if(terminalParam instanceof PmsTerminalParam){ - lambdaQueryWrapper.ne(Terminal::getId,terminalParam.getId()); + lambdaQueryWrapper.ne(PmsTerminal::getId,terminalParam.getId()); } } int result = this.count(lambdaQueryWrapper); diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TractionStationServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TractionStationServiceImpl.java similarity index 64% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TractionStationServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TractionStationServiceImpl.java index 1c78942d2..9d4dbe82c 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TractionStationServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TractionStationServiceImpl.java @@ -1,15 +1,18 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.device.pms.enums.PmsDeviceResponseEnum; -import com.njcn.device.pms.mapper.TractionStationMapper; +import com.njcn.device.pms.mapper.majornetwork.TractionStationMapper; +import com.njcn.device.pms.pojo.dto.PmsTractionStationDTO; +import com.njcn.device.pms.pojo.param.PmsTractionStationParam; import com.njcn.device.pms.pojo.param.TractionStationParam; import com.njcn.device.pms.pojo.po.TractionStation; -import com.njcn.device.pms.service.ITractionStationService; +import com.njcn.device.pms.service.majornetwork.ITractionStationService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.web.pojo.param.BaseParam; +import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -17,17 +20,21 @@ import java.util.List; /** *

- * 服务实现类 + * 服务实现类 *

* * @author hongawen * @since 2022-10-14 */ @Service +@RequiredArgsConstructor public class TractionStationServiceImpl extends ServiceImpl implements ITractionStationService { + private final TractionStationMapper tractionStationMapper; + /** * 查询牵引站列表 + * * @param baseParam * @return */ @@ -38,6 +45,7 @@ public class TractionStationServiceImpl extends ServiceImpl + * @author yzh + * @date 2022/11/8 + */ + @Override + public List getPmsTractionStationInfo(PmsTractionStationParam param) { + return tractionStationMapper.getPmsTractionStationInfo(param); + } + /** * 名称重复校验 */ - private void checkName(TractionStationParam tractionStationParam, boolean flag){ + private void checkName(TractionStationParam tractionStationParam, boolean flag) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(TractionStation::getName,tractionStationParam.getName()); + lambdaQueryWrapper.eq(TractionStation::getName, tractionStationParam.getName()); //修改 - if(!flag){ - if(tractionStationParam instanceof TractionStationParam){ - lambdaQueryWrapper.ne(TractionStation::getId,tractionStationParam.getId()); + if (!flag) { + if (tractionStationParam instanceof TractionStationParam) { + lambdaQueryWrapper.ne(TractionStation::getId, tractionStationParam.getId()); } } int result = this.count(lambdaQueryWrapper); diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TransientStasticDataServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TransientStasticDataServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TransientStasticDataServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TransientStasticDataServiceImpl.java index 280b2a503..d665382ad 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TransientStasticDataServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TransientStasticDataServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.TransientStasticDataMapper; +import com.njcn.device.pms.mapper.majornetwork.TransientStasticDataMapper; import com.njcn.device.pms.pojo.po.TransientStasticData; -import com.njcn.device.pms.service.ITransientStasticDataService; +import com.njcn.device.pms.service.majornetwork.ITransientStasticDataService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TreatTransientDetailDataServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TreatTransientDetailDataServiceImpl.java similarity index 67% rename from pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TreatTransientDetailDataServiceImpl.java rename to pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TreatTransientDetailDataServiceImpl.java index 8b1b9dd11..a38f2ef00 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/impl/TreatTransientDetailDataServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/TreatTransientDetailDataServiceImpl.java @@ -1,8 +1,8 @@ -package com.njcn.device.pms.service.impl; +package com.njcn.device.pms.service.majornetwork.impl; -import com.njcn.device.pms.mapper.TreatTransientDetailDataMapper; +import com.njcn.device.pms.mapper.majornetwork.TreatTransientDetailDataMapper; import com.njcn.device.pms.pojo.po.TreatTransientDetailData; -import com.njcn.device.pms.service.ITreatTransientDetailDataService; +import com.njcn.device.pms.service.majornetwork.ITreatTransientDetailDataService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service;