From d8eef30b3c201f05f9f235c3d3bd568a7c680fc7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 8 Nov 2022 17:29:29 +0800 Subject: [PATCH] =?UTF-8?q?/heart/icpartyactivity/search=E8=81=94=E5=BB=BA?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcPartyUnitServiceImpl.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 7a07763ea1..17ed0d4dde 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/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.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 search(PartyUnitFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); @@ -329,11 +332,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl option(IcPartyUnitDTO dto) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); - wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); - wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); - List list = baseDao.selectList(wrapper); + // LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + // wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); + // wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + // wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); + // List list = baseDao.selectList(wrapper); + // 改成查询当前组织及下级的数据 + String customerId = loginUserUtil.getLoginUserCustomerId(); + PartyUnitFormDTO partyUnitFormDTO = new PartyUnitFormDTO(); + partyUnitFormDTO.setCustomerId(customerId); + partyUnitFormDTO.setAgencyId(dto.getAgencyId()); + partyUnitFormDTO.setServiceMatter(dto.getServiceMatter()); + List list = baseDao.pageList(partyUnitFormDTO); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); }