|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -38,6 +39,8 @@ public class AnScreenServiceImpl implements AnScreenService { |
|
|
private ScreenAnGrassRootsGovernMonthlyDao screenAnGrassRootsGovernMonthlyDao; |
|
|
private ScreenAnGrassRootsGovernMonthlyDao screenAnGrassRootsGovernMonthlyDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ScreenAnCommunityProjectProfileDao screenAnCommunityProjectProfileDao; |
|
|
private ScreenAnCommunityProjectProfileDao screenAnCommunityProjectProfileDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 基层党员-各类总数 |
|
|
* 基层党员-各类总数 |
|
@ -124,10 +127,19 @@ public class AnScreenServiceImpl implements AnScreenService { |
|
|
public GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO) { |
|
|
public GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO) { |
|
|
GrassRootsOrgTrendResultDTO resultDTO = new GrassRootsOrgTrendResultDTO(); |
|
|
GrassRootsOrgTrendResultDTO resultDTO = new GrassRootsOrgTrendResultDTO(); |
|
|
|
|
|
|
|
|
|
|
|
// 1. x轴
|
|
|
|
|
|
// List<String> xAxis = new ArrayList<>();
|
|
|
|
|
|
// if(StringUtils.isNotBlank(formDTO.getMonthId())){
|
|
|
|
|
|
// xAxis = partyMemberLeadServiceImpl.getXproEndMonth(formDTO.getMonthId());
|
|
|
|
|
|
// }else{
|
|
|
|
|
|
// xAxis = partyMemberLeadServiceImpl.getXPro();
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM); |
|
|
String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM); |
|
|
// 查询近一年的指数值【包括本月】
|
|
|
String curDate = monthId.substring(0, 4) + "-" + monthId.substring(4, 6) + "-" + "01"; |
|
|
List<GrassRootsOrgTrendDTO> list = screenAnGrassRootsOrgMonthlyDao.selectGrassRootsOrgTrend(formDTO.getAgencyId(), monthId); |
|
|
// 查询近一年的指数值【包括本月】
|
|
|
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); |
|
|
List<GrassRootsOrgTrendDTO> list = screenAnGrassRootsOrgMonthlyDao.selectGrassRootsOrgTrend(formDTO.getAgencyId(), curDate); |
|
|
|
|
|
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); |
|
|
List<Integer> groupTotalList = list.stream().map(GrassRootsOrgTrendDTO::getGroupTotal).collect(Collectors.toList()); |
|
|
List<Integer> groupTotalList = list.stream().map(GrassRootsOrgTrendDTO::getGroupTotal).collect(Collectors.toList()); |
|
|
List<Integer> issueTotalList = list.stream().map(GrassRootsOrgTrendDTO::getIssueTotal).collect(Collectors.toList()); |
|
|
List<Integer> issueTotalList = list.stream().map(GrassRootsOrgTrendDTO::getIssueTotal).collect(Collectors.toList()); |
|
|
List<Integer> projectTotal = list.stream().map(GrassRootsOrgTrendDTO::getProjectTotal).collect(Collectors.toList()); |
|
|
List<Integer> projectTotal = list.stream().map(GrassRootsOrgTrendDTO::getProjectTotal).collect(Collectors.toList()); |
|
@ -180,8 +192,9 @@ public class AnScreenServiceImpl implements AnScreenService { |
|
|
GrassRootsGovernTrendResultDTO resultDTO = new GrassRootsGovernTrendResultDTO(); |
|
|
GrassRootsGovernTrendResultDTO resultDTO = new GrassRootsGovernTrendResultDTO(); |
|
|
|
|
|
|
|
|
String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM); |
|
|
String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM); |
|
|
|
|
|
String curDate = monthId.substring(0, 4) + "-" + monthId.substring(4, 6) + "-" + "01"; |
|
|
// 查询近一年的指数值【包括本月】
|
|
|
// 查询近一年的指数值【包括本月】
|
|
|
List<GrassRootsGovernTrendDTO> list = screenAnGrassRootsGovernMonthlyDao.selectGrassRootsGovernTrend(formDTO.getAgencyId(), monthId); |
|
|
List<GrassRootsGovernTrendDTO> list = screenAnGrassRootsGovernMonthlyDao.selectGrassRootsGovernTrend(formDTO.getAgencyId(), curDate); |
|
|
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); |
|
|
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); |
|
|
List<Integer> partiProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getPartiProjectTotal).collect(Collectors.toList()); |
|
|
List<Integer> partiProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getPartiProjectTotal).collect(Collectors.toList()); |
|
|
List<Integer> closedProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getClosedProjectTotal).collect(Collectors.toList()); |
|
|
List<Integer> closedProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getClosedProjectTotal).collect(Collectors.toList()); |
|
|