diff --git a/pqs-job/job-executor/pom.xml b/pqs-job/job-executor/pom.xml
index 3866e91c2..adf27a5dd 100644
--- a/pqs-job/job-executor/pom.xml
+++ b/pqs-job/job-executor/pom.xml
@@ -72,6 +72,12 @@
prepare-api
${project.version}
+
+
+ com.njcn
+ process-api
+ ${project.version}
+
diff --git a/pqs-job/job-executor/src/main/java/com/njcn/executor/handler/SupvStatisticReportJob.java b/pqs-job/job-executor/src/main/java/com/njcn/executor/handler/SupvStatisticReportJob.java
new file mode 100644
index 000000000..ee1b62a16
--- /dev/null
+++ b/pqs-job/job-executor/src/main/java/com/njcn/executor/handler/SupvStatisticReportJob.java
@@ -0,0 +1,34 @@
+package com.njcn.executor.handler;
+
+import com.njcn.process.api.SupvStatisticReportMFeignClient;
+import com.xxl.job.core.context.XxlJobHelper;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * pqs
+ * 技术监督计划问题月报统计
+ * @author cdf
+ * @date 2023/6/29
+ */
+@Slf4j
+@Component
+@RequiredArgsConstructor
+public class SupvStatisticReportJob {
+
+ private final SupvStatisticReportMFeignClient supvStatisticReportMFeignClient;
+
+ @XxlJob("statisticReportJobHandler")
+ public void statisticReportJobHandler() {
+ LocalDate yesterday = LocalDate.now().plusDays(-1);
+ supvStatisticReportMFeignClient.statisticReport(yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+ log.info(LocalDateTime.now()+"技术监督计划问题月报统计调用成功");
+ }
+}
diff --git a/pqs-job/job-executor/src/main/resources/bootstrap.yml b/pqs-job/job-executor/src/main/resources/bootstrap.yml
index 36c48ef4d..a4105977e 100644
--- a/pqs-job/job-executor/src/main/resources/bootstrap.yml
+++ b/pqs-job/job-executor/src/main/resources/bootstrap.yml
@@ -46,8 +46,8 @@ logging:
xxl:
job:
admin:
- addresses: http://@service.server.url@:10217/job-admin
-# addresses: http://192.168.1.29:10217/job-admin
+ # addresses: http://@service.server.url@:10217/job-admin
+ addresses: http://192.168.1.18:10217/job-admin
#执行器通讯TOKEN [选填]:非空时启用;
accessToken:
executor:
diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/api/SupvStatisticReportMFeignClient.java b/pqs-process/process-api/src/main/java/com/njcn/process/api/SupvStatisticReportMFeignClient.java
new file mode 100644
index 000000000..5e755258a
--- /dev/null
+++ b/pqs-process/process-api/src/main/java/com/njcn/process/api/SupvStatisticReportMFeignClient.java
@@ -0,0 +1,24 @@
+package com.njcn.process.api;
+
+import com.njcn.common.pojo.constant.ServerInfo;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.process.api.fallback.SupvStatisticReportMFallbackFactory;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.time.LocalDate;
+
+/**
+ * 过程监督月报统计
+ * @author cdf
+ * @date 2023/4/13
+ */
+@FeignClient(value = ServerInfo.PROCESS,path = "/supv/report",fallbackFactory = SupvStatisticReportMFallbackFactory.class)
+public interface SupvStatisticReportMFeignClient {
+
+ @PostMapping("/statisticReport")
+ HttpResult statisticReport(@RequestParam("timeId") String timeId);
+
+}
diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/api/fallback/SupvStatisticReportMFallbackFactory.java b/pqs-process/process-api/src/main/java/com/njcn/process/api/fallback/SupvStatisticReportMFallbackFactory.java
new file mode 100644
index 000000000..a55d5c31c
--- /dev/null
+++ b/pqs-process/process-api/src/main/java/com/njcn/process/api/fallback/SupvStatisticReportMFallbackFactory.java
@@ -0,0 +1,42 @@
+package com.njcn.process.api.fallback;
+
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.exception.BusinessException;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.process.api.SupvStatisticReportMFeignClient;
+import com.njcn.process.utils.ProcessEnumUtil;
+import feign.hystrix.FallbackFactory;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.time.LocalDate;
+
+/**
+ *
+ * @author cdf
+ * @date 2023/4/13
+ */
+@Slf4j
+@Component
+public class SupvStatisticReportMFallbackFactory implements FallbackFactory {
+
+ @Override
+ public SupvStatisticReportMFeignClient create(Throwable throwable) {
+ //判断抛出异常是否为解码器抛出的业务异常
+ Enum> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
+ if (throwable.getCause() instanceof BusinessException) {
+ BusinessException businessException = (BusinessException) throwable.getCause();
+ exceptionEnum = ProcessEnumUtil.getExceptionEnum(businessException.getResult());
+ }
+ Enum> finalExceptionEnum = exceptionEnum;
+ return new SupvStatisticReportMFeignClient() {
+
+ @Override
+ public HttpResult statisticReport(String timeId) {
+ log.error("{}异常,降级处理,异常为:{}", "技术监督月报统计", throwable.toString());
+ throw new BusinessException(finalExceptionEnum);
+ }
+ };
+ }
+}
diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java
index 1ef558be1..cc869f356 100644
--- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java
+++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanParam.java
@@ -71,21 +71,18 @@ public class SupvPlanParam extends BaseParam {
* 监督对象名称
*/
@ApiModelProperty(value = "监督对象名称")
- @NotBlank(message = "监督对象名称不可为空")
private String supvObjName;
/**
- * 对象类型
+ * 监督对象类型
*/
@ApiModelProperty(value = "对象类型")
- @NotBlank(message = "对象类型不可为空")
private String supvObjType;
/**
- * 对象电压等级
+ * 监督对象电压等级
*/
@ApiModelProperty(value = "对象电压等级")
- @NotBlank(message = "对象电压等级不可为空")
private String objVoltageLevel;
/**
diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java
index ef3932302..5af851436 100644
--- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java
+++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlan.java
@@ -1,5 +1,6 @@
package com.njcn.process.pojo.po;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -30,16 +31,29 @@ public class SupvPlan extends BaseEntity {
@TableId
private String planId;
+ @TableField(exist = false)
+ private String provinceId;
+
+ @TableField(exist = false)
+ private String provinceName;
+
+ @TableField(exist = false)
+ private String cityId;
+
+ @TableField(exist = false)
+ private String cityName;
+
+ @TableField(exist = false)
+ private String countyId;
+
+ @TableField(exist = false)
+ private String countyName;
+
/**
* 计划名称
*/
private String workPlanName;
- /**
- * 监督单位
- */
- private String supvOrgId;
-
/**
* 监督类型
*/
@@ -50,17 +64,71 @@ public class SupvPlan extends BaseEntity {
*/
private String supvStage;
+ /**
+ * 监督单位
+ */
+ private String supvOrgId;
+
+ /**
+ * 监督单位
+ */
+ @TableField(exist = false)
+ private String supvOrgName;
+
/**
* 计划监督时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate planSupvDate;
+ /**
+ * 计划编制人id
+ */
+ private String planUserId;
+
+ @TableField(exist = false)
+ private String planUserName;
+
+ /**
+ * 计划编制单位id
+ */
+ private String planOrgId;
+
+ @TableField(exist = false)
+ private String planOrgName;
+
+ /**
+ * 备注
+ */
+ private String otherRemark;
+
+ /**
+ * 计划执行开始时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private LocalDate effectStartTime;
+
+ /**
+ * 计划执行结束时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private LocalDate effectEndTime;
+
+
+ /**
+ * 实施状态
+ */
+ private String effectStatus;
+
/**
* 监督对象名称
*/
+
private String supvObjName;
+ @TableField(exist = false)
+ private String supvObjId;
+
/**
* 对象类型
*/
@@ -71,6 +139,9 @@ public class SupvPlan extends BaseEntity {
*/
private String objVoltageLevel;
+ @TableField(exist = false)
+ private String objVoltageLevelName;
+
/**
* 关联电站
*/
@@ -82,6 +153,12 @@ public class SupvPlan extends BaseEntity {
*/
private String substationVoltageLevel;
+ /**
+ * 关联电站电压等级名称
+ */
+ @TableField(exist = false)
+ private String substationVoltageLevelName;
+
/**
* 监督对象属性
@@ -98,17 +175,7 @@ public class SupvPlan extends BaseEntity {
*/
private Double objCapacity;
- /**
- * 计划执行开始时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- private LocalDate effectStartTime;
- /**
- * 计划执行结束时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- private LocalDate effectEndTime;
/**
* 报告出具时间
@@ -122,26 +189,9 @@ public class SupvPlan extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime problemOcTime;
- /**
- * 备注
- */
- private String otherRemark;
-
- /**
- * 计划编制人id
- */
- private String planUserId;
-
- /**
- * 计划编制单位id
- */
- private String planOrgId;
- /**
- * 实施状态
- */
- private String effectStatus;
+
/**
* 0.未上送 1.上送 2.取消上送
diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPushGwController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPushGwController.java
index 66ee9edfc..5a51b1e9e 100644
--- a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPushGwController.java
+++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPushGwController.java
@@ -51,7 +51,7 @@ public class SupvPushGwController extends BaseController {
}
/**
- * 接收电能质量技术监督工作计划数据接口
+ * 推送技术监督实施问题
* @author cdf
* @date 2023/6/28
*/
@@ -61,25 +61,12 @@ public class SupvPushGwController extends BaseController {
@ApiImplicitParam(name = "problemIds",value = "请求体",required = true)
public HttpResult