From b5670cc0079b79a885a41be00071690251699f6a Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Wed, 20 May 2020 19:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8A=E7=BA=A7=E5=8F=AF?= =?UTF-8?q?=E8=AE=A4=E9=A2=86=E4=BC=81=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridPersonnelController.java | 16 + .../EnterpriseOfGridOperatorServiceImpl.java | 9 + .../gridpersonnel/IGridPersonnelService.java | 9 + .../impl/GridPersonnelServiceImpl.java | 6 + .../gridpersonnel/gridpersonnel-mapper.xml | 4 + .../list-gridpersonnel-mine.html | 327 ++++++++++++++++++ 6 files changed, 371 insertions(+) create mode 100644 src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html diff --git a/src/main/java/com/cm/inspection/controller/apis/gridpersonnel/GridPersonnelController.java b/src/main/java/com/cm/inspection/controller/apis/gridpersonnel/GridPersonnelController.java index f6ed4d9..1e065fb 100644 --- a/src/main/java/com/cm/inspection/controller/apis/gridpersonnel/GridPersonnelController.java +++ b/src/main/java/com/cm/inspection/controller/apis/gridpersonnel/GridPersonnelController.java @@ -109,4 +109,20 @@ public class GridPersonnelController extends AbstractController { return securityComponent.getCurrentUserIdInfo(); } + @ApiOperation(value = "我的网格人员分页列表", notes = "我的网格人员分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagegridpersonnelofmine") + public SuccessResultList> listPageGridPersonnelOfMine(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return gridPersonnelService.listPageGridPersonnelOfMine(page); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/service/enterpriseofgridoperator/impl/EnterpriseOfGridOperatorServiceImpl.java b/src/main/java/com/cm/inspection/service/enterpriseofgridoperator/impl/EnterpriseOfGridOperatorServiceImpl.java index a74ddec..69bb34c 100644 --- a/src/main/java/com/cm/inspection/service/enterpriseofgridoperator/impl/EnterpriseOfGridOperatorServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/enterpriseofgridoperator/impl/EnterpriseOfGridOperatorServiceImpl.java @@ -185,6 +185,15 @@ public class EnterpriseOfGridOperatorServiceImpl extends BaseService implements @Override public SuccessResultList> listPageEnterpriseOfGridOperatorByUserId(String userId, ListPage page) { page.getParams().put("userId", userId); + GridPersonnelDTO gridPersonnelDTO = gridPersonnelService.getGridPersonnelByUserId(userId); + if(gridPersonnelDTO == null) { + throw new SearchException(""); + } + page.getParams().put("area1", gridPersonnelDTO.getArea1()); + page.getParams().put("area2", gridPersonnelDTO.getArea2()); + page.getParams().put("area3", gridPersonnelDTO.getArea3()); + page.getParams().put("area4", gridPersonnelDTO.getArea4()); + page.getParams().put("area5", gridPersonnelDTO.getArea5()); PageHelper.startPage(page.getPage(), page.getRows()); List enterpriseOfGridOperatorDTOs = enterpriseOfGridOperatorDao.listEnterpriseOfGridOperatorByUserId(page.getParams()); PageInfo pageInfo = new PageInfo<>(enterpriseOfGridOperatorDTOs); diff --git a/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java b/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java index 7fe8a30..96a234b 100644 --- a/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java +++ b/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java @@ -155,4 +155,13 @@ public interface IGridPersonnelService { * @throws SearchException */ GridPersonnelDTO getGridPersonnelByUserId(String userId) throws SearchException; + + /** + * 我的网格人员分页列表 + * + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPageGridPersonnelOfMine(ListPage page) throws SearchException; } diff --git a/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java b/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java index 4edbfda..fbe010a 100644 --- a/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java @@ -185,4 +185,10 @@ public class GridPersonnelServiceImpl extends BaseService implements IGridPerson return gridPersonnelDao.getGridPersonnel(params); } + @Override + public SuccessResultList> listPageGridPersonnelOfMine(ListPage page) throws SearchException { + page.getParams().put("leaderUserId", securityComponent.getCurrentUser().getUserId()); + return listPageGridPersonnel(page); + } + } diff --git a/src/main/resources/mybatis/mapper/gridpersonnel/gridpersonnel-mapper.xml b/src/main/resources/mybatis/mapper/gridpersonnel/gridpersonnel-mapper.xml index bf3cb1f..4817576 100644 --- a/src/main/resources/mybatis/mapper/gridpersonnel/gridpersonnel-mapper.xml +++ b/src/main/resources/mybatis/mapper/gridpersonnel/gridpersonnel-mapper.xml @@ -222,6 +222,10 @@ AND t1.user_id LIKE CONCAT(#{userId}, '%') + + AND + t1.leader_user_id LIKE CONCAT(#{leaderUserId}, '%') + AND t1.level = #{level} diff --git a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html new file mode 100644 index 0000000..d7746b4 --- /dev/null +++ b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html @@ -0,0 +1,327 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file