|
@ -26,18 +26,14 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
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.dao.IcSocietyOrgDao; |
|
|
import com.epmet.dao.IcSocietyOrgDao; |
|
|
import com.epmet.dto.form.AddSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.EditSocietyOrgFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.GetListSocietyOrgFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.UserIdsFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
import com.epmet.dto.result.GetListSocietyOrgResultDTO; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.SocietyOrgListResultDTO; |
|
|
|
|
|
import com.epmet.dto.result.StaffSinGridResultDTO; |
|
|
|
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
import com.epmet.entity.IcSocietyOrgEntity; |
|
|
import com.epmet.entity.IcSocietyOrgEntity; |
|
|
import com.epmet.excel.IcSocietyOrgExcel; |
|
|
import com.epmet.excel.IcSocietyOrgExcel; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.service.IcSocietyOrgService; |
|
|
import com.epmet.service.IcSocietyOrgService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
@ -68,6 +64,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private IcUserDemandRecService icUserDemandRecService; |
|
|
private IcUserDemandRecService icUserDemandRecService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Author sun |
|
|
* @Author sun |
|
@ -120,11 +118,12 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
formDTO.setPids(staffInfoCache.getAgencyPIds()); |
|
|
formDTO.setPids(staffInfoCache.getAgencyPIds()); |
|
|
//1.根据查询条件分页查询社会组织数据
|
|
|
//1.根据查询条件分页查询社会组织数据
|
|
|
PageInfo<SocietyOrgListResultDTO> result = |
|
|
PageInfo<SocietyOrgListResultDTO> result = |
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); |
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); |
|
|
if (CollectionUtils.isEmpty(result.getList())) { |
|
|
if (CollectionUtils.isEmpty(result.getList())) { |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
resultDTO.setTotal((int) result.getTotal()); |
|
|
resultDTO.setTotal((int) result.getTotal()); |
|
|
|
|
|
|
|
|
//2.查询被绑定管理员信息
|
|
|
//2.查询被绑定管理员信息
|
|
|
UserIdsFormDTO dto = new UserIdsFormDTO(); |
|
|
UserIdsFormDTO dto = new UserIdsFormDTO(); |
|
|
List<String> staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); |
|
|
List<String> staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); |
|
@ -135,8 +134,20 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
throw new RenException("获取工作人员基本信息失败......"); |
|
|
throw new RenException("获取工作人员基本信息失败......"); |
|
|
} |
|
|
} |
|
|
result.getList().forEach(r -> listResult.getData().stream().filter(u -> r.getAdminStaffId().equals(u.getStaffId())).forEach(u -> r.setAdminStaffName(u.getStaffName()))); |
|
|
result.getList().forEach(r -> listResult.getData().stream().filter(u -> r.getAdminStaffId().equals(u.getStaffId())).forEach(u -> r.setAdminStaffName(u.getStaffName()))); |
|
|
resultDTO.setList(result.getList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//3.查询被绑定管理员信息
|
|
|
|
|
|
OrgInfoFormDTO org = new OrgInfoFormDTO(); |
|
|
|
|
|
List<String> orgIds = result.getList().stream().map(SocietyOrgListResultDTO::getAgencyId).collect(Collectors.toList()); |
|
|
|
|
|
orgIds = orgIds.stream().distinct().collect(Collectors.toList()); |
|
|
|
|
|
org.setOrgIds(orgIds); |
|
|
|
|
|
org.setOrgType("agency"); |
|
|
|
|
|
Result<List<OrgInfoResultDTO>> orgResult = govOrgOpenFeignClient.selectOrgInfo(org); |
|
|
|
|
|
if (!orgResult.success()) { |
|
|
|
|
|
throw new RenException("获取组织基础信息失败......"); |
|
|
|
|
|
} |
|
|
|
|
|
result.getList().forEach(r -> orgResult.getData().stream().filter(u -> r.getAgencyId().equals(u.getOrgId())).forEach(u -> r.setAgencyName(u.getOrgName()))); |
|
|
|
|
|
|
|
|
|
|
|
resultDTO.setList(result.getList()); |
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|