|  |  |  | 
|---|
|  |  |  | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Device; | 
|---|
|  |  |  | import com.doumee.service.business.impl.hksync.*; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("【海康】全量同步门禁设备接口") | 
|---|
|  |  |  | @PostMapping("/syncDevices") | 
|---|
|  |  |  | @CloudRequiredPermission("business:hksync:device") | 
|---|
|  |  |  | public ApiResponse syncHkDevices(@RequestBody AcsDeviceListRequest param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | String result = hkSyncDeviceService.syncHkDevices(param); | 
|---|
|  |  |  | public ApiResponse syncHkDevices(@RequestBody Device param, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | String result = null; | 
|---|
|  |  |  | if(Constants.equalsInteger(param.getType(),Constants.ZERO)){ | 
|---|
|  |  |  | result = hkSyncDeviceService.syncHkDevices(param); | 
|---|
|  |  |  | }else if(Constants.equalsInteger(param.getType(),Constants.TWO)){ | 
|---|
|  |  |  | //同步LED | 
|---|
|  |  |  | result = hkSyncDeviceService.syncHkLed(param); | 
|---|
|  |  |  | }else if(Constants.equalsInteger(param.getType(),Constants.THREE)){ | 
|---|
|  |  |  | //同步广播 | 
|---|
|  |  |  | result = hkSyncDeviceService.syncHkBroadcast(param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ApiResponse.success(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @PreventRepeat | 
|---|