Browse Source

获取上级党组织列表调整

feature/teamB_zz_wgh
Jackwang 3 years ago
parent
commit
6fda7a5d57
  1. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java
  2. 4
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  3. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

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

@ -91,7 +91,8 @@ public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
* @params [agencyPid, customerId, code] * @params [agencyPid, customerId, code]
* @return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO> * @return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO>
*/ */
List<IcPartyOrgTreeDTO> selectParentOrgByAgencyPid(@Param("agencyPid") String agencyPid, List<IcPartyOrgTreeDTO> selectParentOrgByAgencyPid(@Param("agencyId") String agencyId,
@Param("agencyPid") String agencyPid,
@Param("customerId") String customerId, @Param("customerId") String customerId,
@Param("partyOrgType") String partyOrgType); @Param("partyOrgType") String partyOrgType);

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

@ -262,10 +262,10 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
} }
//如果类型为支部,则查询该行政组织下的所有党委(列表) //如果类型为支部,则查询该行政组织下的所有党委(列表)
if(PartyOrgTypeEnum.BRANCH.getCode().equals(formDTO.getPartyOrgType())){ if(PartyOrgTypeEnum.BRANCH.getCode().equals(formDTO.getPartyOrgType())){
list.addAll(baseDao.selectParentOrgByAgencyPid(agencyPid,formDTO.getCustomerId(),PartyOrgTypeEnum.PARTY.getCode())); list.addAll(baseDao.selectParentOrgByAgencyPid(formDTO.getAgencyId(),null,formDTO.getCustomerId(),PartyOrgTypeEnum.PARTY.getCode()));
}else{ }else{
//查询该行政组织对应上级所关联的党组织(单个实体类) //查询该行政组织对应上级所关联的党组织(单个实体类)
list.addAll(baseDao.selectParentOrgByAgencyPid(agencyPid,formDTO.getCustomerId(),null)); list.addAll(baseDao.selectParentOrgByAgencyPid(null,agencyPid,formDTO.getCustomerId(),null));
} }
return new Result<List<IcPartyOrgTreeDTO>>().ok(list); return new Result<List<IcPartyOrgTreeDTO>>().ok(list);
} }

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

@ -128,7 +128,12 @@
from ic_party_org from ic_party_org
where DEL_FLAG = 0 where DEL_FLAG = 0
and CUSTOMER_ID=#{customerId} and CUSTOMER_ID=#{customerId}
and AGENCY_ID=#{agencyPid} <if test="agencyId != null and agencyId != ''">
AND (AGENCY_ID = #{agencyId} or AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' ))
</if>
<if test="agencyPid != null and agencyPid != ''">
and AGENCY_ID=#{agencyPid}
</if>
<if test="partyOrgType != null and partyOrgType != ''"> <if test="partyOrgType != null and partyOrgType != ''">
and PARTY_ORG_TYPE = #{partyOrgType} and PARTY_ORG_TYPE = #{partyOrgType}
</if> </if>

Loading…
Cancel
Save