From 650de7c883d1e130e8a0bca8d348a561be7cf572 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Wed, 6 Sep 2023 11:06:43 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=A1=E5=88=92=202.=E6=8A=80=E6=9C=AF=E7=9B=91?= =?UTF-8?q?=E7=9D=A3=E9=A2=84=E5=91=8A=E8=AD=A6=E5=8D=95=E5=92=8C=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E6=95=B0=E6=8D=AE=203.=E6=8A=80=E6=9C=AF=E7=9B=91?= =?UTF-8?q?=E7=9D=A3=E5=9B=BD=E7=BD=91=E4=B8=8A=E9=80=81=EF=BC=8C=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E3=80=81=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E5=8D=95=E5=92=8C=E5=8F=8D=E9=A6=88=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=204.=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/param/SupvAlarmBackParam.java | 74 +++ .../process/pojo/param/SupvAlarmParam.java | 112 ++++ .../process/pojo/param/SupvPlanHisParam.java | 84 +++ .../process/pojo/param/SupvPlanParam.java | 8 + .../com/njcn/process/pojo/po/SupvAlarm.java | 125 +++++ .../njcn/process/pojo/po/SupvAlarmBack.java | 85 +++ .../com/njcn/process/pojo/po/SupvPlan.java | 6 +- .../com/njcn/process/pojo/po/SupvPlanHis.java | 95 ++++ .../com/njcn/process/pojo/po/SupvProblem.java | 16 +- .../com/njcn/process/pojo/vo/SupvPlanVO.java | 3 +- .../njcn/process/pojo/vo/SupvProblemVO.java | 153 ++++++ .../njcn/process/pojo/vo/gw/AlarmBackVO.java | 188 +++++++ .../com/njcn/process/pojo/vo/gw/AlarmVO.java | 306 +++++++++++ .../njcn/process/pojo/vo/gw/PlanHisVO.java | 210 +++++++ .../com/njcn/process/pojo/vo/gw/PlanVO.java | 514 ++++++++++++++++++ .../njcn/process/pojo/vo/gw/ProblemVO.java | 337 ++++++++++++ .../controller/SupvAlarmBackController.java | 82 +++ .../controller/SupvAlarmController.java | 83 +++ .../controller/SupvPlanHisController.java | 82 +++ .../controller/SupvProblemController.java | 22 +- .../controller/SupvPushGwController.java | 29 + .../process/mapper/SupvAlarmBackMapper.java | 24 + .../njcn/process/mapper/SupvAlarmMapper.java | 16 + .../process/mapper/SupvPlanHisMapper.java | 16 + .../process/mapper/SupvProblemMapper.java | 6 + .../process/mapper/SupvReportMMapper.java | 8 +- .../mapper/mapping/SupvAlarmBackMapper.xml | 22 + .../mapper/mapping/SupvAlarmMapper.xml | 5 + .../mapper/mapping/SupvPlanHisMapper.xml | 5 + .../mapper/mapping/SupvProblemMapper.xml | 9 + .../mapper/mapping/SupvReportMMapper.xml | 17 + .../service/ISupvAlarmBackService.java | 28 + .../process/service/ISupvAlarmService.java | 27 + .../process/service/ISupvPlanHisService.java | 28 + .../process/service/ISupvProblemService.java | 10 +- .../process/service/SupvPushGwService.java | 26 + .../impl/SupvAlarmBackServiceImpl.java | 82 +++ .../service/impl/SupvAlarmServiceImpl.java | 82 +++ .../service/impl/SupvPlanHisServiceImpl.java | 82 +++ .../service/impl/SupvPlanServiceImpl.java | 54 +- .../service/impl/SupvProblemServiceImpl.java | 27 +- .../service/impl/SupvPushGwServiceImpl.java | 356 +++++++++--- .../service/impl/SupvReportMServiceImpl.java | 28 +- .../src/main/resources/bootstrap.yml | 3 +- .../njcn/system/enums/DicDataTypeEnum.java | 6 +- 45 files changed, 3440 insertions(+), 141 deletions(-) create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmBackParam.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmParam.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanHisParam.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarm.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarmBack.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlanHis.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvProblemVO.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmBackVO.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmVO.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanHisVO.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanVO.java create mode 100644 pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/ProblemVO.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmBackController.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmController.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPlanHisController.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmBackMapper.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmMapper.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvPlanHisMapper.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmBackMapper.xml create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmMapper.xml create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvPlanHisMapper.xml create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmBackService.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmService.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvPlanHisService.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmBackServiceImpl.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmServiceImpl.java create mode 100644 pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanHisServiceImpl.java diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmBackParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmBackParam.java new file mode 100644 index 000000000..7eb52197e --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmBackParam.java @@ -0,0 +1,74 @@ +package com.njcn.process.pojo.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.web.pojo.param.BaseParam; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * @author wr + * @description + * @date 2023/9/1 14:32 + */ +@Data +public class SupvAlarmBackParam extends BaseParam { + + @ApiModelProperty(value = "监督单位",required = true) + private String orgId; + + @ApiModelProperty(value = "告预警单编号",required = true) + private String workAlarmId; + + @Data + public static class AlarmBackInsert { + @ApiModelProperty("项目执行单位编号") + private String executeOrgId; + + @ApiModelProperty("项目执行单位名称") + private String executeOrgName; + + @ApiModelProperty("采取措施") + @NotBlank(message = "采取措施不能为空") + private String treatmentMeasures; + + @ApiModelProperty("填报人id,取ISC平台上的人员id") + @NotBlank(message = "采取措施不能为空") + private String fillUserId; + + @ApiModelProperty("填报人名称,取ISC平台上的人员名称") + @NotBlank(message = "填报人名称不能为空") + private String fillUserName; + + @ApiModelProperty("完成时间 yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message = "完成时间不能为空") + private LocalDateTime completeTime; + + @ApiModelProperty("告预警单id,关联告预警单表") + @NotBlank(message = "告预警单编号不能为空") + private String workAlarmId; + + @ApiModelProperty("反馈单位id,取ISC平台上的组织id") + private String feedbackOrgId; + + @ApiModelProperty("反馈单位名称,取ISC平台上的组织名称") + private String feedbackOrgName; + + } + + @Data + public static class AlarmBackUpdate extends AlarmBackInsert { + + @ApiModelProperty("预告警单反馈编号") + @NotBlank(message = "预告警单反馈编号不能为空") + private String alarmBackId; + + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmParam.java new file mode 100644 index 000000000..3a4f73d46 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvAlarmParam.java @@ -0,0 +1,112 @@ +package com.njcn.process.pojo.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.web.pojo.param.BaseParam; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * @author wr + * @description + * @date 2023/9/1 14:32 + */ +@Data +public class SupvAlarmParam extends BaseParam { + + @ApiModelProperty(value = "监督单位",required = true) + private String orgId; + + @Data + public static class AlarmInsert { + + @ApiModelProperty("单据类别") + @NotBlank(message = "单据类别不能为空") + private String billType; + + @ApiModelProperty("单据编号") + @NotBlank(message = "单据编号不能为空") + private String billNo; + + @ApiModelProperty("单据名称") + @NotBlank(message = "单据名称不能为空") + private String billName; + + @ApiModelProperty("编制单位id,取ISC平台上的组织id (sys_dept)") + @NotBlank(message = "编制单位编号不能为空") + private String createrOrgId; + + @ApiModelProperty("编制单位名称,取ISC平台上的组织名称") + @NotBlank(message = "编制单位名称不能为空") + private String createrOrgName; + + @ApiModelProperty("所属专业,见3.11(字典)") + @NotBlank(message = "所属专业不能为空") + private String specialityType; + + @ApiModelProperty("责任单位id,取ISC平台上的组织id") + @NotBlank(message = "责任单位编号不能为空") + private String orgId; + + @ApiModelProperty("责任单位名称,取ISC平台上的组织名称") + @NotBlank(message = "责任单位名称不能为空") + private String orgName; + + @ApiModelProperty("接收人id,取ISC平台上的人员id") + private String receiveUserId; + + @ApiModelProperty("接收人名称,取ISC平台上的人员名称") + private String receiveUserName; + + @ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @NotNull(message = "完成时间不能为空") + private LocalDateTime createrTime; + + @ApiModelProperty("主管部门id,取ISC平台上的组织id") + @NotBlank(message = "主管部门编号不能为空") + private String managerDeptId; + + @ApiModelProperty("主管部门名称,取ISC平台上的组织名称") + @NotBlank(message = "主管部门名称不能为空") + private String managerDeptName; + + @ApiModelProperty("主送单位id,取ISC平台上的组织id") + private String mainSenderId; + + @ApiModelProperty("主送单位名称,取ISC平台上的组织名称") + private String mainSenderName; + + @ApiModelProperty("抄送单位id,取ISC平台上的组织id") + private String copySenderId; + + @ApiModelProperty("抄送单位名称,取ISC平台上的组织名称") + private String copySenderName; + + @ApiModelProperty("依据标准") + @NotBlank(message = "依据标准不能为空") + private String techSupvBasis; + + @ApiModelProperty("问题描述") + @NotBlank(message = "问题描述不能为空") + private String problemDesc; + + @ApiModelProperty("处理建议") + @NotBlank(message = "处理建议不能为空") + private String dealAdvise; + + + } + + @Data + public static class AlarmUpdate extends AlarmInsert { + + @ApiModelProperty("预告警单id") + private String alarmId; + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanHisParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanHisParam.java new file mode 100644 index 000000000..003c04df9 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvPlanHisParam.java @@ -0,0 +1,84 @@ +package com.njcn.process.pojo.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.web.pojo.param.BaseParam; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * @author wr + * @description + * @date 2023/9/1 14:32 + */ +@Data +public class SupvPlanHisParam extends BaseParam { + + @ApiModelProperty(value = "监督单位",required = true) + private String orgId; + + @Data + public static class insert { + + @ApiModelProperty("计划表主键") + @NotBlank(message = "计划表编号不能为空") + private String planId; + + @ApiModelProperty("其他要求") + @NotBlank(message = "其他要求不能为空") + private String otherRemark; + + @ApiModelProperty("调整原因") + @NotBlank(message = "调整原因不能为空") + private String applyComment; + + } + + @Data + public static class update extends insert{ + + @ApiModelProperty("历史记录编号") + private String id; + + @ApiModelProperty("计划名称") + @NotBlank(message = "计划表名称不能为空") + private String workPlanName; + + @ApiModelProperty("监督单位id 取ISC平台上的组织id") + private String supvOrgId; + + private String supvOrgName; + + @ApiModelProperty("计划监督时间") + private LocalDate planSupvDate; + + @ApiModelProperty("计划状态") + private String planStatus; + + @ApiModelProperty("更新人id") + private String updateUserId; + + private String updateUserName; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime updateTime; + + @ApiModelProperty("取消标识") + private String deleteFlag; + + @ApiModelProperty("当取消标识为1时必填") + private LocalDate deleteTime; + + @ApiModelProperty("上次变更记录主键, 从第二次变更起为必填") + private String parentId; + + @ApiModelProperty("调整时间, 审核通过时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime adjustTime; + + + } +} 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 4589b3d2a..5c2fff038 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 @@ -152,6 +152,8 @@ public class SupvPlanParam extends BaseParam { @ApiModelProperty(value = "实施人") private String effectUserId; + @ApiModelProperty(value = "计划状态") + private String planStatus; @EqualsAndHashCode(callSuper = true) @Data @@ -160,6 +162,12 @@ public class SupvPlanParam extends BaseParam { @ApiModelProperty(value = "索引",required = true) @NotBlank(message = "计划索引不可为空") private String planId; + + @ApiModelProperty("其他要求") + private String otherRemarkHis; + + @ApiModelProperty("调整原因") + private String applyCommentHis; } } diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarm.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarm.java new file mode 100644 index 000000000..93c5b0053 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarm.java @@ -0,0 +1,125 @@ +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; +import java.time.LocalDateTime; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Data +@TableName("supv_alarm") +@ApiModel(value = "SupvAlarm对象", description = "") +public class SupvAlarm { + + private static final long serialVersionUID = 1L; + + @TableId("Alarm_Id") + private String alarmId; + + @ApiModelProperty("省id") + @TableField("Province_Id") + private String provinceId; + + @ApiModelProperty("省名称") + @TableField("province_Name") + private String provinceName; + + @ApiModelProperty("单据类别") + @TableField("bill_Type") + private String billType; + + @ApiModelProperty("单据编号") + @TableField("bill_No") + private String billNo; + + @ApiModelProperty("单据名称") + @TableField("bill_Name") + private String billName; + + @ApiModelProperty("编制单位id,取ISC平台上的组织id (sys_dept)") + @TableField("creater_Org_Id") + private String createrOrgId; + + @ApiModelProperty("编制单位名称,取ISC平台上的组织名称") + @TableField("creater_Org_Name") + private String createrOrgName; + + @ApiModelProperty("所属专业,见3.11(字典)") + @TableField("speciality_Type") + private String specialityType; + + @ApiModelProperty("责任单位id,取ISC平台上的组织id") + @TableField("org_Id") + private String orgId; + + @ApiModelProperty("责任单位名称,取ISC平台上的组织名称") + @TableField("org_Name") + private String orgName; + + @ApiModelProperty("接收人id,取ISC平台上的人员id") + @TableField("receive_UserId") + + private String receiveUserId; + + @ApiModelProperty("接收人名称,取ISC平台上的人员名称") + @TableField("receive_User_Name") + private String receiveUserName; + + @ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss") + @TableField("creater_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime createrTime; + + @ApiModelProperty("主管部门id,取ISC平台上的组织id") + @TableField("manager_Dept_Id") + private String managerDeptId; + + @ApiModelProperty("主管部门名称,取ISC平台上的组织名称") + @TableField("manager_Dept_Name") + private String managerDeptName; + + @ApiModelProperty("主送单位id,取ISC平台上的组织id") + @TableField("main_Sender_Id") + private String mainSenderId; + + @ApiModelProperty("主送单位名称,取ISC平台上的组织名称") + @TableField("main_Sender_Name") + private String mainSenderName; + + @ApiModelProperty("抄送单位id,取ISC平台上的组织id") + @TableField("copy_Sender_Id") + private String copySenderId; + + @ApiModelProperty("抄送单位名称,取ISC平台上的组织名称") + @TableField("copy_Sender_Name") + private String copySenderName; + + @ApiModelProperty("依据标准") + @TableField("tech_Supv_Basis") + private String techSupvBasis; + + @ApiModelProperty("问题描述") + @TableField("problem_Desc") + private String problemDesc; + + @ApiModelProperty("处理建议") + @TableField("deal_Advise") + private String dealAdvise; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarmBack.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarmBack.java new file mode 100644 index 000000000..e30f69d22 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvAlarmBack.java @@ -0,0 +1,85 @@ +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; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 技术监督预告警单反馈数据表 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Data +@TableName("supv_alarm_back") +@ApiModel(value = "SupvAlarmBack对象", description = "技术监督预告警单反馈数据表") +public class SupvAlarmBack { + + private static final long serialVersionUID = 1L; + + @TableId("alarm_Back_Id") + private String alarmBackId; + + @TableField("execute_Org_Id") + private String executeOrgId; + + @TableField("execute_Org_Name") + private String executeOrgName; + + @TableField("treatment_Measures") + private String treatmentMeasures; + + @ApiModelProperty("填报人id,取ISC平台上的人员id") + @TableField("fill_User_Id") + private String fillUserId; + + @ApiModelProperty("填报人名称,取ISC平台上的人员名称") + @TableField("fill_User_Name") + private String fillUserName; + + @ApiModelProperty("完成时间 yyyy-MM-dd HH:mm:ss") + @TableField("complete_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime completeTime; + + @ApiModelProperty("告预警单id,关联告预警单表") + @TableField("work_Alarm_Id") + private String workAlarmId; + + @ApiModelProperty("单据编号") + @TableField(exist = false) + private String billNo; + + @ApiModelProperty("单据名称") + @TableField(exist = false) + private String billName; + + + @ApiModelProperty("反馈单位id,取ISC平台上的组织id") + @TableField("feedback_Org_Id") + private String feedbackOrgId; + + @ApiModelProperty("反馈单位名称,取ISC平台上的组织名称") + @TableField("feedback_Org_Name") + private String feedbackOrgName; + + @TableField("province_Id") + private String provinceId; + + @ApiModelProperty("省名称,取ISC平台上的组织名称") + @TableField("province_Name") + private String provinceName; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + + +} 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 08915015f..1cd62f22f 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 @@ -4,14 +4,10 @@ import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.njcn.db.bo.BaseEntity; -import java.io.Serializable; import java.time.LocalDate; import java.time.LocalDateTime; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; /** *

@@ -205,7 +201,7 @@ public class SupvPlan extends BaseEntity { /** * 删除标识 0否1是 */ - private String deleteFlag="0"; + private String deleteFlag = "0"; /** * 计划状态 1新建2变更 3取消 */ diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlanHis.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlanHis.java new file mode 100644 index 000000000..e87e6fcb7 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvPlanHis.java @@ -0,0 +1,95 @@ +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; +import java.time.LocalDate; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 监督工作计划变更历史数据表 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Data +@TableName("supv_plan_his") +@ApiModel(value = "SupvPlanHis对象", description = "监督工作计划变更历史数据表") +public class SupvPlanHis { + + private static final long serialVersionUID = 1L; + + @TableId("Id") + private String id; + + @ApiModelProperty("计划表主键") + @TableField("Plan_Id") + private String planId; + + @ApiModelProperty("计划名称") + @TableField("Work_Plan_Name") + private String workPlanName; + + @ApiModelProperty("监督单位id 取ISC平台上的组织id") + @TableField("Supv_Org_Id") + private String supvOrgId; + + @TableField("Supv_Org_Name") + private String supvOrgName; + + @ApiModelProperty("计划监督时间") + @TableField("plan_Supv_Date") + private LocalDate planSupvDate; + + @ApiModelProperty("其他要求") + @TableField("Other_Remark") + private String otherRemark; + + @ApiModelProperty("调整原因") + @TableField("Apply_Comment") + private String applyComment; + + @ApiModelProperty("计划状态") + @TableField("Plan_Status") + private String planStatus; + + @ApiModelProperty("更新人id") + @TableField("Update_User_Id") + private String updateUserId; + + @TableField("Update_User_Name") + private String updateUserName; + + @TableField("Update_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + + @ApiModelProperty("取消标识") + @TableField("Delete_Flag") + private String deleteFlag; + + @ApiModelProperty("当取消标识为1时必填") + @TableField("Delete_Time") + private LocalDate deleteTime; + + @ApiModelProperty("上次变更记录主键, 从第二次变更起为必填") + @TableField("Parent_Id") + private String parentId; + + @ApiModelProperty("调整时间, 审核通过时间") + @TableField("Adjust_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime adjustTime; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java index b6a421e20..1a7896d1b 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java @@ -6,18 +6,12 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.njcn.db.bo.BaseEntity; -import java.io.Serializable; -import java.time.LocalDate; + import java.time.LocalDateTime; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import org.springframework.format.annotation.DateTimeFormat; - -import javax.validation.constraints.NotBlank; /** *

@@ -27,8 +21,8 @@ import javax.validation.constraints.NotBlank; * @author hongawen * @since 2023-06-21 */ -@EqualsAndHashCode(callSuper = true) @Data +@EqualsAndHashCode(callSuper = true) @TableName("supv_problem") public class SupvProblem extends BaseEntity { @@ -148,18 +142,18 @@ public class SupvProblem extends BaseEntity { private String remark; @TableField(exist = false) - @ApiModelProperty(name = "attachmentName",value = "盖章报告") + @ApiModelProperty(name = "attachmentName", value = "盖章报告") private String attachmentName; @TableField(exist = false) - @ApiModelProperty(name = "attachmentNameTwo",value = "佐证材料") + @ApiModelProperty(name = "attachmentNameTwo", value = "佐证材料") private String attachmentNameTwo; /** * 问题发现时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime discoveryTime; + private LocalDateTime discoveryTime; } diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java index b56997e13..3feff1add 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvPlanVO.java @@ -181,5 +181,6 @@ public class SupvPlanVO { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; - + @ApiModelProperty(value = "计划状态") + private String planStatus; } diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvProblemVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvProblemVO.java new file mode 100644 index 000000000..8696cfcab --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SupvProblemVO.java @@ -0,0 +1,153 @@ +package com.njcn.process.pojo.vo; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.process.pojo.po.SupvProblem; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author hongawen + * @since 2023-06-21 + */ +@Data +public class SupvProblemVO { + + private static final long serialVersionUID = 1L; + + + @Excel(name = "",width = 15) + private String problemId; + + @Excel(name = "",width = 15) + private String workPlanName; + + @Excel(name = "",width = 15) + private String provinceId; + + @Excel(name = "",width = 15) + private String planId; + + @Excel(name = "",width = 15) + private String dutyOrgId; + + @Excel(name = "",width = 15) + private String dutyOrgName; + + @Excel(name = "",width = 15) + private String monitorType; + + + @JsonFormat(pattern = "yyyy-MM-dd") + @TableField(updateStrategy = FieldStrategy.IGNORED) + @Excel(name = "",width = 15) + private LocalDateTime rectificationTime; + + + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "",width = 15) + private LocalDateTime planRectificationTime; + + /** + * 是否发布预告警 + */ + @Excel(name = "",width = 15) + private Integer ifReleaseWarning; + + /** + * 问题简要描述 + */ + @Excel(name = "",width = 15) + private String simpleProblemDesc; + + /** + * 监督标准序号 + */ + @Excel(name = "",width = 15) + private String supvStandardSort; + + /** + * 问题描述 + */ + @Excel(name = "",width = 15) + private String problemDesc; + + /** + * 监督标准 + */ + private String supvStandard; + + /** + * 标准出处 + */ + private String supvResouce; + + /** + * 问题等级 01 一般,02 较大 + */ + private String problemLevel; + + /** + * 定级依据 + */ + private String problemLevelReason; + + /** + * 问题类型 + */ + private String problemType; + + /** + * 整改方案 + */ + private String rectificationProgramme; + + /** + * 整改情况01已整改,02未整改 + */ + private String rectificationStatus; + + + /** + * 整改措施 + */ + private String rectificationMeasure; + + + /** + * 0.以上送 1.未上送 2.取消上送 + */ + private Integer isUploadHead; + + /** + * 备注 + */ + private String remark; + + @TableField(exist = false) + @ApiModelProperty(name = "attachmentName", value = "盖章报告") + private String attachmentName; + + + @TableField(exist = false) + @ApiModelProperty(name = "attachmentNameTwo", value = "佐证材料") + private String attachmentNameTwo; + + /** + * 问题发现时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime discoveryTime; + + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmBackVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmBackVO.java new file mode 100644 index 000000000..15d6b574c --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmBackVO.java @@ -0,0 +1,188 @@ +package com.njcn.process.pojo.vo.gw; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; + +import java.time.LocalDateTime; + +/** + *

+ * 技术监督预告警单反馈数据表 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Getter +public class AlarmBackVO { + + private static final long serialVersionUID = 1L; + + @TableId("alarm_Back_Id") + private String alarmBackId; + + @TableField("execute_Org_Id") + private String executeOrgId; + + @TableField("execute_Org_Name") + private String executeOrgName; + + @TableField("treatment_Measures") + private String treatmentMeasures; + + @ApiModelProperty("填报人id,取ISC平台上的人员id") + @TableField("fill_User_Id") + private String fillUserId; + + @ApiModelProperty("填报人名称,取ISC平台上的人员名称") + @TableField("fill_User_Name") + private String fillUserName; + + @ApiModelProperty("完成时间 yyyy-MM-dd HH:mm:ss") + @TableField("complete_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime completeTime; + + @ApiModelProperty("告预警单id,关联告预警单表") + @TableField("work_Alarm_Id") + private String workAlarmId; + + @ApiModelProperty("单据编号") + @TableField(exist = false) + private String billNo; + + @ApiModelProperty("单据名称") + @TableField(exist = false) + private String billName; + + + @ApiModelProperty("反馈单位id,取ISC平台上的组织id") + @TableField("feedback_Org_Id") + private String feedbackOrgId; + + @ApiModelProperty("反馈单位名称,取ISC平台上的组织名称") + @TableField("feedback_Org_Name") + private String feedbackOrgName; + + @TableField("province_Id") + private String provinceId; + + @ApiModelProperty("省名称,取ISC平台上的组织名称") + @TableField("province_Name") + private String provinceName; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + + public void setAlarmBackId(String alarmBackId) { + if (StrUtil.isNotBlank(alarmBackId)) { + this.alarmBackId = alarmBackId; + } else { + this.alarmBackId = null; + } + } + + public void setExecuteOrgId(String executeOrgId) { + if (StrUtil.isNotBlank(executeOrgId)) { + this.executeOrgId = executeOrgId; + } else { + this.executeOrgId = null; + } + } + + public void setExecuteOrgName(String executeOrgName) { + if (StrUtil.isNotBlank(executeOrgName)) { + this.executeOrgName = executeOrgName; + } else { + this.executeOrgName = null; + } + } + + public void setTreatmentMeasures(String treatmentMeasures) { + if (StrUtil.isNotBlank(treatmentMeasures)) { + this.treatmentMeasures = treatmentMeasures; + } else { + this.treatmentMeasures = null; + } + } + + public void setFillUserId(String fillUserId) { + if (StrUtil.isNotBlank(fillUserId)) { + this.fillUserId = fillUserId; + } else { + this.fillUserId = null; + } + } + + public void setFillUserName(String fillUserName) { + if (StrUtil.isNotBlank(fillUserName)) { + this.fillUserName = fillUserName; + } else { + this.fillUserName = null; + } + } + + public void setCompleteTime(LocalDateTime completeTime) { + this.completeTime = completeTime; + } + + public void setWorkAlarmId(String workAlarmId) { + if (StrUtil.isNotBlank(workAlarmId)) { + this.workAlarmId = workAlarmId; + } else { + this.workAlarmId = null; + } + } + + public void setFeedbackOrgId(String feedbackOrgId) { + if (StrUtil.isNotBlank(feedbackOrgId)) { + this.feedbackOrgId = feedbackOrgId; + } else { + this.feedbackOrgId = null; + } + } + + public void setFeedbackOrgName(String feedbackOrgName) { + if (StrUtil.isNotBlank(feedbackOrgName)) { + this.feedbackOrgName = feedbackOrgName; + } else { + this.feedbackOrgName = null; + } + } + + public void setProvinceId(String provinceId) { + if (StrUtil.isNotBlank(provinceId)) { + this.provinceId = provinceId; + } else { + this.provinceId = null; + } + } + + public void setProvinceName(String provinceName) { + if (StrUtil.isNotBlank(provinceName)) { + this.provinceName = provinceName; + } else { + this.provinceName = null; + } + } + + public void setBillNo(String billNo) { + this.billNo = billNo; + } + + public void setBillName(String billName) { + this.billName = billName; + } + + public void setIsUploadHead(Integer isUploadHead) { + this.isUploadHead = isUploadHead; + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmVO.java new file mode 100644 index 000000000..2aef8d80c --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/AlarmVO.java @@ -0,0 +1,306 @@ +package com.njcn.process.pojo.vo.gw; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; + +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Getter +public class AlarmVO { + + private static final long serialVersionUID = 1L; + + @TableId("Alarm_Id") + private String alarmId; + + @ApiModelProperty("省id") + @TableField("Province_Id") + private String provinceId; + + @ApiModelProperty("省名称") + @TableField("province_Name") + private String provinceName; + + @ApiModelProperty("单据类别") + @TableField("bill_Type") + private String billType; + + @ApiModelProperty("单据编号") + @TableField("bill_No") + private String billNo; + + @ApiModelProperty("单据名称") + @TableField("bill_Name") + private String billName; + + @ApiModelProperty("编制单位id,取ISC平台上的组织id (sys_dept)") + @TableField("creater_Org_Id") + private String createrOrgId; + + @ApiModelProperty("编制单位名称,取ISC平台上的组织名称") + @TableField("creater_Org_Name") + private String createrOrgName; + + @ApiModelProperty("所属专业,见3.11(字典)") + @TableField("speciality_Type") + private String specialityType; + + @ApiModelProperty("责任单位id,取ISC平台上的组织id") + @TableField("org_Id") + private String orgId; + + @ApiModelProperty("责任单位名称,取ISC平台上的组织名称") + @TableField("org_Name") + private String orgName; + + @ApiModelProperty("接收人id,取ISC平台上的人员id") + @TableField("receive_UserId") + private String receiveUserid; + + @ApiModelProperty("接收人名称,取ISC平台上的人员名称") + @TableField("receive_User_Name") + private String receiveUserName; + + @ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss") + @TableField("creater_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime createrTime; + + @ApiModelProperty("主管部门id,取ISC平台上的组织id") + @TableField("manager_Dept_Id") + private String managerDeptId; + + @ApiModelProperty("主管部门名称,取ISC平台上的组织名称") + @TableField("manager_Dept_Name") + private String managerDeptName; + + @ApiModelProperty("主送单位id,取ISC平台上的组织id") + @TableField("main_Sender_Id") + private String mainSenderId; + + @ApiModelProperty("主送单位名称,取ISC平台上的组织名称") + @TableField("main_Sender_Name") + private String mainSenderName; + + @ApiModelProperty("抄送单位id,取ISC平台上的组织id") + @TableField("copy_Sender_Id") + private String copySenderId; + + @ApiModelProperty("抄送单位名称,取ISC平台上的组织名称") + @TableField("copy_Sender_Name") + private String copySenderName; + + @ApiModelProperty("依据标准") + @TableField("tech_Supv_Basis") + private String techSupvBasis; + + @ApiModelProperty("问题描述") + @TableField("problem_Desc") + private String problemDesc; + + @ApiModelProperty("处理建议") + @TableField("deal_Advise") + private String dealAdvise; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + + public void setAlarmId(String alarmId) { + if (StrUtil.isNotBlank(alarmId)) { + this.alarmId = alarmId; + } else { + this.alarmId = null; + } + } + + public void setProvinceId(String provinceId) { + if (StrUtil.isNotBlank(provinceId)) { + this.provinceId = provinceId; + } else { + this.provinceId = null; + } + } + + public void setProvinceName(String provinceName) { + if (StrUtil.isNotBlank(provinceName)) { + this.provinceName = provinceName; + } else { + this.provinceName = null; + } + } + + public void setBillType(String billType) { + if (StrUtil.isNotBlank(billType)) { + this.billType = billType; + } else { + this.billType = null; + } + } + + public void setBillNo(String billNo) { + if (StrUtil.isNotBlank(billNo)) { + this.billNo = billNo; + } else { + this.billNo = null; + } + } + + public void setBillName(String billName) { + if (StrUtil.isNotBlank(billName)) { + this.billName = billName; + } else { + this.billName = null; + } + } + + public void setCreaterOrgId(String createrOrgId) { + if (StrUtil.isNotBlank(createrOrgId)) { + this.createrOrgId = createrOrgId; + } else { + this.createrOrgId = null; + } + } + + public void setCreaterOrgName(String createrOrgName) { + if (StrUtil.isNotBlank(createrOrgName)) { + this.createrOrgName = createrOrgName; + } else { + this.createrOrgName = null; + } + } + + public void setSpecialityType(String specialityType) { + if (StrUtil.isNotBlank(specialityType)) { + this.specialityType = specialityType; + } else { + this.specialityType = null; + } + } + + public void setOrgId(String orgId) { + if (StrUtil.isNotBlank(orgId)) { + this.orgId = orgId; + } else { + this.orgId = null; + } + } + + public void setOrgName(String orgName) { + if (StrUtil.isNotBlank(orgName)) { + this.orgName = orgName; + } else { + this.orgName = null; + } + } + + public void setReceiveUserid(String receiveUserid) { + if (StrUtil.isNotBlank(receiveUserid)) { + this.receiveUserid = receiveUserid; + } else { + this.receiveUserid = null; + } + } + + public void setReceiveUserName(String receiveUserName) { + if (StrUtil.isNotBlank(receiveUserName)) { + this.receiveUserName = receiveUserName; + } else { + this.receiveUserName = null; + } + } + + public void setCreaterTime(LocalDateTime createrTime) { + this.createrTime = createrTime; + } + + public void setManagerDeptId(String managerDeptId) { + if (StrUtil.isNotBlank(managerDeptId)) { + this.managerDeptId = managerDeptId; + } else { + this.managerDeptId = null; + } + } + + public void setManagerDeptName(String managerDeptName) { + if (StrUtil.isNotBlank(managerDeptName)) { + this.managerDeptName = managerDeptName; + } else { + this.managerDeptName = null; + } + } + + public void setMainSenderId(String mainSenderId) { + if (StrUtil.isNotBlank(mainSenderId)) { + this.mainSenderId = mainSenderId; + } else { + this.mainSenderId = null; + } + } + + public void setMainSenderName(String mainSenderName) { + if (StrUtil.isNotBlank(mainSenderName)) { + this.mainSenderName = mainSenderName; + } else { + this.mainSenderName = null; + } + } + + public void setCopySenderId(String copySenderId) { + if (StrUtil.isNotBlank(copySenderId)) { + this.copySenderId = copySenderId; + } else { + this.copySenderId = null; + } + } + + public void setCopySenderName(String copySenderName) { + if (StrUtil.isNotBlank(copySenderName)) { + this.copySenderName = copySenderName; + } else { + this.copySenderName = null; + } + } + + public void setTechSupvBasis(String techSupvBasis) { + if (StrUtil.isNotBlank(techSupvBasis)) { + this.techSupvBasis = techSupvBasis; + } else { + this.techSupvBasis = null; + } + } + + public void setProblemDesc(String problemDesc) { + if (StrUtil.isNotBlank(problemDesc)) { + this.problemDesc = problemDesc; + } else { + this.problemDesc = null; + } + } + + public void setDealAdvise(String dealAdvise) { + if (StrUtil.isNotBlank(dealAdvise)) { + this.dealAdvise = dealAdvise; + } else { + this.dealAdvise = null; + } + } + + public void setIsUploadHead(Integer isUploadHead) { + this.isUploadHead = isUploadHead; + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanHisVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanHisVO.java new file mode 100644 index 000000000..54dd43e65 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanHisVO.java @@ -0,0 +1,210 @@ +package com.njcn.process.pojo.vo.gw; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + *

+ * 监督工作计划变更历史数据表 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Getter + +public class PlanHisVO { + + private static final long serialVersionUID = 1L; + + @TableId("Id") + private String id; + + @ApiModelProperty("计划表主键") + @TableField("Plan_Id") + private String planId; + + @ApiModelProperty("计划名称") + @TableField("Work_Plan_Name") + private String workPlanName; + + @ApiModelProperty("监督单位id 取ISC平台上的组织id") + @TableField("Supv_Org_Id") + private String supvOrgId; + + @TableField("Supv_Org_Name") + private String supvOrgName; + + @ApiModelProperty("计划监督时间") + @TableField("plan_Supv_Date") + private LocalDate planSupvDate; + + @ApiModelProperty("其他要求") + @TableField("Other_Remark") + private String otherRemark; + + @ApiModelProperty("调整原因") + @TableField("Apply_Comment") + private String applyComment; + + @ApiModelProperty("计划状态") + @TableField("Plan_Status") + private String planStatus; + + @ApiModelProperty("更新人id") + @TableField("Update_User_Id") + private String updateUserId; + + @TableField("Update_User_Name") + private String updateUserName; + + @TableField("Update_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + + @ApiModelProperty("取消标识") + @TableField("Delete_Flag") + private String deleteFlag; + + @ApiModelProperty("当取消标识为1时必填") + @TableField("Delete_Time") + private LocalDate deleteTime; + + @ApiModelProperty("上次变更记录主键, 从第二次变更起为必填") + @TableField("Parent_Id") + private String parentId; + + @ApiModelProperty("调整时间, 审核通过时间") + @TableField("Adjust_Time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private LocalDateTime adjustTime; + + @ApiModelProperty("0.以上送 1.未上送 2.取消上送 3.待重新上送") + @TableField("is_upload_head") + private Integer isUploadHead; + + public void setId(String id) { + if (StrUtil.isNotBlank(id)) { + this.id = id; + } else { + this.id = null; + } + } + + public void setPlanId(String planId) { + if (StrUtil.isNotBlank(planId)) { + this.planId = planId; + } else { + this.planId = null; + } + } + + public void setWorkPlanName(String workPlanName) { + if (StrUtil.isNotBlank(workPlanName)) { + this.workPlanName = workPlanName; + } else { + this.workPlanName = null; + } + } + + public void setSupvOrgId(String supvOrgId) { + if (StrUtil.isNotBlank(supvOrgId)) { + this.supvOrgId = supvOrgId; + } else { + this.supvOrgId = null; + } + } + + public void setSupvOrgName(String supvOrgName) { + if (StrUtil.isNotBlank(supvOrgName)) { + this.supvOrgName = supvOrgName; + } else { + this.supvOrgName = null; + } + } + + public void setPlanSupvDate(LocalDate planSupvDate) { + this.planSupvDate = planSupvDate; + } + + public void setOtherRemark(String otherRemark) { + if (StrUtil.isNotBlank(otherRemark)) { + this.otherRemark = otherRemark; + } else { + this.otherRemark = null; + } + } + + public void setApplyComment(String applyComment) { + if (StrUtil.isNotBlank(applyComment)) { + this.applyComment = applyComment; + } else { + this.applyComment = null; + } + } + + public void setPlanStatus(String planStatus) { + if (StrUtil.isNotBlank(planStatus)) { + this.planStatus = planStatus; + } else { + this.planStatus = null; + } + } + + public void setUpdateUserId(String updateUserId) { + if (StrUtil.isNotBlank(updateUserId)) { + this.updateUserId = updateUserId; + } else { + this.updateUserId = null; + } + } + + public void setUpdateUserName(String updateUserName) { + if (StrUtil.isNotBlank(updateUserName)) { + this.updateUserName = updateUserName; + } else { + this.updateUserName = null; + } + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public void setDeleteFlag(String deleteFlag) { + if (StrUtil.isNotBlank(deleteFlag)) { + this.deleteFlag = deleteFlag; + } else { + this.deleteFlag = null; + } + } + + public void setDeleteTime(LocalDate deleteTime) { + this.deleteTime = deleteTime; + } + + public void setParentId(String parentId) { + if (StrUtil.isNotBlank(parentId)) { + this.parentId = parentId; + } else { + this.parentId = null; + } + } + + public void setAdjustTime(LocalDateTime adjustTime) { + this.adjustTime = adjustTime; + } + + public void setIsUploadHead(Integer isUploadHead) { + this.isUploadHead = isUploadHead; + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanVO.java new file mode 100644 index 000000000..c80cd4c33 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/PlanVO.java @@ -0,0 +1,514 @@ +package com.njcn.process.pojo.vo.gw; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * @author wr + * @description + * @date 2023/9/6 9:33 + */ +@Getter +public class PlanVO { + private static final long serialVersionUID = 1L; + + @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 supvType; + + /** + * 监督阶段 + */ + 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 HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime effectStartTime; + + /** + * 计划执行结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime effectEndTime; + + + /** + * 实施状态 + */ + private String effectStatus; + + /** + * 监督对象名称 + */ + + private String supvObjName; + + @TableField(exist = false) + private String supvObjId; + + /** + * 对象类型 + */ + private String supvObjType; + + /** + * 对象电压等级 + */ + private String objVoltageLevel; + + @TableField(exist = false) + private String objVoltageLevelName; + + /** + * 关联电站 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String substationName; + + + /** + * 关联电站电压等级 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String substationVoltageLevel; + + /** + * 关联电站电压等级名称 + */ + @TableField(exist = false) + private String substationVoltageLevelName; + + + /** + * 监督对象属性 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String objType; + + /** + * 监督对象属性名称 + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String objTypeName; + + /** + * 监督对象协议容量(MVA) + */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private Double objCapacity; + + + /** + * 报告出具时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime reportIssueTime; + + /** + * 电能质量问题发生时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime problemOcTime; + + + /** + * 0.未上送 1.上送 2.取消上送 + */ + private Integer isUploadHead; + + /** + * 删除标识 0否1是 + */ + private String deleteFlag = "0"; + /** + * 计划状态 1新建2变更 3取消 + */ + private String planStatus; + /** + * 删除时间 + */ + private LocalDateTime deleteTime; + /** + * 实施人id + */ + private String effectUserId; + /** + * 实施人姓名 + */ + private String effectUserName; + + public void setPlanId(String planId) { + if (StrUtil.isNotBlank(planId)) { + this.planId = planId; + } else { + this.planId = null; + } + + } + + public void setProvinceId(String provinceId) { + if (StrUtil.isNotBlank(provinceId)) { + this.provinceId = provinceId; + } else { + this.provinceId = null; + } + } + + public void setProvinceName(String provinceName) { + if (StrUtil.isNotBlank(provinceName)) { + this.provinceName = provinceName; + } else { + this.provinceName = null; + } + } + + public void setCityId(String cityId) { + if (StrUtil.isNotBlank(cityId)) { + this.cityId = cityId; + } else { + this.cityId = null; + } + + } + + public void setCityName(String cityName) { + if (StrUtil.isNotBlank(cityName)) { + this.cityName = cityName; + } else { + this.cityName = null; + } + } + + public void setCountyId(String countyId) { + if (StrUtil.isNotBlank(countyId)) { + this.countyId = countyId; + } else { + this.countyId = null; + } + } + + public void setCountyName(String countyName) { + if (StrUtil.isNotBlank(countyName)) { + this.countyName = countyName; + } else { + this.countyName = null; + } + } + + public void setWorkPlanName(String workPlanName) { + if (StrUtil.isNotBlank(workPlanName)) { + this.workPlanName = workPlanName; + } else { + this.workPlanName = null; + } + } + + public void setSupvType(String supvType) { + if (StrUtil.isNotBlank(supvType)) { + this.supvType = supvType; + } else { + this.supvType = null; + } + } + + public void setSupvStage(String supvStage) { + if (StrUtil.isNotBlank(supvStage)) { + this.supvStage = supvStage; + } else { + this.supvStage = null; + } + } + + public void setSupvOrgId(String supvOrgId) { + if (StrUtil.isNotBlank(supvOrgId)) { + this.supvOrgId = supvOrgId; + } else { + this.supvOrgId = null; + } + } + + public void setSupvOrgName(String supvOrgName) { + if (StrUtil.isNotBlank(supvOrgName)) { + this.supvOrgName = supvOrgName; + } else { + this.supvOrgName = null; + } + } + + public void setPlanSupvDate(LocalDate planSupvDate) { + this.planSupvDate = planSupvDate; + } + + public void setPlanUserId(String planUserId) { + if (StrUtil.isNotBlank(planUserId)) { + this.planUserId = planUserId; + } else { + this.planUserId = null; + } + } + + public void setPlanUserName(String planUserName) { + if (StrUtil.isNotBlank(planUserName)) { + this.planUserName = planUserName; + } else { + this.planUserName = null; + } + } + + public void setPlanOrgId(String planOrgId) { + if (StrUtil.isNotBlank(planOrgId)) { + this.planOrgId = planOrgId; + } else { + this.planOrgId = null; + } + } + + public void setPlanOrgName(String planOrgName) { + if (StrUtil.isNotBlank(planOrgName)) { + this.planOrgName = planOrgName; + } else { + this.planOrgName = null; + } + } + + public void setOtherRemark(String otherRemark) { + if (StrUtil.isNotBlank(otherRemark)) { + this.otherRemark = otherRemark; + } else { + this.otherRemark = null; + } + } + + public void setEffectStartTime(LocalDateTime effectStartTime) { + this.effectStartTime = effectStartTime; + + } + + public void setEffectEndTime(LocalDateTime effectEndTime) { + this.effectEndTime = effectEndTime; + + } + + public void setEffectStatus(String effectStatus) { + if (StrUtil.isNotBlank(effectStatus)) { + this.effectStatus = effectStatus; + } else { + this.effectStatus = null; + } + } + + public void setSupvObjName(String supvObjName) { + if (StrUtil.isNotBlank(supvObjName)) { + this.supvObjName = supvObjName; + } else { + this.supvObjName = null; + } + } + + public void setSupvObjId(String supvObjId) { + if (StrUtil.isNotBlank(supvObjId)) { + this.supvObjId = supvObjId; + } else { + this.supvObjId = null; + } + } + + public void setSupvObjType(String supvObjType) { + if (StrUtil.isNotBlank(supvObjType)) { + this.supvObjType = supvObjType; + } else { + this.supvObjType = null; + } + } + + public void setObjVoltageLevel(String objVoltageLevel) { + if (StrUtil.isNotBlank(objVoltageLevel)) { + this.objVoltageLevel = objVoltageLevel; + } else { + this.objVoltageLevel = null; + } + } + + public void setObjVoltageLevelName(String objVoltageLevelName) { + if (StrUtil.isNotBlank(objVoltageLevelName)) { + this.objVoltageLevelName = objVoltageLevelName; + } else { + this.objVoltageLevelName = null; + } + } + + public void setSubstationName(String substationName) { + if (StrUtil.isNotBlank(substationName)) { + this.substationName = substationName; + } else { + this.substationName = null; + } + } + + public void setSubstationVoltageLevel(String substationVoltageLevel) { + if (StrUtil.isNotBlank(substationVoltageLevel)) { + this.substationVoltageLevel = substationVoltageLevel; + } else { + this.substationVoltageLevel = null; + } + } + + public void setSubstationVoltageLevelName(String substationVoltageLevelName) { + if (StrUtil.isNotBlank(substationVoltageLevelName)) { + this.substationVoltageLevelName = substationVoltageLevelName; + } else { + this.substationVoltageLevelName = null; + } + } + + public void setObjType(String objType) { + if (StrUtil.isNotBlank(objType)) { + this.objType = objType; + } else { + this.objType = null; + } + } + + public void setObjTypeName(String objTypeName) { + if (StrUtil.isNotBlank(objTypeName)) { + this.objTypeName = objTypeName; + } else { + this.objTypeName = null; + } + } + + public void setObjCapacity(Double objCapacity) { + if (ObjectUtil.isNotNull(objCapacity)) { + this.objCapacity = objCapacity; + } else { + this.objCapacity = null; + } + } + + public void setReportIssueTime(LocalDateTime reportIssueTime) { + this.reportIssueTime = reportIssueTime; + } + + public void setProblemOcTime(LocalDateTime problemOcTime) { + this.problemOcTime = problemOcTime; + } + + public void setIsUploadHead(Integer isUploadHead) { + this.isUploadHead = isUploadHead; + } + + public void setDeleteFlag(String deleteFlag) { + if (StrUtil.isNotBlank(deleteFlag)) { + this.deleteFlag = deleteFlag; + } else { + this.deleteFlag = null; + } + } + + public void setPlanStatus(String planStatus) { + if (StrUtil.isNotBlank(planStatus)) { + this.planStatus = planStatus; + } else { + this.planStatus = null; + } + } + + public void setDeleteTime(LocalDateTime deleteTime) { + this.deleteTime = deleteTime; + } + + public void setEffectUserId(String effectUserId) { + if (StrUtil.isNotBlank(effectUserId)) { + this.effectUserId = effectUserId; + } else { + this.effectUserId = null; + } + } + + public void setEffectUserName(String effectUserName) { + if (StrUtil.isNotBlank(effectUserName)) { + this.effectUserName = effectUserName; + } else { + this.effectUserName = null; + } + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/ProblemVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/ProblemVO.java new file mode 100644 index 000000000..c923e64c2 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/gw/ProblemVO.java @@ -0,0 +1,337 @@ +package com.njcn.process.pojo.vo.gw; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.njcn.db.bo.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author hongawen + * @since 2023-06-21 + */ +@Getter +public class ProblemVO extends BaseEntity { + + private static final long serialVersionUID = 1L; + + @TableId + private String problemId; + + /** + * 所属网省id + */ + @TableField(exist = false) + private String provinceId; + + + /** + * 关联计划表 + */ + private String planId; + + /** + * 责任单位id,取ISC平台上的组织id + */ + private String dutyOrgId; + + @TableField(exist = false) + private String dutyOrgName; + + /** + * 监测点类型 ,仅供电电压监督计划必填 + */ + private String monitorType; + + /** + * 整改时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private LocalDateTime rectificationTime; + + /** + * 计划整改时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime planRectificationTime; + + /** + * 是否发布预告警 + */ + private Integer ifReleaseWarning; + + /** + * 问题简要描述 + */ + private String simpleProblemDesc; + + /** + * 监督标准序号 + */ + private String supvStandardSort; + + /** + * 问题描述 + */ + private String problemDesc; + + /** + * 监督标准 + */ + private String supvStandard; + + /** + * 标准出处 + */ + private String supvResouce; + + /** + * 问题等级 01 一般,02 较大 + */ + private String problemLevel; + + /** + * 定级依据 + */ + private String problemLevelReason; + + /** + * 问题类型 + */ + private String problemType; + + /** + * 整改方案 + */ + private String rectificationProgramme; + + /** + * 整改情况01已整改,02未整改 + */ + private String rectificationStatus; + + + /** + * 整改措施 + */ + private String rectificationMeasure; + + + /** + * 0.以上送 1.未上送 2.取消上送 + */ + private Integer isUploadHead; + + /** + * 备注 + */ + private String remark; + + @TableField(exist = false) + @ApiModelProperty(name = "attachmentName", value = "盖章报告") + private String attachmentName; + + + @TableField(exist = false) + @ApiModelProperty(name = "attachmentNameTwo", value = "佐证材料") + private String attachmentNameTwo; + + /** + * 问题发现时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime discoveryTime; + + public void setProblemId(String problemId) { + if (StrUtil.isNotBlank(problemId)) { + this.problemId = problemId; + } else { + this.problemId = null; + } + } + + public void setProvinceId(String provinceId) { + if (StrUtil.isNotBlank(provinceId)) { + this.provinceId = provinceId; + } else { + this.provinceId = null; + } + } + + public void setPlanId(String planId) { + if (StrUtil.isNotBlank(planId)) { + this.planId = planId; + } else { + this.planId = null; + } + } + + public void setDutyOrgId(String dutyOrgId) { + if (StrUtil.isNotBlank(dutyOrgId)) { + this.dutyOrgId = dutyOrgId; + } else { + this.dutyOrgId = null; + } + } + + public void setDutyOrgName(String dutyOrgName) { + if (StrUtil.isNotBlank(dutyOrgName)) { + this.dutyOrgName = dutyOrgName; + } else { + this.dutyOrgName = null; + } + } + + public void setMonitorType(String monitorType) { + if (StrUtil.isNotBlank(monitorType)) { + this.monitorType = monitorType; + } else { + this.monitorType = null; + } + } + + public void setRectificationTime(LocalDateTime rectificationTime) { + this.rectificationTime = rectificationTime; + } + + public void setPlanRectificationTime(LocalDateTime planRectificationTime) { + this.planRectificationTime = planRectificationTime; + } + + public void setIfReleaseWarning(Integer ifReleaseWarning) { + this.ifReleaseWarning = ifReleaseWarning; + } + + public void setSimpleProblemDesc(String simpleProblemDesc) { + if (StrUtil.isNotBlank(simpleProblemDesc)) { + this.simpleProblemDesc = simpleProblemDesc; + } else { + this.simpleProblemDesc = null; + } + } + + public void setSupvStandardSort(String supvStandardSort) { + if (StrUtil.isNotBlank(supvStandardSort)) { + this.supvStandardSort = supvStandardSort; + } else { + this.supvStandardSort = null; + } + } + + public void setProblemDesc(String problemDesc) { + if (StrUtil.isNotBlank(problemDesc)) { + this.problemDesc = problemDesc; + } else { + this.problemDesc = null; + } + } + + public void setSupvStandard(String supvStandard) { + if (StrUtil.isNotBlank(supvStandard)) { + this.supvStandard = supvStandard; + } else { + this.supvStandard = null; + } + } + + public void setSupvResouce(String supvResouce) { + if (StrUtil.isNotBlank(supvResouce)) { + this.supvResouce = supvResouce; + } else { + this.supvResouce = null; + } + } + + public void setProblemLevel(String problemLevel) { + if (StrUtil.isNotBlank(problemLevel)) { + this.problemLevel = problemLevel; + } else { + this.problemLevel = null; + } + } + + public void setProblemLevelReason(String problemLevelReason) { + if (StrUtil.isNotBlank(problemLevelReason)) { + this.problemLevelReason = problemLevelReason; + } else { + this.problemLevelReason = null; + } + } + + public void setProblemType(String problemType) { + if (StrUtil.isNotBlank(problemType)) { + this.problemType = problemType; + } else { + this.problemType = null; + } + } + + public void setRectificationProgramme(String rectificationProgramme) { + if (StrUtil.isNotBlank(rectificationProgramme)) { + this.rectificationProgramme = rectificationProgramme; + } else { + this.rectificationProgramme = null; + } + } + + public void setRectificationStatus(String rectificationStatus) { + if (StrUtil.isNotBlank(rectificationStatus)) { + this.rectificationStatus = rectificationStatus; + } else { + this.rectificationStatus = null; + } + } + + public void setRectificationMeasure(String rectificationMeasure) { + if (StrUtil.isNotBlank(rectificationMeasure)) { + this.rectificationMeasure = rectificationMeasure; + } else { + this.rectificationMeasure = null; + } + } + + public void setIsUploadHead(Integer isUploadHead) { + this.isUploadHead = isUploadHead; + } + + public void setRemark(String remark) { + if (StrUtil.isNotBlank(remark)) { + this.remark = remark; + } else { + this.remark = null; + } + } + + public void setAttachmentName(String attachmentName) { + if (StrUtil.isNotBlank(attachmentName)) { + this.attachmentName = attachmentName; + } else { + this.attachmentName = null; + } + } + + public void setAttachmentNameTwo(String attachmentNameTwo) { + if (StrUtil.isNotBlank(attachmentNameTwo)) { + this.attachmentNameTwo = attachmentNameTwo; + } else { + this.attachmentNameTwo = null; + } + this.attachmentNameTwo = attachmentNameTwo; + } + + public void setDiscoveryTime(LocalDateTime discoveryTime) { + this.discoveryTime = discoveryTime; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmBackController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmBackController.java new file mode 100644 index 000000000..ea18a754f --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmBackController.java @@ -0,0 +1,82 @@ +package com.njcn.process.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.constant.OperateType; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.process.pojo.param.SupvAlarmBackParam; +import com.njcn.process.pojo.po.SupvAlarmBack; +import com.njcn.process.service.ISupvAlarmBackService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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 com.njcn.web.controller.BaseController; + +import java.util.List; + +/** + *

+ * 技术监督预告警单反馈数据表 前端控制器 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@RestController +@Api(tags ="预告警单反馈") +@RequestMapping("/supvAlarmBack") +@RequiredArgsConstructor +public class SupvAlarmBackController extends BaseController { + + private final ISupvAlarmBackService supvAlarmBackService; + + @PostMapping("addAlarmBack") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("新增预告警单反馈") + public HttpResult addAlarmBack(@RequestBody @Validated SupvAlarmBackParam.AlarmBackInsert insert){ + String methodDescribe = getMethodDescribe("addAlarmBack"); + Boolean b = supvAlarmBackService.addAlarmBack(insert); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("updateAlarmBack") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("修改预告警单反馈") + public HttpResult updateAlarmBack(@RequestBody @Validated SupvAlarmBackParam.AlarmBackUpdate update){ + String methodDescribe = getMethodDescribe("updateAlarmBack"); + Boolean b = supvAlarmBackService.updateAlarmBack(update); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("delAlarmBack") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("删除预告警单反馈") + @ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true) + public HttpResult delAlarmBack(@RequestBody List planIds){ + String methodDescribe = getMethodDescribe("delAlarmBack"); + Boolean b = supvAlarmBackService.delAlarmBack(planIds); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("pageAlarmBack") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("分页查询预告警单反馈") + @ApiImplicitParam(name = "param",value = "请求体",required = true) + public HttpResult> pageAlarmBack(@RequestBody SupvAlarmBackParam param){ + String methodDescribe = getMethodDescribe("pagePlanHis"); + Page supvPlanHisPage = supvAlarmBackService.pageAlarmBack(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe); + } +} + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmController.java new file mode 100644 index 000000000..b8d06c2bd --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvAlarmController.java @@ -0,0 +1,83 @@ +package com.njcn.process.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.constant.OperateType; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.process.pojo.param.SupvAlarmParam; +import com.njcn.process.pojo.po.SupvAlarm; +import com.njcn.process.service.ISupvAlarmService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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 com.njcn.web.controller.BaseController; + +import java.util.List; + +/** + *

+ * 前端控制器 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@RestController +@Api(tags ="预告警单") +@RequestMapping("/supvAlarm") +@RequiredArgsConstructor +public class SupvAlarmController extends BaseController { + + private final ISupvAlarmService supvAlarmService; + + @PostMapping("addAlarm") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("新增预告警单") + public HttpResult addAlarm(@RequestBody @Validated SupvAlarmParam.AlarmInsert insert){ + String methodDescribe = getMethodDescribe("addAlarm"); + Boolean b = supvAlarmService.addAlarm(insert); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("updateAlarm") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("修改预告警单") + public HttpResult updateAlarm(@RequestBody @Validated SupvAlarmParam.AlarmUpdate update){ + String methodDescribe = getMethodDescribe("updateAlarm"); + Boolean b = supvAlarmService.updateAlarm(update); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("delAlarm") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("删除预告警单") + @ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true) + public HttpResult delAlarm(@RequestBody List planIds){ + String methodDescribe = getMethodDescribe("delAlarm"); + Boolean b = supvAlarmService.delAlarm(planIds); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("pageAlarm") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("分页查询预告警单") + @ApiImplicitParam(name = "param",value = "请求体",required = true) + public HttpResult> pageAlarm(@RequestBody SupvAlarmParam param){ + String methodDescribe = getMethodDescribe("pageAlarm"); + Page supvPlanHisPage = supvAlarmService.pageAlarm(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe); + } + +} + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPlanHisController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPlanHisController.java new file mode 100644 index 000000000..792e2bd6d --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvPlanHisController.java @@ -0,0 +1,82 @@ +package com.njcn.process.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.constant.OperateType; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.process.pojo.param.SupvPlanHisParam; +import com.njcn.process.pojo.po.SupvPlanHis; +import com.njcn.process.service.ISupvPlanHisService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +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 com.njcn.web.controller.BaseController; + +import java.util.List; + +/** + *

+ * 监督工作计划变更历史数据表 前端控制器 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@RestController +@RequestMapping("/supvPlanHis") +@Api(tags ="计划历史记录") +@RequiredArgsConstructor +public class SupvPlanHisController extends BaseController { + + private final ISupvPlanHisService supvPlanHisService; + + @PostMapping("addPlanHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("新增技术监督计划历史记录") + public HttpResult addPlanHis(@RequestBody @Validated SupvPlanHisParam.insert insert){ + String methodDescribe = getMethodDescribe("addPlanHis"); + Boolean b = supvPlanHisService.addPlanHis(insert); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("updatePlanHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("修改技术监督计划历史记录") + public HttpResult updatePlanHis(@RequestBody @Validated SupvPlanHisParam.update update){ + String methodDescribe = getMethodDescribe("updatePlanHis"); + Boolean b = supvPlanHisService.updatePlanHis(update); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("delPlanHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) + @ApiOperation("删除监督计划历史记录") + @ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true) + public HttpResult delPlanHis(@RequestBody List planIds){ + String methodDescribe = getMethodDescribe("delPlanHis"); + Boolean b = supvPlanHisService.delPlanHis(planIds); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe); + } + + @PostMapping("pagePlanHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("分页查询监督计划历史记录") + @ApiImplicitParam(name = "param",value = "请求体",required = true) + public HttpResult> pagePlanHis(@RequestBody SupvPlanHisParam param){ + String methodDescribe = getMethodDescribe("pagePlanHis"); + Page supvPlanHisPage = supvPlanHisService.pagePlanHis(param); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe); + } +} + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvProblemController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvProblemController.java index 9ec870a1e..7e3cd3c70 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvProblemController.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvProblemController.java @@ -2,7 +2,6 @@ package com.njcn.process.controller; import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.constant.OperateType; @@ -12,12 +11,9 @@ import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.process.pojo.param.SupvProblemParam; -import com.njcn.process.pojo.po.SupvFile; import com.njcn.process.pojo.po.SupvProblem; +import com.njcn.process.pojo.vo.SupvProblemVO; import com.njcn.process.service.ISupvProblemService; -import com.njcn.system.api.DicDataFeignClient; -import com.njcn.user.api.DeptFeignClient; -import com.njcn.user.pojo.vo.PvTerminalTreeVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -31,10 +27,6 @@ import org.springframework.web.bind.annotation.RestController; import com.njcn.web.controller.BaseController; import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; /** *

@@ -53,10 +45,6 @@ public class SupvProblemController extends BaseController { private final ISupvProblemService iSupvProblemService; - - - - @PostMapping("addProblem") @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) @ApiOperation("新增技术监督问题") @@ -99,5 +87,13 @@ public class SupvProblemController extends BaseController { Page page = iSupvProblemService.pageProblem(supvProblemParam); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); } + + @PostMapping("problemList") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("所有监督问题") + @ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true) + public void problemList(@RequestBody SupvProblemParam supvProblemParam){ + iSupvProblemService.problemList(supvProblemParam); + } } 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 0007120d5..492a877bb 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 @@ -125,4 +125,33 @@ public class SupvPushGwController extends BaseController { String s = supvPushGwService.deletePlan(planIds); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe); } + + + @PostMapping("pushPlanHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("推送工作计划变更历史数据接口") + public HttpResult pushPlanHis(@RequestBody List ids){ + String methodDescribe = getMethodDescribe("pushPlanHis"); + String s = supvPushGwService.pushPlanHis(ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe); + } + + @PostMapping("pushAlarm") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("推送电能质量技术监督预告警单数据接口") + public HttpResult pushAlarm(@RequestBody List ids){ + String methodDescribe = getMethodDescribe("pushAlarm"); + String s = supvPushGwService.pushAlarm(ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe); + } + + @PostMapping("pushAlarmHis") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("推送电能质量技术监督预告警单反馈数据接口") + public HttpResult pushAlarmHis(@RequestBody List ids){ + String methodDescribe = getMethodDescribe("pushAlarmHis"); + String s = supvPushGwService.pushAlarmHis(ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe); + } + } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmBackMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmBackMapper.java new file mode 100644 index 000000000..2b4cb80d6 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmBackMapper.java @@ -0,0 +1,24 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.process.pojo.param.SupvAlarmBackParam; +import com.njcn.process.pojo.po.SupvAlarmBack; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + *

+ * 技术监督预告警单反馈数据表 Mapper 接口 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface SupvAlarmBackMapper extends BaseMapper { + + + Page pageAlarmBack(Page objectPage,@Param("ids") List ids,@Param("param") SupvAlarmBackParam param); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmMapper.java new file mode 100644 index 000000000..985a9df20 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvAlarmMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.SupvAlarm; + +/** + *

+ * Mapper 接口 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface SupvAlarmMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvPlanHisMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvPlanHisMapper.java new file mode 100644 index 000000000..08920d53a --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvPlanHisMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.SupvPlanHis; + +/** + *

+ * 监督工作计划变更历史数据表 Mapper 接口 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface SupvPlanHisMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvProblemMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvProblemMapper.java index c9baf0d1a..8eac2f7ca 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvProblemMapper.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvProblemMapper.java @@ -2,9 +2,13 @@ package com.njcn.process.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.param.SupvProblemParam; import com.njcn.process.pojo.po.SupvProblem; +import com.njcn.process.pojo.vo.SupvProblemVO; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** *

* Mapper 接口 @@ -17,4 +21,6 @@ public interface SupvProblemMapper extends BaseMapper { Boolean updateId(@Param("isUploadHead")Integer isUploadHead, @Param("id") String id); + + List listDerive(@Param("param") SupvProblemParam supvProblemParam); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java index 92c05de47..4d574fcda 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java @@ -23,8 +23,14 @@ public interface SupvReportMMapper extends MppBaseMapper { List statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType,@Param("effectStatus")List effectStatus); - + //问题数据 List statisticQueReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType); + + //问题整改数量 + List statisticQueReportRectify(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType); + + + Boolean updateId(@Param("isUploadHead")Integer isUploadHead, @Param("id") String id); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmBackMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmBackMapper.xml new file mode 100644 index 000000000..a50694556 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmBackMapper.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmMapper.xml new file mode 100644 index 000000000..9a13b9ef4 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvAlarmMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvPlanHisMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvPlanHisMapper.xml new file mode 100644 index 000000000..61a6ab04e --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvPlanHisMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvProblemMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvProblemMapper.xml index ab80c0ab5..c1178b56c 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvProblemMapper.xml +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvProblemMapper.xml @@ -5,4 +5,13 @@ update supv_problem set is_upload_head= #{isUploadHead} where problem_Id=#{id} + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml index 3aba72ba5..46915cc84 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml @@ -40,4 +40,21 @@ group by a.duty_Org_Id + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmBackService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmBackService.java new file mode 100644 index 000000000..6d97ac669 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmBackService.java @@ -0,0 +1,28 @@ +package com.njcn.process.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.process.pojo.param.SupvAlarmBackParam; +import com.njcn.process.pojo.po.SupvAlarmBack; + +import java.util.List; + +/** + *

+ * 技术监督预告警单反馈数据表 服务类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface ISupvAlarmBackService extends IService { + + + boolean addAlarmBack(SupvAlarmBackParam.AlarmBackInsert param); + + boolean updateAlarmBack(SupvAlarmBackParam.AlarmBackUpdate param); + + boolean delAlarmBack(List planIds); + + Page pageAlarmBack(SupvAlarmBackParam param); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmService.java new file mode 100644 index 000000000..0973bf878 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvAlarmService.java @@ -0,0 +1,27 @@ +package com.njcn.process.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.process.pojo.param.SupvAlarmParam; +import com.njcn.process.pojo.po.SupvAlarm; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface ISupvAlarmService extends IService { + + boolean addAlarm(SupvAlarmParam.AlarmInsert param); + + boolean updateAlarm(SupvAlarmParam.AlarmUpdate param); + + boolean delAlarm(List planIds); + + Page pageAlarm(SupvAlarmParam param); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvPlanHisService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvPlanHisService.java new file mode 100644 index 000000000..d956d8e52 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvPlanHisService.java @@ -0,0 +1,28 @@ +package com.njcn.process.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.process.pojo.param.SupvPlanHisParam; +import com.njcn.process.pojo.po.SupvPlanHis; + +import java.util.List; + +/** + *

+ * 监督工作计划变更历史数据表 服务类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +public interface ISupvPlanHisService extends IService { + + + boolean addPlanHis(SupvPlanHisParam.insert supvPlanHis); + + boolean updatePlanHis(SupvPlanHisParam.update supvPlanHis); + + boolean delPlanHis(List planIds); + + Page pagePlanHis(SupvPlanHisParam supvPlanParam); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvProblemService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvProblemService.java index c40e1c800..09e57f5b8 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvProblemService.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvProblemService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.process.pojo.param.SupvProblemParam; import com.njcn.process.pojo.po.SupvProblem; -import com.njcn.process.pojo.po.SupvProblem; +import com.njcn.process.pojo.vo.SupvProblemVO; import java.util.List; @@ -48,4 +48,12 @@ public interface ISupvProblemService extends IService { */ Page pageProblem(SupvProblemParam supvProblemParam); + /** + * @Description: 查询所有问题信息 + * @param supvProblemParam + * @return: java.util.List + * @Author: wr + * @Date: 2023/9/1 9:44 + */ + void problemList(SupvProblemParam supvProblemParam); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/SupvPushGwService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/SupvPushGwService.java index 5ffb80fba..c4c62b008 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/SupvPushGwService.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/SupvPushGwService.java @@ -48,4 +48,30 @@ public interface SupvPushGwService { * @date 2023/6/28 */ String deletePlan(List planIds); + + /** + * @Description: + * @param ids + * @return: java.lang.String + * @Author: wr + * @Date: 2023/9/5 10:25 + */ + String pushPlanHis(List ids); + + /** + * @Description: + * @param ids + * @return: java.lang.String + * @Author: wr + * @Date: 2023/9/5 10:27 + */ + String pushAlarm(List ids); + /** + * @Description: + * @param ids + * @return: java.lang.String + * @Author: wr + * @Date: 2023/9/5 10:35 + */ + String pushAlarmHis(List ids); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmBackServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmBackServiceImpl.java new file mode 100644 index 000000000..25914a0ce --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmBackServiceImpl.java @@ -0,0 +1,82 @@ +package com.njcn.process.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.process.mapper.SupvAlarmBackMapper; +import com.njcn.process.pojo.param.SupvAlarmBackParam; +import com.njcn.process.pojo.po.SupvAlarm; +import com.njcn.process.pojo.po.SupvAlarmBack; +import com.njcn.process.service.ISupvAlarmBackService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.po.Dept; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 技术监督预告警单反馈数据表 服务实现类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Service +@RequiredArgsConstructor +public class SupvAlarmBackServiceImpl extends ServiceImpl implements ISupvAlarmBackService { + + private final DeptFeignClient deptFeignClient; + @Value("${gw.code}") + private String code; + @Override + public boolean addAlarmBack(SupvAlarmBackParam.AlarmBackInsert param) { + //获取省单位 + Dept data = deptFeignClient.getDeptByCode(code).getData(); + SupvAlarmBack supvAlarmBack = BeanUtil.copyProperties(param, SupvAlarmBack.class); + supvAlarmBack.setProvinceId(data.getCode()); + supvAlarmBack.setProvinceName(data.getName()); + supvAlarmBack.setIsUploadHead(0); + return this.save(supvAlarmBack); + } + + @Override + public boolean updateAlarmBack(SupvAlarmBackParam.AlarmBackUpdate param) { + SupvAlarmBack supvAlarmBack = BeanUtil.copyProperties(param, SupvAlarmBack.class); + SupvAlarmBack byId = this.getById(param.getAlarmBackId()); + if(1==byId.getIsUploadHead()){ + supvAlarmBack.setIsUploadHead(3); + } + return this.updateById(supvAlarmBack); + } + + @Override + public boolean delAlarmBack(List ids) { + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.ne(SupvAlarmBack::getIsUploadHead, 0).eq(SupvAlarmBack::getWorkAlarmId, ids); + int count = this.count(lambdaQueryWrapper); + if (count > 0) { + throw new BusinessException("请选择未上送国网的删除"); + } + return this.removeByIds(ids); + } + + @Override + public Page pageAlarmBack(SupvAlarmBackParam param) { + List deptIds=new ArrayList<>(); + if(StrUtil.isNotBlank(param.getOrgId())){ + deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getOrgId()).getData(); + } + Page page = this.baseMapper.pageAlarmBack(new Page<>(param.getPageNum(), param.getPageSize()), + deptIds,param + ); + return page; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmServiceImpl.java new file mode 100644 index 000000000..ac8cd3585 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvAlarmServiceImpl.java @@ -0,0 +1,82 @@ +package com.njcn.process.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.process.mapper.SupvAlarmMapper; +import com.njcn.process.pojo.param.SupvAlarmParam; +import com.njcn.process.pojo.po.SupvAlarm; +import com.njcn.process.pojo.po.SupvPlanHis; +import com.njcn.process.service.ISupvAlarmService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.po.Dept; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 服务实现类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Service +@RequiredArgsConstructor +public class SupvAlarmServiceImpl extends ServiceImpl implements ISupvAlarmService { + + private final DeptFeignClient deptFeignClient; + + @Value("${gw.code}") + private String code; + @Override + public boolean addAlarm(SupvAlarmParam.AlarmInsert param) { + //获取省单位 + Dept data = deptFeignClient.getDeptByCode(code).getData(); + SupvAlarm supvAlarm = BeanUtil.copyProperties(param, SupvAlarm.class); + supvAlarm.setProvinceId(data.getCode()); + supvAlarm.setProvinceName(data.getName()); + supvAlarm.setIsUploadHead(0); + return this.save(supvAlarm); + } + + @Override + public boolean updateAlarm(SupvAlarmParam.AlarmUpdate param) { + SupvAlarm supvAlarm = BeanUtil.copyProperties(param, SupvAlarm.class); + SupvAlarm byId = this.getById(param.getAlarmId()); + if(1==byId.getIsUploadHead()){ + supvAlarm.setIsUploadHead(3); + } + return this.updateById(supvAlarm); + } + + @Override + public boolean delAlarm(List planIds) { + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.ne(SupvAlarm::getIsUploadHead, 0).eq(SupvAlarm::getAlarmId, planIds); + int count = this.count(lambdaQueryWrapper); + if (count > 0) { + throw new BusinessException("请选择未上送国网的删除"); + } + return this.removeByIds(planIds); + } + + @Override + public Page pageAlarm(SupvAlarmParam param) { + List deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getOrgId()).getData(); + Page page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), + new LambdaQueryWrapper().in(SupvAlarm::getCreaterOrgId, deptIds) + .between(SupvAlarm::getCreaterTime, + DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())), + DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))) + + ); + return page; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanHisServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanHisServiceImpl.java new file mode 100644 index 000000000..042a76ff1 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanHisServiceImpl.java @@ -0,0 +1,82 @@ +package com.njcn.process.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.njcn.common.pojo.exception.BusinessException; +import com.njcn.process.mapper.SupvPlanHisMapper; +import com.njcn.process.pojo.param.SupvPlanHisParam; +import com.njcn.process.pojo.po.SupvPlan; +import com.njcn.process.pojo.po.SupvPlanHis; +import com.njcn.process.pojo.po.SupvProblem; +import com.njcn.process.service.ISupvPlanHisService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.process.service.ISupvPlanService; +import com.njcn.user.api.DeptFeignClient; +import com.njcn.user.pojo.po.Dept; +import com.njcn.web.utils.RequestUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; + +/** + *

+ * 监督工作计划变更历史数据表 服务实现类 + *

+ * + * @author wr + * @since 2023-09-01 + */ +@Service +@RequiredArgsConstructor +public class SupvPlanHisServiceImpl extends ServiceImpl implements ISupvPlanHisService { + + private final DeptFeignClient deptFeignClient; + @Override + public boolean addPlanHis(SupvPlanHisParam.insert supvPlanHis) { + + return true; + } + + @Override + public boolean updatePlanHis(SupvPlanHisParam.update supvPlanHis) { + SupvPlanHis planHis = BeanUtil.copyProperties(supvPlanHis, SupvPlanHis.class); + SupvPlanHis byId = this.getById(supvPlanHis.getId()); + if(1==byId.getIsUploadHead()){ + planHis.setIsUploadHead(3); + } + return this.updateById(planHis); + } + + @Override + public boolean delPlanHis(List planIds) { + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(SupvPlanHis::getIsUploadHead, 1).eq(SupvPlanHis::getId, planIds); + int count = this.count(lambdaQueryWrapper); + if (count > 0) { + throw new BusinessException("请选择未上送国网的删除"); + } + return this.removeByIds(planIds); + } + + @Override + public Page pagePlanHis(SupvPlanHisParam supvPlanParam) { + List deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getOrgId()).getData(); + Page page = this.page(new Page<>(supvPlanParam.getPageNum(), supvPlanParam.getPageSize()), + new LambdaQueryWrapper().in(SupvPlanHis::getSupvOrgId, deptIds) + .between(SupvPlanHis::getAdjustTime, + DateUtil.beginOfDay(DateUtil.parse(supvPlanParam.getSearchBeginTime())), + DateUtil.endOfDay(DateUtil.parse(supvPlanParam.getSearchEndTime()))) + + ); + return page; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java index a7d66eac5..da6f99308 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPlanServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -21,9 +22,11 @@ import com.njcn.process.mapper.SupvProblemMapper; import com.njcn.process.pojo.param.SupvPlanParam; import com.njcn.process.pojo.po.SupvFile; import com.njcn.process.pojo.po.SupvPlan; +import com.njcn.process.pojo.po.SupvPlanHis; import com.njcn.process.pojo.po.SupvProblem; import com.njcn.process.pojo.vo.SupvPlanVO; import com.njcn.process.service.ISupvFileService; +import com.njcn.process.service.ISupvPlanHisService; import com.njcn.process.service.ISupvPlanService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataEnum; @@ -32,6 +35,7 @@ import com.njcn.system.enums.SystemResponseEnum; import com.njcn.system.pojo.po.DictData; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.api.UserFeignClient; +import com.njcn.user.pojo.po.Dept; import com.njcn.user.pojo.po.User; import com.njcn.user.pojo.vo.PvTerminalTreeVO; import com.njcn.web.factory.PageFactory; @@ -40,10 +44,12 @@ import liquibase.pro.packaged.L; import liquibase.pro.packaged.S; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; import java.util.Map; import java.util.Objects; @@ -74,9 +80,11 @@ public class SupvPlanServiceImpl extends ServiceImpl i private final SupvProblemMapper supvProblemMapper; private final FileStorageUtil fileStorageUtil; + private final ISupvPlanHisService supvPlanHisService; @Override + @Transactional(rollbackFor = Exception.class) public boolean addPlan(SupvPlanParam supvPlanParam) { checkParam(supvPlanParam, false); SupvPlan supvPlan = new SupvPlan(); @@ -124,6 +132,7 @@ public class SupvPlanServiceImpl extends ServiceImpl i } @Override + @Transactional(rollbackFor = Exception.class) public boolean updatePlan(SupvPlanParam supvPlanParam) { checkParam(supvPlanParam, true); SupvPlan supvPlan = new SupvPlan(); @@ -148,9 +157,6 @@ public class SupvPlanServiceImpl extends ServiceImpl i } } - - - if(!"01".equals(supvPlan.getEffectStatus())){ if(Objects.isNull(supvPlan.getEffectStartTime()) ){ throw new BusinessException("开始实施时间不可为空!"); @@ -162,14 +168,50 @@ public class SupvPlanServiceImpl extends ServiceImpl i throw new BusinessException("结束实施时间不可为空!"); } } - this.updateById(supvPlan); - return true; + SupvPlan byId = this.getById(supvPlan.getPlanId()); + if(1==byId.getIsUploadHead()){ + supvPlan.setIsUploadHead(3); + + SupvPlanHis planHis=new SupvPlanHis(); + planHis.setPlanId(supvPlan.getPlanId()); + planHis.setWorkPlanName(supvPlan.getWorkPlanName()); + planHis.setSupvOrgId(supvPlan.getSupvOrgId()); + Dept data = deptFeignClient.getDeptByCode(supvPlan.getSupvOrgId()).getData(); + if(ObjectUtil.isNull(data)){ + throw new BusinessException("监督单位不存在,请检查监督计划单位字段"); + } + planHis.setSupvOrgName(data.getName()); + planHis.setPlanSupvDate(supvPlan.getPlanSupvDate()); + if (supvPlanParam instanceof SupvPlanParam.UpdateSupvPlanParam) { + planHis.setOtherRemark(((SupvPlanParam.UpdateSupvPlanParam) supvPlanParam).getOtherRemarkHis()); + planHis.setApplyComment(((SupvPlanParam.UpdateSupvPlanParam) supvPlanParam).getApplyCommentHis()); + } + planHis.setPlanStatus(supvPlanParam.getPlanStatus()); + planHis.setUpdateUserId(RequestUtil.getUserIndex()); + planHis.setUpdateUserName(RequestUtil.getUserNickname()); + planHis.setUpdateTime(LocalDateTime.now()); + planHis.setDeleteFlag("0"); + //判断是否已存在问题 + List list = supvPlanHisService.list(new LambdaQueryWrapper() + .eq(SupvPlanHis::getPlanId, planHis.getPlanId()) + .orderByDesc(SupvPlanHis::getUpdateTime) + + ); + if(CollUtil.isNotEmpty(list)){ + planHis.setParentId(list.get(0).getId()); + } + planHis.setAdjustTime(LocalDateTime.now()); + planHis.setIsUploadHead(0); + supvPlanHisService.save(planHis); + } + return this.updateById(supvPlan); } @Override + @Transactional(rollbackFor = Exception.class) public boolean delPlan(List planIds) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(SupvPlan::getIsUploadHead, 1).eq(SupvPlan::getPlanId, planIds); + lambdaQueryWrapper.ne(SupvPlan::getIsUploadHead, 0).eq(SupvPlan::getPlanId, planIds); int count = this.count(lambdaQueryWrapper); if (count > 0) { throw new BusinessException("请选择未上送国网的删除"); diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java index f8a9ceca0..f6f41f80e 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java @@ -3,23 +3,21 @@ package com.njcn.process.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.utils.PubUtils; +import com.njcn.device.pq.pojo.vo.PqsLineWeightVo; import com.njcn.oss.utils.FileStorageUtil; -import com.njcn.process.enums.ProcessResponseEnum; +import com.njcn.poi.excel.ExcelUtil; import com.njcn.process.mapper.SupvFileMapper; import com.njcn.process.mapper.SupvProblemMapper; import com.njcn.process.pojo.param.SupvProblemParam; import com.njcn.process.pojo.po.SupvFile; -import com.njcn.process.pojo.po.SupvPlan; -import com.njcn.process.pojo.po.SupvProblem; import com.njcn.process.pojo.po.SupvProblem; +import com.njcn.process.pojo.vo.SupvProblemVO; import com.njcn.process.service.ISupvProblemService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.user.api.DeptFeignClient; @@ -27,10 +25,10 @@ import com.njcn.user.pojo.vo.PvTerminalTreeVO; import com.njcn.web.factory.PageFactory; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -55,6 +53,7 @@ public class SupvProblemServiceImpl extends ServiceImpl problemIds) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(SupvProblem::getIsUploadHead, 1).eq(SupvProblem::getProblemId, problemIds); + lambdaQueryWrapper.ne(SupvProblem::getIsUploadHead, 0).eq(SupvProblem::getProblemId, problemIds); int count = this.count(lambdaQueryWrapper); if (count > 0) { throw new BusinessException("请选择未上送国网的删除"); @@ -128,5 +133,13 @@ public class SupvProblemServiceImpl extends ServiceImpl supvProblemVOS = this.baseMapper.listDerive(supvProblemParam); +// List weightExcels = this.baseMapper.selectWeights(terminalMainQueryParam); +// ExcelUtil.exportExcel("监测点权重信息.xlsx",PqsLineWeightVo.WeightExcel.class,weightExcels); + + } + } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java index a0987d1ca..2aed1dac9 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java @@ -1,5 +1,6 @@ package com.njcn.process.service.impl; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; @@ -9,6 +10,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.oss.utils.FileStorageUtil; import com.njcn.process.mapper.SupvFileMapper; @@ -16,10 +18,11 @@ import com.njcn.process.mapper.SupvPlanMapper; import com.njcn.process.mapper.SupvProblemMapper; import com.njcn.process.mapper.SupvReportMMapper; import com.njcn.process.pojo.param.SendParam; -import com.njcn.process.pojo.po.SupvFile; -import com.njcn.process.pojo.po.SupvPlan; -import com.njcn.process.pojo.po.SupvProblem; -import com.njcn.process.pojo.po.SupvReportM; +import com.njcn.process.pojo.po.*; +import com.njcn.process.pojo.vo.gw.*; +import com.njcn.process.service.ISupvAlarmBackService; +import com.njcn.process.service.ISupvAlarmService; +import com.njcn.process.service.ISupvPlanHisService; import com.njcn.process.service.SupvPushGwService; import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.enums.DicDataTypeEnum; @@ -77,6 +80,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { private final UserFeignClient userFeignClient; + private final ISupvPlanHisService supvPlanHisService; + private final ISupvAlarmService supvAlarmService; + private final ISupvAlarmBackService supvAlarmBackService; + @Value("${gw.url}") private String gwUrl; @@ -108,6 +115,9 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { List supvVoltageDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData(); Map mapVoltage = supvVoltageDicList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + List planList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PLAN_STATUS.getCode()).getData(); + Map mapPlan = planList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + List userIds = supvPlanList.stream().map(SupvPlan::getCreateBy).distinct().collect(Collectors.toList()); List userList = userFeignClient.getUserByIdList(userIds).getData(); Map map = userList.stream().collect(Collectors.toMap(User::getId, Function.identity())); @@ -188,6 +198,12 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { supvPlan.setObjVoltageLevelName(dictData.getName()); } + //计划状态 + if (mapPlan.containsKey(supvPlan.getPlanStatus())) { + DictData dictData = mapPlan.get(supvPlan.getPlanStatus()); + supvPlan.setPlanStatus(String.format("%02d", dictData.getAlgoDescribe())); + } + //判断用户是否存在 if (map.containsKey(supvPlan.getPlanUserId())) { supvPlan.setPlanUserName(map.get(supvPlan.getPlanUserId()).getName()); @@ -203,10 +219,9 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { if (supvPlanList.size() > 100) { throw new BusinessException("一次最多上送100条数据"); } - - + List planVOS = BeanUtil.copyToList(supvPlanList, PlanVO.class); SendParam param = new SendParam(); - param.setStats(supvPlanList); + param.setStats(planVOS); param.setProvinceId("13B9B47F1E483324E05338297A0A0595"); String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督工作计划数据接口数据:" + s + "结束----!"); @@ -215,30 +230,30 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督工作计划数据接口响应结果:" + send + "结束----!"); if (send.containsKey("succeed")) { String succeed = send.get("succeed"); - if(succeed.indexOf("\\\"")!=-1){ + if (succeed.indexOf("\\\"") != -1) { succeed = succeed.replace("\\\"", "\""); } Map mapData = JSON.parseObject(succeed, Map.class); String status = mapData.get("status").toString(); if ("000000".equals(status)) { for (SupvPlan supvPlan : supvPlanList) { - supvPlanMapper.updateId(1,supvPlan.getPlanId()); + supvPlanMapper.updateId(1, supvPlan.getPlanId()); } String result = mapData.get("result").toString(); Map mapCount = JSON.parseObject(result, Map.class); String count = mapCount.get("count").toString(); - return "操作成功:成功数据"+count+"条"; + return "操作成功:成功数据" + count + "条"; } else { String errors = mapData.get("errors").toString(); - throw new BusinessException("操作失败:"+status+"_"+errors); + throw new BusinessException("操作失败:" + status + "_" + errors); } } else { - throw new BusinessException("出现未知错误"); + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); } } @Override - public String pushQuestion(List problemIds,Integer type) { + public String pushQuestion(List problemIds, Integer type) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.in(SupvProblem::getProblemId, problemIds); List supvProblemList = supvProblemMapper.selectList(lambdaQueryWrapper); @@ -277,16 +292,18 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { //TODO // 目前一个问题对应一个措施,上送一个问题需要调用问题接口和整改措施接口 + List list = BeanUtil.copyToList(supvProblemList, ProblemVO.class); + SendParam param = new SendParam(); - param.setStats(supvProblemList); + param.setStats(list); param.setProvinceId("13B9B47F1E483324E05338297A0A0595"); String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口数据:" + s + "结束----!"); Map send; - if(type==0){ + if (type == 0) { send = send(param, getUrl(2), "pqProblemCreate"); log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题数据接口响应结果:" + send + "结束----!"); - }else{ + } else { send = send(param, getUrl(3), "pqProblemUpdate"); log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题整改数据接口响应结果:" + send + "结束----!"); } @@ -294,32 +311,32 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { if (send.containsKey("succeed")) { String succeed = send.get("succeed"); - if(succeed.indexOf("\\\"")!=-1){ + if (succeed.indexOf("\\\"") != -1) { succeed = succeed.replace("\\\"", "\""); } Map map = JSON.parseObject(succeed, Map.class); String status = map.get("status").toString(); if ("000000".equals(status)) { for (SupvProblem supvProblem : supvProblemList) { - supvProblemMapper.updateId(1,supvProblem.getProblemId()); + supvProblemMapper.updateId(1, supvProblem.getProblemId()); } String result = map.get("result").toString(); Map mapCount = JSON.parseObject(result, Map.class); String count = mapCount.get("count").toString(); - return "操作成功:成功数据"+count+"条"; - }else { + return "操作成功:成功数据" + count + "条"; + } else { String errors = map.get("errors").toString(); - throw new BusinessException("操作失败:"+status+"_"+errors); + throw new BusinessException("操作失败:" + status + "_" + errors); } } else { - throw new BusinessException("出现未知错误"); + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); } } @Override public String pushFile(List busIds) throws IOException { - StringBuilder stringBuilder=new StringBuilder(); + StringBuilder stringBuilder = new StringBuilder(); LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.in(SupvFile::getBusiId, busIds); List supvFiles = supvFileMapper.selectList(lambdaQueryWrapper); @@ -336,7 +353,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 总部提供附件接收接口,省公司调用此接口,完成附件上报响应结果:" + sendFile + "结束----!"); if (sendFile.containsKey("succeed")) { String succeed = sendFile.get("succeed"); - if(succeed.indexOf("\\\"")!=-1){ + if (succeed.indexOf("\\\"") != -1) { succeed = succeed.replace("\\\"", "\""); } Map map = JSON.parseObject(succeed, Map.class); @@ -345,13 +362,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { String result = map.get("result").toString(); Map mapCount = JSON.parseObject(result, Map.class); String count = mapCount.get("count").toString(); - stringBuilder.append( "第"+i+"次操作成功:成功数据"+count+"条"); + stringBuilder.append("第" + i + "次操作成功:成功数据" + count + "条"); } else { String errors = map.get("errors").toString(); - stringBuilder.append("第"+i+"次操作失败:"+status+"_"+errors); + stringBuilder.append("第" + i + "次操作失败:" + status + "_" + errors); } } else { - stringBuilder.append("第"+i+"次出现未知错误"); + stringBuilder.append("第" + i + "次当前时间段国网上送请求过多,请稍后再试"); } } return stringBuilder.toString(); @@ -377,25 +394,25 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口响应结果:" + send + "结束----!"); if (send.containsKey("succeed")) { String succeed = send.get("succeed"); - if(succeed.indexOf("\\\"")!=-1){ + if (succeed.indexOf("\\\"") != -1) { succeed = succeed.replace("\\\"", "\""); } Map map = JSON.parseObject(succeed, Map.class); String status = map.get("status").toString(); if ("000000".equals(status)) { for (SupvReportM supvReportM : supvReportMList) { - supvReportMMapper.updateId(1,supvReportM.getMonthReportId()); + supvReportMMapper.updateId(1, supvReportM.getMonthReportId()); } String result = map.get("result").toString(); Map mapCount = JSON.parseObject(result, Map.class); String count = mapCount.get("count").toString(); - return "操作成功:成功数据"+count+"条"; + return "操作成功:成功数据" + count + "条"; } else { String errors = map.get("errors").toString(); - throw new BusinessException("操作失败:"+status+"_"+errors); + throw new BusinessException("操作失败:" + status + "_" + errors); } } else { - throw new BusinessException("出现未知错误"); + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); } } @@ -428,73 +445,236 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口响应结果:" + send + "结束----!"); if (send.containsKey("succeed")) { String succeed = send.get("succeed"); - if(succeed.indexOf("\\\"")!=-1){ + if (succeed.indexOf("\\\"") != -1) { succeed = succeed.replace("\\\"", "\""); } Map map = JSON.parseObject(succeed, Map.class); String status = map.get("status").toString(); if ("000000".equals(status)) { for (SupvPlan supvPlan : supvPlanList) { - supvPlanMapper.updateId(2,supvPlan.getPlanId()); + supvPlanMapper.updateId(2, supvPlan.getPlanId()); } String result = map.get("result").toString(); Map mapCount = JSON.parseObject(result, Map.class); String countNum = mapCount.get("count").toString(); - return "操作成功:成功数据"+countNum+"条"; + return "操作成功:成功数据" + countNum + "条"; } else { String errors = map.get("errors").toString(); - throw new BusinessException("操作失败:"+status+"_"+errors); + throw new BusinessException("操作失败:" + status + "_" + errors); } } else { - throw new BusinessException("出现未知错误"); + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); } } - public Map send(SendParam param, String url, String serviceName) { - Map map = new LinkedHashMap<>(); - ContentBody cb; - if (ObjectUtil.isNull(param)) { - cb = new ContentBody(""); - } else { - String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); - log.info(Thread.currentThread().getName() + "1.信息:" + s); - cb = new ContentBody(s); + @Override + public String pushPlanHis(List ids) { + List supvPlanHis = supvPlanHisService.listByIds(ids); + if (supvPlanHis.size() > 100) { + throw new BusinessException("一次最多上送100条数据"); } - //ContentBody传递,要求使用post方式进行调用 - //如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接 - HttpParameters.Builder builder = HttpParameters.newBuilder(); + //计划状态 + List planList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PLAN_STATUS.getCode()).getData(); + Map mapPlan = planList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); - builder.requestURL(url) // 设置请求的URL,可以拼接URL请求参数 - .api("zongbuSync") // 设置服务名 - .version("1.0.0") // 设置版本号 - .method("post") // 设置调用方式, 必须为 post - .contentType("application/json; charset=UTF-8") //设置请求content-type - .accessKey("7d4cb2c0afb5468ca56e0654b1a442ef").secretKey("lW2xr6zKjbaqVDOSgQpcGrM6Rg0=");// 设置accessKey 和 设置secretKey + for (SupvPlanHis supvPlanHi : supvPlanHis) { + //计划状态 + if (mapPlan.containsKey(supvPlanHi.getPlanStatus())) { + DictData dictData = mapPlan.get(supvPlanHi.getPlanStatus()); + supvPlanHi.setPlanStatus(String.format("%02d", dictData.getAlgoDescribe())); + } + } + List list = BeanUtil.copyToList(supvPlanHis, PlanHisVO.class); + SendParam param = new SendParam(); + param.setStats(list); + param.setProvinceId("13B9B47F1E483324E05338297A0A0595"); + String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); + log.info(Thread.currentThread().getName() + "获取返回体 预告警单数据接口:" + s + "结束----!"); + Map send = send(param, getUrl(7), "pqPlanCreateHis"); + log.info(Thread.currentThread().getName() + "获取返回体 预告警单数据接口:" + send + "结束----!"); + if (send.containsKey("succeed")) { + String succeed = send.get("succeed"); + if (succeed.indexOf("\\\"") != -1) { + succeed = succeed.replace("\\\"", "\""); + } + Map map = JSON.parseObject(succeed, Map.class); + String status = map.get("status").toString(); + if ("000000".equals(status)) { + List hisIds = supvPlanHis.stream().map(SupvPlanHis::getId).collect(Collectors.toList()); + supvPlanHisService.update(new LambdaUpdateWrapper() + .set(SupvPlanHis::getIsUploadHead, 1) + .in(SupvPlanHis::getId, hisIds) + ); - builder.contentBody(cb); - String token = LoginToken(); - builder.putHeaderParamsMap("x-token", token); - builder.putHeaderParamsMap("serviceName", serviceName); - //进行调用,返回结果 + String result = map.get("result").toString(); + Map mapCount = JSON.parseObject(result, Map.class); + String countNum = mapCount.get("count").toString(); + return "操作成功:成功数据" + countNum + "条"; + } else { + String errors = map.get("errors").toString(); + throw new BusinessException("操作失败:" + status + "_" + errors); + } + } else { + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); + } + } + + @Override + public String pushAlarm(List ids) { + List supvAlarms = supvAlarmService.listByIds(ids); + if (supvAlarms.size() > 100) { + throw new BusinessException("一次最多上送100条数据"); + } + //单据类型 + List billList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.BILL_TYPE.getCode()).getData(); + Map mapBill = billList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + + //所属专业 + List specialityList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SPECIALITY_TYPE.getCode()).getData(); + Map mapSpeciality = specialityList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + DictData dictData; + for (SupvAlarm supvAlarm : supvAlarms) { + + //单据类型 + if (mapBill.containsKey(supvAlarm.getBillType())) { + dictData = mapBill.get(supvAlarm.getBillType()); + supvAlarm.setBillType(String.format("%02d", dictData.getAlgoDescribe())); + } + + //所属专业 + if (mapSpeciality.containsKey(supvAlarm.getSpecialityType())) { + dictData = mapSpeciality.get(supvAlarm.getSpecialityType()); + supvAlarm.setSpecialityType(String.format("%02d", dictData.getAlgoDescribe())); + } + } + List list = BeanUtil.copyToList(supvAlarms, AlarmVO.class); + SendParam param = new SendParam(); + param.setStats(list); + param.setProvinceId("13B9B47F1E483324E05338297A0A0595"); + String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); + log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----!"); + Map send = send(param, getUrl(8), "pqAlarmCreate"); + log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----!"); + if (send.containsKey("succeed")) { + String succeed = send.get("succeed"); + if (succeed.indexOf("\\\"") != -1) { + succeed = succeed.replace("\\\"", "\""); + } + Map map = JSON.parseObject(succeed, Map.class); + String status = map.get("status").toString(); + if ("000000".equals(status)) { + List hisIds = supvAlarms.stream().map(SupvAlarm::getAlarmId).collect(Collectors.toList()); + supvAlarmService.update(new LambdaUpdateWrapper() + .set(SupvAlarm::getIsUploadHead, 1) + .in(SupvAlarm::getAlarmId, hisIds) + ); + + String result = map.get("result").toString(); + Map mapCount = JSON.parseObject(result, Map.class); + String countNum = mapCount.get("count").toString(); + return "操作成功:成功数据" + countNum + "条"; + } else { + String errors = map.get("errors").toString(); + throw new BusinessException("操作失败:" + status + "_" + errors); + } + } else { + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); + } + } + + @Override + public String pushAlarmHis(List ids) { + List supvAlarmBacks = supvAlarmBackService.listByIds(ids); + if (supvAlarmBacks.size() > 100) { + throw new BusinessException("一次最多上送100条数据"); + } + List list = BeanUtil.copyToList(supvAlarmBacks, AlarmBackVO.class); + SendParam param = new SendParam(); + param.setStats(list); + param.setProvinceId("13B9B47F1E483324E05338297A0A0595"); + String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); + log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----!"); + Map send = send(param, getUrl(9), "pqAlarmBackCreate"); + log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----!"); + if (send.containsKey("succeed")) { + String succeed = send.get("succeed"); + if (succeed.indexOf("\\\"") != -1) { + succeed = succeed.replace("\\\"", "\""); + } + Map map = JSON.parseObject(succeed, Map.class); + String status = map.get("status").toString(); + if ("000000".equals(status)) { + List hisIds = supvAlarmBacks.stream().map(SupvAlarmBack::getAlarmBackId).collect(Collectors.toList()); + + supvAlarmBackService.update(new LambdaUpdateWrapper() + .set(SupvAlarmBack::getIsUploadHead, 1) + .in(SupvAlarmBack::getAlarmBackId, hisIds) + ); + + String result = map.get("result").toString(); + Map mapCount = JSON.parseObject(result, Map.class); + String countNum = mapCount.get("count").toString(); + return "操作成功:成功数据" + countNum + "条"; + } else { + String errors = map.get("errors").toString(); + throw new BusinessException("操作失败:" + status + "_" + errors); + } + } else { + throw new BusinessException("当前时间段国网上送请求过多,请稍后再试"); + } + + } + + public Map send(SendParam param, String url, String serviceName) { + Map map = new LinkedHashMap<>(); try { - HttpReturn ret = HttpCaller.invokeReturn(builder.build()); - String responseStr = ret.getResponseStr();//获取响应的文本串 - map.put("succeed", responseStr); - } catch (HttpCallerException e) { - // error process - log.info(Thread.currentThread().getName() + "错误信息:" + e); - map.put("error", e.toString()); + ContentBody cb; + if (ObjectUtil.isNull(param)) { + cb = new ContentBody(""); + } else { + String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT); + log.info(Thread.currentThread().getName() + "1.信息:" + s); + cb = new ContentBody(s); + } + //ContentBody传递,要求使用post方式进行调用 + //如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接 + HttpParameters.Builder builder = HttpParameters.newBuilder(); + + builder.requestURL(url) // 设置请求的URL,可以拼接URL请求参数 + .api("zongbuSync") // 设置服务名 + .version("1.0.0") // 设置版本号 + .method("post") // 设置调用方式, 必须为 post + .contentType("application/json; charset=UTF-8") //设置请求content-type + .accessKey("7d4cb2c0afb5468ca56e0654b1a442ef").secretKey("lW2xr6zKjbaqVDOSgQpcGrM6Rg0=");// 设置accessKey 和 设置secretKey + + + builder.contentBody(cb); + String token = LoginToken(); + builder.putHeaderParamsMap("x-token", token); + builder.putHeaderParamsMap("serviceName", serviceName); + //进行调用,返回结果 + try { + HttpReturn ret = HttpCaller.invokeReturn(builder.build()); + String responseStr = ret.getResponseStr();//获取响应的文本串 + map.put("succeed", responseStr); + } catch (HttpCallerException e) { + // error process + log.info(Thread.currentThread().getName() + "错误信息:" + e); + map.put("error", e.toString()); + } + }catch (Exception e){ + map.put("error", "当前时间段国网上送请求过多,请稍后再试"); } return map; } - public String LoginToken() { + public String LoginToken() { String token = null; String clientId = "942a9278671711eda2e10ae0b5517f6c"; String clientSecret = "3Psd2VEhsA3dVsSPHW0ll5r/03kAqlA2P4w2IiWPA8UWSadcX0we2wffjyTUYGsK"; - String userUrl = "http://"+gwUrl+"/psr-auth/oauth/accessToken?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}"; + String userUrl = "http://" + gwUrl + "/psr-auth/oauth/accessToken?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}"; Map map = new HashMap<>(); map.put("grant_type", "credentials"); map.put("client_id", clientId); @@ -506,13 +686,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { //获取返回体 Map body = userEntity.getBody(); token = body.get("access_token").toString(); - }else{ + } else { throw new BusinessException("获取数据token出现未知异常!请检查ip端口是否正确!"); } return token; } - public Map sendFile(String url, SupvFile supvFile) throws IOException { + public Map sendFile(String url, SupvFile supvFile) throws IOException { String path = supvFile.getFileUrl(); if (StrUtil.isBlank(path)) { throw new BusinessException("获取文件上传路径为空!请检查原始路径是否存在"); @@ -532,7 +712,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { throw new BusinessException("文件服务器,文件不存在"); } - Map map=new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); //ContentBody传递,要求使用post方式进行调用 //如果需要传递请求参数 可以拼接到请求URL中,或者设置paramsMap参数由SDK内部进行拼接 @@ -547,8 +727,8 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { String token = LoginToken(); - log.info(Thread.currentThread().getName() + "3.错误信息:"+token); - builder.putHeaderParamsMap("x-token",token); + log.info(Thread.currentThread().getName() + "3.错误信息:" + token); + builder.putHeaderParamsMap("x-token", token); builder.putHeaderParamsMap("serviceName", "pqFileCreate"); String uploadTime = supvFile.getUploadTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); @@ -562,17 +742,17 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { .putParamsMap("uploadTime", uploadTime) .putParamsMap("uploaderId", supvFile.getUploaderId()); //设置上传文件 - builder.addAttachFile("file", attachmentName,fileStream); + builder.addAttachFile("file", attachmentName, fileStream); //进行调用,返回结果 try { HttpReturn ret = HttpCaller.invokeReturn(builder.build()); String responseStr = ret.getResponseStr();//获取响应的文本串 - map.put("succeed",responseStr); + map.put("succeed", responseStr); } catch (HttpCallerException e) { // error process - log.info(Thread.currentThread().getName() + "错误信息:"+e); - map.put("error",e.toString()); + log.info(Thread.currentThread().getName() + "错误信息:" + e); + map.put("error", e.toString()); } return map; } @@ -644,7 +824,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { * @return */ public String getUrl(Integer type) { - String url = "http://"+gwUrl+"/CSB"; + String url = "http://" + gwUrl + "/CSB"; switch (type) { case 1: @@ -683,6 +863,24 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { */ url += "/WMCenter/powerQuality/plan/delete"; break; + case 7: + /** + * 接收电能质量技术监督工作计划变更历史数据接口 + */ + url += "/WMCenter/powerQuality/plan/createHis"; + break; + case 8: + /** + * 接收电能质量技术监督预告警单数据接口 + */ + url += "/WMCenter/powerQuality/alarm/create"; + break; + case 9: + /** + * 接收电能质量技术监督预告警单反馈数据接口 + */ + url += "/WMCenter/powerQuality/alarm/backCreate"; + break; } return url; } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java index 72c34d301..6dc32e892 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java @@ -97,9 +97,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,null); List processPublicDTOListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null, Stream.of("02","03","04").collect(Collectors.toList())); - List processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); - List processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null); - List processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null); + List processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",Stream.of("02","03","04").collect(Collectors.toList())); List processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",Stream.of("02","03","04").collect(Collectors.toList())); List processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",null); @@ -115,19 +115,20 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTOQesYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),"01",null); //新能源问题总数量 - List processPublicDTOQesNewM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null); - List processPublicDTOQesNewAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null); + List processPublicDTOQesNewM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"01"); + List processPublicDTOQesNewAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"01"); //新能源问题已整改数量 - List processPublicDTOQesNewYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null); - List processPublicDTOQesNewYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01",null); + List processPublicDTOQesNewYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","01"); + List processPublicDTOQesNewYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","01"); //新能源改扩建问题数量 List processPublicDTOQesNewGaiM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"02"); List processPublicDTOQesNewGaiAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,"02"); - List processPublicDTOQesNewGaiYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02"); - List processPublicDTOQesNewGaiYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02"); + //新能源改扩建整改问题数量 + List processPublicDTOQesNewGaiYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02"); + List processPublicDTOQesNewGaiYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"01","02"); //敏感用户 @@ -140,8 +141,8 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTOQesMingGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null); //敏感用户问题已整改数量 - List processPublicDTOQesMingGanYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null); - List processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null); + List processPublicDTOQesMingGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null); + List processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null); //电压 List processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); @@ -150,8 +151,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); List processPublicDTODianYaGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); - List processPublicDTODianYaGanYesM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null); - List processPublicDTODianYaGanYesAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null); + //整改 + List processPublicDTODianYaGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null); + List processPublicDTODianYaGanYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"01",null); List supvReportMBatch = new ArrayList<>(); diff --git a/pqs-process/process-boot/src/main/resources/bootstrap.yml b/pqs-process/process-boot/src/main/resources/bootstrap.yml index abe450780..671b3c721 100644 --- a/pqs-process/process-boot/src/main/resources/bootstrap.yml +++ b/pqs-process/process-boot/src/main/resources/bootstrap.yml @@ -55,7 +55,8 @@ mybatis-plus: type-aliases-package: com.njcn.process.pojo gw: - url: 25.36.214.86:32234 + url: dwzyywzt-pms3-proxy.com + code: 13B9B47F1E483324E05338297A0A0595 mqtt: client-id: @artifactId@${random.value} diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java index a4ea80f6a..6fb0d3317 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java @@ -105,9 +105,9 @@ public enum DicDataTypeEnum { APP_DEVICE_EVENT_TYPE("app设备事件类型","appDeviceEventType"), - DEVICE_UNIT("数据单位类型","Device_Unit") - - + DEVICE_UNIT("数据单位类型","Device_Unit"), + //国网上送 + PLAN_STATUS("计划状态","plan_status"), ;