diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java index 17f939b2c6..72815d45b3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java @@ -9,18 +9,19 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; +import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.form.*; import com.epmet.dataaggre.dto.govorg.result.*; +import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; +import com.epmet.dataaggre.entity.govorg.CustomerGridEntity; import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums; import com.epmet.dataaggre.service.AggreGridService; import com.epmet.dataaggre.service.govorg.GovOrgService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; @@ -178,4 +179,26 @@ public class GovOrgController { return new Result>().ok(govOrgService.getAgencyTree(tokenDto, formDTO)); } + /** + * @Description 查询组织信息 + * @param agencyId + * @author zxc + * @date 2021/11/5 2:54 下午 + */ + @PostMapping("agency") + public Result getAgencyInfo(@RequestParam("agencyId")String agencyId){ + return new Result().ok(govOrgService.getAgencyInfo(agencyId)); + } + + /** + * @Description 查询网格信息 + * @param gridId + * @author zxc + * @date 2021/11/5 2:54 下午 + */ + @PostMapping("grid") + public Result getGridInfo(@RequestParam("gridId")String gridId){ + return new Result().ok(govOrgService.getGridInfo(gridId)); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java index 41b97b57ac..a927352031 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java @@ -10,6 +10,8 @@ import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO; import com.epmet.dataaggre.dto.govorg.form.SubOrgFormDTO; import com.epmet.dataaggre.dto.govorg.result.*; import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; +import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; +import com.epmet.dataaggre.entity.govorg.CustomerGridEntity; import java.util.List; @@ -154,4 +156,20 @@ public interface GovOrgService { * @Date 2021/9/23 10:14 */ List getStaffOrgList(String staffId); + + /** + * @Description 查询组织信息 + * @param agencyId + * @author zxc + * @date 2021/11/5 2:54 下午 + */ + CustomerAgencyEntity getAgencyInfo(String agencyId); + + /** + * @Description 查询网格信息 + * @param gridId + * @author zxc + * @date 2021/11/5 2:57 下午 + */ + CustomerGridEntity getGridInfo(String gridId); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java index d4e265cdec..eaf846cf45 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java @@ -20,6 +20,7 @@ import com.epmet.dataaggre.dto.govorg.form.SubOrgFormDTO; import com.epmet.dataaggre.dto.govorg.result.*; import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; +import com.epmet.dataaggre.entity.govorg.CustomerGridEntity; import com.epmet.dataaggre.service.commonservice.AreaCodeService; import com.epmet.dataaggre.service.epmetuser.EpmetUserService; import com.epmet.dataaggre.service.govorg.GovOrgService; @@ -532,4 +533,26 @@ public class GovOrgServiceImpl implements GovOrgService { return customerAgencyDao.getOrgList(staffId); } + /** + * @Description 查询组织信息 + * @param agencyId + * @author zxc + * @date 2021/11/5 2:54 下午 + */ + @Override + public CustomerAgencyEntity getAgencyInfo(String agencyId) { + return customerAgencyDao.selectById(agencyId); + } + + /** + * @Description 查询网格信息 + * @param gridId + * @author zxc + * @date 2021/11/5 2:57 下午 + */ + @Override + public CustomerGridEntity getGridInfo(String gridId) { + return customerGridDao.selectById(gridId); + } + }