Browse Source

/heart/icpartyactivity/search联建活动列表

master
yinzuomei 3 years ago
parent
commit
d8eef30b3c
  1. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -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.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto; 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.ConvertUtils;
import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.ExcelPoiUtils;
import com.epmet.commons.tools.utils.Result; 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.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -114,7 +116,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService;
@Resource @Resource
private GovOrgOpenFeignClient govOrgOpenFeignClient; private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Override @Override
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
@ -329,11 +332,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
*/ */
@Override @Override
public List<OptionDTO> option(IcPartyUnitDTO dto) { public List<OptionDTO> option(IcPartyUnitDTO dto) {
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); // wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId());
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); // wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); // wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); // 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)) { if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList(); return Collections.emptyList();
} }

Loading…
Cancel
Save