| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.ParkListRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventParkRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.doumee.service.business.HkSyncService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPrivilegeServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | private HkSyncDeviceServiceImpl hkSyncDeviceService; |
| | | @Autowired |
| | | private HkSyncParkServiceImpl hkSyncParkService; |
| | | @Autowired |
| | | private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService; |
| | | @Autowired |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步门禁设备接口") |
| | |
| | | String result = hkSyncParkService.syncHkParks(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步访客权限组接口") |
| | | @PostMapping("/getPrivilege") |
| | | // @RequiresPermissions("business:hksync:privilege") |
| | | public ApiResponse getPrivilege(@RequestBody PrivilegeGroupRequest param) { |
| | | String result = hkSyncPrivilegeService.syncPrivilege(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】门禁事件订阅推送对接处理接口") |
| | | @PostMapping("/push/acs") |
| | | public ApiResponse pushAcs(@RequestBody EventAcsRequest param, HttpServletResponse response) { |
| | | String result = hkSyncPushService.dealAcsEvent(param,response); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】访客事件订阅推送对接处理接口") |
| | | @PostMapping("/push/visit") |
| | | public ApiResponse pushVisit(@RequestBody EventVisitRequest param, HttpServletResponse response) { |
| | | String result = hkSyncPushService.dealVisitEvent(param,response); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】停车场事件订阅推送对接处理接口") |
| | | @PostMapping("/push/parks") |
| | | public ApiResponse pushParks(@RequestBody EventParkRequest param, HttpServletResponse response) { |
| | | String result = hkSyncPushService.dealParkEvent(param,response); |
| | | return ApiResponse.success(result); |
| | | } |
| | | } |