|
|
@ -1,8 +1,23 @@ |
|
|
|
package com.epmet.datareport.service.screen.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; |
|
|
|
import com.epmet.datareport.service.screen.PartyMemberLeadService; |
|
|
|
import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; |
|
|
|
import com.epmet.screen.dto.form.FineExampleFormDTO; |
|
|
|
import com.epmet.screen.constant.*; |
|
|
|
import com.epmet.screen.dto.result.CompartmentResultDTO; |
|
|
|
import com.epmet.screen.dto.result.ContactMassLineChartResult; |
|
|
|
import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; |
|
|
|
import com.epmet.screen.dto.result.FineExampleResultDTO; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 党建引领相关各指标查询 |
|
|
|
* |
|
|
@ -11,4 +26,49 @@ import org.springframework.stereotype.Service; |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 1、先锋模范 |
|
|
|
* @param fineExampleFormDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/20 1:56 下午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 2、党员联系群众 |
|
|
|
* @param contactMassLineChartFormDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/20 2:35 下午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { |
|
|
|
ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); |
|
|
|
List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId()); |
|
|
|
if (contactMassLineChartResults.size() == NumConstant.ZERO){ |
|
|
|
result.setXAxis(new ArrayList<>()); |
|
|
|
result.setGroupMemberData(new ArrayList<>()); |
|
|
|
result.setGroupData(new ArrayList<>()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
List<String> xAxis = new ArrayList<>(); |
|
|
|
List<Integer> groupData = new ArrayList<>(); |
|
|
|
List<Integer> groupMemberData = new ArrayList<>(); |
|
|
|
contactMassLineChartResults.forEach(contact -> { |
|
|
|
xAxis.add(contact.getOrgName()); |
|
|
|
groupData.add(contact.getGroupTotal()); |
|
|
|
groupMemberData.add(contact.getUserTotal()); |
|
|
|
}); |
|
|
|
result.setXAxis(xAxis); |
|
|
|
result.setGroupData(groupData); |
|
|
|
result.setGroupMemberData(groupMemberData); |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|