From c35538b5a54358f11af7dacaea17f89fd6cba39a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 13 May 2022 18:42:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BF=81=E5=85=A5=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E5=BD=93=E5=89=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98=E6=89=80=E5=B1=9E=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=8F=8A=E4=B8=8B=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/IcMoveInListFormDTO.java | 9 ++++++++- .../com/epmet/controller/IcMoveInRecordController.java | 1 + .../epmet/service/impl/IcMoveInRecordServiceImpl.java | 5 +++++ .../src/main/resources/mapper/IcMoveInRecordDao.xml | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java index eaeb03b6db..fe2144059d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java @@ -70,6 +70,13 @@ public class IcMoveInListFormDTO implements Serializable { private Boolean isPage = true; private String customerId; private String moveInId; - + /** + * 当前登录用户id + */ + private String staffId; + /** + * 当前登录用户所属组织id + */ + private String agencyId; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java index 4a5be8eb89..d35d1dbdaf 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java @@ -65,6 +65,7 @@ public class IcMoveInRecordController { @MaskResponse(fieldNames = {"mobile", "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); return new Result>().ok(icMoveInRecordService.list(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java index ecb0cfc044..dcfa02524d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java @@ -68,6 +68,11 @@ public class IcMoveInRecordServiceImpl extends BaseServiceImpl list(IcMoveInListFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException("获取工作人员信息失败"); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); //列表/导出查询 PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); List list = baseDao.selectMoveInList(formDTO); diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml index 79c4b5bdc9..87e2d5f12b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml @@ -69,6 +69,9 @@ AND id = #{moveInId} + + AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%')) + ORDER BY created_time DESC From 118ce3cfa1a31e7ef64d585fe0d2d01707fedc2b Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 16 May 2022 09:45:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BF=81=E5=87=BA=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/ChangeRelocationServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java index def8b7dafe..52697856b7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java @@ -166,7 +166,7 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl