|  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.config.DataSyncConfig; | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.admin.request.LaborMemberDTO; | 
|---|
|  |  |  | import com.doumee.dao.admin.request.MemberImport; | 
|---|
|  |  |  | import com.doumee.dao.admin.request.MemberQuery; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.ResetPasswordDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Member; | 
|---|
|  |  |  | import com.doumee.dao.business.model.MemberRole; | 
|---|
|  |  |  | import com.doumee.service.business.MemberService; | 
|---|
|  |  |  | import com.doumee.service.business.ext.ERPSyncService; | 
|---|
|  |  |  | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import io.swagger.annotations.*; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.io.File; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("员工权限下发") | 
|---|
|  |  |  | @GetMapping("/roleAuth/{id}") | 
|---|
|  |  |  | @CloudRequiredPermission("business:empower:create") | 
|---|
|  |  |  | public ApiResponse roleAuthById(@PathVariable Integer id) { | 
|---|
|  |  |  | memberService.roleAuthById(id); | 
|---|
|  |  |  | public ApiResponse roleAuthById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | memberService.roleAuthById(id,this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("同步人脸信息") | 
|---|
|  |  |  | @PostMapping("/updateFace") | 
|---|
|  |  |  | public ApiResponse updateFace(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | member.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | memberService.updateFace(member); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("批量授权下发") | 
|---|
|  |  |  | @PostMapping("/batchRoleAuth") | 
|---|
|  |  |  | public ApiResponse batchRoleAuth(@RequestBody Member memberRole, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | memberRole.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | memberService.batchRoleAuth(memberRole); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("强制删除安防平台人员信息") | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "人员信息导入" ,notes = "保单申请") | 
|---|
|  |  |  | @PostMapping("/importExcel") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), | 
|---|
|  |  |  | @ApiImplicitParam(name = "组织类型 0相关方 1内部组织", value = "companyType", required = true, paramType = "query", dataType = "Integer",example = "0",dataTypeClass = Integer.class), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @CloudRequiredPermission("business:member:create") | 
|---|
|  |  |  | public ApiResponse<String> importExcel (@ApiParam(value = "file") MultipartFile file,@ApiParam(value = "companyType") Integer companyType, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success(memberService.importBatch(file,companyType,this.getLoginUser(token))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("批量拉黑") | 
|---|
|  |  |  | @GetMapping("/batchBlock") | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ApiResponse.success("同步成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("测试人员冻结") | 
|---|