1.调整pms国网主配网监测点问题
This commit is contained in:
@@ -108,7 +108,7 @@ public class PqTypicalSourceCreatePOServiceImpl extends ServiceImpl<PqTypicalSou
|
|||||||
list = this.lambdaQuery()
|
list = this.lambdaQuery()
|
||||||
.eq(PqTypicalSourceCreatePO::getStatisticalDate,uploadParam.getTime())
|
.eq(PqTypicalSourceCreatePO::getStatisticalDate,uploadParam.getTime())
|
||||||
.in(PqTypicalSourceCreatePO::getId,uploadParam.getList())
|
.in(PqTypicalSourceCreatePO::getId,uploadParam.getList())
|
||||||
.eq(PqTypicalSourceCreatePO::getStatisticalLevel,"3")
|
.in(PqTypicalSourceCreatePO::getStatisticalLevel,Stream.of("3","4").collect(Collectors.toList()))
|
||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
//未指定数据上送,则将所有未上送的数据,上送上去
|
//未指定数据上送,则将所有未上送的数据,上送上去
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ import com.njcn.harmonic.pojo.po.upload.RUploadEvaluationDataD;
|
|||||||
import com.njcn.harmonic.pojo.po.upload.RUploadPointStatisticalDataD;
|
import com.njcn.harmonic.pojo.po.upload.RUploadPointStatisticalDataD;
|
||||||
import com.njcn.harmonic.pojo.vo.upload.UploadPointStatisticalDataVo;
|
import com.njcn.harmonic.pojo.vo.upload.UploadPointStatisticalDataVo;
|
||||||
import com.njcn.harmonic.service.upload.IPointStatisticalDataService;
|
import com.njcn.harmonic.service.upload.IPointStatisticalDataService;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.Dic;
|
||||||
|
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.po.Dept;
|
||||||
import com.njcn.web.enums.GWSendEnum;
|
import com.njcn.web.enums.GWSendEnum;
|
||||||
@@ -32,6 +36,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -45,6 +50,8 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
|
|||||||
|
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<UploadPointStatisticalDataVo> getPointStatisticalData(UploadDataParam param) {
|
public Page<UploadPointStatisticalDataVo> getPointStatisticalData(UploadDataParam param) {
|
||||||
LambdaQueryWrapper<RUploadPointStatisticalDataD> lambdaQueryWrapper = getDeptLevel(param);
|
LambdaQueryWrapper<RUploadPointStatisticalDataD> lambdaQueryWrapper = getDeptLevel(param);
|
||||||
@@ -64,6 +71,10 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String uploadPointStatisticalData(UploadParam param) {
|
public String uploadPointStatisticalData(UploadParam param) {
|
||||||
|
|
||||||
|
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.Station_Type.getCode()).getData();
|
||||||
|
Map<String, DictData> dictDataMap = dictDataList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
List<RUploadPointStatisticalDataD> list;
|
List<RUploadPointStatisticalDataD> list;
|
||||||
//指定数据上送,不管之前有没有上送,都重新上送一次
|
//指定数据上送,不管之前有没有上送,都重新上送一次
|
||||||
//(预防之前上送过,修改数据后需要再次上送)
|
//(预防之前上送过,修改数据后需要再次上送)
|
||||||
@@ -81,6 +92,9 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
|
|||||||
.in(RUploadPointStatisticalDataD::getStatisticalLevel, Stream.of("3","4").collect(Collectors.toList()))
|
.in(RUploadPointStatisticalDataD::getStatisticalLevel, Stream.of("3","4").collect(Collectors.toList()))
|
||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list = list.stream().peek(item->item.setStationType(dictDataMap.get(item.getStationType()).getValue())).collect(Collectors.toList());
|
||||||
|
|
||||||
List<MonitorStatisticalDTO> dtoList = BeanUtil.copyToList(list, MonitorStatisticalDTO.class);
|
List<MonitorStatisticalDTO> dtoList = BeanUtil.copyToList(list, MonitorStatisticalDTO.class);
|
||||||
//以尺寸100分片
|
//以尺寸100分片
|
||||||
List<List<MonitorStatisticalDTO>> pendingIds = ListUtils.partition(dtoList, 100);
|
List<List<MonitorStatisticalDTO>> pendingIds = ListUtils.partition(dtoList, 100);
|
||||||
|
|||||||
@@ -188,6 +188,16 @@ public class DeptController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/existMonitorDeptTree")
|
||||||
|
@ApiOperation("获取部门树(存在监测点的)")
|
||||||
|
public HttpResult<List<DeptTreeVO>> existMonitorDeptTree(){
|
||||||
|
String methodDescribe = getMethodDescribe("deptTree");
|
||||||
|
List<DeptTreeVO> result = deptService.existMonitorDeptTree();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件获取后代部门索引
|
* 根据条件获取后代部门索引
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ public interface IDeptService extends IService<Dept> {
|
|||||||
*/
|
*/
|
||||||
List<DeptTreeVO> deptTree();
|
List<DeptTreeVO> deptTree();
|
||||||
|
|
||||||
|
|
||||||
|
List<DeptTreeVO> existMonitorDeptTree();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据登录用户获取区域树
|
* 根据登录用户获取区域树
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
|||||||
private final CommLedgerDeptClient commLedgerDeptClient;
|
private final CommLedgerDeptClient commLedgerDeptClient;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<DeptVO> listDept(DeptParam.QueryParam queryParam) {
|
public Page<DeptVO> listDept(DeptParam.QueryParam queryParam) {
|
||||||
QueryWrapper<DeptVO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<DeptVO> queryWrapper = new QueryWrapper<>();
|
||||||
@@ -173,6 +175,22 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeptTreeVO> existMonitorDeptTree() {
|
||||||
|
List<String> deptIds = commLedgerDeptClient.existMonitorDeptTree().getData();
|
||||||
|
if(CollectionUtil.isEmpty(deptIds)){
|
||||||
|
throw new BusinessException("当前没有部门存在监测点");
|
||||||
|
}
|
||||||
|
List<Integer> deptType = WebUtil.filterDeptType();
|
||||||
|
String deptIndex = RequestUtil.getDeptIndex();
|
||||||
|
List<DeptTreeVO> deptList = this.baseMapper.getDeptTree(deptIndex, deptType);
|
||||||
|
List<DeptTreeVO> finalDeptList = deptList.stream().filter(item->deptIds.contains(item.getCode())).collect(Collectors.toList());
|
||||||
|
return finalDeptList.stream()
|
||||||
|
.filter(deptVO -> deptVO.getId().equals(deptIndex))
|
||||||
|
.peek(deptFirst -> deptFirst.setChildren(getChildren(deptFirst, finalDeptList)))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DeptAllTreeVO> loginDeptTree() {
|
public List<DeptAllTreeVO> loginDeptTree() {
|
||||||
List<Integer> deptType = WebUtil.filterDeptType();
|
List<Integer> deptType = WebUtil.filterDeptType();
|
||||||
|
|||||||
Reference in New Issue
Block a user