|
@@ -1,5 +1,6 @@
|
|
package com.ghsc.partybuild.service.impl;
|
|
package com.ghsc.partybuild.service.impl;
|
|
|
|
|
|
|
|
+import com.ghsc.partybuild.mapper.PartyTotalCQuery;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.ghsc.partybuild.mapper.IntegratedQueryCQuery;
|
|
import com.ghsc.partybuild.mapper.IntegratedQueryCQuery;
|
|
@@ -7,20 +8,42 @@ import com.ghsc.partybuild.service.IntegratedQueryService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service("integrateQueryService")
|
|
@Service("integrateQueryService")
|
|
public class IntegratedQueryServiceImpl implements IntegratedQueryService {
|
|
public class IntegratedQueryServiceImpl implements IntegratedQueryService {
|
|
@Autowired
|
|
@Autowired
|
|
private IntegratedQueryCQuery integratedQueryCquery;
|
|
private IntegratedQueryCQuery integratedQueryCquery;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private PartyTotalCQuery partyTotalCquery;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public PageInfo<HashMap<String, Object>> getDepartmentAdvanceList(int pageNum, int pageSize, String dzzmc, String[] zzlb, String[] jczzfl, String jldzzrqStart, String jldzzrqEnd, String gjjmrqStart, String gjjmrqEnd, Integer memberCountStart, Integer memberCountEnd, Integer djkpxxYear, Integer[] judgeLevel, Integer honourYear, Integer honourlevel, Integer[] honourType
|
|
public PageInfo<HashMap<String, Object>> getDepartmentAdvanceList(int pageNum, int pageSize, String dzzmc, String[] zzlb, String[] jczzfl, String jldzzrqStart, String jldzzrqEnd, String gjjmrqStart, String gjjmrqEnd, Integer memberCountStart, Integer memberCountEnd, Integer djkpxxYear, Integer[] judgeLevel, Integer honourYear, Integer honourlevel, Integer[] honourType
|
|
, Integer djkpxxYearDzb, Integer[] judgeLevelDzb,String dzzdm) {
|
|
, Integer djkpxxYearDzb, Integer[] judgeLevelDzb,String dzzdm) {
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
List<HashMap<String, Object>> list = integratedQueryCquery.departmentAdvanceList(dzzmc, zzlb, jczzfl, jldzzrqStart, jldzzrqEnd, gjjmrqStart, gjjmrqEnd, memberCountStart, memberCountEnd,
|
|
List<HashMap<String, Object>> list = integratedQueryCquery.departmentAdvanceList(dzzmc, zzlb, jczzfl, jldzzrqStart, jldzzrqEnd, gjjmrqStart, gjjmrqEnd, memberCountStart, memberCountEnd,
|
|
djkpxxYear, judgeLevel, honourYear, honourlevel, honourType, djkpxxYearDzb, judgeLevelDzb,dzzdm);
|
|
djkpxxYear, judgeLevel, honourYear, honourlevel, honourType, djkpxxYearDzb, judgeLevelDzb,dzzdm);
|
|
|
|
+
|
|
|
|
+ // 设置党员数量
|
|
|
|
+ List<String> dzzdmList = list.stream().map(it -> it.get("DZZDM").toString()).collect(Collectors.toList());
|
|
|
|
+ List<HashMap<String, Object>> zgUserlList = new ArrayList<>();
|
|
|
|
+ if (dzzdmList.size() > 0) {
|
|
|
|
+ zgUserlList = partyTotalCquery.selectZgUsertotalList(dzzdmList, null);
|
|
|
|
+ }
|
|
|
|
+ for (HashMap<String, Object> item : list) {
|
|
|
|
+ String itDzzdm = item.get("DZZDM").toString();
|
|
|
|
+ List<HashMap<String, Object>> zgList = zgUserlList.stream().filter(it -> it.get("DZZDM").toString().equals(itDzzdm)).collect(Collectors.toList());
|
|
|
|
+ Object numZguser = 0;
|
|
|
|
+ if (zgList.size() > 0) {
|
|
|
|
+ numZguser = zgList.get(0).get("NUM_ZGUSER");
|
|
|
|
+ }
|
|
|
|
+ item.put("MEMBERCOUNT", numZguser); // 设置职工数量为在岗党员数(前端显示用的MEMBERCOUNT)
|
|
|
|
+ }
|
|
|
|
+
|
|
PageInfo<HashMap<String, Object>> result = new PageInfo(list);
|
|
PageInfo<HashMap<String, Object>> result = new PageInfo(list);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|