jiangping
2024-08-28 42f57295f5fe64132c11a25f55cd25c3c8acf167
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/HkSyncController.java
@@ -1,20 +1,15 @@
package com.doumee.api.business;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest;
import com.doumee.core.haikang.model.param.request.EventSubRequest;
import com.doumee.core.haikang.model.param.request.ParkListRequest;
import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest;
import com.doumee.core.haikang.model.param.request.*;
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.parks.EventPlatCarstatusRequest;
import com.doumee.core.haikang.model.param.request.event.parks.EventPlatWorkstatusRequest;
import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformCarsRequest;
import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformRequest;
import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest;
import com.doumee.core.model.ApiResponse;
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 com.doumee.dao.business.model.Device;
import com.doumee.service.business.impl.hksync.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -42,12 +37,29 @@
    private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService;
    @Autowired
    private HkSyncPushServiceImpl hkSyncPushService;
    @Autowired
    private HkSyncPlatformsServiceImpl hkSyncPlatformsService;
    @PreventRepeat
    @ApiOperation("【海康】全量同步月台信息接口")
    @PostMapping("/syncPlatforms")
    @RequiresPermissions("business:hksync:platforms")
    public ApiResponse syncPlatforms(@RequestBody PlatformsListRequest param) {
        String result = hkSyncPlatformsService.syncPlatforms(param);
        return ApiResponse.success(result);
    }
    @PreventRepeat
    @ApiOperation("【海康】全量同步月台状态信息接口")
    @PostMapping("/syncPlatformStatus")
    @RequiresPermissions("business:hksync:platforms")
    public ApiResponse syncPlatformStatus(@RequestBody PlatformStatusRequest param) {
        String result = hkSyncPlatformsService.getPlatformStatus(param);
        return ApiResponse.success(result);
    }
    @PreventRepeat
    @ApiOperation("【海康】全量同步门禁设备接口")
    @PostMapping("/syncDevices")
    @RequiresPermissions("business:hksync:device")
    public ApiResponse syncHkDevices(@RequestBody AcsDeviceListRequest param) {
    public ApiResponse syncHkDevices(@RequestBody Device param) {
        String result = hkSyncDeviceService.syncHkDevices(param);
        return ApiResponse.success(result);
    }
@@ -96,15 +108,15 @@
        return ApiResponse.success(null);
    }
    @ApiOperation("【海康】月台工作状态事件推送")
    @PostMapping("/platform/workstatus")
    public ApiResponse workstatus(@RequestBody EventPlatWorkstatusRequest param, HttpServletResponse response) {
         hkSyncPushService.dealWorkstatusEvent(param,response);
    @PostMapping("/push/platform/workstatus")
    public ApiResponse pushPlatformStatus(@RequestBody EventPlatformRequest param, HttpServletResponse response) {
         hkSyncPushService.dealPlatformStatusEvent(param,response);
        return ApiResponse.success(null);
    }
    @ApiOperation("【海康】月台车辆状态事件推送")
    @PostMapping("/platform/carstatus")
    public ApiResponse carstatus(@RequestBody EventPlatCarstatusRequest param, HttpServletResponse response) {
         hkSyncPushService.dealCarstatusEvent(param,response);
    @PostMapping("/push/platform/carstatus")
    public ApiResponse pushPlatformCarStatus(@RequestBody EventPlatformCarsRequest param, HttpServletResponse response) {
         hkSyncPushService.dealPlatformCarsEvent(param,response);
        return ApiResponse.success(null);
    }
}