1.技术监督代码提交
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<select id="listDerive" resultType="com.njcn.process.pojo.vo.SupvProblemVO">
|
||||
select
|
||||
work_plan_name,
|
||||
sp.*
|
||||
spm.*
|
||||
from
|
||||
supv_problem spm
|
||||
INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id
|
||||
|
||||
@@ -60,7 +60,7 @@ public class SupvAlarmBackServiceImpl extends ServiceImpl<SupvAlarmBackMapper, S
|
||||
@Override
|
||||
public boolean delAlarmBack(List<String> ids) {
|
||||
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);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
|
||||
@@ -59,7 +59,7 @@ public class SupvAlarmServiceImpl extends ServiceImpl<SupvAlarmMapper, SupvAlarm
|
||||
@Override
|
||||
public boolean delAlarm(List<String> planIds) {
|
||||
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);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
|
||||
@@ -59,7 +59,7 @@ public class SupvPlanHisServiceImpl extends ServiceImpl<SupvPlanHisMapper, SupvP
|
||||
@Override
|
||||
public boolean delPlanHis(List<String> planIds) {
|
||||
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);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
|
||||
@@ -211,7 +211,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delPlan(List<String> planIds) {
|
||||
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);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
|
||||
@@ -20,7 +20,10 @@ import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||
import com.njcn.process.service.ISupvProblemService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -87,7 +90,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delProblem(List<String> problemIds) {
|
||||
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);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请选择未上送国网的删除");
|
||||
@@ -136,8 +139,26 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
@Override
|
||||
public void problemList(SupvProblemParam 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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user