diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java new file mode 100644 index 0000000000..50b05afb6c --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/8/5 5:23 下午 + * @DESC + */ +@Data +public class EventTitleOrgResultDTO implements Serializable { + + private static final long serialVersionUID = -517506506008916648L; + + private String agencyId; + private String gridId; + private String gridName; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java index 53e6330d06..cba514d051 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -29,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.CommonGridIdFormDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.excel.CustomerStaffGridExcel; import com.epmet.service.CustomerStaffGridService; @@ -131,4 +134,15 @@ public class CustomerStaffGridController { public Result> selectGridStaffByGridIds(@RequestBody List gridIds){ return new Result>().ok(customerStaffGridService.selectGridStaffByGridIds(gridIds)); } + + /** + * @Description 查询ORG + * @Param userId + * @author zxc + * @date 2021/8/5 5:36 下午 + */ + @PostMapping("eventorg") + public Result> eventOrg(@LoginUser TokenDto tokenDto){ + return new Result>().ok(customerStaffGridService.eventOrg(tokenDto.getUserId())); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java index d9ce1b0e61..426a0e6b3a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerStaffDepartmentDTO; import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.LatestGridFormDTO; +import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; import org.apache.ibatis.annotations.Mapper; @@ -106,4 +107,12 @@ public interface CustomerStaffGridDao extends BaseDao { * @date 2021/6/8 3:36 下午 */ List selectGridStaffByGridIds(@Param("gridIds") List gridIds); + + /** + * @Description 查询ORG + * @Param userId + * @author zxc + * @date 2021/8/5 5:36 下午 + */ + List eventOrg(@Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java index 0cf4041cce..1e78f3725b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java @@ -26,6 +26,7 @@ import com.epmet.dto.form.CustomerGridFormDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CommonStaffInfoResultDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; @@ -126,4 +127,12 @@ public interface CustomerStaffGridService extends BaseService selectGridStaffByGridIds(List gridIds); + + /** + * @Description 查询ORG + * @Param userId + * @author zxc + * @date 2021/8/5 5:36 下午 + */ + List eventOrg(String userId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java index ac8abc82fc..27d3da6576 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.CommonGridIdFormDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; import com.epmet.feign.EpmetUserOpenFeignClient; @@ -181,4 +182,15 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl eventOrg(String userId) { + return baseDao.eventOrg(userId); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index 5e08a59b97..b1acb714b9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -102,6 +102,27 @@ ) + + + insert into customer_staff_grid