Browse Source

列表搜索党组织树(不包含当前级组织)

feature/teamB_zz_wgh
Jackwang 3 years ago
parent
commit
97e656bfdb
  1. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java
  2. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java
  3. 9
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java
  4. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  5. 28
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

13
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java

@ -96,6 +96,19 @@ public class IcPartyOrgController {
return icPartyOrgService.getTreelist(formDTO); return icPartyOrgService.getTreelist(formDTO);
} }
/**
* @describe: 列表搜索党组织树(不包含当前级组织)
* @author wangtong
* @date 2022/6/10 14:20
* @params [tokenDto, formDTO]
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO>>
*/
@GetMapping("getSearchTreelist")
public Result<List<IcPartyOrgTreeDTO>> getSearchTreelist(@LoginUser TokenDto tokenDto,PartyOrgTreeListDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
return icPartyOrgService.getSearchTreelist(formDTO);
}
/** /**
* @describe: 当前登录用户所属行政组织及下级的党组织只限支部 * @describe: 当前登录用户所属行政组织及下级的党组织只限支部
* @author wangtong * @author wangtong

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

@ -3,7 +3,6 @@ package com.epmet.modules.partyOrg.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -21,7 +20,7 @@ import java.util.List;
public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> { public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
/** /**
* @describe: 获取组织列表 * @describe: 获取当前及下级组织列表
* @author wangtong * @author wangtong
* @date 2022/5/17 19:00 * @date 2022/5/17 19:00
* @params [] * @params []
@ -75,4 +74,13 @@ public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
* @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<BranchlistTreeSubDTO> selectAllBranchByAgencyId(@Param("agencyId") String agencyId, @Param("customerId") String customerId); List<BranchlistTreeSubDTO> selectAllBranchByAgencyId(@Param("agencyId") String agencyId, @Param("customerId") String customerId);
/**
* @describe: 获取下级组织列表
* @author wangtong
* @date 2022/6/10 14:21
* @params [formDTO]
* @return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO>
*/
List<IcPartyOrgTreeDTO> getSearchTreelist(PartyOrgTreeListDTO formDTO);
} }

9
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java

@ -98,4 +98,13 @@ public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> {
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.partymember.dto.partyOrg.result.BranchListResultDTO> * @return com.epmet.commons.tools.utils.Result<com.epmet.resi.partymember.dto.partyOrg.result.BranchListResultDTO>
*/ */
Result<List<BranchlistTreeDTO>> branchlist(TokenDto tokenDto); Result<List<BranchlistTreeDTO>> branchlist(TokenDto tokenDto);
/**
* @describe: 列表搜索党组织树(不包含当前级组织)
* @author wangtong
* @date 2022/6/10 14:20
* @params [formDTO]
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO>>
*/
Result<List<IcPartyOrgTreeDTO>> getSearchTreelist(PartyOrgTreeListDTO formDTO);
} }

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

@ -231,6 +231,12 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
return new Result<List<BranchlistTreeDTO>>().ok(resultList); return new Result<List<BranchlistTreeDTO>>().ok(resultList);
} }
@Override
public Result<List<IcPartyOrgTreeDTO>> getSearchTreelist(PartyOrgTreeListDTO formDTO) {
List<IcPartyOrgTreeDTO> list = baseDao.getSearchTreelist(formDTO);
return new Result<List<IcPartyOrgTreeDTO>>().ok(build(list));
}
/** /**
* 构建树节点 * 构建树节点
*/ */

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

@ -96,6 +96,34 @@
AND (AGENCY_ID = #{agencyId} or AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' )) AND (AGENCY_ID = #{agencyId} or AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' ))
</if> </if>
</select> </select>
<select id="getSearchTreelist"
resultType="com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO">
select ID,
CUSTOMER_ID,
ORG_PID as pid,
ORG_PIDS,
AGENCY_ID,
AGENCY_PIDS,
PARTY_ORG_TYPE,
PARTY_ORG_NAME
from ic_party_org
where DEL_FLAG=0
and CUSTOMER_ID=#{customerId}
<choose>
<when test="orgPid != '' and orgPid != null and agencyId != null and agencyId != ''">
AND (AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' )
or
id =#{orgPid})
</when>
<otherwise>
<if test="agencyId != null and agencyId != ''">
AND AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' )
</if>
</otherwise>
</choose>
</select>
</mapper> </mapper>

Loading…
Cancel
Save