|
@@ -11,6 +11,7 @@ import org.jeecg.common.dto.report.CostAccountingRespDTO;
|
|
|
import org.jeecg.common.dto.report.ProStatisticsRespDTO;
|
|
|
import org.jeecg.common.dto.report.ProStatisticsThreeRespDTO;
|
|
|
import org.jeecg.common.dto.report.ProStatisticsTwoRespDTO;
|
|
|
+import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.modules.archives.entity.ProjectManageArchives;
|
|
|
import org.jeecg.modules.archives.entity.ProjectManageArchivesAndBusiness;
|
|
|
import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
|
|
@@ -34,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -128,15 +130,32 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
//项目日志
|
|
|
Map<String, List<ProWorkLogic>> logicMap = getProLogic(id);
|
|
|
|
|
|
+ //项目成员
|
|
|
+ String member = getMember(archives);
|
|
|
+
|
|
|
//逻辑处理
|
|
|
ProStatisticsRespDTO respDTO = new ProStatisticsRespDTO(archives.getId(), archives.getProName(),
|
|
|
- archives.getProCode(), archives.getProName(), "0");
|
|
|
+ archives.getProCode(), archives.getProName(), "0", member);
|
|
|
//配置收付款条线数据
|
|
|
setSecondChildren(businesses, respDTO, CoLineMap, otherList, businessMap, logicMap, milestoneMap, purchaseDataMap, slipMap);
|
|
|
|
|
|
return respDTO;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc 获取项目组成员
|
|
|
+ */
|
|
|
+ private String getMember(ProjectManageArchives archives) {
|
|
|
+ String[] member = {archives.getSaleManager(), archives.getSaleMan(), archives.getImpManager(), archives.getImpConsultant(),
|
|
|
+ archives.getDeManager(), archives.getDeEngineer(), archives.getSeManager(), archives.getSeEngineer()};
|
|
|
+ if(member.length == 0){
|
|
|
+ throw new JeecgBootException("项目编码为:" + archives.getProCode() + " 的成员为空");
|
|
|
+ }
|
|
|
+ return String.join(",", Arrays.asList(String.join("、", Arrays.asList(member).stream().filter(t-> StringUtils.isNotBlank(t)).collect(Collectors.toList())).split("、")).stream().distinct().collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @desc 日志map
|
|
|
*/
|
|
@@ -358,5 +377,10 @@ public class ProReportServiceImpl implements ProReportService {
|
|
|
List<ProjectManageArchivesAndBusiness> list = projectManageArchivesAndBusinessService.list(queryWrapper);
|
|
|
return list;
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String[] str = {"a", "b", null, "3"};
|
|
|
+ System.out.println(String.join(",", Arrays.asList(str).stream().filter(t -> StringUtils.isNotBlank(t)).collect(Collectors.toList())));
|
|
|
+ }
|
|
|
}
|
|
|
|