|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
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.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.enums.PartyOrgTypeEnum; |
|
|
import com.epmet.commons.tools.enums.PartyOrgTypeEnum; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
@ -31,6 +32,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; |
|
|
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.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.DefaultPartyOrgResDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -361,4 +363,29 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 党组织活动发布时, |
|
|
|
|
|
* 查询当前登录用户所属行政组织下,默认的党组织,取第一个 |
|
|
|
|
|
* |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param userId |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public DefaultPartyOrgResDTO defaultPartyOrg(String customerId, String userId) { |
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(customerId,userId); |
|
|
|
|
|
if(null==staffInfoCacheResult){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"查询工作人员所属组织异常","查询工作人员所属组织异常"); |
|
|
|
|
|
} |
|
|
|
|
|
DefaultPartyOrgResDTO resDto=new DefaultPartyOrgResDTO(); |
|
|
|
|
|
resDto.setStaffAgencyId(staffInfoCacheResult.getAgencyId()); |
|
|
|
|
|
resDto.setStaffAgencyName(staffInfoCacheResult.getAgencyName()); |
|
|
|
|
|
|
|
|
|
|
|
IcPartyOrgEntity entity=baseDao.selectDefaultPartyOrg(staffInfoCacheResult.getAgencyId(),staffInfoCacheResult.getLevel()); |
|
|
|
|
|
resDto.setDefaultPartyOrgId(entity.getId()); |
|
|
|
|
|
resDto.setDefaultPartyOrgPid(entity.getOrgPid()); |
|
|
|
|
|
resDto.setDefaultPartyOrgName(entity.getPartyOrgName()); |
|
|
|
|
|
resDto.setDefaultPartyOrgPath(StringUtils.isNotBlank(entity.getOrgPids()) ? entity.getOrgPids().concat(StrConstant.COLON).concat(entity.getId()) : entity.getId()); |
|
|
|
|
|
return resDto; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|