From 1294fe08be91b59b2e8aacd42c06f8c1a15824e3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 19 Oct 2022 15:22:11 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yantai/DataSyncUserAndOrgServiceImpl.java | 49 +++++++++++++++++-- .../epmet/dao/yantai/DataSyncOrgDataDao.java | 2 + .../mapper/yantai/DataSyncOrgDataDao.xml | 6 +++ .../impl/CustomerStaffServiceImpl.java | 10 ++-- 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/yantai/DataSyncUserAndOrgServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/yantai/DataSyncUserAndOrgServiceImpl.java index 4261969097..6b81da281f 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/yantai/DataSyncUserAndOrgServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/yantai/DataSyncUserAndOrgServiceImpl.java @@ -1,16 +1,22 @@ package com.epmet.controller.yantai; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.CustomerStaffInfoDTOCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.api.yt.OrgData; +import com.epmet.commons.tools.utils.api.yt.UserData; import com.epmet.commons.tools.utils.api.yt.YantaiApi; import com.epmet.dao.yantai.DataSyncOrgDataDao; import com.epmet.dao.yantai.DataSyncUserDataDao; +import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.form.yantai.YtUserPageFormDTO; import com.epmet.dto.result.yantai.DataSyncOrgDataDTO; import com.epmet.dto.result.yantai.YtUserPageResDTO; import com.epmet.entity.yantai.DataSyncOrgDataEntity; +import com.epmet.entity.yantai.DataSyncUserDataEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.DataSyncOrgDataService; import com.epmet.service.DataSyncUserDataService; @@ -56,9 +62,46 @@ public class DataSyncUserAndOrgServiceImpl implements DataSyncUserAndOrgService */ @Override public Boolean yanTaiSyncUser(String organizationId) { - -// List data = YantaiApi.getUserByOuGuid(organizationId); - //todo 更新或插入数据 + String customerId = "45687aa479955f9d06204d415238f7cc"; + // 缓存初始化staffs + epmetUserOpenFeignClient.allCustomerStaffInCache(customerId); + Integer no = NumConstant.ONE; + Integer size; + do { + // 分批获取org + PageInfo pageInfo = PageHelper.startPage(no, NumConstant.ONE_HUNDRED).doSelectPageInfo(() -> dataSyncOrgDataDao.getAllList(customerId)); + size = pageInfo.getList().size(); + if (CollectionUtils.isNotEmpty(pageInfo.getList())){ + List needInsert = new ArrayList<>(); + pageInfo.getList().forEach(org -> { + // 根据org查用户 + List data = YantaiApi.getUserByOuGuid(org.getOrganizationId()); + if (CollectionUtils.isNotEmpty(data)){ + for (UserData u : data) { + CustomerStaffInfoDTOCache staffInfo = CustomerStaffRedis.getStaffInfoByMobile(customerId, u.getMobileTelephoneNumber()); + DataSyncUserDataEntity entity = ConvertUtils.sourceToTarget(u, DataSyncUserDataEntity.class); + entity.setCustomerId(customerId); + entity.setRemark(""); + if (null == staffInfo){ + entity.setStatus(NumConstant.ZERO_STR); + entity.setOrganizationId(""); + entity.setStaffId(""); + }else { + CustomerStaffInfoCacheResult staffInfo1 = CustomerStaffRedis.getStaffInfo(customerId, staffInfo.getUserId()); + entity.setStatus(NumConstant.ONE_STR); + entity.setOrganizationId(null == staffInfo1 ? "" : staffInfo1.getAgencyId()); + entity.setStaffId(staffInfo.getUserId()); + } + needInsert.add(entity); + } + } + }); + dataSyncUserDataService.insertBatch(needInsert,NumConstant.FIVE_HUNDRED); + } + no++; + }while (size == NumConstant.ONE_HUNDRED); + // 删除staffs缓存 + CustomerStaffRedis.delAllCustomerStaff(customerId); return false; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/yantai/DataSyncOrgDataDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/yantai/DataSyncOrgDataDao.java index edad699db9..b0b0529b62 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/yantai/DataSyncOrgDataDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/yantai/DataSyncOrgDataDao.java @@ -22,4 +22,6 @@ public interface DataSyncOrgDataDao extends BaseDao { * @return */ List queryList(@Param("pid") String pid); + + List getAllList(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/yantai/DataSyncOrgDataDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/yantai/DataSyncOrgDataDao.xml index 6f81c501f3..14931417d7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/yantai/DataSyncOrgDataDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/yantai/DataSyncOrgDataDao.xml @@ -46,4 +46,10 @@ order by d.ORDER_NUMBER asc + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 657e590d64..1d229ba369 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -61,6 +61,8 @@ import com.epmet.service.GovStaffRoleService; import com.epmet.service.StaffRoleService; import com.epmet.service.UserService; import com.epmet.util.ModuleConstant; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -1159,10 +1161,10 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl customerStaffs = baseDao.getAllStaffByCustomerId(customerId); - size = customerStaffs.size(); - if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(customerStaffs)){ - customerStaffs.forEach(c -> { + PageInfo pageInfo = PageHelper.startPage(no, NumConstant.ONE_HUNDRED).doSelectPageInfo(() -> baseDao.getAllStaffByCustomerId(customerId)); + size = pageInfo.getList().size(); + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(pageInfo.getList())){ + pageInfo.getList().forEach(c -> { String key = RedisKeys.getCustomerStaffInfoKeyByMobile(customerId, c.getMobile()); Map map = BeanUtil.beanToMap(c, false, true); redisUtils.hMSet(key,map); From 204444a511c098dd2fbf5ab3a6ea38b3571f8754 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 16:36:22 +0800 Subject: [PATCH 2/8] =?UTF-8?q?/gov/org/staff/addstaffv2=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AddStaffV2FromDTO.java | 5 ++++- .../com/epmet/controller/StaffController.java | 22 +++++++++++++++---- .../epmet/service/impl/StaffServiceImpl.java | 6 ++--- .../impl/CustomerStaffServiceImpl.java | 3 ++- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java index ecdfba89f9..7bc3b93076 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java @@ -74,5 +74,8 @@ public class AddStaffV2FromDTO implements Serializable { private List newRoles; - private String currentStaffId; + /** + * 烟台用:当前登录用户 + */ + private String currentUserId; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index d3f9b9dd28..4b925df93e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -4,13 +4,17 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.enums.RequirePermissionEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.StaffService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -204,10 +208,20 @@ public class StaffController { @RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_CREATE) public Result addStaffV2(@LoginUser TokenDto tokenDto, @RequestBody AddStaffV2FromDTO fromDTO){ ValidatorUtils.validateEntity(fromDTO, AddStaffV2FromDTO.AddStaff.class); - fromDTO.setCustomerId(tokenDto.getCustomerId()); - fromDTO.setApp(tokenDto.getApp()); - fromDTO.setClient(tokenDto.getClient()); - fromDTO.setCurrentStaffId(tokenDto.getUserId()); + if(AppClientConstant.APP_OPER.equals(tokenDto.getApp())){ + if(StringUtils.isBlank(fromDTO.getCustomerId())){ + // 该接口烟台运营端-统一认证也在用,所以客户id,运营端必传。 + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"运营端操作,customerId不能为空","运营端操作,customerId不能为空"); + } + }else{ + //小程序端或者数字社区从token里面取 + fromDTO.setCustomerId(tokenDto.getCustomerId()); + } + //因为添加的是工作人员,这里写死吧! + fromDTO.setApp("gov"); + fromDTO.setClient("wxmp"); + //当前登录用户 + fromDTO.setCurrentUserId(tokenDto.getUserId()); return staffService.addStaffV2(fromDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index 9f337196ca..d364fabda6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -575,8 +575,8 @@ public class StaffServiceImpl implements StaffService { //1.根据新增人员类型判断查询机关信息 OrgResultDTO orgDTO = customerAgencyDao.selectAgencyDetail(fromDTO.getOrgId(), fromDTO.getOrgType()); if (null == orgDTO) { - logger.error(String.format("工作人员新增,根据新增人员组织类型未查询到相关组织信息,orgId->%s,orgType->%s", fromDTO.getOrgId(), fromDTO.getOrgType())); - throw new RenException("根据新增人员组织类型未查询到相关组织信息"); + logger.warn(String.format("工作人员新增,根据新增人员组织类型未查询到相关组织信息,orgId->%s,orgType->%s", fromDTO.getOrgId(), fromDTO.getOrgType())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"根据新增人员组织类型未查询到相关组织信息","组织不存在"); } //2.调用user服务,新增用户信息 @@ -655,7 +655,7 @@ public class StaffServiceImpl implements StaffService { || "0c41b272ee9ee95ac6f184ad548a30eb".equals(fromDTO.getCustomerId())) { YtSyncStaffIdFormDTO ytSyncStaffIdFormDTO = ConvertUtils.sourceToTarget(fromDTO,YtSyncStaffIdFormDTO.class); ytSyncStaffIdFormDTO.setStaffId(result.getData().getUserId()); - ytSyncStaffIdFormDTO.setOperUserId(fromDTO.getCurrentStaffId()); + ytSyncStaffIdFormDTO.setOperUserId(fromDTO.getCurrentUserId()); epmetThirdOpenFeignClient.dataSyncUpdateStaff(ytSyncStaffIdFormDTO); } //2022.10.18加个返参,借用下StaffDetailResultDTO不再新建dto了 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 1d229ba369..d931b46a2c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -349,7 +349,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + // return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"手机号已存在","手机号已存在"); } //USER表插入数据 UserEntity userEntity = new UserEntity(); From 9513601af001f5190a8066061dc01fb6518e384a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 16:47:38 +0800 Subject: [PATCH 3/8] =?UTF-8?q?/gov/org/staff/addstaffv2=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E8=B0=83=E7=94=A8;staff/editstaff?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/StaffController.java | 2 +- .../java/com/epmet/service/impl/StaffServiceImpl.java | 11 +++-------- .../epmet/service/impl/CustomerStaffServiceImpl.java | 3 ++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index 4b925df93e..bcc8e2f55e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -101,7 +101,7 @@ public class StaffController { */ @PostMapping("editstaff") @RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_UPDATE) - public Result editStaff(@LoginUser TokenDto tokenDto, @RequestBody StaffSubmitFromDTO fromDTO){ + public Result editStaff(@RequestBody StaffSubmitFromDTO fromDTO){ ValidatorUtils.validateEntity(fromDTO); return staffService.editStaff(fromDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index d364fabda6..a81f868ac5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -216,14 +216,12 @@ public class StaffServiceImpl implements StaffService { CustomerAgencyEntity customerAgencyEntity = customerAgencyService.selectById(fromDTO.getAgencyId()); fromDTO.setCustomerId(customerAgencyEntity.getCustomerId()); } + // epmetUserFeignClient.editStaff没有用到这俩参数,就注释了。 // fromDTO.setApp(tokenDto.getApp()); // fromDTO.setClient(tokenDto.getClient()); Result result = epmetUserFeignClient.editStaff(fromDTO); if (!result.success()) { - if (result.getCode() != EpmetErrorCode.SERVER_ERROR.getCode()) { - return new Result().error(result.getCode(), result.getMsg()); - } - return new Result().error(EpmetErrorCode.STAFF_EDIT_FAILED.getCode(), EpmetErrorCode.STAFF_EDIT_FAILED.getMsg()); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),result.getInternalMsg(),result.getMsg()); } // if (tokenDto.getClient().equals("web")){ if(CollectionUtils.isNotEmpty(fromDTO.getNewRoles())){ @@ -584,10 +582,7 @@ public class StaffServiceImpl implements StaffService { submitDTO.setAgencyId(orgDTO.getAgencyId()); Result result = epmetUserFeignClient.addStaff(submitDTO); if (!result.success()) { - if (result.getCode() != EpmetErrorCode.SERVER_ERROR.getCode()) { - return new Result().error(result.getCode(), result.getMsg()); - } - return new Result().error(EpmetErrorCode.STAFF_ADD_FAILED.getCode(), EpmetErrorCode.STAFF_ADD_FAILED.getMsg()); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),result.getInternalMsg(),result.getMsg()); } //3.人员机关表总人数加一、关系表新增关系数据 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index d931b46a2c..24d9eb6729 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -470,7 +470,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + // return new Result().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg()); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"手机号已存在","手机号已存在"); } CustomerStaffEntity customerStaffEntity = baseDao.selectByUserId(fromDTO.getStaffId()); From 271a9ad65855facb14085ce5bb441e39135b2313 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 18:16:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?/gov/org/staff/editstaffinit=E8=BF=94?= =?UTF-8?q?=E5=9B=9EcustomerId=EF=BC=8Cstaff=5Forg=5Frelation=E6=94=B9?= =?UTF-8?q?=E4=BA=86=E4=B8=8B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/StaffOrgRelationDTO.java | 2 +- .../src/main/java/com/epmet/dto/result/StaffInitResultDTO.java | 1 + .../src/main/java/com/epmet/entity/StaffOrgRelationEntity.java | 2 +- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffOrgRelationDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffOrgRelationDTO.java index 47e3105b3d..e1b2602373 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffOrgRelationDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffOrgRelationDTO.java @@ -60,7 +60,7 @@ public class StaffOrgRelationDTO implements Serializable { private String orgId; /** - * 工作人员添加入口类型(组织:agency;部门:dept;网格:gridId) + * 工作人员的添加入口类型(组织:agency;部门:dept;网格:grid) */ private String orgType; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java index 69f9e86294..87b641b564 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java @@ -13,6 +13,7 @@ import java.util.List; @Data public class StaffInitResultDTO implements Serializable { private static final long serialVersionUID = 1L; + private String customerId; /** * 人员ID */ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffOrgRelationEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffOrgRelationEntity.java index 99c242b25d..04ef0c00d2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffOrgRelationEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffOrgRelationEntity.java @@ -56,7 +56,7 @@ public class StaffOrgRelationEntity extends BaseEpmetEntity { private String orgId; /** - * 工作人员添加入口类型(组织:agency;部门:dept;网格:gridId) + * 工作人员的添加入口类型(组织:agency;部门:dept;网格:grid) */ private String orgType; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 24d9eb6729..62af329caf 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -303,6 +303,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Wed, 19 Oct 2022 18:25:59 +0800 Subject: [PATCH 5/8] =?UTF-8?q?/gov/org/staff/editstaff,staff=5Frole.custo?= =?UTF-8?q?merId=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 62af329caf..a5d32a11b0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -496,6 +496,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Wed, 19 Oct 2022 18:38:57 +0800 Subject: [PATCH 6/8] =?UTF-8?q?/data/aggregator/org/staffdetailv2=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=8A=A5=E9=94=99=E3=80=82=E8=BF=94=E5=9B=9EcustomerI?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java | 1 + .../service/epmetuser/impl/EpmetUserServiceImpl.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java index 2a320915e8..ea1763af18 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java @@ -46,5 +46,6 @@ public class StaffDetailV2FormDTO implements Serializable { * 数字社区里的角色名称 */ private List szsqRoles; + private String customerId; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index e89800fa69..7f2fa0e263 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -7,6 +7,8 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.IdAndNameDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.OrgTypeEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; @@ -720,7 +722,8 @@ public class EpmetUserServiceImpl implements EpmetUserService { //基本信息 CustomerStaffDTO dto = customerStaffDao.selectByStaffId(staffId); if (null == dto) { - return result; + // return result; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"customer_staff is null staffId:"+staffId,"未查询到工作人员基础信息"); } //角色信息 List list = staffRoleDao.selectByStaffId(staffId); From 1b3a4a4262e28c915b436607cfc68a57da65366e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Oct 2022 09:08:04 +0800 Subject: [PATCH 7/8] LOUTI --- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index a5d32a11b0..0bcb0b5eee 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -478,6 +478,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Thu, 20 Oct 2022 09:24:41 +0800 Subject: [PATCH 8/8] /staff/editstaffinit --- .../src/main/java/com/epmet/dto/form/StaffInfoFromDTO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffInfoFromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffInfoFromDTO.java index 7c2a885f06..9bcd6dcb8c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffInfoFromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffInfoFromDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -14,7 +15,7 @@ import java.io.Serializable; @Data public class StaffInfoFromDTO implements Serializable { private static final long serialVersionUID = 1L; - public interface EditStaffInitGroup {} + public interface EditStaffInitGroup extends CustomerClientShowGroup {} /** * 客户ID */