预处理模块:工单问题生成,主网有效监测时长计算,
过程监督模块:工单模块功能,其他模块的审核
This commit is contained in:
@@ -60,5 +60,11 @@
|
||||
<version>1.5.1-RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>prepare-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.process.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.process.api.fallback.RStatWorkOrderFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/15 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PROCESS,path = "/rStatWorkOrder",fallbackFactory = RStatWorkOrderFallbackFactory.class)
|
||||
public interface RStatWorkOrderFeignClient {
|
||||
@PostMapping("/createProblem")
|
||||
HttpResult<Boolean> createProblem(@RequestBody List<OverLimitFlagDTO> overLimitFlagDTOList);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.process.api.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.process.api.RStatWorkOrderFeignClient;
|
||||
import com.njcn.process.utils.ProcessEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/15 14:15【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RStatWorkOrderFallbackFactory implements FallbackFactory<RStatWorkOrderFeignClient> {
|
||||
|
||||
@Override
|
||||
public RStatWorkOrderFeignClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = ProcessEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new RStatWorkOrderFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> createProblem(List<OverLimitFlagDTO> overLimitFlagDTOList) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "问题单插入异常", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel
|
||||
public class ElectricityQualityCheckParam {
|
||||
|
||||
@ApiModelProperty(name = "id",value = "电能质量问题编号",required = true)
|
||||
@NotBlank(message = "电能质量问题编号不能为空")
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
@ApiModelProperty(value="审核是否通过(0:否 1:是)")
|
||||
@NotBlank(message = "审核标志不能为空")
|
||||
private String checkResult;
|
||||
|
||||
@ApiModelProperty(value="审核人")
|
||||
@NotBlank(message = "审核人不能为空")
|
||||
private String checkPerson;
|
||||
|
||||
@ApiModelProperty(value="填报进度")
|
||||
@NotBlank(message = "填报进度不能为空")
|
||||
private String reportProcess;
|
||||
|
||||
@ApiModelProperty(value="审核意见")
|
||||
@NotBlank(message = "审核意见不能为空")
|
||||
private String checkComment;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LoadTypeUserCheckParam {
|
||||
|
||||
@ApiModelProperty(name = "id",required = true)
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value="审核是否通过(0:否 1:是)")
|
||||
@NotBlank(message = "审核标志不能为空")
|
||||
private String checkResult;
|
||||
|
||||
@ApiModelProperty(value="审核人")
|
||||
@NotBlank(message = "审核人不能为空")
|
||||
private String checkPerson;
|
||||
|
||||
@ApiModelProperty(value="审核意见")
|
||||
@NotBlank(message = "审核意见不能为空")
|
||||
private String checkComment;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlanChcekParm {
|
||||
|
||||
|
||||
@ApiModelProperty(value="普测计划编号")
|
||||
@NotBlank(message = "普测计划编号不能为空")
|
||||
private String planNo;
|
||||
|
||||
@ApiModelProperty(value="审核是否通过(0:否 1:是)")
|
||||
@NotBlank(message = "审核标志不能为空")
|
||||
private String checkResult;
|
||||
|
||||
@ApiModelProperty(value="审核人")
|
||||
@NotBlank(message = "审核人不能为空")
|
||||
private String checkPerson;
|
||||
|
||||
@ApiModelProperty(value="审核意见")
|
||||
@NotBlank(message = "审核意见不能为空")
|
||||
private String checkComment;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RStatProblemAndWorkOrderParam {
|
||||
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value="问题类型")
|
||||
private String problemType;
|
||||
|
||||
@ApiModelProperty(value="审核状态")
|
||||
private String checkStatus;
|
||||
|
||||
@ApiModelProperty(value="台区名称")
|
||||
private String distributionName;
|
||||
|
||||
@ApiModelProperty(value="问题发生时间")
|
||||
private String occurTime;
|
||||
|
||||
@ApiModelProperty(value="工单状态")
|
||||
private String workOrderStatus;
|
||||
|
||||
@ApiModelProperty(value="问题编号")
|
||||
private String problemNo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -87,6 +87,16 @@ public class RGeneralSurveyPlanPO {
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@TableField(value="check_person")
|
||||
private String checkPerson;
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@TableField(value = "check_comment")
|
||||
private String checkComment;
|
||||
|
||||
/**
|
||||
* 文件是否上传(0:否 1:是)
|
||||
|
||||
@@ -64,6 +64,15 @@ public class RLoadTypeUserManage implements Serializable {
|
||||
* 入网报告状态,字典ID
|
||||
*/
|
||||
private String iStatus;
|
||||
/**
|
||||
*入网报告审核人
|
||||
*/
|
||||
private String iCheckPerson;
|
||||
/**
|
||||
*入网报告审核意见
|
||||
*/
|
||||
private String iCheckComment;
|
||||
|
||||
/**
|
||||
* 入网报告路径
|
||||
*/
|
||||
@@ -96,6 +105,14 @@ public class RLoadTypeUserManage implements Serializable {
|
||||
* 实测报告状态,字典ID
|
||||
*/
|
||||
private String aStatus;
|
||||
/**
|
||||
*实测报告审核人
|
||||
*/
|
||||
private String aCheckPerson;
|
||||
/**
|
||||
*实测报告审核意见
|
||||
*/
|
||||
private String aCheckComment;
|
||||
/**
|
||||
* 实测报告路径
|
||||
*/
|
||||
@@ -120,5 +137,7 @@ public class RLoadTypeUserManage implements Serializable {
|
||||
* 实测详情
|
||||
*/
|
||||
private String aDescription;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ public class RStatDistributionProblemPO {
|
||||
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
@TableField(value = "org_name")
|
||||
private String orgName;
|
||||
/**
|
||||
* 问题类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||
*/
|
||||
@@ -49,7 +50,8 @@ public class RStatDistributionProblemPO {
|
||||
*/
|
||||
@TableField(value = "distribution_id")
|
||||
private String distributionId;
|
||||
|
||||
@TableField(value = "distribution_name")
|
||||
private String distributionName;
|
||||
/**
|
||||
* 最新超标时间(超标连续大于4小时)
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/22 18:59【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 电能质量问题日志表
|
||||
*/
|
||||
@TableName(value = "r_stat_electric_quality_problem_log")
|
||||
public class RStatElectricQualityProblemLogPO {
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
@MppMultiId(value = "power_quality_problem_no")
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@MppMultiId(value = "data_date")
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@TableField(value = "checker")
|
||||
private String checker;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
@TableField(value = "report_process")
|
||||
private String reportProcess;
|
||||
|
||||
/**
|
||||
* 填报内容
|
||||
*/
|
||||
@TableField(value = "report_process_content")
|
||||
private String reportProcessContent;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@TableField(value = "type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 获取电能质量问题编号
|
||||
*
|
||||
* @return power_quality_problem_no - 电能质量问题编号
|
||||
*/
|
||||
public String getPowerQualityProblemNo() {
|
||||
return powerQualityProblemNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置电能质量问题编号
|
||||
*
|
||||
* @param powerQualityProblemNo 电能质量问题编号
|
||||
*/
|
||||
public void setPowerQualityProblemNo(String powerQualityProblemNo) {
|
||||
this.powerQualityProblemNo = powerQualityProblemNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取操作时间
|
||||
*
|
||||
* @return data_date - 操作时间
|
||||
*/
|
||||
public Date getDataDate() {
|
||||
return dataDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作时间
|
||||
*
|
||||
* @param dataDate 操作时间
|
||||
*/
|
||||
public void setDataDate(Date dataDate) {
|
||||
this.dataDate = dataDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核人
|
||||
*
|
||||
* @return checker - 审核人
|
||||
*/
|
||||
public String getChecker() {
|
||||
return checker;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审核人
|
||||
*
|
||||
* @param checker 审核人
|
||||
*/
|
||||
public void setChecker(String checker) {
|
||||
this.checker = checker;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核备注
|
||||
*
|
||||
* @return description - 审核备注
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审核备注
|
||||
*
|
||||
* @param description 审核备注
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*
|
||||
* @return report_process - 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
public String getReportProcess() {
|
||||
return reportProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*
|
||||
* @param reportProcess 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
public void setReportProcess(String reportProcess) {
|
||||
this.reportProcess = reportProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取填报内容
|
||||
*
|
||||
* @return report_process_content - 填报内容
|
||||
*/
|
||||
public String getReportProcessContent() {
|
||||
return reportProcessContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置填报内容
|
||||
*
|
||||
* @param reportProcessContent 填报内容
|
||||
*/
|
||||
public void setReportProcessContent(String reportProcessContent) {
|
||||
this.reportProcessContent = reportProcessContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取状态
|
||||
*
|
||||
* @return type - 状态
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态
|
||||
*
|
||||
* @param type 状态
|
||||
*/
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,13 @@ public class RStatWorkOrderDetailPO {
|
||||
private String problemNo;
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
@TableField(value = "org_name")
|
||||
private String orgName;
|
||||
|
||||
@TableField(value = "distribution_id")
|
||||
private String distributionId;
|
||||
@TableField(value = "distribution_name")
|
||||
private String distributionName;
|
||||
/**
|
||||
* 工单状态(字典,待派单、已派单、已关闭)
|
||||
*/
|
||||
@@ -144,6 +151,12 @@ public class RStatWorkOrderDetailPO {
|
||||
@TableField(value = "cause_feedback")
|
||||
private String causeFeedback;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
@TableField(value = "check_person")
|
||||
private String checkPerson;
|
||||
|
||||
/**
|
||||
* 审核状态(字典,两种类型:审核通过/审核不通过)
|
||||
*/
|
||||
@@ -157,7 +170,7 @@ public class RStatWorkOrderDetailPO {
|
||||
private String checkComments;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
* 整改完成时间
|
||||
*/
|
||||
@TableField(value = "rectify_complete_time")
|
||||
private Date rectifyCompleteTime;
|
||||
@@ -174,6 +187,12 @@ public class RStatWorkOrderDetailPO {
|
||||
@TableField(value = "rectify_describe")
|
||||
private String rectifyDescribe;
|
||||
|
||||
/**
|
||||
* 整改人ID
|
||||
*/
|
||||
@TableField(value = "assess_person")
|
||||
private String assessPerson;
|
||||
|
||||
/**
|
||||
* 评估完成时间
|
||||
*/
|
||||
|
||||
@@ -49,28 +49,32 @@ public class RGeneralSurveyPlanVO {
|
||||
@ApiModelProperty(value="计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "is_file_upload")
|
||||
@ApiModelProperty(value="文件是否上传(0:否 1:是)")
|
||||
private Integer isFileUpload;
|
||||
|
||||
/**
|
||||
* 上传文件数量
|
||||
*/
|
||||
@TableField(value = "file_count")
|
||||
@ApiModelProperty(value="上传文件数量")
|
||||
private Integer fileCount;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
@TableField(value = "file_path")
|
||||
@ApiModelProperty(value="文件路径")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty(value="审核人")
|
||||
private String checkPerson;
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@ApiModelProperty(value="审核意见")
|
||||
private String checkComment;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@TableField(value = "upload_time")
|
||||
@ApiModelProperty(value="上传时间")
|
||||
private Date uploadTime;
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 台区测点问题表
|
||||
*/
|
||||
@Data
|
||||
public class RStatDistributionProblemVO {
|
||||
/**
|
||||
* 问题编号(有生成规则,看文档)
|
||||
*/
|
||||
private String problemNo;
|
||||
|
||||
private String orgNo;
|
||||
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 问题类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||
*/
|
||||
private String problemType;
|
||||
|
||||
/**
|
||||
* 问题发生时间
|
||||
*/
|
||||
private Date occurTime;
|
||||
|
||||
/**
|
||||
* 台区ID
|
||||
*/
|
||||
private String distributionId;
|
||||
/**
|
||||
* 台区名称
|
||||
*/
|
||||
private String distributionName;
|
||||
|
||||
/**
|
||||
* 最新超标时间(超标连续大于4小时)
|
||||
*/
|
||||
private Date lastTime;
|
||||
|
||||
/**
|
||||
* 审核状态(字典,两种类型:待审核/已审核)
|
||||
*/
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审核处理(字典,三种情况:“-”“生成工单”“无需处理”,待审核状态的审核结果为“-”,另外两种根据审核弹窗选择结果显示.这边字典存两个生成工单、无需处理,为空是替换成“-”)
|
||||
*/
|
||||
private String checkResult;
|
||||
|
||||
/**
|
||||
* 问题处理时间
|
||||
*/
|
||||
private Date handleTime;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
private String problemDescribe;
|
||||
|
||||
/**
|
||||
* 补充描述
|
||||
*/
|
||||
private String supplyDescribe;
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/22 18:59【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 电能质量问题日志表
|
||||
*/
|
||||
public class RStatElectricQualityProblemLogVO {
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
private String orgName;
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
private Date dataDate;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String checker;
|
||||
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
private String reportProcess;
|
||||
|
||||
/**
|
||||
* 填报内容
|
||||
*/
|
||||
private String reportProcessContent;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 获取电能质量问题编号
|
||||
*
|
||||
* @return power_quality_problem_no - 电能质量问题编号
|
||||
*/
|
||||
public String getPowerQualityProblemNo() {
|
||||
return powerQualityProblemNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置电能质量问题编号
|
||||
*
|
||||
* @param powerQualityProblemNo 电能质量问题编号
|
||||
*/
|
||||
public void setPowerQualityProblemNo(String powerQualityProblemNo) {
|
||||
this.powerQualityProblemNo = powerQualityProblemNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取操作时间
|
||||
*
|
||||
* @return data_date - 操作时间
|
||||
*/
|
||||
public Date getDataDate() {
|
||||
return dataDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作时间
|
||||
*
|
||||
* @param dataDate 操作时间
|
||||
*/
|
||||
public void setDataDate(Date dataDate) {
|
||||
this.dataDate = dataDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核人
|
||||
*
|
||||
* @return checker - 审核人
|
||||
*/
|
||||
public String getChecker() {
|
||||
return checker;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审核人
|
||||
*
|
||||
* @param checker 审核人
|
||||
*/
|
||||
public void setChecker(String checker) {
|
||||
this.checker = checker;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核备注
|
||||
*
|
||||
* @return description - 审核备注
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置审核备注
|
||||
*
|
||||
* @param description 审核备注
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*
|
||||
* @return report_process - 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
public String getReportProcess() {
|
||||
return reportProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*
|
||||
* @param reportProcess 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
public void setReportProcess(String reportProcess) {
|
||||
this.reportProcess = reportProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取填报内容
|
||||
*
|
||||
* @return report_process_content - 填报内容
|
||||
*/
|
||||
public String getReportProcessContent() {
|
||||
return reportProcessContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置填报内容
|
||||
*
|
||||
* @param reportProcessContent 填报内容
|
||||
*/
|
||||
public void setReportProcessContent(String reportProcessContent) {
|
||||
this.reportProcessContent = reportProcessContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取状态
|
||||
*
|
||||
* @return type - 状态
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态
|
||||
*
|
||||
* @param type 状态
|
||||
*/
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 工单详情表
|
||||
*/
|
||||
@Data
|
||||
public class RStatWorkOrderDetailVO {
|
||||
/**
|
||||
* 问题编号(台区测点问题表的problem_no)
|
||||
*/
|
||||
private String problemNo;
|
||||
private String orgNo;
|
||||
private String orgName;
|
||||
|
||||
|
||||
/**
|
||||
* 台区ID
|
||||
*/
|
||||
private String distributionId;
|
||||
/**
|
||||
* 台区名称
|
||||
*/
|
||||
private String distributionName;
|
||||
/**
|
||||
* 工单状态(字典,待派单、已派单、已关闭)
|
||||
*/
|
||||
private String workOrderStatus;
|
||||
|
||||
/**
|
||||
* 工单类型(字典,目前一个,整改单)
|
||||
*/
|
||||
private String workOrderType;
|
||||
|
||||
/**
|
||||
* 一级业务类型(字典,目前一个,运检业务)
|
||||
*/
|
||||
private String primaryBusinessType;
|
||||
|
||||
/**
|
||||
* 二级业务类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||
*/
|
||||
private String twoBusinessType;
|
||||
|
||||
/**
|
||||
* 供电所
|
||||
*/
|
||||
private String powerSupplyStation;
|
||||
private String powerSupplyStationName;
|
||||
|
||||
|
||||
/**
|
||||
* 工单流程(字典,生成工单、派单、反馈、审核、整改、评估、归档,默认生成工单)
|
||||
*/
|
||||
private String workOrderProcess;
|
||||
|
||||
/**
|
||||
* 维护班组
|
||||
*/
|
||||
private String whbz;
|
||||
|
||||
/**
|
||||
* 工单负责人
|
||||
*/
|
||||
private String workOrderLeader;
|
||||
|
||||
/**
|
||||
* 工单完成时间
|
||||
*/
|
||||
private Date workOrderOverTime;
|
||||
|
||||
/**
|
||||
* 要求反馈时间
|
||||
*/
|
||||
private Date expectAskFeedbackTime;
|
||||
|
||||
/**
|
||||
* 接单人ID
|
||||
*/
|
||||
private String pickUpPerson;
|
||||
|
||||
/**
|
||||
* 下发时间
|
||||
*/
|
||||
private Date distributionTime;
|
||||
|
||||
/**
|
||||
* 预期到期时间
|
||||
*/
|
||||
private Date expirationTime;
|
||||
|
||||
/**
|
||||
* 关联设备主人
|
||||
*/
|
||||
private String relationDevice;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String enclosure;
|
||||
|
||||
/**
|
||||
* 抄送
|
||||
*/
|
||||
private String copyFor;
|
||||
|
||||
/**
|
||||
* 反馈时间
|
||||
*/
|
||||
private Date askFeedbackTime;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
private Date plannedCompletionTime;
|
||||
|
||||
/**
|
||||
* 原因反馈
|
||||
*/
|
||||
private String causeFeedback;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String checkPerson;
|
||||
|
||||
/**
|
||||
* 审核状态(字典,两种类型:审核通过/审核不通过)
|
||||
*/
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审核意见(审核通过可为空,审核不通过时必填)
|
||||
*/
|
||||
private String checkComments;
|
||||
|
||||
/**
|
||||
* 整改完成时间
|
||||
*/
|
||||
private Date rectifyCompleteTime;
|
||||
|
||||
/**
|
||||
* 整改人ID
|
||||
*/
|
||||
private String rectifyPerson;
|
||||
|
||||
/**
|
||||
* 整改描述
|
||||
*/
|
||||
private String rectifyDescribe;
|
||||
|
||||
/**
|
||||
* 整改人ID
|
||||
*/
|
||||
private String assessPerson;
|
||||
|
||||
/**
|
||||
* 评估完成时间
|
||||
*/
|
||||
private Date assessCompleteTime;
|
||||
|
||||
/**
|
||||
* 评估结果(字典,评估合格、评估不合格)
|
||||
*/
|
||||
private String assessResult;
|
||||
|
||||
/**
|
||||
* 评估描述
|
||||
*/
|
||||
private String assessDescribe;
|
||||
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
private String problemDescribe;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.process.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.EnumUtils;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月20日 10:03
|
||||
*/
|
||||
public class ProcessEnumUtil {
|
||||
|
||||
/**
|
||||
* 获取HarmonicResponseEnum实例
|
||||
*/
|
||||
public static ProcessResponseEnum getHarmonicEnumResponseEnumByMessage(@NotNull Object value) {
|
||||
ProcessResponseEnum harmonicResponseEnum;
|
||||
try {
|
||||
String message = value.toString();
|
||||
if(message.indexOf(StrUtil.C_COMMA)>0){
|
||||
value = message.substring(message.indexOf(StrUtil.C_COMMA)+1);
|
||||
}
|
||||
harmonicResponseEnum = EnumUtils.valueOf(ProcessResponseEnum.class, value, ProcessResponseEnum.class.getMethod(BusinessException.GET_MESSAGE_METHOD));
|
||||
return Objects.isNull(harmonicResponseEnum) ? ProcessResponseEnum.PROCESS_COMMON_ERROR : harmonicResponseEnum;
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new BusinessException(CommonResponseEnum.INTERNAL_ERROR);
|
||||
}
|
||||
}
|
||||
public static Enum<?> getExceptionEnum(HttpResult<Object> result){
|
||||
//如果返回错误,且为内部错误,则直接抛出异常
|
||||
CommonResponseEnum commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
|
||||
if (commonResponseEnum == CommonResponseEnum.DEVICE_RESPONSE_ENUM) {
|
||||
return getHarmonicEnumResponseEnumByMessage(result.getMessage());
|
||||
}
|
||||
return commonResponseEnum;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -108,6 +108,12 @@
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>prepare-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -24,6 +24,8 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电能质量问题
|
||||
* @author xiaoyao
|
||||
@@ -213,14 +215,26 @@ public class ElectricityQualityIssuesController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/queryIssuesAndOrder")
|
||||
@ApiOperation("查询问题及工单(当前部门下)")
|
||||
@ApiImplicitParam(name = "orgNo", value = "部门id", required = true)
|
||||
public HttpResult<IssueesAndOrderVO> queryIssuesAndOrder(@RequestParam("orgNo") String orgNo){
|
||||
String methodDescribe = getMethodDescribe("queryIssuesAndOrder");
|
||||
IssueesAndOrderVO issueesAndOrderVO =issuesService.queryIssuesAndOrder(orgNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, issueesAndOrderVO, methodDescribe);
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/checkPowerQuality")
|
||||
@ApiOperation("电能质量问题审核")
|
||||
@ApiImplicitParam(name = "electricityQualityCheckParam", value = "电能质量问题审核参数", required = true)
|
||||
public HttpResult<Boolean> checkPowerQuality(@Validated @RequestBody ElectricityQualityCheckParam electricityQualityCheckParam){
|
||||
String methodDescribe = getMethodDescribe("checkPowerQuality");
|
||||
|
||||
Boolean flag = issuesService.checkPowerQuality (electricityQualityCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
/*todo*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryCheckTrack")
|
||||
@ApiOperation("历史审核记录查询")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "历史审核记录查询参数", required = true)
|
||||
public HttpResult<List<RStatElectricQualityProblemLogVO>> queryCheckTrack(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("checkPowerQuality");
|
||||
|
||||
List<RStatElectricQualityProblemLogVO> rStatElectricQualityProblemLogVOS = issuesService.queryCheckTrack (powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rStatElectricQualityProblemLogVOS, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,7 +92,27 @@ public class LoadTypeUserManageController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/checkLoadTypeUserI")
|
||||
@ApiOperation("入网评估报告审核")
|
||||
@ApiImplicitParam(name = "loadTypeUserCheckParam", value = "入网评估报告审核参数", required = true)
|
||||
public HttpResult<Boolean> checkLoadTypeUserI(@Validated @RequestBody LoadTypeUserCheckParam loadTypeUserCheckParam){
|
||||
String methodDescribe = getMethodDescribe("checkLoadTypeUserI");
|
||||
|
||||
Boolean flag = loadTypeUserManageService.checkLoadTypeUserI (loadTypeUserCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/checkLoadTypeUserA")
|
||||
@ApiOperation("实测报告审核")
|
||||
@ApiImplicitParam(name = "loadTypeUserCheckParam", value = "实测报告参数", required = true)
|
||||
public HttpResult<Boolean> checkLoadTypeUserA(@Validated @RequestBody LoadTypeUserCheckParam loadTypeUserCheckParam){
|
||||
String methodDescribe = getMethodDescribe("checkLoadTypeUserA");
|
||||
|
||||
Boolean flag = loadTypeUserManageService.checkLoadTypeUserA (loadTypeUserCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
/**
|
||||
* 上传干扰源用户入网报告
|
||||
* @author qijian
|
||||
|
||||
@@ -92,10 +92,21 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlanAudit");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1").collect (Collectors.toList ()));
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1","2").collect (Collectors.toList ()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/checkPlanAudit")
|
||||
@ApiOperation("普测计划-审核")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanChcekParm", value = "普测计划审核参数", required = true)
|
||||
public HttpResult<Boolean> checkPlanAudit(@Validated @RequestBody RGeneralSurveyPlanChcekParm rGeneralSurveyPlanChcekParm){
|
||||
String methodDescribe = getMethodDescribe("checkPlanAudit");
|
||||
|
||||
Boolean flag = rGeneralSurveyPlanPOService.checkPlanAudit (rGeneralSurveyPlanChcekParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanResult")
|
||||
@ApiOperation("查询普测计划-结果页面")
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.process.pojo.param.RStatProblemAndWorkOrderParam;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
import com.njcn.process.pojo.vo.RStatDistributionProblemVO;
|
||||
import com.njcn.process.pojo.vo.RStatWorkOrderDetailVO;
|
||||
import com.njcn.process.service.RStatDistributionProblemService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -15,10 +20,10 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -56,4 +61,58 @@ public class RStatWorkOrderController extends BaseController {
|
||||
OrderCountVO orderCountVO =rStatDistributionProblemService.queryOrderCount(orgNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, orderCountVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/createProblem")
|
||||
@ApiOperation("创建问题接口")
|
||||
@ApiImplicitParam(name = "overLimitFlagDTOList", value = "部门id", required = true)
|
||||
public HttpResult<Boolean> createProblem(@RequestBody List<OverLimitFlagDTO> overLimitFlagDTOList){
|
||||
String methodDescribe = getMethodDescribe("createProblem");
|
||||
Boolean problem = rStatDistributionProblemService.createProblem (overLimitFlagDTOList);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, problem, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryProblem")
|
||||
@ApiOperation("查询工单问题")
|
||||
@ApiImplicitParam(name = "rStatProblemAndWorkOrderParam", value = "查询工单问题参数", required = true)
|
||||
public HttpResult<IPage<RStatDistributionProblemVO>> queryProblem(@Validated @RequestBody RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam){
|
||||
String methodDescribe = getMethodDescribe("queryProblem");
|
||||
|
||||
IPage<RStatDistributionProblemVO> rStatDistributionProblemVOIPage = rStatDistributionProblemService.queryProblem (rStatProblemAndWorkOrderParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rStatDistributionProblemVOIPage, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/checkProblem")
|
||||
@ApiOperation("审核处理")
|
||||
@ApiImplicitParam(name = "rStatDistributionProblemVO", value = "审核工单问题参数", required = true)
|
||||
public HttpResult<Boolean> checkProblem(@Validated @RequestBody RStatDistributionProblemVO rStatDistributionProblemVO){
|
||||
String methodDescribe = getMethodDescribe("checkProblem");
|
||||
|
||||
Boolean flag = rStatDistributionProblemService.checkProblem (rStatDistributionProblemVO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryWorkOrder")
|
||||
@ApiOperation("查询工单")
|
||||
@ApiImplicitParam(name = "rStatProblemAndWorkOrderParam", value = "查询工单问题参数", required = true)
|
||||
public HttpResult<IPage<RStatWorkOrderDetailVO>> queryWorkOrder(@Validated @RequestBody RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam){
|
||||
String methodDescribe = getMethodDescribe("queryWorkOrder");
|
||||
|
||||
IPage<RStatWorkOrderDetailVO> rStatWorkOrderDetailVOIPage = rStatDistributionProblemService.queryWorkOrder (rStatProblemAndWorkOrderParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rStatWorkOrderDetailVOIPage, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateWorkOrderStatus")
|
||||
@ApiOperation("更新工单进度")
|
||||
@ApiImplicitParam(name = "rStatWorkOrderDetailVO", value = "查询工单问题参数", required = true)
|
||||
public HttpResult<Boolean> updateWorkOrderStatus(@Validated @RequestBody RStatWorkOrderDetailVO rStatWorkOrderDetailVO){
|
||||
String methodDescribe = getMethodDescribe("updateWorkOrderStatus");
|
||||
|
||||
Boolean flag = rStatDistributionProblemService.updateWorkOrderStatus (rStatWorkOrderDetailVO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.po.RStatElectricQualityProblemLogPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/22 18:59【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatElectricQualityProblemLogMapper extends MppBaseMapper<RStatElectricQualityProblemLogPO> {
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.param.RStatProblemAndWorkOrderParam;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
import com.njcn.process.pojo.vo.RStatWorkOrderDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,4 +18,25 @@ import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatWorkOrderDetailMapper extends MppBaseMapper<RStatWorkOrderDetailPO> {
|
||||
@Select ({"<script>",
|
||||
"SELECT\n" +
|
||||
"\ta.*, b.problem_describe\n" +
|
||||
"FROM\n" +
|
||||
"\tr_stat_work_order_detail a\n" +
|
||||
"INNER JOIN r_stat_distribution_problem b ON a.problem_no = b.problem_no\n" +
|
||||
"WHERE 1=1 \n" +
|
||||
"<when test='temp.problemType!=null and temp.problemType!=\"\"'>",
|
||||
"\t AND a.two_business_type = #{temp.problemType}\n" +
|
||||
"</when>",
|
||||
"<when test='temp.occurTime!=null and temp.occurTime!=\"\"'>",
|
||||
"AND DATE_FORMAT(b.occur_time, '%Y%m%d') = #{temp.occurTime}\n" +
|
||||
"</when>",
|
||||
"<when test='temp.workOrderStatus!=null and temp.workOrderStatus!=\"\"'>",
|
||||
"AND a.work_order_status = #{temp.workOrderStatus}\n" +
|
||||
"</when>",
|
||||
"<when test='temp.problemNo!=null and temp.problemNo!=\"\"'>",
|
||||
"AND a.problem_no = #{temp.problemNo}",
|
||||
"</when>",
|
||||
"</script>"})
|
||||
Page<RStatWorkOrderDetailVO> getPageVo(Page<RStatWorkOrderDetailVO> returnpage,@Param("temp") RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.process.mapper.RStatElectricQualityProblemLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RStatElectricQualityProblemLogPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_electric_quality_problem_log-->
|
||||
<id column="power_quality_problem_no" jdbcType="VARCHAR" property="powerQualityProblemNo" />
|
||||
<result column="data_date" jdbcType="TIMESTAMP" property="dataDate" />
|
||||
<result column="checker" jdbcType="VARCHAR" property="checker" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="report_process" jdbcType="VARCHAR" property="reportProcess" />
|
||||
<result column="report_process_content" jdbcType="VARCHAR" property="reportProcessContent" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
power_quality_problem_no, data_date, checker, description, report_process, report_process_content,
|
||||
`type`
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -6,6 +6,8 @@ import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电能质量问题接口类
|
||||
* @author xiaoyao
|
||||
@@ -96,4 +98,20 @@ public interface IssuesService {
|
||||
* @Date: 2023/1/5
|
||||
*/
|
||||
IssueesAndOrderVO queryIssuesAndOrder(String orgNo);
|
||||
/**
|
||||
* @Description: 电能质量问题审核
|
||||
* @Param: [electricityQualityCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
Boolean checkPowerQuality(ElectricityQualityCheckParam electricityQualityCheckParam);
|
||||
/**
|
||||
* @Description: 历史审核记录查询
|
||||
* @Param: [powerQualityProblemNo]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RStatElectricQualityProblemLogVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/23
|
||||
*/
|
||||
List<RStatElectricQualityProblemLogVO> queryCheckTrack(String powerQualityProblemNo);
|
||||
}
|
||||
|
||||
@@ -79,4 +79,20 @@ public interface LoadTypeUserManageService {
|
||||
* @return
|
||||
*/
|
||||
List<LoadTypeRelationExcel> exportLoadTypeRelationList(List<String> list);
|
||||
/**
|
||||
* @Description: 入网评估报告审核
|
||||
* @Param: [loadTypeUserCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
Boolean checkLoadTypeUserI(LoadTypeUserCheckParam loadTypeUserCheckParam);
|
||||
/**
|
||||
* @Description: 实测报告审核
|
||||
* @Param: [loadTypeUserCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
Boolean checkLoadTypeUserA(LoadTypeUserCheckParam loadTypeUserCheckParam);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ package com.njcn.process.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanAddParm;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyResultUploadParam;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.vo.SurveyPlanExcel;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
@@ -81,4 +78,12 @@ public interface RGeneralSurveyPlanPOService extends IMppService<RGeneralSurveyP
|
||||
* @Date: 2022/12/1
|
||||
*/
|
||||
List<RGeneralSurveyPlanPO> querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm);
|
||||
/**
|
||||
* @Description: checkPlanAudit
|
||||
* @Param: [rGeneralSurveyPlanChcekParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
Boolean checkPlanAudit(RGeneralSurveyPlanChcekParm rGeneralSurveyPlanChcekParm);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.process.pojo.param.RStatProblemAndWorkOrderParam;
|
||||
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
import com.njcn.process.pojo.vo.RStatDistributionProblemVO;
|
||||
import com.njcn.process.pojo.vo.RStatWorkOrderDetailVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -32,4 +39,44 @@ public interface RStatDistributionProblemService extends IMppService<RStatDistri
|
||||
* @Date: 2023/2/2
|
||||
*/
|
||||
OrderCountVO queryOrderCount(String orgNo);
|
||||
/**
|
||||
* @Description: 创建问题接口
|
||||
* @Param: [overLimitFlagDTOList]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/15
|
||||
*/
|
||||
Boolean createProblem(List<OverLimitFlagDTO> overLimitFlagDTOList);
|
||||
/**
|
||||
* @Description: 查询问题接口
|
||||
* @Param: [rStatProblemAndWorkOrderParam]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RStatDistributionProblemVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/16
|
||||
*/
|
||||
IPage<RStatDistributionProblemVO> queryProblem(RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam);
|
||||
/**
|
||||
* @Description: 审核处理
|
||||
* @Param: [rStatDistributionProblemVO]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
Boolean checkProblem(RStatDistributionProblemVO rStatDistributionProblemVO);
|
||||
/**
|
||||
* @Description: queryWorkOrder
|
||||
* @Param: [rStatProblemAndWorkOrderParam]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RStatWorkOrderDetailVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
IPage<RStatWorkOrderDetailVO> queryWorkOrder(RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam);
|
||||
/**
|
||||
* @Description: 更新工单进度
|
||||
* @Param: [rStatWorkOrderDetailVO]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
Boolean updateWorkOrderStatus(RStatWorkOrderDetailVO rStatWorkOrderDetailVO);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import cn.hutool.extra.pinyin.PinyinUtil;
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -36,6 +37,7 @@ import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 电能质量问题实现类
|
||||
@@ -64,6 +66,8 @@ public class IssuesServiceImpl implements IssuesService {
|
||||
|
||||
private final RMpElectricQualityProblemFlowDetailsMapper flowDetailsMapper;
|
||||
|
||||
private final RStatElectricQualityProblemLogMapper rStatElectricQualityProblemLogMapper;
|
||||
|
||||
@Resource
|
||||
private MinIoUtils minIoUtils;
|
||||
|
||||
@@ -561,4 +565,88 @@ public class IssuesServiceImpl implements IssuesService {
|
||||
return issueesAndOrderVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param electricityQualityCheckParam
|
||||
* @Description: 电能质量问题审核
|
||||
* @Param: [electricityQualityCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkPowerQuality(ElectricityQualityCheckParam electricityQualityCheckParam) {
|
||||
boolean result = true;
|
||||
RStatElectricQualityProblemLogPO rStatElectricQualityProblemLogPO = new RStatElectricQualityProblemLogPO();
|
||||
rStatElectricQualityProblemLogPO.setPowerQualityProblemNo (electricityQualityCheckParam.getPowerQualityProblemNo ());
|
||||
rStatElectricQualityProblemLogPO.setChecker (electricityQualityCheckParam.getCheckPerson ());
|
||||
rStatElectricQualityProblemLogPO.setDataDate ( new Date ());
|
||||
rStatElectricQualityProblemLogPO.setDescription (electricityQualityCheckParam.getCheckComment ());
|
||||
rStatElectricQualityProblemLogPO.setReportProcess (electricityQualityCheckParam.getReportProcess ());
|
||||
rStatElectricQualityProblemLogPO.setReportProcessContent (electricityQualityCheckParam.getCheckComment ());
|
||||
|
||||
rStatElectricQualityProblemLogPO.setType (Objects.equals ("1", electricityQualityCheckParam.getCheckResult ())?DicDataEnum.SUCCESS.getCode ( ):DicDataEnum.FAIL.getCode ( ));
|
||||
/*插入审核日志表*/
|
||||
int insert = rStatElectricQualityProblemLogMapper.insert (rStatElectricQualityProblemLogPO);
|
||||
String report_process ="";
|
||||
String report_process_status ="";
|
||||
String reportProcess =electricityQualityCheckParam.getReportProcess ();
|
||||
String checkResult = electricityQualityCheckParam.getCheckResult ( );
|
||||
if (DicDataEnum.CAUSE_ANALYSIS.getCode ().equals(reportProcess)){
|
||||
if(Objects.equals ("1", checkResult)){
|
||||
report_process_status = DicDataEnum.AUDITT.getCode ();
|
||||
report_process = DicDataEnum.PLAN_MEASURES.getCode ();
|
||||
}else{
|
||||
report_process_status = DicDataEnum.FAIL.getCode ();
|
||||
report_process = DicDataEnum.CAUSE_ANALYSIS.getCode ();
|
||||
}
|
||||
}else if (DicDataEnum.PLAN_MEASURES.getCode().equals(reportProcess)){
|
||||
if(Objects.equals ("1", checkResult)){
|
||||
report_process_status = DicDataEnum.AUDITT.getCode ();
|
||||
report_process = DicDataEnum.ACTUAL_MEASURES.getCode ();
|
||||
}else{
|
||||
report_process_status = DicDataEnum.FAIL.getCode ();
|
||||
report_process = DicDataEnum.PLAN_MEASURES.getCode ();
|
||||
}
|
||||
|
||||
}else if (DicDataEnum.ACTUAL_MEASURES.getCode().equals(reportProcess)){
|
||||
if(Objects.equals ("1", checkResult)){
|
||||
report_process_status = DicDataEnum.AUDITT.getCode ();
|
||||
report_process = DicDataEnum.INSIGHTS.getCode ();
|
||||
}else{
|
||||
report_process_status = DicDataEnum.FAIL.getCode ();
|
||||
report_process = DicDataEnum.ACTUAL_MEASURES.getCode ();
|
||||
}
|
||||
|
||||
}else if (DicDataEnum.INSIGHTS.getCode().equals(reportProcess)){
|
||||
|
||||
if(Objects.equals ("1", checkResult)){
|
||||
report_process_status = DicDataEnum.AUDITT.getCode ();
|
||||
report_process = DicDataEnum.ARCHIVED.getCode ();
|
||||
}else{
|
||||
report_process_status = DicDataEnum.FAIL.getCode ();
|
||||
report_process = DicDataEnum.INSIGHTS.getCode ();
|
||||
}
|
||||
}
|
||||
UpdateWrapper<RStatElectricQualityProblemFlow> updateWrapper = new UpdateWrapper ();
|
||||
updateWrapper.eq ("power_quality_problem_no", electricityQualityCheckParam.getPowerQualityProblemNo ());
|
||||
updateWrapper.set ("report_process", report_process);
|
||||
updateWrapper.set ("report_process_status",report_process_status);
|
||||
int i= issuesMapper.update (null,updateWrapper);
|
||||
result = insert==1&&i==1;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param powerQualityProblemNo
|
||||
* @Description: 历史审核记录查询
|
||||
* @Param: [powerQualityProblemNo]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RStatElectricQualityProblemLogVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/23
|
||||
*/
|
||||
@Override
|
||||
public List<RStatElectricQualityProblemLogVO> queryCheckTrack(String powerQualityProblemNo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.api.DistributionMonitorClient;
|
||||
@@ -342,4 +343,54 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param loadTypeUserCheckParam
|
||||
* @Description: 入网评估报告审核
|
||||
* @Param: [loadTypeUserCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkLoadTypeUserI(LoadTypeUserCheckParam loadTypeUserCheckParam) {
|
||||
boolean result = true;
|
||||
UpdateWrapper<RLoadTypeUserManage> updateWrapper = new UpdateWrapper ();
|
||||
updateWrapper.eq ("id", loadTypeUserCheckParam.getId ());
|
||||
updateWrapper.set ("i_check_comment", loadTypeUserCheckParam.getCheckComment ());
|
||||
updateWrapper.set ("i_check_person",loadTypeUserCheckParam.getCheckPerson ());
|
||||
|
||||
DictData fail = dicDataFeignClient.getDicDataByCode (DicDataEnum.FAIL.getCode ( )).getData ( );
|
||||
DictData finish = dicDataFeignClient.getDicDataByCode(DicDataEnum.SUCCESS.getCode()).getData();
|
||||
|
||||
updateWrapper.set ("i_status", Objects.equals ("1", loadTypeUserCheckParam.getCheckResult ())?finish.getId ():fail.getId ());
|
||||
int i= loadTypeUserManageMapper.update (null,updateWrapper);
|
||||
result = i==1;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param loadTypeUserCheckParam
|
||||
* @Description: 实测报告审核
|
||||
* @Param: [loadTypeUserCheckParam]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkLoadTypeUserA(LoadTypeUserCheckParam loadTypeUserCheckParam) {
|
||||
boolean result = true;
|
||||
UpdateWrapper<RLoadTypeUserManage> updateWrapper = new UpdateWrapper ();
|
||||
updateWrapper.eq ("id", loadTypeUserCheckParam.getId ());
|
||||
updateWrapper.set ("a_check_comment", loadTypeUserCheckParam.getCheckComment ());
|
||||
updateWrapper.set ("a_check_person",loadTypeUserCheckParam.getCheckPerson ());
|
||||
|
||||
DictData fail = dicDataFeignClient.getDicDataByCode (DicDataEnum.FAIL.getCode ( )).getData ( );
|
||||
DictData finish = dicDataFeignClient.getDicDataByCode(DicDataEnum.SUCCESS.getCode()).getData();
|
||||
|
||||
updateWrapper.set ("a_status", Objects.equals ("1", loadTypeUserCheckParam.getCheckResult ())?finish.getId ():fail.getId ());
|
||||
int i= loadTypeUserManageMapper.update (null,updateWrapper);
|
||||
result = i==1;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.process.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
@@ -12,10 +13,7 @@ import com.njcn.minio.utils.MinIoUtils;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanDetailMapper;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanPOMapper;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanAddParm;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyResultUploadParam;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
@@ -85,7 +83,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
RGeneralSurveyPlanPO rGeneralSurveyPlanPO = new RGeneralSurveyPlanPO ();
|
||||
BeanUtils.copyProperties (rGeneralSurveyPlanAddParm,rGeneralSurveyPlanPO);
|
||||
/*todo 后期与工作流绑定*/
|
||||
rGeneralSurveyPlanPO.setStatus (0);
|
||||
rGeneralSurveyPlanPO.setStatus (1);
|
||||
boolean b = this.saveOrUpdateByMultiId (rGeneralSurveyPlanPO);
|
||||
|
||||
List<RGeneralSurveyPlanAddParm.RGeneralSurveyPlanDetailAddParm> rGeneralSurveyPlanDetailAddParm = rGeneralSurveyPlanAddParm.getRGeneralSurveyPlanDetailAddParm ( );
|
||||
@@ -333,6 +331,26 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rGeneralSurveyPlanChcekParm
|
||||
* @Description: checkPlanAudit
|
||||
* @Param: [rGeneralSurveyPlanChcekParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/22
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkPlanAudit(RGeneralSurveyPlanChcekParm rGeneralSurveyPlanChcekParm) {
|
||||
boolean result = true;
|
||||
UpdateWrapper<RGeneralSurveyPlanPO> updateWrapper = new UpdateWrapper();
|
||||
updateWrapper.eq ("plan_no", rGeneralSurveyPlanChcekParm.getPlanNo ());
|
||||
updateWrapper.set ("check_comment", rGeneralSurveyPlanChcekParm.getCheckComment ());
|
||||
updateWrapper.set ("check_person",rGeneralSurveyPlanChcekParm.getCheckPerson ());
|
||||
updateWrapper.set ("status", Objects.equals ("1", rGeneralSurveyPlanChcekParm.getCheckResult ())?3:2);
|
||||
result = this.update (updateWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到Minio
|
||||
*
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.device.pms.api.PmsPowerDistributionareaClient;
|
||||
import com.njcn.device.pms.pojo.param.PowerDistributionareaParam;
|
||||
import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.process.mapper.RStatDistributionProblemMapper;
|
||||
import com.njcn.process.mapper.RStatWorkOrderDetailMapper;
|
||||
import com.njcn.process.pojo.param.RStatProblemAndWorkOrderParam;
|
||||
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
import com.njcn.process.pojo.vo.RStatDistributionProblemVO;
|
||||
import com.njcn.process.pojo.vo.RStatWorkOrderDetailVO;
|
||||
import com.njcn.process.service.RStatDistributionProblemService;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
@@ -29,10 +41,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDistributionProblemMapper, RStatDistributionProblemPO> implements RStatDistributionProblemService{
|
||||
public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDistributionProblemMapper, RStatDistributionProblemPO> implements RStatDistributionProblemService {
|
||||
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final PmsPowerDistributionareaClient pmsPowerDistributionareaClient;
|
||||
|
||||
private final RStatDistributionProblemMapper rStatDistributionProblemMapper;
|
||||
|
||||
@@ -48,22 +61,22 @@ public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDis
|
||||
*/
|
||||
@Override
|
||||
public IssueesAndOrderVO queryIssuesAndOrder(String orgNo) {
|
||||
IssueesAndOrderVO issueesAndOrderVO = new IssueesAndOrderVO();
|
||||
IssueesAndOrderVO issueesAndOrderVO = new IssueesAndOrderVO ( );
|
||||
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId (orgNo).getData ( );
|
||||
/*问题个数*/
|
||||
QueryWrapper<RStatDistributionProblemPO> problemPOQueryWrapper = new QueryWrapper<> ();
|
||||
QueryWrapper<RStatDistributionProblemPO> problemPOQueryWrapper = new QueryWrapper<> ( );
|
||||
problemPOQueryWrapper.select ("problem_no").
|
||||
in ("org_no",deptIds);
|
||||
in ("org_no", deptIds);
|
||||
List<RStatDistributionProblemPO> rStatDistributionProblemPOS = rStatDistributionProblemMapper.selectList (problemPOQueryWrapper);
|
||||
issueesAndOrderVO.setId (orgNo);
|
||||
issueesAndOrderVO.setIssueesCount (rStatDistributionProblemPOS.size ());
|
||||
issueesAndOrderVO.setIssueesCount (rStatDistributionProblemPOS.size ( ));
|
||||
List<String> problemNoList = rStatDistributionProblemPOS.stream ( ).map (RStatDistributionProblemPO::getProblemNo).collect (Collectors.toList ( ));
|
||||
/*已关联工单数量*/
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ( );
|
||||
workOrderDetailPOQueryWrapper.select ("1").
|
||||
in("problem_no",problemNoList).
|
||||
in ("org_no",deptIds);
|
||||
in ("problem_no", problemNoList).
|
||||
in ("org_no", deptIds);
|
||||
Integer relatedOrderCount = rStatWorkOrderDetailMapper.selectCount (workOrderDetailPOQueryWrapper);
|
||||
issueesAndOrderVO.setRelatedOrderCount (relatedOrderCount);
|
||||
return issueesAndOrderVO;
|
||||
@@ -79,18 +92,209 @@ public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDis
|
||||
*/
|
||||
@Override
|
||||
public OrderCountVO queryOrderCount(String orgNo) {
|
||||
OrderCountVO orderCountVO = new OrderCountVO();
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||
OrderCountVO orderCountVO = new OrderCountVO ( );
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId (orgNo).getData ( );
|
||||
/*工单数量*/
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ( );
|
||||
workOrderDetailPOQueryWrapper.
|
||||
in ("org_no",deptIds);
|
||||
in ("org_no", deptIds);
|
||||
List<RStatWorkOrderDetailPO> rStatWorkOrderDetailPOS = rStatWorkOrderDetailMapper.selectList (workOrderDetailPOQueryWrapper);
|
||||
orderCountVO.setId (orgNo);
|
||||
orderCountVO.setOrderCount (rStatWorkOrderDetailPOS.size ());
|
||||
orderCountVO.setOrderCount (rStatWorkOrderDetailPOS.size ( ));
|
||||
/*已完成工单数量*/
|
||||
long count = rStatWorkOrderDetailPOS.stream ( ).filter (t -> Objects.equals (t.getWorkOrderStatus ( ), DicDataEnum.CLOSED.getCode ())).count ( );
|
||||
orderCountVO.setCompelteOrderCount (Integer.valueOf (count+""));
|
||||
long count = rStatWorkOrderDetailPOS.stream ( ).filter (t -> Objects.equals (t.getWorkOrderStatus ( ), DicDataEnum.CLOSED.getCode ( ))).count ( );
|
||||
orderCountVO.setCompelteOrderCount (Integer.valueOf (count + ""));
|
||||
return orderCountVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param overLimitFlagDTOList
|
||||
* @Description: 创建问题接口
|
||||
* @Param: [overLimitFlagDTOList]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/15
|
||||
*/
|
||||
@Override
|
||||
public Boolean createProblem(List<OverLimitFlagDTO> overLimitFlagDTOList) {
|
||||
List<RStatDistributionProblemPO> rStatDistributionProblemPOList = new ArrayList<> ( );
|
||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
PowerDistributionareaParam powerDistributionareaParam = new PowerDistributionareaParam();
|
||||
List<PowerDistributionarea> data = pmsPowerDistributionareaClient.getPowerDistributionList (powerDistributionareaParam).getData ( );
|
||||
Map<String, PowerDistributionarea> collect = data.stream ( ).collect (Collectors.
|
||||
toMap (PowerDistributionarea::getId,
|
||||
powerDistributionarea->powerDistributionarea));
|
||||
overLimitFlagDTOList.forEach (overLimitFlagDTO -> {
|
||||
RStatDistributionProblemPO rStatDistributionProblemPO = new RStatDistributionProblemPO ( );
|
||||
rStatDistributionProblemPO.setProblemNo (createproblemNo(overLimitFlagDTO.getOverLimtType (),overLimitFlagDTO.getStartTime ().format(fmt)));
|
||||
rStatDistributionProblemPO.setOrgNo (collect.get(overLimitFlagDTO.getLineId ()).getOrgId ());
|
||||
rStatDistributionProblemPO.setOrgName (collect.get(overLimitFlagDTO.getLineId ()).getOrgName ());
|
||||
rStatDistributionProblemPO.setProblemType (overLimitFlagDTO.getOverLimtType ());
|
||||
rStatDistributionProblemPO.setOccurTime (Date.from(overLimitFlagDTO.getStartTime ().atZone(ZoneId.systemDefault()).toInstant()));
|
||||
rStatDistributionProblemPO.setLastTime (Date.from(overLimitFlagDTO.getEndTime ().atZone(ZoneId.systemDefault()).toInstant()));
|
||||
rStatDistributionProblemPO.setCheckStatus (DicDataEnum.REVIEW.getCode ());
|
||||
rStatDistributionProblemPO.setDistributionId (overLimitFlagDTO.getLineId ( ));
|
||||
rStatDistributionProblemPO.setDistributionName (collect.get(overLimitFlagDTO.getLineId ()).getName ());
|
||||
rStatDistributionProblemPO.setMeasurementPointId (overLimitFlagDTO.getLineId ( ));
|
||||
rStatDistributionProblemPO.setProblemDescribe ("......");
|
||||
rStatDistributionProblemPOList.add (rStatDistributionProblemPO);
|
||||
}
|
||||
);
|
||||
boolean b = this.saveBatch (rStatDistributionProblemPOList);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rStatProblemAndWorkOrderParam
|
||||
* @Description: 查询问题接口
|
||||
* @Param: [rStatProblemAndWorkOrderParam]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RStatDistributionProblemVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/16
|
||||
*/
|
||||
@Override
|
||||
public IPage<RStatDistributionProblemVO> queryProblem(RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam) {
|
||||
IPage<RStatDistributionProblemPO> page = new Page<> (rStatProblemAndWorkOrderParam.getCurrentPage(), rStatProblemAndWorkOrderParam.getPageSize());
|
||||
IPage<RStatDistributionProblemVO> returnpage = new Page<> (rStatProblemAndWorkOrderParam.getCurrentPage(), rStatProblemAndWorkOrderParam.getPageSize());
|
||||
QueryWrapper<RStatDistributionProblemPO> queryWrapper = new QueryWrapper<> ();
|
||||
queryWrapper.eq (StrUtil.isNotBlank(rStatProblemAndWorkOrderParam.getProblemType ()),"problem_type",rStatProblemAndWorkOrderParam.getProblemType ()).
|
||||
eq (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getCheckStatus ()),"check_status",rStatProblemAndWorkOrderParam.getCheckStatus ()).
|
||||
eq (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getOccurTime ()),"DATE_FORMAT( occur_time ,'%Y-%m-%d')",rStatProblemAndWorkOrderParam.getOccurTime ()).
|
||||
like (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getDistributionName ()), "distribution_name",rStatProblemAndWorkOrderParam.getDistributionName ());
|
||||
List<RStatDistributionProblemPO> records = rStatDistributionProblemMapper.selectPage (page, queryWrapper).getRecords ( );
|
||||
if(CollectionUtils.isEmpty (records)){
|
||||
return returnpage;
|
||||
}
|
||||
List<RStatDistributionProblemVO> list = new ArrayList<> ();
|
||||
records.forEach (temp->{
|
||||
RStatDistributionProblemVO rStatDistributionProblemVO = new RStatDistributionProblemVO();
|
||||
BeanUtils.copyProperties (temp, rStatDistributionProblemVO);
|
||||
list.add (rStatDistributionProblemVO);
|
||||
});
|
||||
returnpage.setRecords (list);
|
||||
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rStatDistributionProblemVO
|
||||
* @Description: 审核处理(更新问题表,生成工单表)
|
||||
* @Param: [rStatDistributionProblemVO]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkProblem(RStatDistributionProblemVO rStatDistributionProblemVO) {
|
||||
Boolean flag = true;
|
||||
RStatDistributionProblemPO rStatDistributionProblemPO = new RStatDistributionProblemPO();
|
||||
BeanUtils.copyProperties (rStatDistributionProblemVO, rStatDistributionProblemPO);
|
||||
flag = this.updateByMultiId (rStatDistributionProblemPO);
|
||||
if(!flag){
|
||||
return flag;
|
||||
}
|
||||
/*生成工单表*/
|
||||
if(Objects.equals (DicDataEnum.GENERATE.getCode (),rStatDistributionProblemPO.getCheckResult ())){
|
||||
/*处理台区信息*/
|
||||
PowerDistributionareaParam powerDistributionareaParam = new PowerDistributionareaParam();
|
||||
|
||||
List<PowerDistributionarea> data = pmsPowerDistributionareaClient.getPowerDistributionList (powerDistributionareaParam).getData ( );
|
||||
Map<String, PowerDistributionarea> collect = data.stream ( ).collect (Collectors.
|
||||
toMap (PowerDistributionarea::getId,
|
||||
powerDistributionarea->powerDistributionarea));
|
||||
RStatWorkOrderDetailPO po = new RStatWorkOrderDetailPO();
|
||||
BeanUtils.copyProperties (rStatDistributionProblemVO, po);
|
||||
po.setProblemNo (rStatDistributionProblemVO.getProblemNo ());
|
||||
po.setWorkOrderStatus (DicDataEnum.PEND_DISPATCH.getCode ());
|
||||
po.setWorkOrderType (DicDataEnum.RECT_ORDER.getCode ());
|
||||
po.setPrimaryBusinessType (DicDataEnum.TRANS_BUSINESS.getCode ());
|
||||
po.setTwoBusinessType (rStatDistributionProblemVO.getProblemType ());
|
||||
po.setPowerSupplyStation (collect.get (rStatDistributionProblemVO.getDistributionId ()).getPowerStationId ());
|
||||
po.setWorkOrderProcess (DicDataEnum.GENERATED.getCode ());
|
||||
int insert = rStatWorkOrderDetailMapper.insert (po);
|
||||
if(!(insert==1)){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rStatProblemAndWorkOrderParam
|
||||
* @Description: queryWorkOrder
|
||||
* @Param: [rStatProblemAndWorkOrderParam]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RStatWorkOrderDetailVO>
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
@Override
|
||||
public IPage<RStatWorkOrderDetailVO> queryWorkOrder(RStatProblemAndWorkOrderParam rStatProblemAndWorkOrderParam) {
|
||||
|
||||
// IPage<RStatWorkOrderDetailPO> page = new Page<> (rStatProblemAndWorkOrderParam.getCurrentPage(), rStatProblemAndWorkOrderParam.getPageSize());
|
||||
Page<RStatWorkOrderDetailVO> returnpage = new Page<> (rStatProblemAndWorkOrderParam.getCurrentPage(), rStatProblemAndWorkOrderParam.getPageSize());
|
||||
// QueryWrapper<RStatWorkOrderDetailPO> queryWrapper = new QueryWrapper<> ();
|
||||
// queryWrapper.eq (StrUtil.isNotBlank(rStatProblemAndWorkOrderParam.getProblemType ()),"problem_type",rStatProblemAndWorkOrderParam.getProblemType ()).
|
||||
// eq (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getOccurTime ()),"DATE_FORMAT( occur_time ,'%Y-%m-%d')",rStatProblemAndWorkOrderParam.getOccurTime ()).
|
||||
// eq (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getWorkOrderStatus ()),"work_order_status",rStatProblemAndWorkOrderParam.getWorkOrderStatus ()).
|
||||
// eq (StrUtil.isNotBlank (rStatProblemAndWorkOrderParam.getProblemNo ()), "problem_no",rStatProblemAndWorkOrderParam.getProblemNo ());
|
||||
returnpage = rStatWorkOrderDetailMapper.getPageVo (returnpage ,rStatProblemAndWorkOrderParam);
|
||||
|
||||
|
||||
// List<RStatWorkOrderDetailVO> list = new ArrayList<> ();
|
||||
// records.forEach (temp->{
|
||||
// RStatWorkOrderDetailVO rStatWorkOrderDetailVO = new RStatWorkOrderDetailVO();
|
||||
// BeanUtils.copyProperties (temp, rStatWorkOrderDetailVO);
|
||||
// list.add (rStatWorkOrderDetailVO);
|
||||
// });
|
||||
// returnpage.setRecords (list);
|
||||
|
||||
return returnpage;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rStatWorkOrderDetailVO
|
||||
* @Description: 更新工单进度
|
||||
* @Param: [rStatWorkOrderDetailVO]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/17
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateWorkOrderStatus(RStatWorkOrderDetailVO rStatWorkOrderDetailVO) {
|
||||
Boolean flag= true;
|
||||
RStatWorkOrderDetailPO rStatWorkOrderDetailPO = new RStatWorkOrderDetailPO();
|
||||
BeanUtils.copyProperties (rStatWorkOrderDetailVO, rStatWorkOrderDetailPO);
|
||||
int i = rStatWorkOrderDetailMapper.updateByMultiId (rStatWorkOrderDetailPO);
|
||||
if(!(i==1)){
|
||||
flag=false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 系统根据规则生成:
|
||||
* 县公司首字母缩写+“-”+问题首字母缩写+问题上报日期+5位随机数
|
||||
* 例如:萧山公司2022年9月1日的谐波电压越限问题,编号为:XS-DY2022090200001
|
||||
* 修改需求:问题首字母缩写+问题上报日期+8位随机数
|
||||
* @Param: [OrgName, problemShortName, date]
|
||||
* @return: java.lang.String
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/15
|
||||
*/
|
||||
public String createproblemNo(String problemType,String date){
|
||||
|
||||
/*生成8位随机数*/
|
||||
int i = (int) ((Math.random ( ) * 9 + 1) * 10000000);
|
||||
String problemShortName = "";
|
||||
if(Objects.equals (problemType,DicDataEnum.VOLTAGE_LIMIT.getCode ())){
|
||||
problemShortName = "DY";
|
||||
}else if(Objects.equals (problemType,DicDataEnum.CURRENT_LIMIT.getCode ())){
|
||||
problemShortName = "DL";
|
||||
}
|
||||
return problemShortName+date+i;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user