1.技术监督代码调整
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
@@ -15,14 +10,10 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.SubGetBase;
|
||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||
import com.njcn.device.pms.api.StatationStatClient;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||
import com.njcn.minioss.bo.MinIoUploadResDTO;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.enums.OssResponseEnum;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanDetailMapper;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanPOMapper;
|
||||
import com.njcn.process.mapper.RSurveyCycleMapper;
|
||||
@@ -34,23 +25,17 @@ import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanDetailService;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanPOService;
|
||||
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.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
@@ -75,7 +60,6 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
private final RSurveyCycleMapper rSurveyCycleMapper;
|
||||
private final RSurveyPlanConfigService rSurveyPlanConfigService;
|
||||
|
||||
@@ -96,6 +80,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
BeanUtils.copyProperties(rGeneralSurveyPlanAddParm, rGeneralSurveyPlanPO);
|
||||
|
||||
/**查出周期id**/
|
||||
|
||||
QueryWrapper<RSurveyCyclePO> rSurveyCyclePOQueryWrapper = new QueryWrapper();
|
||||
rSurveyCyclePOQueryWrapper.le("start_year", rGeneralSurveyPlanPO.getPlanEndTime());
|
||||
rSurveyCyclePOQueryWrapper.ge("end_year", rGeneralSurveyPlanPO.getPlanEndTime());
|
||||
@@ -427,7 +412,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
@Override
|
||||
public RGeneralSurveyPlanAddParm querySubStatation(Integer statetionNum) {
|
||||
/*查询所有电站并过滤已经参加当期普测电站*/
|
||||
List<SubGetBase> list = commTerminalGeneralClient.tagOrIdGetSub(null).getData();
|
||||
List<SubGetBase> list = commTerminalGeneralClient.tagOrIdGetSub(new SubstationParam()).getData();
|
||||
|
||||
|
||||
/**查出当前周期id**/
|
||||
@@ -499,7 +484,6 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
public List<DeptSubstationVO> initDetpStataionTree(String orgdid) {
|
||||
|
||||
/*查询所有电站并过滤已经参加当期普测电站*/
|
||||
// List<StatationStat> list = statationStatClient.getPowerInfo(new PmsStatationStatInfoParam()).getData();
|
||||
|
||||
/**查出当前周期id**/
|
||||
QueryWrapper<RSurveyCyclePO> rSurveyCyclePOQueryWrapper = new QueryWrapper();
|
||||
@@ -571,17 +555,12 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
return deptSubstationVO;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
/*
|
||||
遍历两次data来组装带有children关联性的对象,如果找到子级就删除result的数据
|
||||
|
||||
*/
|
||||
// 遍历两次data来组装带有children关联性的对象,如果找到子级就删除result的数据
|
||||
List<DeptSubstationVO> result = new ArrayList<>(deptSubstationVOList);
|
||||
|
||||
for (DeptSubstationVO pv : deptSubstationVOList) {
|
||||
for (DeptSubstationVO pv2 : deptSubstationVOList) {
|
||||
|
||||
/*如果本级id与数据的父id相同,就说明是子父级关系*/
|
||||
|
||||
if (pv.getId().equals(pv2.getPid())) {
|
||||
pv.getChildren().add(pv2);
|
||||
result.remove(pv2);
|
||||
@@ -590,7 +569,6 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurv
|
||||
}
|
||||
|
||||
result = recursion(result.get(0), orgdid);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user