|
|
@ -19,11 +19,9 @@ package com.epmet.dataaggre.service.epmettduck.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
@ -37,13 +35,11 @@ import com.epmet.dataaggre.dto.epmettduck.PrUserProjectDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.ProjectItemTypeEnum; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.form.TDuckHeaderInfoFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.form.TDuckListFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.result.OptionDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.result.ProjectProfileResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.result.TDuckListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.result.*; |
|
|
|
import com.epmet.dataaggre.dto.epmettduck.struct.*; |
|
|
|
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectEntity; |
|
|
|
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectResultEntity; |
|
|
|
import com.epmet.dataaggre.service.epmettduck.PrPublishRangeService; |
|
|
|
import com.epmet.dataaggre.service.epmettduck.PrUserProjectService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
@ -54,6 +50,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -72,6 +69,8 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PrVistRecordDao visitRecordDao; |
|
|
|
@Resource |
|
|
|
private PrPublishRangeService prPublishRangeService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<PrUserProjectDTO> page(Map<String, Object> params) { |
|
|
@ -479,6 +478,25 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, |
|
|
|
return eq.getEntity(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param projectKey |
|
|
|
* @Description 获取发布范围 |
|
|
|
* @Param projectKey |
|
|
|
* @Return {@link GetRangeResultDTO} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/9/18 15:18 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public GetRangeResultDTO getRange(String projectKey) { |
|
|
|
GetRangeResultDTO result = new GetRangeResultDTO(); |
|
|
|
LambdaQueryWrapper<PrUserProjectEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(PrUserProjectEntity :: getKey, projectKey); |
|
|
|
PrUserProjectEntity entity = baseDao.selectOne(wrapper); |
|
|
|
result.setClient(entity.getClient()); |
|
|
|
result.setOrgList(prPublishRangeService.getRangeOrgList(projectKey)); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
private List<Map.Entry<Integer, Integer>> sortMap(Map<Integer, Integer> map, boolean asc) { |
|
|
|
|
|
|
|
Stream<Map.Entry<Integer, Integer>> stream = null; |
|
|
|