Browse Source

移风镇代码初始化

master
lichao 2 years ago
parent
commit
9b3449e9c8
  1. 1
      epmet-gateway/src/main/resources/bootstrap.yml
  2. 60
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/YiFengScreenPartyOrgTreeResultDTO.java
  3. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java
  4. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/YiFengPartyOrgService.java
  5. 214
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/YiFengPartyOrgServiceImpl.java
  6. 163
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/YiFengScreenController.java
  7. 64
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/YiFengScreenService.java
  8. 381
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java
  9. 33
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

1
epmet-gateway/src/main/resources/bootstrap.yml

@ -530,6 +530,7 @@ epmet:
- /gov/org/icGroupPeopleRegister/add
# 组织树,灵山大屏需要无登录调用,放开
- /gov/org/agency/maporg
- /**/yifengScreen/**
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:
- /data/report/**

60
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/YiFengScreenPartyOrgTreeResultDTO.java

@ -0,0 +1,60 @@
package com.epmet.resi.partymember.dto.partymember.result;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 移风大屏-党组织树
*/
@Data
public class YiFengScreenPartyOrgTreeResultDTO {
// 中共青岛市即墨区委移风街道工作委员会
private String title;
private List<PartyOrg> list;
private Integer num;
@Data
public static class PartyOrg {
private String id;
private String pid;
private String name;
private Integer num;
private Integer orgType;
/**
* 子级组织列表
*/
private List<PartyOrg> children = new ArrayList<>();
/**
* 党员列表
*/
private List<Partymember> list = new ArrayList<>();;
}
/**
* @description: 党员信息
*/
@Data
public static class Partymember {
private String name;
private String gender;
private String age;
private String phone;
private String orgname;
private String photo;
private String remarks;
private Integer workStatus;
private Integer isDby;
private Integer isLhdy;
private Integer worknumber;
private Integer workEvent;
}
}

11
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java

@ -8,6 +8,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.*;
import com.epmet.resi.partymember.dto.partymember.result.LingShanScreenPartyOrgCategoryResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.LingShanScreenPartyOrgTreeResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.YiFengScreenPartyOrgTreeResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -146,6 +147,16 @@ public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
@Param("agencyId") String agencyId,
@Param("orgIdpath") String orgIdpath);
List<YiFengScreenPartyOrgTreeResultDTO.PartyOrg> getPartyOrgsLteDangweiForYiFeng(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@Param("orgIdpath") String orgIdpath);
List<YiFengScreenPartyOrgTreeResultDTO.PartyOrg> getPartyOrgsOfBranchForYiFeng(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@Param("orgIdpath") String orgIdpath);
List<LingShanScreenPartyObjectByTypeRstDTO> lingshanListDw(@Param("orgIdPath") String orgIdPath, @Param("orgId") String orgId);
/**

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/YiFengPartyOrgService.java

@ -0,0 +1,12 @@
package com.epmet.modules.partyOrg.service;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanPartyOrgAndOtherObjQtyRstDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO;
import java.util.List;
public interface YiFengPartyOrgService {
List<LingShanPartyOrgAndOtherObjQtyRstDTO> partyOrgAndOtherObjectQtyStats(String agencyId);
List<LingShanScreenPartyObjectByTypeRstDTO> partyObjsByType(String objType, String orgId, String orgType);
}

214
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/YiFengPartyOrgServiceImpl.java

@ -0,0 +1,214 @@
package com.epmet.modules.partyOrg.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.PartyOrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.PidUtils;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.dto.result.LingShanPartyServiceCenterQtyRstDTO;
import com.epmet.dto.result.LingShanPartyUnitRstDTO;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.modules.partyOrg.service.LingShanPartyOrgService;
import com.epmet.modules.partyOrg.service.YiFengPartyOrgService;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanPartyOrgAndOtherObjQtyRstDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO;
import com.epmet.resi.partymember.enums.LingShanPartyObjEnums;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class YiFengPartyOrgServiceImpl implements YiFengPartyOrgService, ResultDataResolver {
@Autowired
private IcPartyOrgDao partyOrgDao;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private EpmetHeartOpenFeignClient heartOpenFeignClient;
@Override
public List<LingShanPartyOrgAndOtherObjQtyRstDTO> partyOrgAndOtherObjectQtyStats(String agencyId) {
ArrayList<LingShanPartyOrgAndOtherObjQtyRstDTO> tl = new ArrayList<>();
// 1.党组织
AgencyInfoCache agencyInfo = null;
try {
agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
} catch (
Exception e) {
logger.error("【灵山大屏-党对象数量查询】组织未找到:" + agencyId);
return convertPartyObjsMap2DTO(null);
}
String orgIdPath = PidUtils.convertPid2OrgIdPath(agencyInfo.getId(), agencyInfo.getPids());
String level = agencyInfo.getLevel();
LambdaQueryWrapper<IcPartyOrgEntity> q;
if (OrgLevelEnum.COMMUNITY.getCode().equals(level)) {
// 社区级别,那直接用agencyId查,因为它下面就只有党支部一级了
q = new QueryWrapper<IcPartyOrgEntity>().select(" party_org_type, count(*) childrenQty").lambda()
// 本组织下级的所有子级
.eq(IcPartyOrgEntity::getAgencyId, agencyId)
// .eq(IcPartyOrgEntity::getPartyOrgType, PartyOrgTypeEnum.BRANCH.getCode()) // 是社区,就只能查询支部了。这里要控制,因为支部的行政组织也是对应到社区,所以这里必须限制一下
.groupBy(IcPartyOrgEntity::getPartyOrgType);
} else {
// 街道及以上级别,用pids,因为要从社区开始查,本级及下级
q = new QueryWrapper<IcPartyOrgEntity>().select(" party_org_type, count(*) childrenQty").lambda()
// 本组织下级的所有子级,不含本级
.likeRight(IcPartyOrgEntity::getAgencyPids, orgIdPath)
.groupBy(IcPartyOrgEntity::getPartyOrgType);
}
List<IcPartyOrgEntity> es = partyOrgDao.selectList(q);
List<LingShanPartyOrgAndOtherObjQtyRstDTO> l1 = es.stream().map(e -> {
LingShanPartyOrgAndOtherObjQtyRstDTO d = new LingShanPartyOrgAndOtherObjQtyRstDTO();
d.setPartyObjectTypeCode(e.getPartyOrgType().equals("5") ? LingShanPartyObjEnums.BRANCH.getCode() : LingShanPartyObjEnums.DW.getCode());
d.setName(PartyOrgTypeEnum.getEnumByCode(e.getPartyOrgType()).getName());
d.setValue(e.getChildrenQty());
return d;
}).collect(Collectors.toList());
tl.addAll(l1);
// 2.党群服务中心/站
List<LingShanPartyServiceCenterQtyRstDTO> serviceCenters = getResultDataOrReturnNull(govOrgOpenFeignClient.partyServiceCenterQtyStats(agencyId, OrgInfoConstant.AGENCY), ServiceConstant.GOV_ORG_SERVER);
if (serviceCenters == null) {
logger.error("【灵山大屏-党组织数量统计】查询党群服务中心失败,返回空");
} else {
List<LingShanPartyOrgAndOtherObjQtyRstDTO> temp = serviceCenters.stream().map(e -> {
LingShanPartyOrgAndOtherObjQtyRstDTO d = new LingShanPartyOrgAndOtherObjQtyRstDTO();
d.setPartyObjectTypeCode(e.getOrgType().equals(OrgInfoConstant.AGENCY) ? LingShanPartyObjEnums.PARTY_SERVICE_CENTER.getCode() : LingShanPartyObjEnums.PARTY_SERVICE_STATION.getCode());
d.setName(e.getOrgType().equals(OrgInfoConstant.AGENCY) ? "党群服务中心" : "党群服务站");
d.setValue(e.getQty());
return d;
}).collect(Collectors.toList());
temp.addAll(temp);
}
// 3.联建单位
Integer partyUnitQty = getResultDataOrReturnNull(heartOpenFeignClient.qtyInAgency(agencyId), ServiceConstant.EPMET_HEART_SERVER);
tl.add(new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.PARTY_UNIT.getCode(), "联建单位", partyUnitQty));
// 4.检查缺项(党委, 支部, 党群服务中心, 党群服务站, 联建单位几项都要有,没有数据则显示0。党代表工作室目前还没开发,开发了也要有)
Map<String, LingShanPartyOrgAndOtherObjQtyRstDTO> map = tl.stream().collect(Collectors.toMap(LingShanPartyOrgAndOtherObjQtyRstDTO::getName, Function.identity()));
return convertPartyObjsMap2DTO(map);
}
/**
* @Description: 看看哪个缺了补上
* @param map:
* @Return java.util.List
* @Author: wangxianzhang
* @Date: 2023/5/23 3:43 PM
*/
public List convertPartyObjsMap2DTO(Map<String, LingShanPartyOrgAndOtherObjQtyRstDTO> map) {
if (map == null) {
map = new HashMap<>();
}
LinkedList rl = new LinkedList<LingShanPartyOrgAndOtherObjQtyRstDTO>();
LingShanPartyOrgAndOtherObjQtyRstDTO dw = map.get("党委");
rl.add(dw != null ? dw : new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.DW.getCode(), "党委", 0));
LingShanPartyOrgAndOtherObjQtyRstDTO zb = map.get("支部");
rl.add(zb != null ? zb : new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.BRANCH.getCode(), "支部", 0));
LingShanPartyOrgAndOtherObjQtyRstDTO dqfwzx = map.get("党群服务中心");
rl.add(dqfwzx != null ? dqfwzx : new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.PARTY_SERVICE_CENTER.getCode(), "党群服务中心", 0));
LingShanPartyOrgAndOtherObjQtyRstDTO dqfwz = map.get("党群服务站");
rl.add(dqfwz != null ? dqfwz : new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.PARTY_SERVICE_STATION.getCode(), "党群服务站", 0));
LingShanPartyOrgAndOtherObjQtyRstDTO ljdz = map.get("联建单位");
rl.add(ljdz != null ? ljdz : new LingShanPartyOrgAndOtherObjQtyRstDTO(LingShanPartyObjEnums.PARTY_UNIT.getCode(), "联建单位", 0));
return rl;
}
@Override
public List<LingShanScreenPartyObjectByTypeRstDTO> partyObjsByType(String objType, String orgId, String orgType) {
if (LingShanPartyObjEnums.DW.getCode().equals(objType)) {
// 党委
return listDw(orgId, orgType);
} else if (LingShanPartyObjEnums.BRANCH.getCode().equals(objType)) {
// 支部
return listBranch(orgId, orgType);
} else if (LingShanPartyObjEnums.PARTY_SERVICE_CENTER.getCode().equals(objType)
|| LingShanPartyObjEnums.PARTY_SERVICE_STATION.getCode().equals(objType)) {
// 党群服务中心
List<com.epmet.dto.result.LingShanScreenPartyObjectByTypeRstDTO> rsts =
getResultDataOrReturnNull(govOrgOpenFeignClient.lingshanPartyServiceCenterList(objType, orgId), ServiceConstant.GOV_ORG_SERVER);
return rsts.stream()
.map(e -> new LingShanScreenPartyObjectByTypeRstDTO(e.getOrgId(), e.getOrgName(), e.getLongitude(), e.getLatitude(), 0))
.collect(Collectors.toList());
} else if (LingShanPartyObjEnums.PARTY_UNIT.getCode().equals(objType)) {
// 联建单位
List<LingShanPartyUnitRstDTO> rsts = getResultDataOrReturnNull(heartOpenFeignClient.lingshanPartyUnitList(orgId), ServiceConstant.EPMET_HEART_SERVER);
if (rsts == null) {
logger.error("【灵山大屏-党建相关对象列表查询】出错,");
}
return rsts.stream()
.map(e -> new LingShanScreenPartyObjectByTypeRstDTO(e.getOrgId(), e.getOrgName(), e.getLongitude(), e.getLatitude(), 0))
.collect(Collectors.toList());
} else {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "未知的数据类型");
}
}
/**
* @Description: 查询党委列表
* @param orgId:
* @param orgType:
* @Return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO>
* @Author: wangxianzhang
* @Date: 2023/5/12 1:42 PM
*/
List<LingShanScreenPartyObjectByTypeRstDTO> listDw(String orgId, String orgType) {
if (OrgInfoConstant.AGENCY.equals(orgType)) {
// 是行政组织,就要查询组织的下一级。查询下一级只能用AGENCY_PIDS
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
return partyOrgDao.lingshanListDw(PidUtils.convertPid2OrgIdPath(agencyInfo.getId(), agencyInfo.getPids()), orgId);
} else {
// 是网格,哪里来的党委?
return new ArrayList<>();
}
}
/**
* @Description: 查询支部支部是直属的!!!!!!!!!!!!!!!!!!!!!!!!!!!
* @param orgId:
* @param orgType:
* @Return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO>
* @Author: wangxianzhang
* @Date: 2023/5/12 1:52 PM
*/
List<LingShanScreenPartyObjectByTypeRstDTO> listBranch(String orgId, String orgType) {
if (OrgInfoConstant.AGENCY.equals(orgType)) {
// 是行政组织
// AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
return partyOrgDao.lingshanListZsBranchs(orgId);
} else {
// 是网格
// 这里应该是有问题。因为查询支部,只能用社区id查,不能用网格id查,party_org里面没有网格相关字段去关联
return new ArrayList<>();
}
}
}

163
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/YiFengScreenController.java

@ -0,0 +1,163 @@
package com.epmet.modules.partymember.controller;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.partyOrg.service.YiFengPartyOrgService;
import com.epmet.modules.partymember.service.YiFengScreenService;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanPartyOrgAndOtherObjQtyRstDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO;
import com.epmet.resi.partymember.dto.partymember.result.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
@RestController
@RequestMapping("yifengScreen")
@Slf4j
public class YiFengScreenController {
@Autowired
private YiFengScreenService yiFengScreenService;
@Autowired
private YiFengPartyOrgService yiFengPartyOrgService;
/**
* @description: 党组织数(只到党支部没有小组)
* @param agencyId:
* @return
* @author: WangXianZhang
* @date: 2023/4/14 1:00 PM
*/
@GetMapping("partyOrgTree")
public Result<YiFengScreenPartyOrgTreeResultDTO> getPartyOrgTree() {
String agencyId = "1739891126105206786";
YiFengScreenPartyOrgTreeResultDTO l = yiFengScreenService.getPartyOrgTree(agencyId);
return new Result().ok(l);
}
/**
* @description: 党建引领党组织和数量
* @param agencyId: 当前组织id
* @return com.epmet.commons.tools.utils.Result
* @author: WangXianZhang
* @date: 2023/4/14 10:57 AM
*/
@GetMapping("partyOrgCategoryAndQuantity")
public Result<List<LingShanScreenPartyOrgCategoryResultDTO>> listPartyOrgCategoryAndQuantity(@RequestParam("agencyId") String agencyId) {
List<LingShanScreenPartyOrgCategoryResultDTO> l = yiFengScreenService.listPartyOrgCategoryAndQuantity(agencyId);
return new Result().ok(l);
}
/**
* @description: 党建活动类型和数量
* @param agencyId: 组织id
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partymember.result.LingShanScreenPartyOrgCategoryResultDTO>>
* @author: WangXianZhang
* @date: 2023/4/14 12:03 PM
*/
@GetMapping("partyActTypeAndQuantity")
public Result<List<LingShanScreenPartyActTypeAndQtyResultDTO>> partyActTypeAndQuantity(@RequestParam("agencyId") String agencyId) {
List<LingShanScreenPartyActTypeAndQtyResultDTO> l = yiFengScreenService.partyActTypeAndQuantity(agencyId);
return new Result().ok(l);
}
/**
* @description: 党员列表
* @param partyOrgId: 党组织id
* @return
* @author: WangXianZhang
* @date: 2023/4/14 3:20 PM
*/
@GetMapping("partymemberList")
public Result<List<LingShanScreenPartyOrgTreeResultDTO.Partymember>> partymemberList(@RequestParam(value = "partyOrgId", required = false) String partyOrgId,
@RequestParam(value = "agencyId", required = false) String agencyId) {
if (StringUtils.isAllBlank(partyOrgId, agencyId)) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "党组织ID和行政组织ID必须传一个");
}
List<LingShanScreenPartyOrgTreeResultDTO.Partymember> l = yiFengScreenService.partymemberListByPartyOrgId(partyOrgId, agencyId);
return new Result().ok(l);
}
/**
* @description: agencyId下的党组织活动数统计
* @param agencyId: 行政组织id
* @return
* @author: WangXianZhang
* @date: 2023/4/14 7:07 PM
*/
@GetMapping("partyActStats/actQtyOfPartyOrg")
public Result<List<LingShanScreenPartyActQtyStatsResultDTO>> actQtyOfPartyOrgStats(@RequestParam("agencyId") String agencyId,
@RequestParam("holdTimeStart") String holdTimeStartStr,
@RequestParam("holdTimeEnd") String holdTimeEndStr) {
Date holdTimeStart;
Date holdTimeEnd;
try {
holdTimeStart = DateUtils.parse(holdTimeStartStr, DateUtils.DATE_TIME_PATTERN);
holdTimeEnd = DateUtils.parse(holdTimeEndStr, DateUtils.DATE_TIME_PATTERN);
} catch (Exception e) {
log.error("日期解析失败,请按指定格式传输:yyyy-MM-dd HH:mm:ss");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "日期解析失败");
}
List<LingShanScreenPartyActQtyStatsResultDTO> l = yiFengScreenService.actQtyOfPartyOrgStats(agencyId, holdTimeStart, holdTimeEnd);
return new Result<List<LingShanScreenPartyActQtyStatsResultDTO>>().ok(l);
}
/**
* @description: 大屏地图-党员数
* @param agencyId:
* @return
* @author: WangXianZhang
* @date: 2023/4/17 1:54 PM
*/
@GetMapping("partymemberQty")
public Result<Integer> getPartymemberQtyOfOrg(@RequestParam("agencyId") String agencyId) {
return new Result<Integer>().ok(yiFengScreenService.getPartymemberQtyOfOrg(agencyId));
}
/**
* @Description: 灵山党组织以及其他党相关对象(党群服务中心站等)的数量统计,供选择
* @param :
* @Return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.LingShanPartyOrgAndOtherObjQtyRstDTO>>
* @Author: wangxianzhang
* @Date: 2023/5/11 3:45 PM
*/
@GetMapping("partyOrgAndOtherObjectQtyStats")
public Result<List<LingShanPartyOrgAndOtherObjQtyRstDTO>> partyOrgAndOtherObjectQtyStats(@RequestParam(value = "agencyId", required = true) String agencyId) {
List<LingShanPartyOrgAndOtherObjQtyRstDTO> l = yiFengPartyOrgService.partyOrgAndOtherObjectQtyStats(agencyId);
return new Result<List<LingShanPartyOrgAndOtherObjQtyRstDTO>>().ok(l);
}
/**
* @Description: 灵山街道按照党类型查询党相关对象
* @param :
* @Return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO>>
* @Author: wangxianzhang
* @Date: 2023/5/12 1:18 PM
*/
@GetMapping("partyObjsByType")
public Result<List<LingShanScreenPartyObjectByTypeRstDTO>> partyObjsByType(@RequestParam(value = "objType", required = false) String objType,
@RequestParam(value = "orgId", required = false) String orgId,
@RequestParam(value = "orgType", required = false) String orgType) {
List<LingShanScreenPartyObjectByTypeRstDTO> l = yiFengPartyOrgService.partyObjsByType(objType, orgId, orgType);
return new Result<List<LingShanScreenPartyObjectByTypeRstDTO>>().ok(l);
}
}

64
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/YiFengScreenService.java

@ -0,0 +1,64 @@
package com.epmet.modules.partymember.service;
import com.epmet.resi.partymember.dto.partymember.result.*;
import java.util.Date;
import java.util.List;
public interface YiFengScreenService {
/**
* @description: 党建引领党组织和数量
* @param agencyId: 组织id
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.LingShanScreenPartyOrgCategoryResultDTO>
* @author: WangXianZhang
* @date: 2023/4/14 11:02 AM
*/
List<LingShanScreenPartyOrgCategoryResultDTO> listPartyOrgCategoryAndQuantity(String agencyId);
/**
* @description: 党建活动类型和数量
* @param agencyId: 组织id
* @return
* @author: WangXianZhang
* @date: 2023/4/14 12:05 PM
*/
List<LingShanScreenPartyActTypeAndQtyResultDTO> partyActTypeAndQuantity(String agencyId);
/**
* @description:
* @param agencyId:
* @return
* @author: WangXianZhang
* @date: 2023/4/14 1:09 PM
*/
YiFengScreenPartyOrgTreeResultDTO getPartyOrgTree(String agencyId);
/**
* @description: 党员列表
* @param partyOrgId:
* @return
* @author: WangXianZhang
* @date: 2023/4/14 3:22 PM
*/
List<LingShanScreenPartyOrgTreeResultDTO.Partymember> partymemberListByPartyOrgId(String partyOrgId, String agencyId);
/**
* @description: agencyId下的党组织活动数统计
* @param agencyId:
* @param holdTimeStart:
* @param holdTimeEnd:
* @return
* @author: WangXianZhang
* @date: 2023/4/14 7:27 PM
*/
List<LingShanScreenPartyActQtyStatsResultDTO> actQtyOfPartyOrgStats(String agencyId, Date holdTimeStart, Date holdTimeEnd);
/**
* @description: 大屏地图-党员数
* @param agencyId:
* @return
* @author: WangXianZhang
* @date: 2023/4/17 1:55 PM
*/
Integer getPartymemberQtyOfOrg(String agencyId);
}

381
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java

@ -0,0 +1,381 @@
package com.epmet.modules.partymember.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.enums.PartyOrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.PidUtils;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.partyOrg.dao.IcPartyActDao;
import com.epmet.modules.partyOrg.dao.IcPartyActTypeDictDao;
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao;
import com.epmet.modules.partyOrg.entity.IcPartyActTypeDictEntity;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.modules.partymember.dao.IcPartyMemberDao;
import com.epmet.modules.partymember.entity.IcPartyMemberEntity;
import com.epmet.modules.partymember.service.LingShanScreenService;
import com.epmet.modules.partymember.service.YiFengScreenService;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.partymember.dto.partymember.result.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataResolver {
@Autowired
private IcPartyOrgDao icPartyOrgDao;
@Autowired
private IcPartyActDao partyActDao;
@Autowired
private IcPartyMemberDao icPartyMemberDao;
@Autowired
private IcPartyActTypeDictDao partyActTypeDictDao;
@Autowired
private ResiGroupOpenFeignClient groupOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public List<LingShanScreenPartyOrgCategoryResultDTO> listPartyOrgCategoryAndQuantity(String agencyId) {
AgencyInfoCache agencyInfo = null;
try {
agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
} catch (Exception e) {
logger.error("【灵山大屏-党对象数量查询】组织未找到:" + agencyId);
return new ArrayList<>();
}
if (agencyInfo == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
}
// 1.查询党组织
List<LingShanScreenPartyOrgCategoryResultDTO> l = icPartyOrgDao
.listPartyOrgCategoryAndQuantity(EpmetRequestHolder.getLoginUserCustomerId(), agencyId, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids()));
// 给组织类型名字赋值
l.forEach(i -> {
PartyOrgTypeEnum partyOrgTypeEnum = PartyOrgTypeEnum.getEnumByCode(i.getPartyOrgType());
if (partyOrgTypeEnum != null) {
i.setName(partyOrgTypeEnum.getName());
}
});
// 2.查询党小组
Integer groupQty = getResultDataOrReturnNull(groupOpenFeignClient.getPartyGroupQuantityByAgencyId(agencyId), ServiceConstant.RESI_GROUP_SERVER);
if (groupQty == null) {
logger.error("【灵山大屏】党建引领-查询党小组信息失败,agencyId:" + agencyId);
groupQty = 0;
}
LingShanScreenPartyOrgCategoryResultDTO gq = new LingShanScreenPartyOrgCategoryResultDTO();
gq.setName("党小组");
gq.setPartyOrgType(null);
gq.setValue(groupQty);
l.add(gq);
return l;
}
@Override
public List<LingShanScreenPartyActTypeAndQtyResultDTO> partyActTypeAndQuantity(String agencyId) {
AgencyInfoCache agencyInfo = null;
try {
agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
} catch (Exception e) {
logger.warn("【灵山大屏-按活动类型查询党建活动统计】" + ExceptionUtils.getErrorStackTrace(e));
return new ArrayList<>();
}
if (agencyInfo == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
}
// 这里要查询的是,发布到我当前这个组织的活动,而不是我这个组织发布的,所以。。。
// 先根据行政组织查询到党组织的信息
// LambdaQueryWrapper<IcPartyOrgEntity> q = new LambdaQueryWrapper<>();
// q.eq(IcPartyOrgEntity::getAgencyId, agencyId);
// IcPartyOrgEntity partyOrg = icPartyOrgDao.selectOne(q);
IcPartyOrgEntity partyOrg = icPartyOrgDao.selectDefaultPartyOrg(agencyId, agencyInfo.getLevel());
if (partyOrg == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前党组织信息为空,agencyId:" + agencyId, "查询当前党组织信息为空");
}
List<LingShanScreenPartyActTypeAndQtyResultDTO> l = partyActDao.getPartyActTypeAndQuantity(EpmetRequestHolder.getLoginUserCustomerId(), PidUtils.convertPid2OrgIdPath(partyOrg.getId(), partyOrg.getOrgPids()));
List<String> type2beReturn = Arrays.asList("wmfwhd", "ljgj", "ztdr");
// 只返回上面的这几种
return l.stream().filter(e -> type2beReturn.contains(e.getActTypeKey())).collect(Collectors.toList());
}
@Override
public YiFengScreenPartyOrgTreeResultDTO getPartyOrgTree(String agencyId) {
// 移风镇 customer 1739891126105206785
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
if (agencyInfo == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
}
String orgIdpath = PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids());
// 1。查询组织
// 先查党委以上级别的,含党委
List<YiFengScreenPartyOrgTreeResultDTO.PartyOrg> l = icPartyOrgDao.getPartyOrgsLteDangweiForYiFeng("1739891126105206785",agencyId, orgIdpath);
// 再查党支部的。因为党委查询的时候使用pids和党支部的时候使用起来不一样,所以要分开
List<YiFengScreenPartyOrgTreeResultDTO.PartyOrg> s = icPartyOrgDao.getPartyOrgsOfBranchForYiFeng("1739891126105206785",agencyId, orgIdpath);
l.addAll(s);
// 2.组装树了开始
Map<String, YiFengScreenPartyOrgTreeResultDTO.PartyOrg> lMap = l.stream().collect(Collectors.toMap(e -> e.getId(), Function.identity()));
// 树根组织的id
String parentPartyOrgId = null;
// 最高的组织级别,用于找到树根。初始值给个100,大一点,不影响
Integer maxLevel = 100;
// 将组织放入到父组织的children列表中
for (Iterator<YiFengScreenPartyOrgTreeResultDTO.PartyOrg> it = l.iterator(); it.hasNext();) {
YiFengScreenPartyOrgTreeResultDTO.PartyOrg e = it.next();
YiFengScreenPartyOrgTreeResultDTO.PartyOrg pOrg = lMap.get(e.getPid());
if (maxLevel > e.getOrgType()) {
maxLevel = e.getOrgType();
parentPartyOrgId = e.getId();
}
if (pOrg != null) {
pOrg.getChildren().add(e);
// 修剪枝叶
it.remove();
}
}
YiFengScreenPartyOrgTreeResultDTO.PartyOrg parentOrg = lMap.get(parentPartyOrgId);
YiFengScreenPartyOrgTreeResultDTO r = new YiFengScreenPartyOrgTreeResultDTO();
r.setTitle(parentOrg.getName());
r.setNum(parentOrg.getNum());
r.setList(parentOrg.getChildren());
return r;
}
@Override
public List<LingShanScreenPartyOrgTreeResultDTO.Partymember> partymemberListByPartyOrgId(String partyOrgId, String agencyId) {
if (StringUtils.isBlank(partyOrgId)) {
// 没有传党组织id,使用行政组织id去查询对应的党组织,然后给党组织id赋值
LambdaQueryWrapper<IcPartyOrgEntity> q = new LambdaQueryWrapper<>();
q.eq(IcPartyOrgEntity::getAgencyId, agencyId);
q.le(IcPartyOrgEntity::getPartyOrgType, 4);// agency,那就只查询<=4的,即省委~社区党委
IcPartyOrgEntity partyOrg = icPartyOrgDao.selectOne(q);
if (partyOrg == null) {
logger.warn("根据该行政组织为找到对应的党组织信息:" + agencyId);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "根据该行政组织为找到对应的党组织信息");
}
partyOrgId = partyOrg.getId();
}
IcPartyOrgEntity partyOrg = icPartyOrgDao.selectById(partyOrgId);
LambdaQueryWrapper<IcPartyMemberEntity> query = null;
if (partyOrg == null) {
String baseErrorMsg = "【灵山大屏】党组织下的党员列表-未找到党组织信息。";
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format(baseErrorMsg + "partyOrgId:" + partyOrg), baseErrorMsg);
} else if (Integer.valueOf(partyOrg.getPartyOrgType()) <= 4) {
// 0省委,1市委,2区委,3党工委,4党委,5支部。党委以上,除了支部
query = new LambdaQueryWrapper<>();
// query.eq(IcPartyMemberEntity::getOrgPids, PidUtils.convertPid2OrgIdPath(partyOrgId, partyOrg.getOrgPids()));
String orgIdPath = PidUtils.convertPid2OrgIdPath(partyOrgId, partyOrg.getOrgPids());
query.eq(IcPartyMemberEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId());
query.and(c1 -> c1.eq(IcPartyMemberEntity::getAgencyId, partyOrg.getAgencyId()).or(c2 -> c2.likeRight(IcPartyMemberEntity::getAgencyPids, orgIdPath)));
} else {
// 5支部
query = new LambdaQueryWrapper<>();
query.eq(IcPartyMemberEntity::getSszb, partyOrg.getId()); // 直接用所属支部
query.eq(IcPartyMemberEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId());
}
List<IcPartyMemberEntity> l = icPartyMemberDao.selectList(query);
// 党员列表转化为需要的dto返回
return l.stream().map(e -> {
// 查询支部
IcPartyOrgEntity branch = icPartyOrgDao.selectById(e.getSszb());
// 查询居民信息,用于显示年龄
IcResiUserInfoCache resiInfo = CustomerResiUserRedis.getIcResiUserInfo(e.getIcResiUser());
LingShanScreenPartyOrgTreeResultDTO.Partymember t = new LingShanScreenPartyOrgTreeResultDTO.Partymember();
String birthDay;
if (resiInfo != null
&& StringUtils.isNotBlank(birthDay = resiInfo.getBirthday())) {
Date birthday = DateUtils.parse(birthDay, DateUtils.DATE_PATTERN);
Calendar ci = Calendar.getInstance();
ci.setTime(birthday);
int birthYear = ci.get(Calendar.YEAR);
t.setAge((LocalDate.now().getYear() - birthYear) + "");
}
t.setName(e.getName());
Integer gender = e.getGender();
t.setGender(gender != null ? GenderEnum.getName(gender.toString()) : "未知");
t.setOrgname(branch != null ? branch.getPartyOrgName() : null);
t.setPhone(e.getMobile());
t.setRemarks(e.getRemark());
t.setPhoto(e.getHeadPhoto());
// t.setIsDby();
// t.setIsLhdy();
// t.setWorkStatus();
// t.setWorknumber();
// t.setWorkEvent();
return t;
}).collect(Collectors.toList());
}
/**
* @description: 这个方法其实有更容易实现更容易阅读和理解的方式循环活动类型每个活动类型都查询一次统计数据即可
* 但是前期追求更少次数的数据库调用以提升效率越写越复杂既然已经这样了也懒得改了就这样吧
* 如果后面有人感觉维护不了了直接按照上述方式重写就行了不要犹豫不要徘徊很容易改没有暗雷
* @param agencyId: 行政组织id
* @return
* @author: WangXianZhang
* @date: 2023/4/14 11:33 PM
*/
@Override
public List<LingShanScreenPartyActQtyStatsResultDTO> actQtyOfPartyOrgStats(String agencyId, Date holdTimeStart, Date holdTimeEnd) {
ArrayList<LingShanScreenPartyActQtyStatsResultDTO> rl = new ArrayList<>();
AgencyInfoCache agencyInfo = null;
try {
agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
} catch (Exception e) {
logger.warn("【灵山大屏-按组织查询党建活动统计】" + ExceptionUtils.getErrorStackTrace(e));
return rl;
}
if (agencyInfo == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
}
// String orgIdpath = PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids());
// 先查当前党组织信息
LambdaQueryWrapper<IcPartyOrgEntity> currentPartyOrgQuery = new LambdaQueryWrapper<>();
currentPartyOrgQuery.eq(IcPartyOrgEntity::getAgencyId, agencyId);
currentPartyOrgQuery.orderByAsc(IcPartyOrgEntity::getPartyOrgType);
currentPartyOrgQuery.last(" limit 1 ");
IcPartyOrgEntity currentPartyOrg = icPartyOrgDao.selectOne(currentPartyOrgQuery);
if (currentPartyOrg == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "未找到党组织信息");
}
// ----------------------------要重写的话,上面建议保留噢,只重写下面就可以了,淦---------------------------------
// 找出当前党组织的下级党组织(全部),及其对应的活动数量
List<LingShanScreenPartyActQtyStatsResultDTO.StatsData> l = partyActDao.actQtyOfPartyOrgStats(currentPartyOrg.getId(), holdTimeStart, holdTimeEnd);
// 将结果遍历,分成2个纬度,分别建立地址引用
// Map<actType, Map<orgId, LingShanScreenPartyActQtyStatsResultDTO.StatsData>>
Map<String, Map<String, LingShanScreenPartyActQtyStatsResultDTO.StatsData>> orgDimMap = new HashMap<>();
HashMap<String, String> orgIdAndName = new HashMap<>();
l.forEach(e -> {
orgIdAndName.put(e.getOrgId(), e.getName());
String actType = e.getActType();
if (StringUtils.isNotBlank(actType)) {
// 不为空,说明该类型有活动数据
Map<String, LingShanScreenPartyActQtyStatsResultDTO.StatsData> m = orgDimMap.get(actType);
if (m == null) {
m = new HashMap<>();
orgDimMap.put(actType, m);
}
m.put(e.getOrgId(), e);
}
});
// 所有的活动类型,并且建立字典,供后续使用
LambdaQueryWrapper<IcPartyActTypeDictEntity> actTypeQuery = new LambdaQueryWrapper<>();
actTypeQuery.eq(IcPartyActTypeDictEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId());
List<IcPartyActTypeDictEntity> actTypes = partyActTypeDictDao.selectList(actTypeQuery);
Map<String, String> actTypeKeyAndName = actTypes.stream().collect(Collectors.toMap(IcPartyActTypeDictEntity::getTypeKey, IcPartyActTypeDictEntity::getTypeName));
// 二维遍历,外层活动类型,内层组织id。确保两个维度的坐标都是全的(哪怕value=0)
for (IcPartyActTypeDictEntity actType : actTypes) {
// 补全外层活动类型
Map<String, LingShanScreenPartyActQtyStatsResultDTO.StatsData> orgIdAndStats = orgDimMap.get(actType.getTypeKey());
if (orgIdAndStats == null) {
orgIdAndStats = new HashMap<>();
orgDimMap.put(actType.getTypeKey(), orgIdAndStats);
}
// 为活动类型补全组织列表(没有活动的组织赋值0)
for (Map.Entry<String, String> entry : orgIdAndName.entrySet()) {
String orgId = entry.getKey();
LingShanScreenPartyActQtyStatsResultDTO.StatsData statsData = orgIdAndStats.get(orgId);
if (statsData == null) {
LingShanScreenPartyActQtyStatsResultDTO.StatsData e = new LingShanScreenPartyActQtyStatsResultDTO.StatsData();
e.setOrgId(orgId);
e.setName(entry.getValue());
e.setValue(0);
e.setActType(actType.getTypeKey());
orgIdAndStats.put(orgId, e);
}
}
}
// 将结果map转化为list,返回
orgDimMap.forEach((actType, orgStatsMap) -> {
LingShanScreenPartyActQtyStatsResultDTO re = new LingShanScreenPartyActQtyStatsResultDTO();
re.setType(actTypeKeyAndName.get(actType));
re.setData(orgStatsMap.values());
rl.add(re);
});
return rl;
}
@Override
public Integer getPartymemberQtyOfOrg(String agencyId) {
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId);
if (agencyInfo == null) {
logger.error("getPartymemberQtyOfOrg查询组织信息失败agencyId:{}", agencyId);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
}
LambdaQueryWrapper<IcPartyMemberEntity> query = new LambdaQueryWrapper<>();
query.likeRight(IcPartyMemberEntity::getAgencyPids, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids()))
.or()
.eq(IcPartyMemberEntity::getAgencyId, agencyId);
return icPartyMemberDao.selectCount(query);
}
}

33
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

@ -293,6 +293,39 @@
group by org.ID, org.PARTY_ORG_NAME
</select>
<!--获取党委以上组织列表-->
<select id="getPartyOrgsLteDangweiForYiFeng"
resultType="com.epmet.resi.partymember.dto.partymember.result.YiFengScreenPartyOrgTreeResultDTO$PartyOrg">
select org.ID id
, org.ORG_PID pid
, org.PARTY_ORG_TYPE org_type
, org.PARTY_ORG_NAME name
, count(mem.ID) num
from ic_party_org org
left join ic_party_member mem on (mem.DEL_FLAG = 0 and mem.ORG_PIDS like concat(org.ORG_PIDS, ':', org.ID, '%'))
where org.DEL_FLAG = 0
and org.PARTY_ORG_TYPE &lt;= '4'
and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%'))
group by org.ID, org.PARTY_ORG_NAME
</select>
<!--获取支部列表-->
<select id="getPartyOrgsOfBranchForYiFeng"
resultType="com.epmet.resi.partymember.dto.partymember.result.YiFengScreenPartyOrgTreeResultDTO$PartyOrg">
select org.ID id
, org.ORG_PID pid
, org.PARTY_ORG_TYPE org_type
, org.PARTY_ORG_NAME name
, count(mem.ID) num
from ic_party_org org
left join ic_party_member mem on (mem.DEL_FLAG = 0 and mem.SSZB = org.ID)
where org.DEL_FLAG = 0
and org.PARTY_ORG_TYPE >= '5'
and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%'))
group by org.ID, org.PARTY_ORG_NAME
</select>
<!-- 灵山:省委~党委党组织+党员数量列表 -->
<select id="lingshanListDw"
resultType="com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO">

Loading…
Cancel
Save