| 
						
						
							
								
							
						
						
					 | 
					@ -17,26 +17,17 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.service.impl; | 
					 | 
					 | 
					package com.epmet.service.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.FieldConstant; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.constant.CustomerAgencyConstant; | 
					 | 
					 | 
					import com.epmet.constant.CustomerAgencyConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.CustomerAgencyDao; | 
					 | 
					 | 
					import com.epmet.dao.CustomerAgencyDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.CustomerAgencyDTO; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.*; | 
					 | 
					 | 
					import com.epmet.dto.form.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.*; | 
					 | 
					 | 
					import com.epmet.dto.result.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.CustomerAgencyEntity; | 
					 | 
					 | 
					import com.epmet.entity.CustomerAgencyEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.redis.CustomerAgencyRedis; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.AgencyService; | 
					 | 
					 | 
					import com.epmet.service.AgencyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.CustomerAgencyService; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.slf4j.Logger; | 
					 | 
					 | 
					import org.slf4j.Logger; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.slf4j.LoggerFactory; | 
					 | 
					 | 
					import org.slf4j.LoggerFactory; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -45,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Arrays; | 
					 | 
					 | 
					import java.util.Arrays; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.List; | 
					 | 
					 | 
					import java.util.List; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Map; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					/** | 
					 | 
					 | 
					/** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * 机关单位信息 | 
					 | 
					 | 
					 * 机关单位信息 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -146,24 +136,24 @@ public class AgencyServiceImpl implements AgencyService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @Description 组织首页-获取组织机构信息 | 
					 | 
					 | 
					     * @Description 组织首页-获取组织机构信息 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public Result<AgencydetailResultDTO> agencyDetail(AgencydetailFormDTO formDTO) { | 
					 | 
					 | 
					    public Result<AgencysResultDTO> agencyDetail(AgencydetailFormDTO formDTO) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AgencydetailResultDTO agencydetailResultDTO = new AgencydetailResultDTO(); | 
					 | 
					 | 
					        AgencysResultDTO agencysResultDTO = new AgencysResultDTO(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //1:查询本机关详细信息
 | 
					 | 
					 | 
					        //1:查询本机关详细信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        CustomerAgencyEntity entity = customerAgencyDao.selectById(formDTO.getAgencyId()); | 
					 | 
					 | 
					        CustomerAgencyEntity entity = customerAgencyDao.selectById(formDTO.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (null == entity) { | 
					 | 
					 | 
					        if (null == entity) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            return new Result<AgencydetailResultDTO>().ok(agencydetailResultDTO); | 
					 | 
					 | 
					            return new Result<AgencysResultDTO>().ok(agencysResultDTO); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        agencydetailResultDTO = ConvertUtils.sourceToTarget(entity, AgencydetailResultDTO.class); | 
					 | 
					 | 
					        agencysResultDTO = ConvertUtils.sourceToTarget(entity, AgencysResultDTO.class); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        agencydetailResultDTO.setAgencyId(entity.getId()); | 
					 | 
					 | 
					        agencysResultDTO.setAgencyId(entity.getId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        agencydetailResultDTO.setAgencyName(entity.getOrganizationName()); | 
					 | 
					 | 
					        agencysResultDTO.setAgencyName(entity.getOrganizationName()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //2:查询本机关的所有上级机关,按自上而下层级顺序
 | 
					 | 
					 | 
					        //2:查询本机关的所有上级机关,按自上而下层级顺序
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (null == entity.getPids()) { | 
					 | 
					 | 
					        if (null == entity.getPids()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            return new Result<AgencydetailResultDTO>().ok(agencydetailResultDTO); | 
					 | 
					 | 
					            return new Result<AgencysResultDTO>().ok(agencysResultDTO); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<String> listStr = Arrays.asList(entity.getPids().split(":")); | 
					 | 
					 | 
					        List<String> listStr = Arrays.asList(entity.getPids().split(":")); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<ParentListResultDTO> parentList = customerAgencyDao.selectPAgencyById(listStr); | 
					 | 
					 | 
					        List<ParentListResultDTO> parentList = customerAgencyDao.selectPAgencyById(listStr); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        agencydetailResultDTO.setParentList(parentList); | 
					 | 
					 | 
					        agencysResultDTO.setParentList(parentList); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return new Result<AgencydetailResultDTO>().ok(agencydetailResultDTO); | 
					 | 
					 | 
					        return new Result<AgencysResultDTO>().ok(agencysResultDTO); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |