1.技术监督代码提交

This commit is contained in:
wr
2023-09-06 14:21:16 +08:00
parent 3035011064
commit a72fc337fe
7 changed files with 72 additions and 91 deletions

View File

@@ -25,129 +25,89 @@ public class SupvProblemVO {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Excel(name = "",width = 15)
private String problemId;
@Excel(name = "",width = 15) @Excel(name = "计划名称",width = 40)
private String workPlanName; private String workPlanName;
@Excel(name = "",width = 15) @Excel(name = "责任单位编号",width = 15)
private String provinceId;
@Excel(name = "",width = 15)
private String planId;
@Excel(name = "",width = 15)
private String dutyOrgId; private String dutyOrgId;
@Excel(name = "",width = 15) @Excel(name = "责任单位名称",width = 15)
private String dutyOrgName; private String dutyOrgName;
@Excel(name = "",width = 15) @Excel(name = "监测点类型",width = 15)
private String monitorType; private String monitorType;
@Excel(name = "是否发布预告警",width = 15,replace= {"否_0", "是_1"})
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Excel(name = "",width = 15)
private LocalDateTime rectificationTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "",width = 15)
private LocalDateTime planRectificationTime;
/**
* 是否发布预告警
*/
@Excel(name = "",width = 15)
private Integer ifReleaseWarning; private Integer ifReleaseWarning;
/** @Excel(name = "计划整改时间",width = 15)
* 问题简要描述 private String planRectificationTime;
*/
@Excel(name = "",width = 15)
private String simpleProblemDesc;
/** @Excel(name = "整改情况",width = 15,replace = {"已整改_01","未整改_02"})
* 监督标准序号 private String rectificationStatus;
*/
@Excel(name = "",width = 15) @Excel(name = "整改时间",width = 15)
private String rectificationTime;
@Excel(name = "监督标准",width = 15)
private String supvStandard;
@Excel(name = "监督标准序号",width = 15)
private String supvStandardSort; private String supvStandardSort;
/** @Excel(name = "标准出处",width = 15)
* 问题描述 private String supvResouce;
*/
@Excel(name = "",width = 15) @Excel(name = "问题等级",width = 15)
private String problemLevel;
@Excel(name = "问题类型",width = 15)
private String problemType;
@Excel(name = "问题简要描述",width = 40)
private String simpleProblemDesc;
@Excel(name = "问题描述",width = 200)
private String problemDesc; private String problemDesc;
/** /**
* 监督标准 * 问题发现时间
*/ */
private String supvStandard; @Excel(name = "问题发现时间",width = 15)
private String discoveryTime;
/**
* 标准出处
*/
private String supvResouce;
/**
* 问题等级 01 一般02 较大
*/
private String problemLevel;
/** /**
* 定级依据 * 定级依据
*/ */
@Excel(name = "定级依据",width = 15)
private String problemLevelReason; private String problemLevelReason;
/**
* 问题类型
*/
private String problemType;
/** /**
* 整改方案 * 整改方案
*/ */
@Excel(name = "整改方案",width = 50)
private String rectificationProgramme; private String rectificationProgramme;
/**
* 整改情况01已整改02未整改
*/
private String rectificationStatus;
/** /**
* 整改措施 * 整改措施
*/ */
@Excel(name = "整改措施",width = 40)
private String rectificationMeasure; private String rectificationMeasure;
/**
* 0.以上送 1.未上送 2.取消上送
*/
private Integer isUploadHead;
/** /**
* 备注 * 备注
*/ */
@Excel(name = "备注",width = 40)
private String remark; private String remark;
@TableField(exist = false)
@ApiModelProperty(name = "attachmentName", value = "盖章报告")
private String attachmentName;
@TableField(exist = false)
@ApiModelProperty(name = "attachmentNameTwo", value = "佐证材料")
private String attachmentNameTwo;
/**
* 问题发现时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime discoveryTime;
} }

View File

@@ -8,7 +8,7 @@
<select id="listDerive" resultType="com.njcn.process.pojo.vo.SupvProblemVO"> <select id="listDerive" resultType="com.njcn.process.pojo.vo.SupvProblemVO">
select select
work_plan_name, work_plan_name,
sp.* spm.*
from from
supv_problem spm supv_problem spm
INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id

View File

@@ -60,7 +60,7 @@ public class SupvAlarmBackServiceImpl extends ServiceImpl<SupvAlarmBackMapper, S
@Override @Override
public boolean delAlarmBack(List<String> ids) { public boolean delAlarmBack(List<String> ids) {
LambdaQueryWrapper<SupvAlarmBack> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SupvAlarmBack> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.ne(SupvAlarmBack::getIsUploadHead, 0).eq(SupvAlarmBack::getWorkAlarmId, ids); lambdaQueryWrapper.ne(SupvAlarmBack::getIsUploadHead, 0).in(SupvAlarmBack::getWorkAlarmId, ids);
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if (count > 0) { if (count > 0) {
throw new BusinessException("请选择未上送国网的删除"); throw new BusinessException("请选择未上送国网的删除");

View File

@@ -59,7 +59,7 @@ public class SupvAlarmServiceImpl extends ServiceImpl<SupvAlarmMapper, SupvAlarm
@Override @Override
public boolean delAlarm(List<String> planIds) { public boolean delAlarm(List<String> planIds) {
LambdaQueryWrapper<SupvAlarm> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SupvAlarm> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.ne(SupvAlarm::getIsUploadHead, 0).eq(SupvAlarm::getAlarmId, planIds); lambdaQueryWrapper.ne(SupvAlarm::getIsUploadHead, 0).in(SupvAlarm::getAlarmId, planIds);
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if (count > 0) { if (count > 0) {
throw new BusinessException("请选择未上送国网的删除"); throw new BusinessException("请选择未上送国网的删除");

View File

@@ -59,7 +59,7 @@ public class SupvPlanHisServiceImpl extends ServiceImpl<SupvPlanHisMapper, SupvP
@Override @Override
public boolean delPlanHis(List<String> planIds) { public boolean delPlanHis(List<String> planIds) {
LambdaQueryWrapper<SupvPlanHis> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SupvPlanHis> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(SupvPlanHis::getIsUploadHead, 1).eq(SupvPlanHis::getId, planIds); lambdaQueryWrapper.ne(SupvPlanHis::getIsUploadHead, 0).in(SupvPlanHis::getId, planIds);
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if (count > 0) { if (count > 0) {
throw new BusinessException("请选择未上送国网的删除"); throw new BusinessException("请选择未上送国网的删除");

View File

@@ -211,7 +211,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean delPlan(List<String> planIds) { public boolean delPlan(List<String> planIds) {
LambdaQueryWrapper<SupvPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SupvPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.ne(SupvPlan::getIsUploadHead, 0).eq(SupvPlan::getPlanId, planIds); lambdaQueryWrapper.ne(SupvPlan::getIsUploadHead, 0).in(SupvPlan::getPlanId, planIds);
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if (count > 0) { if (count > 0) {
throw new BusinessException("请选择未上送国网的删除"); throw new BusinessException("请选择未上送国网的删除");

View File

@@ -20,7 +20,10 @@ import com.njcn.process.pojo.po.SupvProblem;
import com.njcn.process.pojo.vo.SupvProblemVO; import com.njcn.process.pojo.vo.SupvProblemVO;
import com.njcn.process.service.ISupvProblemService; import com.njcn.process.service.ISupvProblemService;
import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.DicDataTypeEnum;
import com.njcn.system.pojo.po.DictData;
import com.njcn.user.api.DeptFeignClient; import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.pojo.po.Dept;
import com.njcn.user.pojo.vo.PvTerminalTreeVO; import com.njcn.user.pojo.vo.PvTerminalTreeVO;
import com.njcn.web.factory.PageFactory; import com.njcn.web.factory.PageFactory;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@@ -87,7 +90,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean delProblem(List<String> problemIds) { public boolean delProblem(List<String> problemIds) {
LambdaQueryWrapper<SupvProblem> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SupvProblem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.ne(SupvProblem::getIsUploadHead, 0).eq(SupvProblem::getProblemId, problemIds); lambdaQueryWrapper.ne(SupvProblem::getIsUploadHead, 0).in(SupvProblem::getProblemId, problemIds);
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if (count > 0) { if (count > 0) {
throw new BusinessException("请选择未上送国网的删除"); throw new BusinessException("请选择未上送国网的删除");
@@ -136,8 +139,26 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
@Override @Override
public void problemList(SupvProblemParam supvProblemParam) { public void problemList(SupvProblemParam supvProblemParam) {
List<SupvProblemVO> supvProblemVOS = this.baseMapper.listDerive(supvProblemParam); List<SupvProblemVO> supvProblemVOS = this.baseMapper.listDerive(supvProblemParam);
// List<PqsLineWeightVo.WeightExcel> weightExcels = this.baseMapper.selectWeights(terminalMainQueryParam); //监测点状态
// ExcelUtil.exportExcel("监测点权重信息.xlsx",PqsLineWeightVo.WeightExcel.class,weightExcels); List<DictData> monitorTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITOR_TYPE.getCode()).getData();
Map<String, DictData> mapMonitorType = monitorTypeList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
//问题类型
List<DictData> problemTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPV_PROBLEM_TYPE.getCode()).getData();
Map<String, DictData> mapProblemType = problemTypeList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
for (SupvProblemVO supvProblem : supvProblemVOS) {
Dept dept = deptFeignClient.getDeptByCode(supvProblem.getDutyOrgId()).getData();
supvProblem.setDutyOrgName(dept.getName());
if (mapMonitorType.containsKey(supvProblem.getMonitorType())) {
supvProblem.setMonitorType(mapMonitorType.get(supvProblem.getMonitorType()).getName());
}
if (mapProblemType.containsKey(supvProblem.getProblemType())) {
supvProblem.setProblemType(mapProblemType.get(supvProblem.getProblemType()).getName());
}
}
ExcelUtil.exportExcel("实施问题信息.xlsx",SupvProblemVO.class,supvProblemVOS);
} }