|
|
@ -15,7 +15,6 @@ import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; |
|
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; |
|
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govissue.result.ShiftProjectIssueListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.ProjectDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO; |
|
|
@ -31,7 +30,6 @@ import com.epmet.dataaggre.service.govorg.GovOrgService; |
|
|
|
import com.epmet.dataaggre.service.govproject.GovProjectService; |
|
|
|
import com.epmet.dataaggre.service.resigroup.ResiGroupService; |
|
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
|
import com.epmet.dto.ProjectCategoryDTO; |
|
|
|
import com.epmet.dto.UserBaseInfoDTO; |
|
|
|
import com.epmet.dto.form.TimestampIntervalFormDTO; |
|
|
|
import com.epmet.dto.form.WorkMinuteFormDTO; |
|
|
@ -293,6 +291,9 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
result.setPendingRatio(l.getPendingRatio()); |
|
|
|
result.setClosedTotal(l.getClosedTotal()); |
|
|
|
result.setClosedRatio(l.getClosedRatio()); |
|
|
|
//默认较昨日较上个月增长值就是当前日期的数据
|
|
|
|
result.setDateIncr(l.getProjectTotal()); |
|
|
|
result.setMonthIncr(l.getProjectTotal()); |
|
|
|
} |
|
|
|
if (formDTO.getYeDateId().equals(l.getDateId())) { |
|
|
|
result.setDateIncr(result.getProjectTotal() - l.getProjectTotal()); |
|
|
@ -362,19 +363,33 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
List<ProjectCategoryTotalResultDTO> list = evaluationIndexService.projectCategoryList(formDTO); |
|
|
|
|
|
|
|
//3.封装数据并返回
|
|
|
|
categoryList.forEach(ca -> { |
|
|
|
//有数据的排在前边,没数据的按分类顺序排在后边
|
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
list.forEach(l -> { |
|
|
|
ProjectCategoryTotalResultDTO dto = new ProjectCategoryTotalResultDTO(); |
|
|
|
dto.setAgencyId(formDTO.getAgencyId()); |
|
|
|
dto.setCategoryCode(ca.getCategoryCode()); |
|
|
|
dto.setCategoryName(ca.getCategoryName()); |
|
|
|
dto.setColour(ca.getColour()); |
|
|
|
list.forEach(l -> { |
|
|
|
dto.setTotal(l.getTotal()); |
|
|
|
categoryList.forEach(ca -> { |
|
|
|
if (ca.getCategoryCode().equals(l.getCategoryCode())) { |
|
|
|
dto.setTotal(l.getTotal()); |
|
|
|
dto.setCategoryCode(ca.getCategoryCode()); |
|
|
|
dto.setCategoryName(ca.getCategoryName()); |
|
|
|
dto.setColour(ca.getColour()); |
|
|
|
} |
|
|
|
}); |
|
|
|
map.put(l.getCategoryCode(), l.getCategoryCode()); |
|
|
|
resultList.add(dto); |
|
|
|
}); |
|
|
|
categoryList.forEach(ca -> { |
|
|
|
if (!map.containsKey(ca.getCategoryCode())) { |
|
|
|
ProjectCategoryTotalResultDTO dto = new ProjectCategoryTotalResultDTO(); |
|
|
|
dto.setAgencyId(formDTO.getAgencyId()); |
|
|
|
dto.setCategoryCode(ca.getCategoryCode()); |
|
|
|
dto.setCategoryName(ca.getCategoryName()); |
|
|
|
dto.setColour(ca.getColour()); |
|
|
|
resultList.add(dto); |
|
|
|
map.put(ca.getCategoryCode(), ca.getCategoryCode()); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return resultList; |
|
|
|
} |
|
|
@ -390,7 +405,7 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
formDTO.setToDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", 1)); |
|
|
|
//1.查询客户下分类信息
|
|
|
|
List<IssueProjectCategoryDictDTO> categoryList = govIssueService.categoryList(formDTO.getCustomerId(), null, null); |
|
|
|
List<String> categoreCodeList = categoryList.stream().map(ca -> formDTO.getCategoryCode().equals(ca.getParentCategoryCode()) ? ca.getCategoryCode() : "").collect(Collectors.toList()); |
|
|
|
List<String> categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(m -> m.getCategoryCode()).collect(Collectors.toList()); |
|
|
|
formDTO.setCategoreCodeList(categoreCodeList); |
|
|
|
|
|
|
|
//2.查询组织及下级截止某一天的某个一级分类下的项目列表
|
|
|
@ -423,18 +438,22 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
} |
|
|
|
}); |
|
|
|
//项目涉及分类信息【一个项目涉及多个一级分类】
|
|
|
|
//一级分类Id
|
|
|
|
List<String> caId = new ArrayList<>(); |
|
|
|
List<String> caCode = new ArrayList<>(); |
|
|
|
list.forEach(ca -> { |
|
|
|
if (ca.getProjectId().equals(re.getProjectId())) { |
|
|
|
caId.add(ca.getCategoryPids()); |
|
|
|
caCode.add(ca.getCategoryCode()); |
|
|
|
} |
|
|
|
}); |
|
|
|
//一级分类名称、code集合
|
|
|
|
List<String> caName = new ArrayList<>(); |
|
|
|
categoryList.forEach(ca -> caId.stream().filter(li -> ca.getId().equals(li)).forEach(s -> caName.add(ca.getCategoryName()))); |
|
|
|
re.setCategoryCodes(caCode); |
|
|
|
List<String> caCode = new ArrayList<>(); |
|
|
|
categoryList.forEach(ca -> caId.stream().filter(li -> ca.getId().equals(li)).forEach(s -> { |
|
|
|
caName.add(ca.getCategoryName()); |
|
|
|
caCode.add(ca.getCategoryCode()); |
|
|
|
})); |
|
|
|
re.setCategoryNames(caName); |
|
|
|
re.setCategoryCodes(caCode); |
|
|
|
//项目来源话题、事件的创建人信息
|
|
|
|
eventUser.forEach(ev -> { |
|
|
|
if (re.getProjectId().equals(ev.getProjectId())) { |
|
|
@ -459,6 +478,7 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
@Override |
|
|
|
public ProjectAnalysisResultDTO projectAnalysis(ProjectAnalysisFormDTO formDTO) { |
|
|
|
ProjectAnalysisResultDTO resultDTO = new ProjectAnalysisResultDTO(); |
|
|
|
resultDTO.setUserId(formDTO.getUserId()); |
|
|
|
//1.查询userId的身份证号在小程序用户中存在的多个userId值
|
|
|
|
List<UserBaseInfoDTO> userList = epmetUserService.getUserBaseList(formDTO.getUserId()); |
|
|
|
List<String> userIds = userList.stream().map(UserBaseInfoDTO::getUserId).collect(Collectors.toList()); |
|
|
|