1.河北国网上送1.8 1.9文档需求更新
2.技术监督功能提交
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -12,13 +14,21 @@ import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.device.pms.api.DistributionMonitorClient;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.process.constant.Param;
|
||||
import com.njcn.process.mapper.FlowFormAssMapper;
|
||||
import com.njcn.process.mapper.FlowableAssMapper;
|
||||
import com.njcn.process.mapper.LoadTypeUserManageMapper;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.FlowFormAss;
|
||||
import com.njcn.process.pojo.po.FlowableAss;
|
||||
import com.njcn.process.pojo.po.RLoadTypeUserManage;
|
||||
import com.njcn.process.pojo.vo.LoadTypeRelationExcel;
|
||||
import com.njcn.process.pojo.vo.LoadTypeUserExcel;
|
||||
import com.njcn.process.pojo.vo.RLoadTypeUserManageVO;
|
||||
import com.njcn.process.pojo.vo.flowable.FlowTaskVo;
|
||||
import com.njcn.process.service.LoadTypeUserManageService;
|
||||
import com.njcn.process.service.flowable.IFlowDefinitionService;
|
||||
import com.njcn.process.service.flowable.IFlowInstanceService;
|
||||
import com.njcn.process.service.flowable.IFlowTaskService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
@@ -33,6 +43,7 @@ import liquibase.pro.packaged.S;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.jdbc.Null;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -60,7 +71,15 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
private final FlowFormAssMapper flowFormAssMapper;
|
||||
|
||||
private final IFlowDefinitionService iFlowDefinitionService;
|
||||
|
||||
private final IFlowInstanceService iFlowInstanceService;
|
||||
|
||||
private final FlowableAssMapper flowableAssMapper;
|
||||
|
||||
private final IFlowTaskService iFlowTaskService;
|
||||
|
||||
/**
|
||||
* 干扰源用户分页查询
|
||||
@@ -121,6 +140,7 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addLoadTypeUser(LoadTypeUserParam loadTypeUserParam) {
|
||||
//参数转换
|
||||
RLoadTypeUserManage rLoadTypeUserManage = new RLoadTypeUserManage();
|
||||
@@ -133,7 +153,25 @@ public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService
|
||||
Dept data = deptFeignClient.getDeptById (loadTypeUserParam.getOrgNo()).getData();
|
||||
rLoadTypeUserManage.setICheckPerson(data.getPid());
|
||||
rLoadTypeUserManage.setACheckPerson(data.getPid());
|
||||
rLoadTypeUserManage.setId(IdUtil.simpleUUID());
|
||||
loadTypeUserManageMapper.insert(rLoadTypeUserManage);
|
||||
|
||||
//绑定工作流
|
||||
|
||||
//开始流程
|
||||
FlowFormAss flowFormAss = flowFormAssMapper.selectOne(new LambdaQueryWrapper<FlowFormAss>().eq(FlowFormAss::getFormId, 2));
|
||||
if (Objects.isNull(flowFormAss)) {
|
||||
throw new BusinessException("当前功能未绑定流程,请先绑定流程");
|
||||
}
|
||||
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String processId = iFlowDefinitionService.startProcessInstanceById(flowFormAss.getDefinitionId(), rLoadTypeUserManage.getId(), map);
|
||||
Task task = iFlowTaskService.getTask(processId);
|
||||
FlowTaskVo flowTaskVo = new FlowTaskVo();
|
||||
flowTaskVo.setTaskId(task.getId());
|
||||
flowTaskVo.setInstanceId(processId);
|
||||
flowTaskVo.setComment(RequestUtil.getUserNickname() + "发起录入干扰源用户申请");
|
||||
iFlowTaskService.complete(flowTaskVo);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,6 +162,28 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),"02",null);
|
||||
|
||||
|
||||
//电容器组月前统计
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
//电容器组问题数量
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
//电容器组已整改问题
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),"02",null);
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),"02",null);
|
||||
|
||||
//评估报告月前统计
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
//评估报告问题数量
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalGanAll = this.baseMapper.statisticQueReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
//评估报告已整改问题
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalGanYesM = this.baseMapper.statisticQueReportRectify(firstDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),"02",null);
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),"02",null);
|
||||
|
||||
|
||||
|
||||
List<SupvReportM> supvReportMBatch = new ArrayList<>();
|
||||
for(DeptGetBase deptGetBase : deptGetBaseList){
|
||||
|
||||
@@ -238,9 +260,28 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
supvReportM.setPowerTotalQuesNum(dealData(childrenDeptList,processPublicDTODianYaGanAll));
|
||||
supvReportM.setPowerMonthReformNum(dealData(childrenDeptList,processPublicDTODianYaGanYesM));
|
||||
supvReportM.setPowerTotalReformNum(dealData(childrenDeptList,processPublicDTODianYaGanYesAll));
|
||||
|
||||
all+=d;
|
||||
|
||||
//电容器组
|
||||
supvReportM.setCapacitorYearSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorAll));
|
||||
supvReportM.setCapacitorMonthSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorListM));
|
||||
supvReportM.setCapacitorTotalSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorAll));
|
||||
supvReportM.setCapacitorMonthQuesNum(dealData(childrenDeptList,processPublicDTOCapacitorGanM));
|
||||
supvReportM.setCapacitorTotalQuesNum(dealData(childrenDeptList,processPublicDTOCapacitorGanAll));
|
||||
supvReportM.setCapacitorMonthReformNum(dealData(childrenDeptList,processPublicDTOCapacitorGanYesM));
|
||||
supvReportM.setCapacitorTotalReformNum(dealData(childrenDeptList,processPublicDTOCapacitorYesAll));
|
||||
all+=supvReportM.getCapacitorTotalSupvNum();
|
||||
//评估报告
|
||||
supvReportM.setAppraisalReportYearSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalAll));
|
||||
supvReportM.setAppraisalReportMonthSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalListM));
|
||||
supvReportM.setAppraisalReportTotalSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalAll));
|
||||
supvReportM.setAppraisalReportMonthQuesNum(dealData(childrenDeptList,processPublicDTOAppraisalGanM));
|
||||
supvReportM.setAppraisalReportTotalQuesNum(dealData(childrenDeptList,processPublicDTOAppraisalGanAll));
|
||||
supvReportM.setAppraisalReportMonthReformNum(dealData(childrenDeptList,processPublicDTOAppraisalGanYesM));
|
||||
supvReportM.setAppraisalReportTotalReformNum(dealData(childrenDeptList,processPublicDTOAppraisalYesAll));
|
||||
all+=supvReportM.getAppraisalReportTotalSupvNum();
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(deptGetBase.getDeptLevel() == 2){
|
||||
|
||||
Reference in New Issue
Block a user