|
|
@ -43,6 +43,7 @@ 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.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -75,6 +76,7 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.http.entity.ContentType; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
@ -114,7 +116,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; |
|
|
|
@Resource |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
@Override |
|
|
|
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
@ -329,11 +332,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionDTO> option(IcPartyUnitDTO dto) { |
|
|
|
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); |
|
|
|
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); |
|
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); |
|
|
|
// LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
// wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId());
|
|
|
|
// wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
|
|
|
|
// wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
|
|
|
|
// List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
|
|
|
|
// 改成查询当前组织及下级的数据
|
|
|
|
String customerId = loginUserUtil.getLoginUserCustomerId(); |
|
|
|
PartyUnitFormDTO partyUnitFormDTO = new PartyUnitFormDTO(); |
|
|
|
partyUnitFormDTO.setCustomerId(customerId); |
|
|
|
partyUnitFormDTO.setAgencyId(dto.getAgencyId()); |
|
|
|
partyUnitFormDTO.setServiceMatter(dto.getServiceMatter()); |
|
|
|
List<IcPartyUnitEntity> list = baseDao.pageList(partyUnitFormDTO); |
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|