冀北电能质量问题流程修改
This commit is contained in:
@@ -72,7 +72,7 @@ public class SupervisionTempLineDebugParam {
|
||||
private String orgNo;
|
||||
|
||||
private List<Integer> statueList;
|
||||
|
||||
private String dealState;
|
||||
/**
|
||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||
*/
|
||||
|
||||
@@ -124,6 +124,7 @@ public class WarningLeafletParam implements Serializable{
|
||||
* 负责单位
|
||||
*/
|
||||
String deptIndex;
|
||||
String dealState;
|
||||
|
||||
/**
|
||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消;5:待反馈
|
||||
|
||||
@@ -93,6 +93,7 @@ public class SupervisionUserComplaintParam {
|
||||
* 负责单位
|
||||
*/
|
||||
String deptIndex;
|
||||
String dealState;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ public class SurveyTestParam implements Serializable {
|
||||
*/
|
||||
String deptIndex;
|
||||
|
||||
String dealState;
|
||||
|
||||
/**
|
||||
* 测试审批状态(1:审批中;2:审批通过;3:审批不通过;4:已取消)
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -41,4 +42,10 @@ public class TempLineRunTestWarning extends BaseEntity implements Serializable{
|
||||
*/
|
||||
@TableField(value = "reason")
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 状态:0-未解决 1-已解决
|
||||
*/
|
||||
@TableField(value = "deal_state")
|
||||
private Integer dealState;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.njcn.supervision.pojo.po.leaflet;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -87,7 +89,11 @@ public class WarningLeaflet extends BaseEntity implements Serializable{
|
||||
*/
|
||||
private String reportPath;
|
||||
|
||||
|
||||
/**
|
||||
* 状态:0-未解决 1-已解决
|
||||
*/
|
||||
@TableField(value = "deal_state")
|
||||
private Integer dealState;
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
|
||||
@@ -110,6 +110,12 @@ public class SupervisionUserComplaintPO extends BaseEntity {
|
||||
@TableField(value = "initiate_warning_flag")
|
||||
private Integer initiateWarningFlag;
|
||||
|
||||
/**
|
||||
* 状态:0-未解决 1-已解决
|
||||
*/
|
||||
@TableField(value = "deal_state")
|
||||
private Integer dealState;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
|
||||
@@ -107,6 +107,14 @@ public class SurveyTest extends BaseEntity implements Serializable {
|
||||
@TableField(value = "initiate_warning_flag")
|
||||
private Integer initiateWarningFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 状态:0-未解决 1-已解决
|
||||
*/
|
||||
@TableField(value = "deal_state")
|
||||
private Integer dealState;
|
||||
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,14 @@ public class SupervisionTempLineDebugVO extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "预告警单问题Id")
|
||||
private String problemId;
|
||||
@ApiModelProperty(value = "状态:0-未解决 1-已解决")
|
||||
private Integer dealState;
|
||||
|
||||
@ApiModelProperty(value = "采取措施")
|
||||
private String takeStep;
|
||||
|
||||
@ApiModelProperty(value = "处理成效报告")
|
||||
private String reportPath;
|
||||
public void setTestRunReport(String testRunReport) {
|
||||
if (StrUtil.isNotBlank(testRunReport)) {
|
||||
this.testRunReport = "/" + testRunReport;
|
||||
|
||||
@@ -123,4 +123,6 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
|
||||
|
||||
@ApiModelProperty("技术监督报告")
|
||||
private String supervisionReport;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -56,4 +56,14 @@ public class SupervisionUserComplaintVO {
|
||||
private String dutyOrgName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "状态:0-未解决 1-已解决")
|
||||
private Integer dealState;
|
||||
|
||||
@ApiModelProperty(value = "采取措施")
|
||||
private String takeStep;
|
||||
|
||||
@ApiModelProperty(value = "处理成效报告")
|
||||
private String reportPath;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -149,4 +149,13 @@ public class SurveyTestVO extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty(value = "状态:0-未解决 1-已解决")
|
||||
private Integer dealState;
|
||||
|
||||
@ApiModelProperty(value = "采取措施")
|
||||
private String takeStep;
|
||||
|
||||
@ApiModelProperty(value = "处理成效报告")
|
||||
private String reportPath;
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,10 @@
|
||||
supervision_temp_line_run_test.test_run_time,
|
||||
supervision_temp_line_run_test.create_by,
|
||||
supervision_warning_leaflet.problem_type problemType,
|
||||
supervision_temp_line_run_test_warning.reason problemReason
|
||||
supervision_temp_line_run_test_warning.reason problemReason,
|
||||
supervision_temp_line_run_test_warning.deal_state dealState,
|
||||
supervision_warning_leaflet.take_step takeStep,
|
||||
supervision_warning_leaflet.report_path reportPath
|
||||
FROM supervision_temp_line_debug
|
||||
inner JOIN supervision_temp_line_report
|
||||
ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
<select id="getPage" resultType="com.njcn.supervision.pojo.vo.problem.SupervisionUserComplaintVO">
|
||||
select
|
||||
*
|
||||
from supervision_user_complaint supervision_user_complaint WHERE ${ew.sqlSegment}
|
||||
supervision_user_complaint.*,
|
||||
supervision_warning_leaflet.take_step takeStep,
|
||||
supervision_warning_leaflet.report_path reportPath
|
||||
from supervision_user_complaint supervision_user_complaint
|
||||
left join supervision_warning_leaflet
|
||||
on supervision_warning_leaflet.problem_id = supervision_user_complaint.id WHERE ${ew.sqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -10,10 +10,14 @@
|
||||
supervision_survey_plan.plan_start_time planStartTime,
|
||||
supervision_survey_plan.supv_type supvType,
|
||||
supervision_survey_plan.supv_object_name supvObjectName,
|
||||
supervision_survey_plan.plan_end_time planEndTime
|
||||
supervision_survey_plan.plan_end_time planEndTime,
|
||||
supervision_warning_leaflet.take_step takeStep,
|
||||
supervision_warning_leaflet.report_path reportPath
|
||||
FROM supervision_survey_test supervision_survey_test
|
||||
left join supervision_survey_plan supervision_survey_plan
|
||||
on supervision_survey_test.plan_id = supervision_survey_plan.id
|
||||
left join supervision_warning_leaflet
|
||||
on supervision_warning_leaflet.problem_id = supervision_survey_test.id
|
||||
WHERE ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.common.DealStateEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.biz.commApi.CommLineClient;
|
||||
@@ -335,6 +336,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
warning.setId(IdWorker.get32UUID());
|
||||
warning.setLineRunId(businessKey);
|
||||
warning.setReason(reason);
|
||||
warning.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
warning.setTestRunReport(supervisionTempLineRunTestPO.getTestRunReport());
|
||||
tempLineRunTestWarningService.save(warning);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -27,6 +28,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 试运行评估问题 服务实现类
|
||||
@@ -55,10 +57,17 @@ public class LineRunTestProblemServiceImpl implements ILineRunTestProblemService
|
||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineDebugQuery.getOrgNo()).getData();
|
||||
queryWrapper.in("supervision_temp_line_report.org_id", data);
|
||||
}
|
||||
//添加上时间范围
|
||||
queryWrapper.between("supervision_temp_line_run_test_warning.create_time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||
//添加上时间范围,如果不是只查询已处理的,时间筛选无效
|
||||
if (Objects.nonNull(supervisionTempLineDebugQuery.getSearchBeginTime())&& StringUtils.equals(supervisionTempLineDebugQuery.getDealState(),"1")){
|
||||
//添加上时间范围
|
||||
queryWrapper.between("supervision_temp_line_run_test_warning.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||
}
|
||||
queryWrapper.eq(StringUtils.equals(supervisionTempLineDebugQuery.getDealState(),"0"),"supervision_temp_line_run_test_warning.deal_state",0);
|
||||
// queryWrapper.between("supervision_temp_line_run_test_warning.create_time",
|
||||
// DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
// DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||
queryWrapper.orderByDesc("supervision_temp_line_run_test_warning.create_time");
|
||||
return lineDebugPOMapper.pageProblem(new Page<>(PageFactory.getPageNum(supervisionTempLineDebugQuery), PageFactory.getPageSize(supervisionTempLineDebugQuery)), queryWrapper);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||
@@ -20,7 +21,9 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||
import com.njcn.bpm.pojo.vo.TodoVO;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.common.DealStateEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.harmonic.pojo.dto.RMpPartHarmonicDetailDTO;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.supervision.enums.*;
|
||||
@@ -28,9 +31,13 @@ import com.njcn.supervision.mapper.leaflet.WarningLeafletMapper;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.problem.SupervisionUserComplaintPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||
import com.njcn.supervision.service.device.TempLineRunTestWarningService;
|
||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||
import com.njcn.supervision.service.problem.SupervisionUserComplaintPOService;
|
||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||
import com.njcn.supervision.utils.InstanceUtil;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
@@ -47,6 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -76,32 +84,53 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
@Resource
|
||||
private TempLineRunTestWarningService lineRunTestWarningService;
|
||||
|
||||
@Resource
|
||||
private ISurveyTestService surveyTestService;
|
||||
|
||||
@Resource
|
||||
private SupervisionUserComplaintPOService supervisionUserComplaintService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
|
||||
*/
|
||||
@Override
|
||||
public String createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail, String reformAdvice, String filePath) {
|
||||
WarningLeaflet warningLeaflet = new WarningLeaflet();
|
||||
warningLeaflet.setLeafletName(name);
|
||||
warningLeaflet.setDeptId(deptId);
|
||||
warningLeaflet.setLeafletNo(code);
|
||||
warningLeaflet.setProblemType(problemType);
|
||||
warningLeaflet.setProblemId(id);
|
||||
warningLeaflet.setLeafletType(leaflet);
|
||||
warningLeaflet.setIssueDetail(issueDetail);
|
||||
//新增字段整改意见
|
||||
warningLeaflet.setReformAdvice(reformAdvice);
|
||||
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
|
||||
warningLeaflet.setStatus(FlowStatusEnum.NO_FEEDBACK.getCode());
|
||||
warningLeaflet.setFilePath(filePath);
|
||||
this.baseMapper.insert(warningLeaflet);
|
||||
return warningLeaflet.getId();
|
||||
WarningLeaflet one = this.lambdaQuery().eq(WarningLeaflet::getProblemId, id).one();
|
||||
if(Objects.isNull(one)){
|
||||
WarningLeaflet warningLeaflet = new WarningLeaflet();
|
||||
warningLeaflet.setLeafletName(name);
|
||||
warningLeaflet.setDeptId(deptId);
|
||||
warningLeaflet.setLeafletNo(code);
|
||||
warningLeaflet.setProblemType(problemType);
|
||||
warningLeaflet.setProblemId(id);
|
||||
warningLeaflet.setLeafletType(leaflet);
|
||||
warningLeaflet.setIssueDetail(issueDetail);
|
||||
//新增字段整改意见
|
||||
warningLeaflet.setReformAdvice(reformAdvice);
|
||||
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
|
||||
warningLeaflet.setStatus(FlowStatusEnum.NO_FEEDBACK.getCode());
|
||||
warningLeaflet.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
warningLeaflet.setFilePath(filePath);
|
||||
this.baseMapper.insert(warningLeaflet);
|
||||
return warningLeaflet.getId();
|
||||
}else {
|
||||
//新增字段整改意见
|
||||
one.setReformAdvice(reformAdvice);
|
||||
one.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
one.setCreateTime(LocalDateTime.now());
|
||||
this.updateById(one);
|
||||
return one.getId();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WarningLeafletVO> warningPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam) {
|
||||
QueryWrapper<WarningLeafletVO> warningLeafletVOQueryWrapper = new QueryWrapper<>();
|
||||
if (Objects.nonNull(warningLeafletQueryParam)) {
|
||||
if (Objects.nonNull(warningLeafletQueryParam)&& StringUtils.equals(warningLeafletQueryParam.getDealState(),"1")) {
|
||||
//添加上时间范围
|
||||
warningLeafletVOQueryWrapper.between("supervision_warning_leaflet.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(warningLeafletQueryParam.getSearchBeginTime())),
|
||||
@@ -114,6 +143,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.dept_id", deptIds);
|
||||
}
|
||||
warningLeafletVOQueryWrapper
|
||||
.eq(StringUtils.equals(warningLeafletQueryParam.getDealState(),"0"),"supervision_temp_line_run_test_warning.deal_state",0)
|
||||
.eq("supervision_warning_leaflet.state", DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||
@@ -228,10 +258,43 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateProcessStatus(String businessKey, Integer status) {
|
||||
this.lambdaUpdate().set(WarningLeaflet::getStatus, status).eq(WarningLeaflet::getId, businessKey).update();
|
||||
WarningLeaflet one = this.lambdaQuery().eq(WarningLeaflet::getId, businessKey).one();
|
||||
//如果审核通过且problem_type不是在线监测的(1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标),将对应能质量问题改成已解决,所有的预告警单改成已解决
|
||||
if(status==2&&one.getProblemType()!=2){
|
||||
//多次的预告警单是删除
|
||||
this.lambdaUpdate().set(WarningLeaflet::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(WarningLeaflet::getId, businessKey)
|
||||
.eq(WarningLeaflet::getProblemId,one.getProblemId()).update();
|
||||
updatePowerProblem(one.getProblemType(),one.getProblemId());
|
||||
}
|
||||
}
|
||||
|
||||
private void updatePowerProblem(Integer problemType, String problemId) {
|
||||
switch (problemType) {
|
||||
//技术监督计划
|
||||
case 1:
|
||||
surveyTestService.lambdaUpdate().set(SurveyTest::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(SurveyTest::getId,problemId).update();
|
||||
break;
|
||||
//用户投诉问题
|
||||
case 3:
|
||||
supervisionUserComplaintService.lambdaUpdate().set(SupervisionUserComplaintPO::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(SupervisionUserComplaintPO::getId,problemId).update();
|
||||
break;
|
||||
//试运行监测点问题
|
||||
case 4:
|
||||
lineRunTestWarningService.lambdaUpdate().set(TempLineRunTestWarning::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(TempLineRunTestWarning::getId,problemId).update();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
|
||||
@@ -6,9 +6,11 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.common.DealStateEnum;
|
||||
import com.njcn.supervision.enums.LeafletTypeEnum;
|
||||
import com.njcn.supervision.enums.ProblemTypeEnum;
|
||||
import com.njcn.supervision.mapper.problem.SupervisionUserComplaintPOMapper;
|
||||
@@ -52,6 +54,7 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
|
||||
BeanUtil.copyProperties(supervisionUserComplaintParam,supervisionUserComplaintPO);
|
||||
supervisionUserComplaintPO.setInitiateWarningFlag(0);
|
||||
supervisionUserComplaintPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
supervisionUserComplaintPO.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
this.save(supervisionUserComplaintPO);
|
||||
return supervisionUserComplaintPO.getId();
|
||||
}
|
||||
@@ -59,8 +62,8 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
|
||||
@Override
|
||||
public Page<SupervisionUserComplaintVO> getSupervisionUserComplaint(SupervisionUserComplaintParam.SupervisionUserComplaintQueryParam supervisionUserComplaintQueryParam) {
|
||||
QueryWrapper<SupervisionUserComplaintParam> supervisionUserComplaintQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (Objects.nonNull(supervisionUserComplaintQueryParam)) {
|
||||
//如果不是只查询已处理的,时间无效
|
||||
if (Objects.nonNull(supervisionUserComplaintQueryParam.getSearchBeginTime())&& StringUtils.equals(supervisionUserComplaintQueryParam.getDealState(),"1")){
|
||||
//添加上时间范围
|
||||
supervisionUserComplaintQueryWrapper.between("supervision_user_complaint.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionUserComplaintQueryParam.getSearchBeginTime())),
|
||||
@@ -74,6 +77,8 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
|
||||
|
||||
supervisionUserComplaintQueryWrapper
|
||||
.eq("supervision_user_complaint.state",DataStateEnum.ENABLE.getCode())
|
||||
//未解决查未解决,已解决查未解决+已解决,反正未解决的都要查
|
||||
.eq(StringUtils.equals(supervisionUserComplaintQueryParam.getDealState(),"0"),"supervision_user_complaint.deal_state",0)
|
||||
.orderByDesc("supervision_user_complaint.Update_Time");
|
||||
Page<SupervisionUserComplaintVO> page = this.baseMapper.getPage(new Page<>(PageFactory.getPageNum(supervisionUserComplaintQueryParam), PageFactory.getPageSize(supervisionUserComplaintQueryParam)), supervisionUserComplaintQueryWrapper);
|
||||
if (CollUtil.isNotEmpty(page.getRecords())) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.common.DealStateEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||
@@ -236,6 +237,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setSubstation(subId);
|
||||
surveyTest.setCustomSubstationFlag(0);
|
||||
surveyTest.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
surveyTest.setCreateBy("");
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTestService.save(surveyTest);
|
||||
@@ -248,6 +250,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setSubstation(surveyPlan.getSubstation());
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setCustomSubstationFlag(1);
|
||||
surveyTest.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTest.setCreateBy("");
|
||||
surveyTestService.save(surveyTest);
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||
import com.njcn.bpm.pojo.vo.TodoVO;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.common.DealStateEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||
@@ -160,10 +161,13 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
public Page<SurveyTestVO> pageProblemSurvey(SurveyTestParam.SurveyTestQueryParam surveyTestQueryParam) {
|
||||
QueryWrapper<SurveyTestVO> surveyTestVOQueryWrapper = new QueryWrapper<>();
|
||||
if (Objects.nonNull(surveyTestQueryParam)) {
|
||||
//添加上时间范围
|
||||
surveyTestVOQueryWrapper.between("supervision_survey_test.create_time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(surveyTestQueryParam.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(surveyTestQueryParam.getSearchEndTime())));
|
||||
//如果不是只查询已处理的,时间无效
|
||||
if (Objects.nonNull(surveyTestQueryParam.getSearchBeginTime())&& StringUtils.equals(surveyTestQueryParam.getDealState(),"1")){
|
||||
//添加上时间范围
|
||||
surveyTestVOQueryWrapper.between("supervision_survey_test.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(surveyTestQueryParam.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(surveyTestQueryParam.getSearchEndTime())));
|
||||
}
|
||||
//根据工程名称模糊搜索
|
||||
if (StrUtil.isNotBlank(surveyTestQueryParam.getSearchValue())) {
|
||||
LambdaQueryWrapper<SurveyPlan> surveyPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -185,6 +189,8 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
}
|
||||
}
|
||||
surveyTestVOQueryWrapper
|
||||
//未解决查未解决,已解决查未解决+已解决,反正未解决的都要查
|
||||
.eq(StringUtils.equals(surveyTestQueryParam.getDealState(),"0"),"supervision_survey_test.deal_state",0)
|
||||
.eq("supervision_survey_test.problem_flag", 1)
|
||||
.eq("supervision_survey_test.status", FlowStatusEnum.APPROVE.getCode())
|
||||
.eq("supervision_survey_test.state", DataStateEnum.ENABLE.getCode())
|
||||
@@ -232,6 +238,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
|
||||
}
|
||||
surveyTest.setState(DataStateEnum.ENABLE.getCode());
|
||||
surveyTest.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
surveyTest.setCreateBy(RequestUtil.getUserIndex());
|
||||
this.updateById(surveyTest);
|
||||
// 发起 BPM 流程
|
||||
|
||||
Reference in New Issue
Block a user