Browse Source

通讯录接口模板提交

dev_shibei_match
sunyuchao 4 years ago
parent
commit
3e8b3e4788
  1. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java
  2. 28
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ListStaffResultDTO.java
  3. 31
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStaffListFormDTO.java
  4. 31
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java
  5. 39
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgStaffListResultDTO.java
  6. 39
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/StaffDetailV2ResultDTO.java
  7. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  8. 27
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  9. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  10. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  11. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  12. 22
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  13. 68
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java
  14. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
  15. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
  16. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
  17. 35
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.6__add_staff_org_relation.sql
  18. 25
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java
  19. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  20. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java
  21. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dataaggre.dto.epmetuser.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 对外接口--通讯录姓名检索工作人员-接口入参
* @Auth sun
*/
@Data
public class ListStaffFormDTO implements Serializable {
private static final long serialVersionUID = -3381286960911634231L;
/**
* 客户Id
*/
@NotBlank(message = "姓名不能为空", groups = ListStaffFormDTO.Staff.class)
private String realName;
public interface Staff extends CustomerClientShowGroup {}
}

28
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ListStaffResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 对外接口--通讯录姓名检索工作人员-接口返参
* @Auth sun
*/
@Data
public class ListStaffResultDTO implements Serializable {
private static final long serialVersionUID = 7129564173128153335L;
//工作人员用户id
private String staffId = "";
//工作人员姓名
private String staffName = "";
//手机号
private String mobile = "";
//用户所属组织id
private String agencyId = "";
//用户所属组织全路径名称
private String agencyAllName = "";
//客户Id
private String customerId = "";
}

31
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStaffListFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dataaggre.dto.govorg.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 通讯录组织/部门/网格下人员列表-接口入参
* @Auth sun
*/
@Data
public class OrgStaffListFormDTO implements Serializable {
private static final long serialVersionUID = -1974456701949979946L;
@NotBlank(message = "parentAgencyId不能为空",groups = AddUserInternalGroup.class)
private String parentAgencyId;
private String areaCode;
/**
* 社区级community
* 街道:street,
* 区县级: district,
* 市级: city
* 省级:province
*/
@NotBlank(message = "level不能为空",groups = AddUserInternalGroup.class)
private String level;
public interface AddUserInternalGroup {
}
}

31
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dataaggre.dto.govorg.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 通讯录人员详情v2-接口返参
* @Auth sun
*/
@Data
public class StaffDetailV2FormDTO implements Serializable {
private static final long serialVersionUID = -1974456701949979946L;
@NotBlank(message = "parentAgencyId不能为空",groups = AddUserInternalGroup.class)
private String parentAgencyId;
private String areaCode;
/**
* 社区级community
* 街道:street,
* 区县级: district,
* 市级: city
* 省级:province
*/
@NotBlank(message = "level不能为空",groups = AddUserInternalGroup.class)
private String level;
public interface AddUserInternalGroup {
}
}

39
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgStaffListResultDTO.java

@ -0,0 +1,39 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 通讯录组织/部门/网格下人员列表-接口返参
* @Auth sun
*/
@Data
public class OrgStaffListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 树结构对象
*/
private AgencyGridResultDTO agencyGridList;
}

39
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/StaffDetailV2ResultDTO.java

@ -0,0 +1,39 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 通讯录人员详情v2-接口返参
* @Auth sun
*/
@Data
public class StaffDetailV2ResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 树结构对象
*/
private AgencyGridResultDTO agencyGridList;
}

16
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java

@ -7,10 +7,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO; import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*; import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.service.datastats.DataStatsService; import com.epmet.dataaggre.service.datastats.DataStatsService;
@ -209,4 +206,15 @@ public class EpmetUserController {
return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId())); return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId()));
} }
/**
* @Param formDTO
* @Description 通讯录姓名检索工作人员
* @author sun
*/
@PostMapping("stafflist")
public Result<List<ListStaffResultDTO>> staffList(@RequestBody ListStaffFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ListStaffFormDTO.Staff.class);
return new Result<List<ListStaffResultDTO>>().ok(epmetUserService.listStaff(formDTO));
}
} }

27
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -11,10 +11,9 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.govorg.form.GridMemberDataAnalysisFromDTO; import com.epmet.dataaggre.dto.govorg.form.GridMemberDataAnalysisFromDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO; import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.result.AgencyGridListResultDTO; import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.NextAreaCodeResultDTO; import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.govorg.result.StaffAgencyGridListResultDTO;
import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums; import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums;
import com.epmet.dataaggre.service.AggreGridService; import com.epmet.dataaggre.service.AggreGridService;
import com.epmet.dataaggre.service.govorg.GovOrgService; import com.epmet.dataaggre.service.govorg.GovOrgService;
@ -128,4 +127,24 @@ public class GovOrgController {
return new Result<StaffAgencyGridListResultDTO>().ok(govOrgService.staffAgencyGridList(tokenDto)); return new Result<StaffAgencyGridListResultDTO>().ok(govOrgService.staffAgencyGridList(tokenDto));
} }
/**
* @Param formDTO
* @Description 通讯录组织/部门/网格下人员列表
* @author sun
*/
@PostMapping("stafflist")
public Result<List<OrgStaffListResultDTO>> staffList(@LoginUser OrgStaffListFormDTO formDTO) {
return new Result<List<OrgStaffListResultDTO>>().ok(govOrgService.staffList(formDTO));
}
/**
* @Param formDTO
* @Description 通讯录人员详情v2
* @author sun
*/
@PostMapping("staffdetailv2")
public Result<StaffDetailV2FormDTO> staffDetailV2(@LoginUser StaffDetailV2ResultDTO formDTO) {
return new Result<StaffDetailV2FormDTO>().ok(govOrgService.staffDetailV2(formDTO));
}
} }

12
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -1,9 +1,6 @@
package com.epmet.dataaggre.service.epmetuser; package com.epmet.dataaggre.service.epmetuser;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO; import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*; import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO; import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
@ -96,4 +93,11 @@ public interface EpmetUserService {
* @date 2021/8/3 15:09 * @date 2021/8/3 15:09
*/ */
UserEventLogoResultDTO mentionMeEvent(String userId); UserEventLogoResultDTO mentionMeEvent(String userId);
/**
* @Param formDTO
* @Description 通讯录姓名检索工作人员
* @author sun
*/
List<ListStaffResultDTO> listStaff(ListStaffFormDTO formDTO);
} }

16
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -9,10 +9,7 @@ import com.epmet.dataaggre.dao.epmetuser.*;
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO; import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO; import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO; import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO; import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*; import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
@ -424,5 +421,16 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return resultDTO; return resultDTO;
} }
/**
* @Param formDTO
* @Description 通讯录姓名检索工作人员
* @author sun
*/
@Override
public List<ListStaffResultDTO> listStaff(ListStaffFormDTO formDTO) {
return null;
}
} }

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -4,6 +4,8 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO; import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.*; import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
@ -81,4 +83,17 @@ public interface GovOrgService {
*/ */
StaffAgencyGridListResultDTO staffAgencyGridList(TokenDto tokenDto); StaffAgencyGridListResultDTO staffAgencyGridList(TokenDto tokenDto);
/**
* @Param formDTO
* @Description 通讯录组织/部门/网格下人员列表
* @author sun
*/
List<OrgStaffListResultDTO> staffList(OrgStaffListFormDTO formDTO);
/**
* @Param formDTO
* @Description 通讯录人员详情v2
* @author sun
*/
StaffDetailV2FormDTO staffDetailV2(StaffDetailV2ResultDTO formDTO);
} }

22
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -16,6 +16,8 @@ import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO; import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO; import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.*; import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
@ -372,4 +374,24 @@ public class GovOrgServiceImpl implements GovOrgService {
return subAgencyList; return subAgencyList;
} }
/**
* @Param formDTO
* @Description 通讯录组织/部门/网格下人员列表
* @author sun
*/
@Override
public List<OrgStaffListResultDTO> staffList(OrgStaffListFormDTO formDTO) {
return null;
}
/**
* @Param formDTO
* @Description 通讯录人员详情v2
* @author sun
*/
@Override
public StaffDetailV2FormDTO staffDetailV2(StaffDetailV2ResultDTO formDTO) {
return null;
}
} }

68
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java

@ -0,0 +1,68 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;
/**
* @author sun
* @dscription
*/
@NoArgsConstructor
@Data
public class AddStaffV2FromDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 机关ID
*/
private String agencyId;
/**
* 人员ID
*/
private String staffId;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空")
@Length(max = 15, message = "姓名仅允许输入15个字符")
private String name;
/**
* 手机
*/
@NotBlank(message = "手机号不能为空")
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "请输入正确的手机号")
private String mobile;
/**
* 性别
*/
@NotNull(message = "性别不能为空")
private Integer gender;
/**
* 专兼职
*/
@NotBlank(message = "专兼职不能为空")
private String workType;
/**
* 角色id列表
*/
@NotNull(message = "角色不能为空")
private List<String> roles;
/**
* 来源app(政府端:gov居民端:resi运营端:oper)
*/
private String app;
/**
* 来源client(PC端:web微信小程序:wxmp)
*/
private String client;
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java

@ -165,4 +165,18 @@ public class StaffController {
public Result<String> staffName(@RequestParam("userId")String userId){ public Result<String> staffName(@RequestParam("userId")String userId){
return new Result<String>().ok(staffService.staffName(userId)); return new Result<String>().ok(staffService.staffName(userId));
} }
/**
* 通讯录人员添加v2
* @author sun
*/
@PostMapping("addstaffv2")
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_CREATE)
public Result addStaffV2(@RequestBody AddStaffV2FromDTO fromDTO){
fromDTO.setApp("gov");
fromDTO.setClient("wxmp");
ValidatorUtils.validateEntity(fromDTO);
return staffService.addStaffV2(fromDTO);
}
} }

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java

@ -113,4 +113,10 @@ public interface StaffService {
* @date 2021/8/4 3:38 下午 * @date 2021/8/4 3:38 下午
*/ */
String staffName(String userId); String staffName(String userId);
/**
* 通讯录人员添加v2
* @author sun
*/
Result addStaffV2(AddStaffV2FromDTO fromDTO);
} }

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

@ -301,4 +301,16 @@ public class StaffServiceImpl implements StaffService {
String result = agencyName.concat(staffBasicInfo.getData().getRealName()); String result = agencyName.concat(staffBasicInfo.getData().getRealName());
return result; return result;
} }
/**
* 通讯录人员添加v2
* @author sun
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Result addStaffV2(AddStaffV2FromDTO fromDTO) {
return new Result();
}
} }

35
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.6__add_staff_org_relation.sql

@ -0,0 +1,35 @@
CREATE TABLE `staff_org_relation` (
`ID` varchar(64) NOT NULL COMMENT 'ID',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`PIDS` varchar(1024) NOT NULL COMMENT '所有上级组织机构ID(以英文:隔开)部门/网格得拼上所属组织Id',
`STAFF_ID` varchar(64) NOT NULL COMMENT '工作人员Id',
`ORG_ID` varchar(64) NOT NULL COMMENT '工作人员添加入口Id(agencyId;deptId;gridId)',
`ORG_TYPE` varchar(30) NOT NULL COMMENT '工作人员添加入口类型(组织:agency;部门:dept;网格:gridId)',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE KEY `staffid_orgid` (`STAFF_ID`,`ORG_ID`) USING BTREE COMMENT '联合主键'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='工作人员注册组织关系表';
INSERT INTO staff_org_relation SELECT
MD5(UUID()),
cs.CUSTOMER_ID,
ca.pids,
cs.USER_ID,
ca.id,
'agency',
'0',
'0',
'APP_USER',
NOW(),
'APP_USER',
NOW()
FROM
customer_staff_agency cs
INNER JOIN customer_agency ca ON cs.AGENCY_ID = ca.ID
WHERE cs.DEL_FLAG = '0';

25
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* @author sun
* @dscription 接口入参--通讯录工作人员解禁
*/
@NoArgsConstructor
@Data
public class EnableStaffFormDTO implements Serializable {
private static final long serialVersionUID = -5220529162950147825L;
/**
* 徽章名称
*/
@NotBlank(message = "徽章名称不能为空")
private String badgeName;
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -428,5 +428,15 @@ public class CustomerStaffController {
return new Result<List<CustomerStaffDTO>>().ok(staffs); return new Result<List<CustomerStaffDTO>>().ok(staffs);
} }
/**
* 通讯录工作人员解禁
* @author sun
*/
@PostMapping("enablestaff")
public Result enableStaff(@RequestBody EnableStaffFormDTO fromDTO){
customerStaffService.enableStaff(fromDTO);
return new Result();
}
} }

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java

@ -329,4 +329,10 @@ public interface CustomerStaffService extends BaseService<CustomerStaffEntity> {
* @date 2021.06.08 10:52 * @date 2021.06.08 10:52
*/ */
List<CustomerStaffDTO> list(String customerId, String realName, String mobile, List<String> ids); List<CustomerStaffDTO> list(String customerId, String realName, String mobile, List<String> ids);
/**
* 通讯录工作人员解禁
* @author sun
*/
void enableStaff(EnableStaffFormDTO fromDTO);
} }

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -737,4 +737,14 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
public List<CustomerStaffDTO> list(String customerId, String realName, String mobile, List<String> userIds) { public List<CustomerStaffDTO> list(String customerId, String realName, String mobile, List<String> userIds) {
return baseDao.listDTOS(customerId, realName, mobile, userIds); return baseDao.listDTOS(customerId, realName, mobile, userIds);
} }
/**
* 通讯录工作人员解禁
* @author sun
*/
@Override
public void enableStaff(EnableStaffFormDTO fromDTO) {
//超级管理员解禁 需要加新权限
}
} }

Loading…
Cancel
Save