|
|
@ -25,21 +25,23 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.OrgTypeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
|
import com.epmet.commons.tools.utils.SpringContextUtils; |
|
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
|
import com.epmet.dao.GuideDao; |
|
|
|
import com.epmet.dto.GuideDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.GuideDetailResultDTO; |
|
|
|
import com.epmet.dto.result.GuideListResultDTO; |
|
|
|
import com.epmet.dto.result.OrgResultDTO; |
|
|
|
import com.epmet.entity.*; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.service.*; |
|
|
@ -184,7 +186,7 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp |
|
|
|
orgFormDTO.setOrgId(formDTO.getOrgId()); |
|
|
|
orgFormDTO.setOrgType(formDTO.getOrgType()); |
|
|
|
//获取组织的pId和pIds
|
|
|
|
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|
|
|
/*Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|
|
|
if (!result.success() || null == result.getData()) { |
|
|
|
throw new RenException(result.getCode(), result.getMsg()); |
|
|
|
} |
|
|
@ -193,7 +195,16 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp |
|
|
|
} else { |
|
|
|
guideDTO.setPid(result.getData().getAgencyId()); |
|
|
|
} |
|
|
|
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); |
|
|
|
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));*/ |
|
|
|
if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){ |
|
|
|
GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); |
|
|
|
guideDTO.setPid(gridInfoCache.getPid()); |
|
|
|
guideDTO.setPids(gridInfoCache.getPids().concat(StrConstant.COLON).concat(gridInfoCache.getId())); |
|
|
|
}else{ |
|
|
|
AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId()); |
|
|
|
guideDTO.setPid(agencyInfoCache.getPid()); |
|
|
|
guideDTO.setPids(PidUtils.convertPid2OrgIdPath(agencyInfoCache.getId(),agencyInfoCache.getPids())); |
|
|
|
} |
|
|
|
insert(guideDTO); |
|
|
|
//保存办事指南内容模块
|
|
|
|
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { |
|
|
@ -273,7 +284,7 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp |
|
|
|
orgFormDTO.setOrgType(formDTO.getOrgType()); |
|
|
|
guideDTO.setOrgName(formDTO.getOrgName()); |
|
|
|
//获取组织的pId和pIds
|
|
|
|
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|
|
|
/*Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|
|
|
if (!result.success() || null == result.getData()) { |
|
|
|
throw new RenException(result.getCode(), result.getMsg()); |
|
|
|
} |
|
|
@ -282,7 +293,17 @@ public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> imp |
|
|
|
} else { |
|
|
|
guideDTO.setPid(result.getData().getAgencyId()); |
|
|
|
} |
|
|
|
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); |
|
|
|
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));*/ |
|
|
|
|
|
|
|
if(OrgTypeEnum.GRID.getCode().equals(formDTO.getOrgType())){ |
|
|
|
GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); |
|
|
|
guideDTO.setPid(gridInfoCache.getPid()); |
|
|
|
guideDTO.setPids(gridInfoCache.getPids().concat(StrConstant.COLON).concat(gridInfoCache.getId())); |
|
|
|
}else{ |
|
|
|
AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId()); |
|
|
|
guideDTO.setPid(agencyInfoCache.getPid()); |
|
|
|
guideDTO.setPids(PidUtils.convertPid2OrgIdPath(agencyInfoCache.getId(),agencyInfoCache.getPids())); |
|
|
|
} |
|
|
|
update(guideDTO); |
|
|
|
//保存办事指南内容模块
|
|
|
|
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { |
|
|
|