|
@ -5,10 +5,12 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.constant.ProjectConstant; |
|
|
import com.epmet.dataaggre.constant.ProjectConstant; |
|
|
import com.epmet.dataaggre.dao.govproject.ProjectDao; |
|
|
import com.epmet.dataaggre.dao.govproject.ProjectDao; |
|
|
|
|
|
import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO; |
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; |
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; |
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; |
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; |
|
|
import com.epmet.dataaggre.dto.govproject.ProjectDTO; |
|
|
import com.epmet.dataaggre.dto.govproject.ProjectDTO; |
|
@ -17,6 +19,7 @@ import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO; |
|
|
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO; |
|
|
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO; |
|
|
import com.epmet.dataaggre.dto.govproject.result.*; |
|
|
import com.epmet.dataaggre.dto.govproject.result.*; |
|
|
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; |
|
|
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; |
|
|
|
|
|
import com.epmet.dataaggre.service.datastats.DataStatsService; |
|
|
import com.epmet.dataaggre.service.govissue.GovIssueService; |
|
|
import com.epmet.dataaggre.service.govissue.GovIssueService; |
|
|
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|
|
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|
|
import com.epmet.dataaggre.service.govproject.GovProjectService; |
|
|
import com.epmet.dataaggre.service.govproject.GovProjectService; |
|
@ -52,6 +55,8 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
private GovIssueService govIssueService; |
|
|
private GovIssueService govIssueService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ResiGroupService resiGroupService; |
|
|
private ResiGroupService resiGroupService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private DataStatsService dataStatsService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 查询项目信息 |
|
|
* @Description 查询项目信息 |
|
@ -251,7 +256,37 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public ProjectTotalResultDTO projectTotal(ProjectTotalFormDTO formDTO) { |
|
|
public ProjectTotalResultDTO projectTotal(ProjectTotalFormDTO formDTO) { |
|
|
return null; |
|
|
ProjectTotalResultDTO result = new ProjectTotalResultDTO(); |
|
|
|
|
|
result.setAgencyId(formDTO.getAgencyId()); |
|
|
|
|
|
result.setDateId(formDTO.getDateId()); |
|
|
|
|
|
//较昨日dateId值
|
|
|
|
|
|
formDTO.setYeDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", -1)); |
|
|
|
|
|
//较上月monthId值
|
|
|
|
|
|
formDTO.setMonthId(DateUtils.dateOrmonthId(formDTO.getDateId(), "month", -1)); |
|
|
|
|
|
|
|
|
|
|
|
//1.分别查询组织下dateId、较昨日、较上月项目统计数据
|
|
|
|
|
|
List<FactAgencyProjectResultDTO> list = dataStatsService.getProjectTotal(formDTO); |
|
|
|
|
|
if (CollectionUtils.isEmpty(list) || !formDTO.getDateId().equals(list.get(0).getDateId())) { |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//2.封装数据
|
|
|
|
|
|
list.forEach(l -> { |
|
|
|
|
|
if (formDTO.getDateId().equals(l.getDateId())) { |
|
|
|
|
|
s result.setProjectTotal(l.getProjectTotal()); |
|
|
|
|
|
result.setPendingTotal(l.getPendingTotal()); |
|
|
|
|
|
result.setPendingRatio(l.getPendingRatio()); |
|
|
|
|
|
result.setClosedTotal(l.getClosedTotal()); |
|
|
|
|
|
result.setClosedRatio(l.getClosedRatio()); |
|
|
|
|
|
} |
|
|
|
|
|
if (formDTO.getYeDateId().equals(l.getDateId())) { |
|
|
|
|
|
result.setDateIncr(result.getProjectTotal() - l.getProjectTotal()); |
|
|
|
|
|
} else if (formDTO.getMonthId().equals(l.getMonthId())) { |
|
|
|
|
|
result.setMonthIncr(result.getProjectTotal() - l.getProjectTotal()); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|