技术监督,监测点联调
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.bpm.listener.business;
|
||||||
|
|
||||||
|
import com.njcn.bpm.listener.BpmProcessInstanceStatusEvent;
|
||||||
|
import com.njcn.bpm.listener.BpmProcessInstanceStatusEventListener;
|
||||||
|
import com.njcn.supervision.api.TempLineFeignClient;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class BpmTempLineDebugStatusListener extends BpmProcessInstanceStatusEventListener {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TempLineFeignClient tempLineFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getProcessDefinitionKey() {
|
||||||
|
return "temp_line_debug";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onEvent(BpmProcessInstanceStatusEvent event) {
|
||||||
|
tempLineFeignClient.updateStatus(event.getBusinessKey(), event.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ public class BpmTempLineStatusListener extends BpmProcessInstanceStatusEventList
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getProcessDefinitionKey() {
|
protected String getProcessDefinitionKey() {
|
||||||
return "temp_line_info_add";
|
return "line_info_add";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.njcn.supervision.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.supervision.api.fallback.TempLineDebugFeignClientFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例 Api 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.SUPERVISION, path = "/tempLinedebug", fallbackFactory = TempLineDebugFeignClientFallbackFactory.class)
|
||||||
|
public interface TempLineDebugFeignClient {
|
||||||
|
|
||||||
|
@GetMapping("/updateStatus")
|
||||||
|
HttpResult<Object> updateStatus(@RequestParam("businessKey") String businessKey, @RequestParam("status")Integer status);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.njcn.supervision.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.supervision.api.TempLineDebugFeignClient;
|
||||||
|
import com.njcn.supervision.utils.SupervisionEnumUtil;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author denghuajun
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022/3/16
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class TempLineDebugFeignClientFallbackFactory implements FallbackFactory<TempLineDebugFeignClient> {
|
||||||
|
@Override
|
||||||
|
public TempLineDebugFeignClient create(Throwable throwable) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (throwable.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||||
|
exceptionEnum = SupervisionEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new TempLineDebugFeignClient() {
|
||||||
|
@Override
|
||||||
|
public HttpResult<Object> updateStatus(String businessKey, Integer status) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.device;
|
||||||
|
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SupervisionTempLineDebugParam extends BaseEntity {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调试原因
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="调试原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="流程实例的编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="1:审批中;2:审批通过;3:审批不通过;4:已取消")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="状态:0-删除 1-正常")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
@ApiModelProperty("发起人自选审批人 Map")
|
||||||
|
private Map<String, List<String>> startUserSelectAssignees;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class SupervisionTempLineDebugQuery extends BaseParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "填报部门")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
private List<Integer> statueList;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -239,5 +239,7 @@ public class SupervisionTempLineReportParam {
|
|||||||
@ApiModelProperty(value = "填报部门")
|
@ApiModelProperty(value = "填报部门")
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
|
||||||
|
private List<Integer> statueList;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.plan;
|
||||||
|
|
||||||
|
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2023-06-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SupervisionPlanParam extends BaseParam {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划名称",required = true)
|
||||||
|
@NotBlank(message = "计划名称不可为空")
|
||||||
|
private String workPlanName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督单位",required = true)
|
||||||
|
@NotBlank(message = "监督单位不可为空")
|
||||||
|
private String supvOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制人id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计划编制人不可为空")
|
||||||
|
private String planUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督类型",required = true)
|
||||||
|
@NotBlank(message = "监督类型不可为空")
|
||||||
|
private String supvType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督阶段
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督阶段",required = true)
|
||||||
|
@NotBlank(message = "监督阶段不可为空")
|
||||||
|
private String supvStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划监督时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划监督时间",required = true)
|
||||||
|
@NotNull(message = "计划监督时间不可为空")
|
||||||
|
private String planSupvDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督对象名称")
|
||||||
|
private String supvObjName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "对象类型")
|
||||||
|
private String supvObjType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象电压等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "对象电压等级")
|
||||||
|
private String objVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联电站
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "关联电站")
|
||||||
|
private String substationName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关联电站电压等级")
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象属性")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象属性名称")
|
||||||
|
private String objTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象协议容量(MVA)")
|
||||||
|
private Double objCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划执行开始时间",required = true)
|
||||||
|
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行开始时间格式有误")
|
||||||
|
private String effectStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划执行结束时间",required = true)
|
||||||
|
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "计划执行结束时间格式有误")
|
||||||
|
private String effectEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告出具时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "报告出具时间",required = true)
|
||||||
|
@DateTimeStrValid(message = "报告出具时间格式有误",format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String reportIssueTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电能质量问题发生时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "电能质量问题发生时间",required = true)
|
||||||
|
@DateTimeStrValid(message = "电能质量问题发生时间格式有误",format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String problemOcTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注(其他要求)")
|
||||||
|
private String otherRemark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制单位id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划编制单位id")
|
||||||
|
@NotBlank(message = "计划编制单位id不可为空")
|
||||||
|
private String planOrgId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "实施状态")
|
||||||
|
private String effectStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "实施人")
|
||||||
|
private String effectUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "计划状态")
|
||||||
|
private String planStatus;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public static class UpdateSupvPlanParam extends SupervisionPlanParam{
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "索引",required = true)
|
||||||
|
@NotBlank(message = "计划索引不可为空")
|
||||||
|
private String planId;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他要求")
|
||||||
|
private String otherRemarkHis;
|
||||||
|
|
||||||
|
@ApiModelProperty("调整原因")
|
||||||
|
private String applyCommentHis;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.plan;
|
||||||
|
|
||||||
|
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2023-06-21
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class SupervisopnProblemParam extends BaseParam {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联计划表
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "关联计划表id",required = true)
|
||||||
|
@NotBlank(message = "关联计划表不可为空")
|
||||||
|
private String planId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任单位id,取ISC平台上的组织id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "责任单位id,取ISC平台上的组织id",required = true)
|
||||||
|
@NotBlank(message = "责任单位id不可为空")
|
||||||
|
private String dutyOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点类型 ,仅供电电压监督计划必填
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监测点类型 ,仅供电电压监督计划必填")
|
||||||
|
private String monitorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "整改时间",required = true)
|
||||||
|
@DateTimeStrValid(message = "整改时间格式有误")
|
||||||
|
private String rectificationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划整改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划整改时间",required = true)
|
||||||
|
@NotNull(message = "计划整改时间不可为空")
|
||||||
|
@DateTimeStrValid(message = "计划整改时间格式有误")
|
||||||
|
private String planRectificationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布预告警
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否发布预告警",required = true)
|
||||||
|
@NotNull(message = "是否发布预告警不可为空")
|
||||||
|
private Integer ifReleaseWarning;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问题简要描述")
|
||||||
|
@NotBlank(message = "问题简要描述不可为空")
|
||||||
|
private String simpleProblemDesc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督标准序号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督标准序号")
|
||||||
|
@NotBlank(message = "监督标准序号不可为空")
|
||||||
|
private String supvStandardSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问题描述")
|
||||||
|
@NotBlank(message = "问题描述不可为空")
|
||||||
|
private String problemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督标准
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督标准",required = true)
|
||||||
|
@NotBlank(message = "监督标准不可为空")
|
||||||
|
private String supvStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准出处
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准出处",required = true)
|
||||||
|
@NotBlank(message = "标准出处不可为空")
|
||||||
|
private String supvResouce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题等级 01 一般,02 较大
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问题等级",required = true)
|
||||||
|
@NotBlank(message = "问题等级不可为空")
|
||||||
|
private String problemLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定级依据
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "定级依据",required = true)
|
||||||
|
@NotBlank(message = "定级依据不可为空")
|
||||||
|
private String problemLevelReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "问题类型",required = true)
|
||||||
|
@NotBlank(message = "问题类型不可为空")
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改方案
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "整改方案",required = true)
|
||||||
|
@NotBlank(message = "整改方案不可为空")
|
||||||
|
private String rectificationProgramme;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "整改措施")
|
||||||
|
private String rectificationMeasure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改情况01已整改,02未整改
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "整改情况",required = true)
|
||||||
|
@NotBlank(message = "整改情况不可为空")
|
||||||
|
private String rectificationStatus;
|
||||||
|
|
||||||
|
@NotBlank(message = "问题发现时间")
|
||||||
|
@DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误")
|
||||||
|
private String discoveryTime;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public static class UpdateSupvProblemParam extends SupervisopnProblemParam{
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "索引",required = true)
|
||||||
|
@NotBlank(message = "问题索引不可为空")
|
||||||
|
private String problemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_temp_line_debug")
|
||||||
|
public class SupervisionTempLineDebugPO extends BaseEntity {
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调试原因
|
||||||
|
*/
|
||||||
|
@TableField(value = "reason")
|
||||||
|
@ApiModelProperty(value="调试原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "process_instance_id")
|
||||||
|
@ApiModelProperty(value="流程实例的编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
@ApiModelProperty(value="1:审批中;2:审批通过;3:审批不通过;4:已取消")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
@ApiModelProperty(value="状态:0-删除 1-正常")
|
||||||
|
private Integer state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,236 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 17:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_plan")
|
||||||
|
public class SupervisionPlanPO extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId(value = "plan_Id", type = IdType.ASSIGN_UUID)
|
||||||
|
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;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String supvObjId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String objVoltageLevelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_plan_name")
|
||||||
|
private String workPlanName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Type")
|
||||||
|
private String supvType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督阶段
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Stage")
|
||||||
|
private String supvStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督单位
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Org_Id")
|
||||||
|
private String supvOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制人id
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_User_Id")
|
||||||
|
private String planUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制单位id
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_Org_Id")
|
||||||
|
private String planOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@TableField(value = "other_Remark")
|
||||||
|
private String otherRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行开始时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "effect_Start_Time")
|
||||||
|
private LocalDateTime effectStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行结束时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "effect_End_Time")
|
||||||
|
private LocalDateTime effectEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实施状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "effect_Status")
|
||||||
|
private String effectStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划监督时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_Supv_Date")
|
||||||
|
private LocalDateTime planSupvDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Obj_Type")
|
||||||
|
private String supvObjType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Obj_Name")
|
||||||
|
private String supvObjName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象电压等级
|
||||||
|
*/
|
||||||
|
@TableField(value = "obj_Voltage_Level")
|
||||||
|
private String objVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联电站
|
||||||
|
*/
|
||||||
|
@TableField(value = "substation_Name")
|
||||||
|
private String substationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联电站电压等级
|
||||||
|
*/
|
||||||
|
@TableField(value = "substation_Voltage_Level")
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象属性 01 在运站 02 新(改、扩)建站,仅新能源场站监督计划必填
|
||||||
|
*/
|
||||||
|
@TableField(value = "obj_Type")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象属性名称 仅新能源场站监督计划必填
|
||||||
|
*/
|
||||||
|
@TableField(value = "obj_Type_Name")
|
||||||
|
private String objTypeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象协议容量(MVA) 新能源场站、敏感用户监督计划必填
|
||||||
|
*/
|
||||||
|
@TableField(value = "obj_Capacity")
|
||||||
|
private Double objCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告出具时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "report_Issue_Time")
|
||||||
|
private LocalDateTime reportIssueTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电能质量问题发生时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_Oc_Time")
|
||||||
|
private LocalDateTime problemOcTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识 0否1是
|
||||||
|
*/
|
||||||
|
@TableField(value = "delete_Flag")
|
||||||
|
private String deleteFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划状态 1新建2变更 3取消
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_Status")
|
||||||
|
private String planStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "delete_Time")
|
||||||
|
private LocalDateTime deleteTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实施人id
|
||||||
|
*/
|
||||||
|
@TableField(value = "effect_User_Id")
|
||||||
|
private String effectUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实施人姓名
|
||||||
|
*/
|
||||||
|
@TableField(value = "effect_User_Name")
|
||||||
|
private String effectUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.未上送 1.上送 2.取消上送 3.待重新上送
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_upload_head")
|
||||||
|
private Integer isUploadHead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "process_instance_id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
private Integer state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 19:50【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@ApiModel(description="")
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_problem")
|
||||||
|
public class SupervisionProblemPO extends BaseEntity {
|
||||||
|
@TableId(value = "problem_Id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String problemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联计划表
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_id")
|
||||||
|
private String planId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属网省id
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String provinceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任单位id,取ISC平台上的组织id
|
||||||
|
*/
|
||||||
|
@TableField(value = "duty_Org_Id")
|
||||||
|
private String dutyOrgId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dutyOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点类型 ,仅供电电压监督计划必填
|
||||||
|
*/
|
||||||
|
@TableField(value = "monitor_Type")
|
||||||
|
private String monitorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectification_Time")
|
||||||
|
private LocalDateTime rectificationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划整改时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "plan_Rectification_Time")
|
||||||
|
private LocalDateTime planRectificationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布预告警
|
||||||
|
*/
|
||||||
|
@TableField(value = "if_Release_Warning")
|
||||||
|
private Boolean ifReleaseWarning;
|
||||||
|
|
||||||
|
@TableField(value = "problem_Desc")
|
||||||
|
private String problemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "simple_Problem_Desc")
|
||||||
|
private String simpleProblemDesc;
|
||||||
|
|
||||||
|
@TableField(value = "supv_Standard_Sort")
|
||||||
|
private String supvStandardSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督标准
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Standard")
|
||||||
|
private String supvStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标准出处
|
||||||
|
*/
|
||||||
|
@TableField(value = "supv_Resouce")
|
||||||
|
private String supvResouce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题等级 01 一般,02 较大
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_Level")
|
||||||
|
private String problemLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定级依据
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_Level_Reason")
|
||||||
|
private String problemLevelReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "problem_Type")
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改方案
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectification_Programme")
|
||||||
|
private String rectificationProgramme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改措施
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectification_Measure")
|
||||||
|
private String rectificationMeasure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改情况, 01已整改,02未整改
|
||||||
|
*/
|
||||||
|
@TableField(value = "rectification_Status")
|
||||||
|
private String rectificationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上送国网 0.未上送 1.上送
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_Upload_Head")
|
||||||
|
private Boolean isUploadHead;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题发现时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "discovery_Time")
|
||||||
|
private LocalDateTime discoveryTime;
|
||||||
|
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attachmentName;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attachmentNameTwo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.supervision.pojo.vo.device;
|
||||||
|
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 10:32【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SupervisionTempLineDebugVO extends BaseEntity {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String lineId;
|
||||||
|
private String lineName;
|
||||||
|
private String reason;
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -215,6 +215,14 @@ public class SupervisionTempLineReportVO {
|
|||||||
@ApiModelProperty(value="电压偏差下限")
|
@ApiModelProperty(value="电压偏差下限")
|
||||||
private Float voltageDeviationLowerLimit;
|
private Float voltageDeviationLowerLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例的编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,183 @@
|
|||||||
|
package com.njcn.supervision.pojo.vo.plan;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/6/25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SupervisionPlanVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "索引",required = true)
|
||||||
|
private String planId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划名称",required = true)
|
||||||
|
private String workPlanName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督单位",required = true)
|
||||||
|
private String supvOrgId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督单位名称",required = true)
|
||||||
|
private String supvOrgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制单位id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划编制单位id")
|
||||||
|
private String planOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编制单位名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划编制单位名字")
|
||||||
|
private String planOrgName;
|
||||||
|
|
||||||
|
|
||||||
|
private String planUserId;
|
||||||
|
|
||||||
|
private String planUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督类型",required = true)
|
||||||
|
private String supvType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督阶段
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督阶段",required = true)
|
||||||
|
private String supvStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划监督时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划监督时间",required = true)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM")
|
||||||
|
private String planSupvDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监督对象名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监督对象名称")
|
||||||
|
private String supvObjName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "对象类型")
|
||||||
|
private String supvObjType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对象电压等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "对象电压等级")
|
||||||
|
private String objVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联电站
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "关联电站")
|
||||||
|
private String substationName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关联电站电压等级")
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象属性")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象属性名称")
|
||||||
|
private String objTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "监督对象协议容量(MVA)")
|
||||||
|
private Double objCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划执行开始时间",required = true)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime effectStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划执行结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划执行结束时间",required = true)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime effectEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告出具时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "报告出具时间",required = true)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime reportIssueTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电能质量问题发生时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "电能质量问题发生时间",required = true)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime problemOcTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String otherRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "省部门")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "市部门")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "县部门")
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件名称")
|
||||||
|
private String attachmentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.未上送 1.上送 2.取消上送
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "0.未上送 1.上送 2.取消上送")
|
||||||
|
private Integer isUploadHead;
|
||||||
|
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实施状态
|
||||||
|
*/
|
||||||
|
private String effectStatus;
|
||||||
|
/**
|
||||||
|
* 实施人id
|
||||||
|
*/
|
||||||
|
private String effectUserId;
|
||||||
|
/**
|
||||||
|
* 实施人姓名
|
||||||
|
*/
|
||||||
|
private String effectUserName;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "计划状态")
|
||||||
|
private String planStatus;
|
||||||
|
}
|
||||||
@@ -34,6 +34,9 @@ public class UserReportVO {
|
|||||||
@ApiModelProperty(value = "填报人")
|
@ApiModelProperty(value = "填报人")
|
||||||
private String reporter;
|
private String reporter;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "填报人名称")
|
||||||
|
private String reporterName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 填报日期
|
* 填报日期
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -120,4 +120,5 @@ public class DeVReportManageController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,15 @@ public class TempLineController extends BaseController {
|
|||||||
Page<SupervisionTempLineReportVO> out = supervisionTempLineReportService.getTempLineReport(supervisionTempLineReportQuery);
|
Page<SupervisionTempLineReportVO> out = supervisionTempLineReportService.getTempLineReport(supervisionTempLineReportQuery);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getDetail")
|
||||||
|
@ApiOperation("查询详情")
|
||||||
|
public HttpResult<SupervisionTempLineReportVO> getDetailTempLine(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getDetailTempLine");
|
||||||
|
SupervisionTempLineReportVO out = supervisionTempLineReportService.getDetailTempLine(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
|
}
|
||||||
@GetMapping("/updateStatus")
|
@GetMapping("/updateStatus")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@Operation(summary = "更改表单状态")
|
@Operation(summary = "更改表单状态")
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.njcn.supervision.controller.device;
|
||||||
|
|
||||||
|
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.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
|
import com.njcn.supervision.service.device.SupervisionTempLineDebugPOService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源用户管理
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/11/11 - 9:20
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/tempLinedebug")
|
||||||
|
@Api(tags = "临时监测点调试管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TempLineDebugController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
private final SupervisionTempLineDebugPOService supervisionTempLineDebugPOService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.ADD)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增临时监测点调试管理")
|
||||||
|
@ApiImplicitParam(name = "supervisionTempLineReportParam", value = "实体参数", required = true)
|
||||||
|
public HttpResult<String> addTempLineDebug(@RequestBody @Validated SupervisionTempLineDebugParam supervisionTempLineReportParam){
|
||||||
|
String methodDescribe = getMethodDescribe("addTempLineDebug");
|
||||||
|
String tempLineId = supervisionTempLineDebugPOService.addTempLineDebug(supervisionTempLineReportParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, tempLineId, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ApiOperation("查询联调监测点")
|
||||||
|
@ApiImplicitParam(name = "supervisionTempLineDebugQuery", value = "参数", required = true)
|
||||||
|
public HttpResult<Page<SupervisionTempLineDebugVO>> getTempLineDeug(@RequestBody @Validated SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||||
|
String methodDescribe = getMethodDescribe("getTempLineDeug");
|
||||||
|
Page<SupervisionTempLineDebugVO> out = supervisionTempLineDebugPOService.getTempLineDeug(supervisionTempLineDebugQuery);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getDetail")
|
||||||
|
@ApiOperation("查询详情")
|
||||||
|
public HttpResult<SupervisionTempLineDebugVO> getDetailTempLine(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getDetailTempLine");
|
||||||
|
SupervisionTempLineDebugVO out = supervisionTempLineDebugPOService.getDetailTempLineDebug(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
|
}
|
||||||
|
@GetMapping("/updateStatus")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@Operation(summary = "更改表单状态")
|
||||||
|
public HttpResult<Object> updateStatus(String businessKey,Integer status) {
|
||||||
|
String methodDescribe = getMethodDescribe("updateStatus");
|
||||||
|
supervisionTempLineDebugPOService.updateStatus(businessKey,status);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
|
// @PostMapping("/cancel")
|
||||||
|
// @ApiOperation("取消设备录入")
|
||||||
|
// @ApiImplicitParam(name = "cancelReqVO", value = "取消原因", required = true)
|
||||||
|
// public HttpResult<String> cancelTempLineReport(@Validated @RequestBody BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
|
// String methodDescribe = getMethodDescribe("cancelTempLineReport");
|
||||||
|
// String id = supervisionTempLineReportService.cancelTempLineReport(cancelReqVO);
|
||||||
|
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, id, methodDescribe);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.njcn.supervision.controller.plan;
|
||||||
|
|
||||||
|
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.supervision.pojo.param.plan.SupervisionPlanParam;
|
||||||
|
import com.njcn.supervision.pojo.vo.plan.SupervisionPlanVO;
|
||||||
|
import com.njcn.supervision.service.plan.SupervisionPlanPOService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源用户管理
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/11/11 - 9:20
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/superPlan")
|
||||||
|
@Api(tags = "技术监督计划")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SupervisionPlanController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
private final SupervisionPlanPOService supervisionPlanPOService;
|
||||||
|
|
||||||
|
@PostMapping("addPlan")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("新增技术监督计划")
|
||||||
|
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||||
|
public HttpResult<Object> addPlan(@RequestBody @Validated SupervisionPlanParam supvPlanParam){
|
||||||
|
String methodDescribe = getMethodDescribe("addPlan");
|
||||||
|
String id = supervisionPlanPOService.addPlan(supvPlanParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, id, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("pagePlan")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("分页查询监督计划")
|
||||||
|
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||||
|
public HttpResult<Page<SupervisionPlanVO>> pagePlan(@RequestBody SupervisionPlanParam supvPlanParam){
|
||||||
|
String methodDescribe = getMethodDescribe("pagePlan");
|
||||||
|
Page<SupervisionPlanVO> page = supervisionPlanPOService.pagePlan(supvPlanParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.njcn.supervision.controller.plan;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
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.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.supervision.pojo.param.plan.SupervisopnProblemParam;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
||||||
|
import com.njcn.supervision.service.plan.SupervisionProblemPOService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源用户管理
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/11/11 - 9:20
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/superProblem")
|
||||||
|
@Api(tags = "技术监督计划问题")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SupervisionProblemController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
private final SupervisionProblemPOService supervisionProblemPOService;
|
||||||
|
|
||||||
|
@PostMapping("addProblem")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||||
|
@ApiOperation("新增技术监督问题")
|
||||||
|
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||||
|
public HttpResult<Object> addProblem(@RequestBody @Validated SupervisopnProblemParam supvProblemParam){
|
||||||
|
String methodDescribe = getMethodDescribe("addProblem");
|
||||||
|
supervisionProblemPOService.addProblem(supvProblemParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("pageProblem")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("分页查询监督问题")
|
||||||
|
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||||
|
public HttpResult<Page<SupervisionProblemPO>> pageProblem(@RequestBody SupervisopnProblemParam supvProblemParam){
|
||||||
|
String methodDescribe = getMethodDescribe("pageProblem");
|
||||||
|
if(StrUtil.isBlank(supvProblemParam.getPlanId())){
|
||||||
|
throw new BusinessException("监督计划索引不可为空");
|
||||||
|
}
|
||||||
|
Page<SupervisionProblemPO> page = supervisionProblemPOService.pageProblem(supvProblemParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.supervision.mapper.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempLineDebugPOMapper extends BaseMapper<SupervisionTempLineDebugPO> {
|
||||||
|
Page<SupervisionTempLineDebugVO> page(@Param("page")Page<Object> objectPage, @Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.device.SupervisionTempLineDebugPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_temp_line_debug-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="reason" jdbcType="VARCHAR" property="reason" />
|
||||||
|
<result column="process_instance_id" jdbcType="VARCHAR" property="processInstanceId" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, reason, process_instance_id, `status`, Create_By, Create_Time, Update_By, Update_Time,
|
||||||
|
`State`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="page" resultType="com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO">
|
||||||
|
SELECT
|
||||||
|
supervision_temp_line_report.id id,
|
||||||
|
supervision_temp_line_report.line_id lineId,
|
||||||
|
supervision_temp_line_report.line_name lineName,
|
||||||
|
supervision_temp_line_debug.reason reason,
|
||||||
|
supervision_temp_line_debug.process_instance_id process_instanceId,
|
||||||
|
supervision_temp_line_debug.`status` `Status`
|
||||||
|
FROM
|
||||||
|
supervision_temp_line_report left
|
||||||
|
JOIN supervision_temp_line_debug ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||||
|
where supervision_temp_line_report.`status`=2
|
||||||
|
and ${ew.sqlSegment}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.supervision.mapper.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 17:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionPlanPOMapper extends BaseMapper<SupervisionPlanPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.supervision.mapper.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 19:50【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionProblemPOMapper extends BaseMapper<SupervisionProblemPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.plan.SupervisionPlanPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.plan.SupervisionPlanPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_plan-->
|
||||||
|
<id column="plan_Id" jdbcType="CHAR" property="planId" />
|
||||||
|
<result column="work_plan_name" jdbcType="VARCHAR" property="workPlanName" />
|
||||||
|
<result column="supv_Type" jdbcType="CHAR" property="supvType" />
|
||||||
|
<result column="supv_Stage" jdbcType="CHAR" property="supvStage" />
|
||||||
|
<result column="supv_Org_Id" jdbcType="CHAR" property="supvOrgId" />
|
||||||
|
<result column="plan_User_Id" jdbcType="CHAR" property="planUserId" />
|
||||||
|
<result column="plan_Org_Id" jdbcType="CHAR" property="planOrgId" />
|
||||||
|
<result column="other_Remark" jdbcType="VARCHAR" property="otherRemark" />
|
||||||
|
<result column="effect_Start_Time" jdbcType="TIMESTAMP" property="effectStartTime" />
|
||||||
|
<result column="effect_End_Time" jdbcType="TIMESTAMP" property="effectEndTime" />
|
||||||
|
<result column="effect_Status" jdbcType="CHAR" property="effectStatus" />
|
||||||
|
<result column="plan_Supv_Date" jdbcType="TIMESTAMP" property="planSupvDate" />
|
||||||
|
<result column="supv_Obj_Type" jdbcType="CHAR" property="supvObjType" />
|
||||||
|
<result column="supv_Obj_Name" jdbcType="VARCHAR" property="supvObjName" />
|
||||||
|
<result column="obj_Voltage_Level" jdbcType="CHAR" property="objVoltageLevel" />
|
||||||
|
<result column="substation_Name" jdbcType="CHAR" property="substationName" />
|
||||||
|
<result column="substation_Voltage_Level" jdbcType="CHAR" property="substationVoltageLevel" />
|
||||||
|
<result column="obj_Type" jdbcType="VARCHAR" property="objType" />
|
||||||
|
<result column="obj_Type_Name" jdbcType="VARCHAR" property="objTypeName" />
|
||||||
|
<result column="obj_Capacity" jdbcType="DOUBLE" property="objCapacity" />
|
||||||
|
<result column="report_Issue_Time" jdbcType="TIMESTAMP" property="reportIssueTime" />
|
||||||
|
<result column="problem_Oc_Time" jdbcType="TIMESTAMP" property="problemOcTime" />
|
||||||
|
<result column="delete_Flag" jdbcType="CHAR" property="deleteFlag" />
|
||||||
|
<result column="plan_Status" jdbcType="CHAR" property="planStatus" />
|
||||||
|
<result column="delete_Time" jdbcType="TIMESTAMP" property="deleteTime" />
|
||||||
|
<result column="effect_User_Id" jdbcType="CHAR" property="effectUserId" />
|
||||||
|
<result column="effect_User_Name" jdbcType="CHAR" property="effectUserName" />
|
||||||
|
<result column="is_upload_head" jdbcType="BIT" property="isUploadHead" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="create_by" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="update_by" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
plan_Id, work_plan_name, supv_Type, supv_Stage, supv_Org_Id, plan_User_Id, plan_Org_Id,
|
||||||
|
other_Remark, effect_Start_Time, effect_End_Time, effect_Status, plan_Supv_Date,
|
||||||
|
supv_Obj_Type, supv_Obj_Name, obj_Voltage_Level, substation_Name, substation_Voltage_Level,
|
||||||
|
obj_Type, obj_Type_Name, obj_Capacity, report_Issue_Time, problem_Oc_Time, delete_Flag,
|
||||||
|
plan_Status, delete_Time, effect_User_Id, effect_User_Name, is_upload_head, create_time,
|
||||||
|
create_by, update_by, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.plan.SupervisionProblemPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.plan.SupervisionProblemPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_problem-->
|
||||||
|
<id column="problem_Id" jdbcType="CHAR" property="problemId" />
|
||||||
|
<result column="plan_id" jdbcType="CHAR" property="planId" />
|
||||||
|
<result column="duty_Org_Id" jdbcType="CHAR" property="dutyOrgId" />
|
||||||
|
<result column="monitor_Type" jdbcType="CHAR" property="monitorType" />
|
||||||
|
<result column="rectification_Time" jdbcType="TIMESTAMP" property="rectificationTime" />
|
||||||
|
<result column="plan_Rectification_Time" jdbcType="TIMESTAMP" property="planRectificationTime" />
|
||||||
|
<result column="if_Release_Warning" jdbcType="BIT" property="ifReleaseWarning" />
|
||||||
|
<result column="problem_Desc" jdbcType="VARCHAR" property="problemDesc" />
|
||||||
|
<result column="simple_Problem_Desc" jdbcType="VARCHAR" property="simpleProblemDesc" />
|
||||||
|
<result column="supv_Standard_Sort" jdbcType="VARCHAR" property="supvStandardSort" />
|
||||||
|
<result column="supv_Standard" jdbcType="VARCHAR" property="supvStandard" />
|
||||||
|
<result column="supv_Resouce" jdbcType="VARCHAR" property="supvResouce" />
|
||||||
|
<result column="problem_Level" jdbcType="VARCHAR" property="problemLevel" />
|
||||||
|
<result column="problem_Level_Reason" jdbcType="VARCHAR" property="problemLevelReason" />
|
||||||
|
<result column="problem_Type" jdbcType="VARCHAR" property="problemType" />
|
||||||
|
<result column="rectification_Programme" jdbcType="VARCHAR" property="rectificationProgramme" />
|
||||||
|
<result column="rectification_Measure" jdbcType="VARCHAR" property="rectificationMeasure" />
|
||||||
|
<result column="rectification_Status" jdbcType="VARCHAR" property="rectificationStatus" />
|
||||||
|
<result column="is_Upload_Head" jdbcType="BIT" property="isUploadHead" />
|
||||||
|
<result column="discovery_Time" jdbcType="TIMESTAMP" property="discoveryTime" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
problem_Id, plan_id, duty_Org_Id, monitor_Type, rectification_Time, plan_Rectification_Time,
|
||||||
|
if_Release_Warning, problem_Desc, simple_Problem_Desc, supv_Standard_Sort, supv_Standard,
|
||||||
|
supv_Resouce, problem_Level, problem_Level_Reason, problem_Type, rectification_Programme,
|
||||||
|
rectification_Measure, rectification_Status, is_Upload_Head, discovery_Time, remark,
|
||||||
|
create_by, update_by, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.supervision.service.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempLineDebugPOService extends IService<SupervisionTempLineDebugPO>{
|
||||||
|
|
||||||
|
|
||||||
|
String addTempLineDebug(SupervisionTempLineDebugParam supervisionTempLineReportParam);
|
||||||
|
|
||||||
|
Page<SupervisionTempLineDebugVO> getTempLineDeug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery);
|
||||||
|
|
||||||
|
SupervisionTempLineDebugVO getDetailTempLineDebug(String id);
|
||||||
|
|
||||||
|
void updateStatus(String businessKey, Integer status);
|
||||||
|
}
|
||||||
@@ -25,4 +25,6 @@ public interface SupervisionTempLineReportService extends IService<SupervisionTe
|
|||||||
void updateStatus(String businessKey, Integer status);
|
void updateStatus(String businessKey, Integer status);
|
||||||
|
|
||||||
String cancelTempLineReport(BpmProcessInstanceCancelParam cancelReqVO);
|
String cancelTempLineReport(BpmProcessInstanceCancelParam cancelReqVO);
|
||||||
|
|
||||||
|
SupervisionTempLineReportVO getDetailTempLine(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
|||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.supervision.enums.FlowStatusEnum;
|
import com.njcn.supervision.enums.FlowStatusEnum;
|
||||||
import com.njcn.supervision.mapper.device.SupervisionDevMainReportPOMapper;
|
import com.njcn.supervision.mapper.device.SupervisionDevMainReportPOMapper;
|
||||||
import com.njcn.supervision.pojo.param.device.SupervisionDevMainReportParam;
|
import com.njcn.supervision.pojo.param.device.SupervisionDevMainReportParam;
|
||||||
@@ -62,6 +63,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
private final SupervisionTempDeviceReportService supervisionTempDeviceReportService;
|
private final SupervisionTempDeviceReportService supervisionTempDeviceReportService;
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
private final UserFeignClient userFeignClient;
|
private final UserFeignClient userFeignClient;
|
||||||
|
private final LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -123,12 +125,13 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
if (StrUtil.isNotBlank(supervisionDevMainReportQuery.getOrgId())) {
|
if (StrUtil.isNotBlank(supervisionDevMainReportQuery.getOrgId())) {
|
||||||
/*获取直接下属子单位*/
|
/*获取直接下属子单位*/
|
||||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionDevMainReportQuery.getOrgId()).getData();
|
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionDevMainReportQuery.getOrgId()).getData();
|
||||||
|
queryWrapper.in("supervision_dev_main_report.org_no", data);
|
||||||
|
|
||||||
|
}
|
||||||
//添加上时间范围
|
//添加上时间范围
|
||||||
queryWrapper.between("supervision_dev_main_report.Create_Time",
|
queryWrapper.between("supervision_dev_main_report.Create_Time",
|
||||||
DateUtil.beginOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchBeginTime())),
|
||||||
DateUtil.endOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchEndTime())));
|
DateUtil.endOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchEndTime())));
|
||||||
}
|
|
||||||
queryWrapper.orderByDesc("supervision_dev_main_report.Update_Time");
|
queryWrapper.orderByDesc("supervision_dev_main_report.Update_Time");
|
||||||
Page<SupervisionDevMainReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionDevMainReportQuery), PageFactory.getPageSize(supervisionDevMainReportQuery)), queryWrapper);
|
Page<SupervisionDevMainReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionDevMainReportQuery), PageFactory.getPageSize(supervisionDevMainReportQuery)), queryWrapper);
|
||||||
page.getRecords().stream().forEach(temp->{
|
page.getRecords().stream().forEach(temp->{
|
||||||
@@ -186,7 +189,8 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
supervisionDevMainReportVO.setOrgName(deptFeignClient.getDeptById(byId.getOrgId()).getData().getName());
|
supervisionDevMainReportVO.setOrgName(deptFeignClient.getDeptById(byId.getOrgId()).getData().getName());
|
||||||
|
|
||||||
SupervisionTempDeviceReport supervisionTempDeviceReport = supervisionTempDeviceReportService.lambdaQuery().eq(SupervisionTempDeviceReport::getId, id).one();
|
SupervisionTempDeviceReport supervisionTempDeviceReport = supervisionTempDeviceReportService.lambdaQuery().eq(SupervisionTempDeviceReport::getId, id).one();
|
||||||
|
supervisionTempDeviceReport.setSubstation(lineFeignClient.getSubstationInfo(supervisionTempDeviceReport.getSubstation()).getData().getName());
|
||||||
|
supervisionTempDeviceReport.setPowerCompany(deptFeignClient.getDeptById(byId.getOrgId()).getData().getName());
|
||||||
supervisionDevMainReportVO.setSupervisionTempDeviceReport(supervisionTempDeviceReport);
|
supervisionDevMainReportVO.setSupervisionTempDeviceReport(supervisionTempDeviceReport);
|
||||||
return supervisionDevMainReportVO;
|
return supervisionDevMainReportVO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package com.njcn.supervision.service.device.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.supervision.mapper.device.SupervisionTempLineDebugPOMapper;
|
||||||
|
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
|
import com.njcn.supervision.service.device.SupervisionTempLineDebugPOService;
|
||||||
|
import com.njcn.supervision.service.device.SupervisionTempLineReportService;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import com.njcn.web.utils.RequestUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<SupervisionTempLineDebugPOMapper, SupervisionTempLineDebugPO> implements SupervisionTempLineDebugPOService{
|
||||||
|
public static final String PROCESS_KEY = "temp_line_debug";
|
||||||
|
private final BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final SupervisionTempLineReportService supervisionTempLineReportService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public String addTempLineDebug(SupervisionTempLineDebugParam supervisionTempLineReportParam) {
|
||||||
|
|
||||||
|
SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
|
||||||
|
if(Objects.nonNull(byId)){
|
||||||
|
if(byId.getState() == 1) {
|
||||||
|
throw new BusinessException("该监测点以申请联调");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SupervisionTempLineDebugPO supervisionTempLineDebugPO = new SupervisionTempLineDebugPO();
|
||||||
|
BeanUtils.copyProperties(supervisionTempLineReportParam,supervisionTempLineDebugPO);
|
||||||
|
supervisionTempLineDebugPO.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
supervisionTempLineDebugPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||||
|
this.save(supervisionTempLineDebugPO);
|
||||||
|
String id = supervisionTempLineDebugPO.getId();
|
||||||
|
// 发起 BPM 流程
|
||||||
|
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||||
|
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||||
|
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_KEY);
|
||||||
|
bpmProcessInstanceCreateReqDTO.setBusinessKey(id);
|
||||||
|
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(supervisionTempLineReportParam.getStartUserSelectAssignees());
|
||||||
|
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||||
|
String processInstanceId = bpmProcessFeignClient.createProcessInstance(supervisionTempLineDebugPO.getCreateBy(),bpmProcessInstanceCreateReqDTO).getData();
|
||||||
|
// 将工作流的编号,更新到流程单中
|
||||||
|
supervisionTempLineDebugPO.setProcessInstanceId(processInstanceId);
|
||||||
|
this.baseMapper.updateById(supervisionTempLineDebugPO);
|
||||||
|
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<SupervisionTempLineDebugVO> getTempLineDeug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||||
|
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||||
|
|
||||||
|
String userIndex = RequestUtil.getUserIndex();
|
||||||
|
queryWrapper.in("supervision_temp_line_report.create_by", CollectionUtil.newArrayList(userIndex))
|
||||||
|
.eq("supervision_temp_line_report.state", DataStateEnum.ENABLE.getCode());
|
||||||
|
if (StrUtil.isNotBlank(supervisionTempLineDebugQuery.getOrgId())) {
|
||||||
|
/*获取直接下属子单位*/
|
||||||
|
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineDebugQuery.getOrgId()).getData();
|
||||||
|
queryWrapper.in("supervision_temp_line_report.org_id", data);
|
||||||
|
|
||||||
|
}
|
||||||
|
//添加上时间范围
|
||||||
|
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
||||||
|
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||||
|
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||||
|
queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time");
|
||||||
|
|
||||||
|
Page<SupervisionTempLineDebugVO> page =this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineDebugQuery), PageFactory.getPageSize(supervisionTempLineDebugQuery)), queryWrapper);
|
||||||
|
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
||||||
|
SupervisionTempLineDebugVO supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
||||||
|
SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportService.getById(id);
|
||||||
|
SupervisionTempLineDebugPO supervisionTempLineDebugPO = this.getById(id);
|
||||||
|
supervisionTempLineDebugVO.setId(id);
|
||||||
|
supervisionTempLineDebugVO.setLineId(supervisionTempLineReport.getLineId());
|
||||||
|
supervisionTempLineDebugVO.setLineName(supervisionTempLineReport.getLineName());
|
||||||
|
supervisionTempLineDebugVO.setReason(supervisionTempLineDebugPO.getReason());
|
||||||
|
supervisionTempLineDebugVO.setProcessInstanceId(supervisionTempLineDebugPO.getProcessInstanceId());
|
||||||
|
supervisionTempLineDebugVO.setStatus(supervisionTempLineDebugPO.getStatus());
|
||||||
|
|
||||||
|
|
||||||
|
return supervisionTempLineDebugVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateStatus(String businessKey, Integer status) {
|
||||||
|
this.lambdaUpdate().set(SupervisionTempLineDebugPO::getStatus,status).eq(SupervisionTempLineDebugPO::getId,businessKey).update();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -93,20 +93,23 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
String userIndex = RequestUtil.getUserIndex();
|
String userIndex = RequestUtil.getUserIndex();
|
||||||
|
|
||||||
queryWrapper.in("supervision_temp_line_report.create_by", CollectionUtil.newArrayList(userIndex))
|
queryWrapper.in("supervision_temp_line_report.create_by", CollectionUtil.newArrayList(userIndex))
|
||||||
.eq("supervision_temp_line_report.state", DataStateEnum.ENABLE.getCode());
|
.eq("supervision_temp_line_report.state", DataStateEnum.ENABLE.getCode())
|
||||||
|
.in(CollectionUtil.isNotEmpty(supervisionTempLineReportQuery.getStatueList()),"supervision_temp_line_report.status",supervisionTempLineReportQuery.getStatueList());
|
||||||
if (StrUtil.isNotBlank(supervisionTempLineReportQuery.getOrgId())) {
|
if (StrUtil.isNotBlank(supervisionTempLineReportQuery.getOrgId())) {
|
||||||
/*获取直接下属子单位*/
|
/*获取直接下属子单位*/
|
||||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineReportQuery.getOrgId()).getData();
|
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineReportQuery.getOrgId()).getData();
|
||||||
|
queryWrapper.in("supervision_temp_line_report.org_id", data);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
//添加上时间范围
|
//添加上时间范围
|
||||||
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
||||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
|
||||||
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchEndTime())));
|
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchEndTime())));
|
||||||
}
|
|
||||||
queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time");
|
queryWrapper.orderByDesc("supervision_temp_line_report.Update_Time");
|
||||||
Page<SupervisionTempLineReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineReportQuery), PageFactory.getPageSize(supervisionTempLineReportQuery)), queryWrapper);
|
Page<SupervisionTempLineReportVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(supervisionTempLineReportQuery), PageFactory.getPageSize(supervisionTempLineReportQuery)), queryWrapper);
|
||||||
page.getRecords().stream().forEach(temp->{
|
page.getRecords().stream().forEach(temp->{
|
||||||
temp.setOrgName((deptFeignClient.getDeptById(temp.getOrgId()).getData().getName()));
|
// temp.setOrgName((deptFeignClient.getDeptById(temp.getOrgId()).getData().getName()));
|
||||||
//处理特殊字段,用户名、部门名
|
//处理特殊字段,用户名、部门名
|
||||||
UserVO userVO = userFeignClient.getUserById(temp.getReporter()).getData();
|
UserVO userVO = userFeignClient.getUserById(temp.getReporter()).getData();
|
||||||
temp.setReporter(userVO.getName());
|
temp.setReporter(userVO.getName());
|
||||||
@@ -133,6 +136,20 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
return supervisionDevMainReportPO.getId();
|
return supervisionDevMainReportPO.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SupervisionTempLineReportVO getDetailTempLine(String id) {
|
||||||
|
SupervisionTempLineReportVO vo =new SupervisionTempLineReportVO();
|
||||||
|
SupervisionTempLineReport byId = this.getById(id);
|
||||||
|
BeanUtils.copyProperties(byId,vo);
|
||||||
|
|
||||||
|
//处理特殊字段,用户名、部门名
|
||||||
|
UserVO userVO = userFeignClient.getUserById(vo.getReporter()).getData();
|
||||||
|
vo.setReporter(userVO.getName());
|
||||||
|
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
|
||||||
|
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
private void checkLineId(SupervisionTempLineReportParam supervisionTempLineReportParam, boolean isExcludeSelf) {
|
private void checkLineId(SupervisionTempLineReportParam supervisionTempLineReportParam, boolean isExcludeSelf) {
|
||||||
LambdaQueryWrapper<SupervisionTempLineReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SupervisionTempLineReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper
|
lambdaQueryWrapper
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.njcn.supervision.service.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.supervision.pojo.param.plan.SupervisionPlanParam;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.supervision.pojo.vo.plan.SupervisionPlanVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 17:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionPlanPOService extends IService<SupervisionPlanPO>{
|
||||||
|
|
||||||
|
|
||||||
|
String addPlan(SupervisionPlanParam supvPlanParam);
|
||||||
|
|
||||||
|
Page<SupervisionPlanVO> pagePlan(SupervisionPlanParam supvPlanParam);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.supervision.service.plan;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.supervision.pojo.param.plan.SupervisopnProblemParam;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 19:50【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionProblemPOService extends IService<SupervisionProblemPO>{
|
||||||
|
|
||||||
|
|
||||||
|
void addProblem(SupervisopnProblemParam supvProblemParam);
|
||||||
|
|
||||||
|
Page<SupervisionProblemPO> pageProblem(SupervisopnProblemParam supvProblemParam);
|
||||||
|
}
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
package com.njcn.supervision.service.plan.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
|
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.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.utils.PubUtils;
|
||||||
|
import com.njcn.supervision.pojo.param.plan.SupervisionPlanParam;
|
||||||
|
import com.njcn.supervision.pojo.vo.plan.SupervisionPlanVO;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.api.UserFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.User;
|
||||||
|
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||||
|
import com.njcn.web.factory.PageFactory;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.supervision.mapper.plan.SupervisionPlanPOMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
||||||
|
import com.njcn.supervision.service.plan.SupervisionPlanPOService;
|
||||||
|
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;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 17:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOMapper, SupervisionPlanPO> implements SupervisionPlanPOService{
|
||||||
|
private final UserFeignClient userFeignClient;
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public String addPlan(SupervisionPlanParam supvPlanParam) {
|
||||||
|
checkParam(supvPlanParam, false);
|
||||||
|
SupervisionPlanPO supvPlan = new SupervisionPlanPO();
|
||||||
|
BeanUtil.copyProperties(supvPlanParam, supvPlan);
|
||||||
|
supvPlan.setPlanSupvDate(LocalDateTimeUtil.parse(supvPlanParam.getPlanSupvDate(), DatePattern.NORM_DATETIME_PATTERN));
|
||||||
|
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getEffectEndTime())) {
|
||||||
|
supvPlan.setEffectEndTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectEndTime()));
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getEffectStartTime())) {
|
||||||
|
supvPlan.setEffectStartTime(PubUtils.localDateTimeFormat(supvPlanParam.getEffectStartTime()));
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getProblemOcTime())) {
|
||||||
|
supvPlan.setProblemOcTime(PubUtils.localDateTimeFormat(supvPlanParam.getProblemOcTime()));
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getReportIssueTime())) {
|
||||||
|
supvPlan.setReportIssueTime(PubUtils.localDateTimeFormat(supvPlanParam.getReportIssueTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(!"01".equals(supvPlan.getEffectStatus())){
|
||||||
|
if(Objects.isNull(supvPlan.getEffectStartTime()) ){
|
||||||
|
throw new BusinessException("开始实施时间不可为空!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if("04".equals(supvPlan.getEffectStatus())){
|
||||||
|
if(Objects.isNull(supvPlan.getEffectEndTime()) ){
|
||||||
|
throw new BusinessException("结束实施时间不可为空!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
supvPlan.setIsUploadHead(0);
|
||||||
|
if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){
|
||||||
|
List<User> userList = userFeignClient.getUserByIdList(Stream.of(supvPlan.getEffectUserId()).collect(Collectors.toList())).getData();
|
||||||
|
if(CollUtil.isNotEmpty(userList)){
|
||||||
|
supvPlan.setEffectUserName(userList.get(0).getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
supvPlan.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
this.save(supvPlan);
|
||||||
|
return supvPlan.getPlanId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<SupervisionPlanVO> pagePlan(SupervisionPlanParam supvPlanParam) {
|
||||||
|
LambdaQueryWrapper<SupervisionPlanPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (StrUtil.isNotBlank(supvPlanParam.getSupvOrgId())) {
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getSupvOrgId()).getData();
|
||||||
|
lambdaQueryWrapper.in(SupervisionPlanPO::getSupvOrgId, deptIds)
|
||||||
|
.between(SupervisionPlanPO::getPlanSupvDate, supvPlanParam.getSearchBeginTime(),supvPlanParam.getSearchEndTime())
|
||||||
|
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()),SupervisionPlanPO::getSupvType,supvPlanParam.getSupvType());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getSortBy())){
|
||||||
|
if(supvPlanParam.getOrderBy().equals("desc")){
|
||||||
|
lambdaQueryWrapper.orderByDesc(SupervisionPlanPO::getPlanSupvDate);
|
||||||
|
}else {
|
||||||
|
lambdaQueryWrapper.orderByAsc(SupervisionPlanPO::getPlanSupvDate);
|
||||||
|
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
lambdaQueryWrapper.orderByDesc(SupervisionPlanPO::getCreateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||||
|
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||||
|
Map<String, PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
Page<SupervisionPlanPO> page = this.page(new Page<>(PageFactory.getPageNum(supvPlanParam), PageFactory.getPageSize(supvPlanParam)), lambdaQueryWrapper);
|
||||||
|
List<SupervisionPlanVO> supvPlanVOList = BeanUtil.copyToList(page.getRecords(), SupervisionPlanVO.class);
|
||||||
|
List<String> userIds = supvPlanVOList.stream().map(SupervisionPlanVO::getPlanUserId).distinct().collect(Collectors.toList());
|
||||||
|
supvPlanVOList.forEach(item -> {
|
||||||
|
PvTerminalTreeVO pvTerminalTreeVO = null;
|
||||||
|
if (mapCode.containsKey(item.getSupvOrgId())) {
|
||||||
|
pvTerminalTreeVO = mapCode.get(item.getSupvOrgId());
|
||||||
|
item.setSupvOrgName(pvTerminalTreeVO.getName());
|
||||||
|
int deptLevel = pvTerminalTreeVO.getPids().split(StrUtil.COMMA).length;
|
||||||
|
if (deptLevel == 2) {
|
||||||
|
//省
|
||||||
|
item.setProvince(pvTerminalTreeVO.getName());
|
||||||
|
} else if (deptLevel == 3) {
|
||||||
|
//市
|
||||||
|
item.setCity(pvTerminalTreeVO.getName());
|
||||||
|
if (mapList.containsKey(pvTerminalTreeVO.getPid())) {
|
||||||
|
PvTerminalTreeVO pvTerminalTreeOne = mapList.get(pvTerminalTreeVO.getPid());
|
||||||
|
item.setProvince(pvTerminalTreeOne.getName());
|
||||||
|
}
|
||||||
|
} else if (deptLevel == 4) {
|
||||||
|
//县
|
||||||
|
if (mapList.containsKey(pvTerminalTreeVO.getPid())) {
|
||||||
|
item.setCounty(pvTerminalTreeVO.getName());
|
||||||
|
PvTerminalTreeVO pvTerminalTreeOne = mapList.get(pvTerminalTreeVO.getPid());
|
||||||
|
if (Objects.nonNull(pvTerminalTreeOne)) {
|
||||||
|
item.setCity(pvTerminalTreeOne.getName());
|
||||||
|
if (mapList.containsKey(pvTerminalTreeOne.getPid())) {
|
||||||
|
PvTerminalTreeVO pvTerminalTreeTwo = mapList.get(pvTerminalTreeOne.getPid());
|
||||||
|
if (Objects.nonNull(pvTerminalTreeTwo)) {
|
||||||
|
item.setProvince(pvTerminalTreeTwo.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mapCode.containsKey(item.getPlanOrgId())) {
|
||||||
|
item.setPlanOrgName(mapCode.get(item.getPlanOrgId()).getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
// SupvFile supvFile = supvFileMapper.selectOne(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId, item.getPlanId()).eq(SupvFile::getType, 0));
|
||||||
|
// if (Objects.nonNull(supvFile)) {
|
||||||
|
// item.setAttachmentName(supvFile.getAttachmentName());
|
||||||
|
// }
|
||||||
|
|
||||||
|
List<User> userList = userFeignClient.getUserByIdList(userIds).getData();
|
||||||
|
Map<String, User> map = userList.stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
||||||
|
|
||||||
|
if (map.containsKey(item.getPlanUserId())) {
|
||||||
|
item.setPlanUserName(map.get(item.getPlanUserId()).getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
Page<SupervisionPlanVO> pageVo = new Page<>();
|
||||||
|
pageVo.setTotal(page.getTotal());
|
||||||
|
pageVo.setPages(page.getPages());
|
||||||
|
pageVo.setSize(page.getSize());
|
||||||
|
pageVo.setRecords(supvPlanVOList);
|
||||||
|
return pageVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void checkParam(SupervisionPlanParam supvPlanParam, Boolean updateFlag) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<SupervisionPlanPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(SupervisionPlanPO::getWorkPlanName, supvPlanParam.getWorkPlanName());
|
||||||
|
|
||||||
|
if (updateFlag) {
|
||||||
|
if (supvPlanParam instanceof SupervisionPlanParam.UpdateSupvPlanParam) {
|
||||||
|
//修改
|
||||||
|
lambdaQueryWrapper.ne(SupervisionPlanPO::getPlanId, ((SupervisionPlanParam.UpdateSupvPlanParam) supvPlanParam).getPlanId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
if (count > 0) {
|
||||||
|
throw new BusinessException("监督计划名称已存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断监督对象类型
|
||||||
|
/* if (StrUtil.isNotBlank(supvPlanParam.getSupvObjType())) {
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataById(supvPlanParam.getSupvType()).getData();
|
||||||
|
if (dictData.getCode().equals(DicDataEnum.New_Energy.getCode())) {
|
||||||
|
if (StrUtil.isBlank(supvPlanParam.getSupvObjType())) {
|
||||||
|
throw new BusinessException("监督对象类型不可为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(supvPlanParam.getObjType())) {
|
||||||
|
throw new BusinessException("监督对象属性名称不可为空");
|
||||||
|
}
|
||||||
|
if (Objects.isNull(supvPlanParam.getObjCapacity())) {
|
||||||
|
throw new BusinessException("监督对象协议容量不可为空");
|
||||||
|
}
|
||||||
|
} else if (!dictData.getCode().equals(DicDataEnum.Technical_Super.getCode())) {
|
||||||
|
if (StrUtil.isBlank(supvPlanParam.getSupvObjName())) {
|
||||||
|
throw new BusinessException("监督对象名称不可为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(supvPlanParam.getObjVoltageLevel())) {
|
||||||
|
throw new BusinessException("监督对象电压等级不可为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (!dictData.getCode().equals(DicDataEnum.POWER_QUALITY.getCode())) {
|
||||||
|
if (Objects.isNull(supvPlanParam.getObjCapacity())) {
|
||||||
|
throw new BusinessException("监督对象协议容量不可为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
//判断时间范围
|
||||||
|
if(StrUtil.isAllNotBlank(supvPlanParam.getEffectStartTime(),supvPlanParam.getEffectEndTime())||
|
||||||
|
StrUtil.isAllNotBlank(supvPlanParam.getEffectStartTime(),supvPlanParam.getReportIssueTime())
|
||||||
|
){
|
||||||
|
String problemOcTime1 = supvPlanParam.getProblemOcTime();
|
||||||
|
if(StrUtil.isNotBlank(problemOcTime1)){
|
||||||
|
//实施开始时间
|
||||||
|
DateTime effectStartTime = DateUtil.parse(supvPlanParam.getEffectStartTime(), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//问题发现时间
|
||||||
|
DateTime problemOcTime = DateUtil.parse(problemOcTime1, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
Boolean fly = false;
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getEffectEndTime())){
|
||||||
|
//实施结束时间
|
||||||
|
DateTime effectEndTime = DateUtil.parse(supvPlanParam.getEffectEndTime(), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (DateUtil.isIn(problemOcTime, effectStartTime, effectEndTime)) {
|
||||||
|
fly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotBlank(supvPlanParam.getReportIssueTime())){
|
||||||
|
//报告出具时间
|
||||||
|
DateTime reportIssueTime = DateUtil.parse(supvPlanParam.getReportIssueTime(), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (DateUtil.isIn(problemOcTime, effectStartTime, reportIssueTime)) {
|
||||||
|
fly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!fly) {
|
||||||
|
throw new BusinessException("问题发现时时间,不在实施开始时间到(实施结束时间/报告出具时间)范围内");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.njcn.supervision.service.plan.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
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.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.supervision.mapper.plan.SupervisionProblemPOMapper;
|
||||||
|
import com.njcn.supervision.pojo.param.plan.SupervisopnProblemParam;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
||||||
|
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
||||||
|
import com.njcn.supervision.service.plan.SupervisionPlanPOService;
|
||||||
|
import com.njcn.supervision.service.plan.SupervisionProblemPOService;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
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.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/20 19:50【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionProblemPOServiceImpl extends ServiceImpl<SupervisionProblemPOMapper, SupervisionProblemPO> implements SupervisionProblemPOService{
|
||||||
|
|
||||||
|
|
||||||
|
private final SupervisionPlanPOService supervisionPlanPOService;
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void addProblem(SupervisopnProblemParam supvProblemParam) {
|
||||||
|
checkParam(supvProblemParam.getPlanId(),supvProblemParam.getDiscoveryTime());
|
||||||
|
SupervisionProblemPO supvProblem = new SupervisionProblemPO();
|
||||||
|
BeanUtil.copyProperties(supvProblemParam, supvProblem);
|
||||||
|
supvProblem.setPlanRectificationTime(PubUtils.beginTimeToLocalDateTime(supvProblemParam.getPlanRectificationTime()));
|
||||||
|
if(StrUtil.isNotBlank(supvProblemParam.getRectificationTime())) {
|
||||||
|
supvProblem.setRectificationTime(PubUtils.beginTimeToLocalDateTime(supvProblemParam.getRectificationTime()));
|
||||||
|
}
|
||||||
|
this.save(supvProblem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<SupervisionProblemPO> pageProblem(SupervisopnProblemParam supvProblemParam) {
|
||||||
|
DictData stamped_report = dicDataFeignClient.getDicDataByCode("Stamped_Report").getData();
|
||||||
|
|
||||||
|
LambdaQueryWrapper<SupervisionProblemPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(SupervisionProblemPO::getPlanId, supvProblemParam.getPlanId());
|
||||||
|
Page<SupervisionProblemPO> page = this.page(new Page<>(PageFactory.getPageNum(supvProblemParam), PageFactory.getPageSize(supvProblemParam)), lambdaQueryWrapper);
|
||||||
|
|
||||||
|
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||||
|
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||||
|
|
||||||
|
for (SupervisionProblemPO item : page.getRecords()) {
|
||||||
|
if (mapCode.containsKey(item.getDutyOrgId())) {
|
||||||
|
item.setDutyOrgName(mapCode.get(item.getDutyOrgId()).getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
// List<SupvFile> supvFileList = supvFileMapper.selectList(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1));
|
||||||
|
// if (CollUtil.isNotEmpty(supvFileList)) {
|
||||||
|
// for(SupvFile supvFile:supvFileList){
|
||||||
|
// if(supvFile.getAttachmentType().equals(stamped_report.getId())){
|
||||||
|
// item.setAttachmentName(supvFile.getAttachmentName());
|
||||||
|
// }else {
|
||||||
|
// item.setAttachmentNameTwo(supvFile.getAttachmentName());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断是否存在时间范围内
|
||||||
|
public void checkParam(String id,String time) {
|
||||||
|
if(StrUtil.isNotBlank(time)){
|
||||||
|
SupervisionPlanPO supvPlan = supervisionPlanPOService.getById(id);
|
||||||
|
if(ObjectUtil.isNotNull(supvPlan)){
|
||||||
|
//判断时间范围
|
||||||
|
if (ObjectUtil.isAllNotEmpty(supvPlan.getEffectStartTime(), supvPlan.getEffectEndTime())||
|
||||||
|
ObjectUtil.isAllNotEmpty(supvPlan.getEffectStartTime(), supvPlan.getReportIssueTime())
|
||||||
|
) {
|
||||||
|
//实施开始时间
|
||||||
|
DateTime effectStartTime = DateUtil.parse(DateUtil.formatLocalDateTime(supvPlan.getEffectStartTime()), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
//问题发现时间
|
||||||
|
DateTime problemOcTime = DateUtil.parse(time, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
Boolean fly = false;
|
||||||
|
if(ObjectUtil.isNotNull(supvPlan.getEffectEndTime())){
|
||||||
|
//实施结束时间
|
||||||
|
DateTime effectEndTime = DateUtil.parse(DateUtil.formatLocalDateTime(supvPlan.getEffectEndTime()), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (DateUtil.isIn(problemOcTime, effectStartTime, effectEndTime)) {
|
||||||
|
fly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isNotNull(supvPlan.getReportIssueTime())){
|
||||||
|
//报告出具时间
|
||||||
|
DateTime reportIssueTime = DateUtil.parse(DateUtil.formatLocalDateTime(supvPlan.getReportIssueTime()), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (DateUtil.isIn(problemOcTime, effectStartTime, reportIssueTime)) {
|
||||||
|
fly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!fly) {
|
||||||
|
throw new BusinessException("问题发现时时间,不在实施开始时间到(实施结束时间/报告出具时间)范围内");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.supervision.service.survey.impl;
|
package com.njcn.supervision.service.survey.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -204,6 +205,10 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
|
|||||||
queryWrapper.in("supervision_general_survey_plan.org_no", data);
|
queryWrapper.in("supervision_general_survey_plan.org_no", data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//添加上时间范围
|
||||||
|
queryWrapper.between("supervision_general_survey_plan.Create_Time",
|
||||||
|
DateUtil.beginOfDay(DateUtil.parse(generalSurveyPlanQueryParam.getSearchBeginTime())),
|
||||||
|
DateUtil.endOfDay(DateUtil.parse(generalSurveyPlanQueryParam.getSearchEndTime())));
|
||||||
queryWrapper.orderByDesc("supervision_general_survey_plan.create_time");
|
queryWrapper.orderByDesc("supervision_general_survey_plan.create_time");
|
||||||
Page<SupervisionGeneralSurveyPlanVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(generalSurveyPlanQueryParam), PageFactory.getPageSize(generalSurveyPlanQueryParam)), queryWrapper);
|
Page<SupervisionGeneralSurveyPlanVO> page = this.baseMapper.page(new Page<>(PageFactory.getPageNum(generalSurveyPlanQueryParam), PageFactory.getPageSize(generalSurveyPlanQueryParam)), queryWrapper);
|
||||||
|
|
||||||
|
|||||||
@@ -251,6 +251,10 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
List<UserReportVO> collect = list.stream().map(temp -> {
|
List<UserReportVO> collect = list.stream().map(temp -> {
|
||||||
UserReportVO vo = new UserReportVO();
|
UserReportVO vo = new UserReportVO();
|
||||||
BeanUtils.copyProperties(temp, vo);
|
BeanUtils.copyProperties(temp, vo);
|
||||||
|
UserVO userVO = userFeignClient.getUserById(temp.getReporter()).getData();
|
||||||
|
vo.setReporter(temp.getReporter());
|
||||||
|
vo.setReporterName(userVO.getName());
|
||||||
|
vo.setOrgName(deptFeignClient.getDeptById(temp.getOrgId()).getData().getName());
|
||||||
return vo;
|
return vo;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
return collect;
|
return collect;
|
||||||
|
|||||||
Reference in New Issue
Block a user