| | |
| | | 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.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | |
| | | 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 io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | public class HkSyncController extends BaseController { |
| | | |
| | | @Autowired |
| | | private HkSyncService hkSyncService; |
| | | private HkSyncDeviceServiceImpl hkSyncDeviceService; |
| | | @Autowired |
| | | private HkSyncParkServiceImpl hkSyncParkService; |
| | | @Autowired |
| | | private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("全量同步门禁设备接口") |
| | | @ApiOperation("【海康】全量同步门禁设备接口") |
| | | @PostMapping("/getDevices") |
| | | @RequiresPermissions("business:hksync:device") |
| | | // @RequiresPermissions("business:hksync:device") |
| | | public ApiResponse getDevices(@RequestBody AcsDeviceListRequest param) { |
| | | hkSyncService.syncHkDevices(param); |
| | | return ApiResponse.success(null); |
| | | String result = hkSyncDeviceService.syncHkDevices(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步停车库接口") |
| | | @PostMapping("/getParks") |
| | | // @RequiresPermissions("business:hksync:park") |
| | | public ApiResponse getParks(@RequestBody ParkListRequest param) { |
| | | String result = hkSyncParkService.syncHkParks(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步停车库接口") |
| | | @PostMapping("/getPrivilege") |
| | | // @RequiresPermissions("business:hksync:privilege") |
| | | public ApiResponse getPrivilege(@RequestBody ParkListRequest param) { |
| | | String result = hkSyncPrivilegeService.syncHkParks(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】事件订阅推送对接处理接口") |
| | | @PostMapping("/push") |
| | | // @RequiresPermissions("business:hksync:privilege") |
| | | public ApiResponse push(@RequestBody ParkListRequest param) { |
| | | String result = hkSyncPrivilegeService.syncHkParks(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | } |