|  |  |  | 
|---|
|  |  |  | package com.doumee.api.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.config.Jwt.JwtPayLoad; | 
|---|
|  |  |  | import com.doumee.config.Jwt.JwtTokenUtil; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.config.annotation.ErpLoginRequired; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginRequired; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.openapi.request.*; | 
|---|
|  |  |  | import com.doumee.core.model.openapi.response.*; | 
|---|
|  |  |  | import com.doumee.core.erp.model.openapi.request.*; | 
|---|
|  |  |  | import com.doumee.core.erp.model.openapi.response.*; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.service.business.DeviceRoleService; | 
|---|
|  |  |  | import com.doumee.service.business.DeviceService; | 
|---|
|  |  |  | import com.doumee.service.business.ERPSyncService; | 
|---|
|  |  |  | import com.doumee.service.business.MemberService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParam; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
|---|
|  |  |  | import org.springframework.http.HttpRequest; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by IntelliJ IDEA. | 
|---|
|  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/visitbiz") | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | public class BizResourceController extends ApiController{ | 
|---|
|  |  |  | public class BizResourceController extends ApiController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ERPSyncService erpSyncService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "调用凭据获取接口", notes = "访客端提供,供ERP端调用,向ERP提供统接口调用凭证") | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "授权token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse roleUserAuthor(@RequestBody UserAuthorRequest param) { | 
|---|
|  |  |  | erpSyncService.roleUserAuthor(param); | 
|---|
|  |  |  | return  ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "授权token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse parkCarAuthor(@RequestBody CarAuthorRequest param) { | 
|---|
|  |  |  | erpSyncService.parkCarAuthor(param); | 
|---|
|  |  |  | return  ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "授权token值", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse approveApply(@RequestBody ApproveNoticeRequest account ) { | 
|---|
|  |  |  | public ApiResponse approveApply(@RequestBody ApproveNoticeRequest param) { | 
|---|
|  |  |  | param.setToken(this.getToken()); | 
|---|
|  |  |  | erpSyncService.approveApply(param); | 
|---|
|  |  |  | return  ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "FTP账户信息", notes = "访客端提供,供ERP端调用,FTP账户信息,其中【FTP资源访问映射地址】用于图片回显使用," + | 
|---|
|  |  |  | "比如人脸图片回显拼接:【FTP资源访问映射地址】+【FTP用户图片存储目录】+【实际人脸图片存储字段内容】" + | 
|---|
|  |  |  | "如:http://175.27.187.84/file4/member/20231211/skjd-skdjf4enc-flgk.png") | 
|---|
|  |  |  | @GetMapping("/resource/ftpAccount") | 
|---|
|  |  |  | public ApiResponse<Map<String,Object>> ftpAccount() { | 
|---|
|  |  |  | Map<String,Object> map = new HashMap<>(); | 
|---|
|  |  |  | map.put("FTP主机地址IP", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_HOST).getCode()); | 
|---|
|  |  |  | map.put("FTP访问端口", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PORT).getCode()); | 
|---|
|  |  |  | map.put("FTP访问登录名", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_USERNAME).getCode()); | 
|---|
|  |  |  | map.put("FTP访问登陆密码", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PWD).getCode()); | 
|---|
|  |  |  | map.put("FTP访客事件图片存储目录", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.VISIT_EVENT_IMG).getCode()); | 
|---|
|  |  |  | map.put("FTP车辆事件图片存储目录", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.CAR_EVENT_IMG).getCode()); | 
|---|
|  |  |  | map.put("FTP门禁事件图片存储目录", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.DEVICE_EVENT_IMG).getCode()); | 
|---|
|  |  |  | map.put("FTP用户图片存储目录", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode()); | 
|---|
|  |  |  | map.put("FTP资源访问映射地址", | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()); | 
|---|
|  |  |  | return  ApiResponse.success(map); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|