diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index b0367639ed..0115706902 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -55,8 +55,12 @@ public class IcPartyActivityDTO implements Serializable { /** * 组织ID */ - @JsonIgnore + // @JsonIgnore private String agencyId; + /** + * 组织名称 + */ + private String agencyName; private String gridId; private String gridName; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java index 5935d564de..1aed3be19f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -51,6 +51,7 @@ public class IcPartyUnitDTO implements Serializable { * 组织ID */ private String agencyId; + private String agencyName; /** * diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 0481b07fc4..fb67921cd8 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -29,4 +29,5 @@ public class PartyActivityFormDTO implements Serializable { private String serviceMatter; private Integer pageNo; private Integer pageSize; + private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java index cf7841d93e..ec4a1751dd 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java @@ -24,4 +24,9 @@ public class PartyUnitFormDTO implements Serializable { private String contactMobile; private Integer pageNo; private Integer pageSize; + + /** + * 工作端当前登录人员 + */ + private String currentStaffId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 2ff977b4db..67b3c5da5a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -71,8 +71,14 @@ public class IcPartyActivityController { @Resource private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; + /** + * 联建活动-列表 + * @param formDTO + * @return + */ @PostMapping("search") - public Result> page(@RequestBody PartyActivityFormDTO formDTO){ + public Result> page(@LoginUser TokenDto tokenDto,@RequestBody PartyActivityFormDTO formDTO){ + formDTO.setCustomerId(formDTO.getCustomerId()); PageData page = icPartyActivityService.search(formDTO); return new Result>().ok(page); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 95093177cb..8a0ba036ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -3,6 +3,7 @@ package com.epmet.controller; import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; @@ -16,10 +17,6 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcPartyUnitDTO; -import com.epmet.dto.form.ImportTaskCommonFormDTO; -import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.form.PartyUnitFormDTO; -import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.*; @@ -37,12 +34,10 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -70,9 +65,20 @@ public class IcPartyUnitController { private Path IC_PARTY_UNIT_UPLOAD_DIR; + /** + * 联建单位-列表查询 + * 本组织及下级数据 + * @param tokenDto + * @param formDTO + * @return + */ @PostMapping("list") public Result> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + //工作端调用的话,赋值当前登录用户id + if(AppClientConstant.APP_GOV.equals(tokenDto.getApp())){ + formDTO.setCurrentStaffId(tokenDto.getUserId()); + } PageData page = icPartyUnitService.search(formDTO); return new Result>().ok(page); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index 0c02e737b7..e0cb649327 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; +import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.PartyUnitListbriefFormDTO; import com.epmet.dto.result.PartyTypepercentResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; @@ -116,4 +117,11 @@ public interface IcPartyUnitDao extends BaseDao { @Param("customerId") String customerId); List selectByIds(@Param("partyUnitIds") List partyUnitIds); + + /** + * 联建单位-分页列表查询 + * @param formDTO + * @return + */ + List pageList(PartyUnitFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index c645ffbc55..e7b3fbc4e5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -128,7 +128,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl search(PartyUnitFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + /*LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); @@ -127,7 +126,13 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = baseDao.selectList(wrapper); + List list = baseDao.selectList(wrapper);*/ + //本组织及下级 + if(StringUtils.isNotBlank(formDTO.getCurrentStaffId())&&StringUtils.isBlank(formDTO.getAgencyId())){ + CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getCurrentStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + } + List list = baseDao.pageList(formDTO); PageInfo pageInfo = new PageInfo<>(list); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); @@ -150,6 +155,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl(dtoList, pageInfo.getTotal()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index 0c5c86d30d..b02c91bfd5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -61,42 +61,49 @@ ADDRESS, LONGITUDE, LATITUDE, - RESULT + RESULT, + a.AGENCY_ID FROM ic_party_activity a INNER JOIN ( SELECT - ACTIVITY_ID, - GROUP_CONCAT( UNIT_ID ) AS unitId + ur.ACTIVITY_ID, + GROUP_CONCAT( ur.UNIT_ID ) AS unitId FROM - ic_activity_unit_relation + ic_activity_unit_relation ur WHERE - DEL_FLAG = '0' - AND AGENCY_ID = #{agencyId} + ur.DEL_FLAG = '0' + + AND (ur.AGENCY_ID = #{agencyId} or ur.PIDS like concat('%',#{agencyId},'%')) + - AND UNIT_ID = #{unitId} + AND ur.UNIT_ID = #{unitId} GROUP BY - ACTIVITY_ID + ur.ACTIVITY_ID ) b ON a.ID = b.ACTIVITY_ID INNER JOIN ( SELECT - ACTIVITY_ID, - GROUP_CONCAT( SERVICE_MATTER ) AS serviceMatter + sr.ACTIVITY_ID, + GROUP_CONCAT( sr.SERVICE_MATTER ) AS serviceMatter FROM - ic_activity_service_relation + ic_activity_service_relation sr WHERE - DEL_FLAG = '0' - AND AGENCY_ID = #{agencyId} + sr.DEL_FLAG = '0' + + AND (sr.AGENCY_ID = #{agencyId} or sr.PIDS like concat('%',#{agencyId},'%')) + - AND SERVICE_MATTER = #{serviceMatter} + AND sr.SERVICE_MATTER = #{serviceMatter} GROUP BY - ACTIVITY_ID + sr.ACTIVITY_ID ) c ON a.ID = c.ACTIVITY_ID WHERE a.DEL_FLAG = '0' - AND a.AGENCY_ID = #{agencyId} + + AND (a.AGENCY_ID = #{agencyId} or a.PIDS like concat('%',#{agencyId},'%')) + AND a.GRID_ID = #{gridId} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index c1800190cb..e57c6d2419 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -193,4 +193,35 @@ ) + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java index bdeca2e352..119362360c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java @@ -76,10 +76,6 @@ public class IcEnterpriseChangeRecordEntity extends BaseEpmetEntity { */ private String scale; - /** - * 规模,手输数字 - */ - private Integer scaleTotal; /** * 场所负责人 */