| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.DataSyncConfig; |
| | | 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.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.EventVisitIccmDataRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitIccmRequest; |
| | | 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.Member; |
| | | 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.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | public class HkSyncController extends BaseController { |
| | | |
| | | @Autowired |
| | | private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService; |
| | | @Autowired |
| | | private HkSyncDeviceServiceImpl hkSyncDeviceService; |
| | | @Autowired |
| | | private HkSyncParkServiceImpl hkSyncParkService; |
| | |
| | | @Autowired |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | |
| | | |
| | | /** |
| | | * 是否开发者 |
| | | */ |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | @ApiOperation("立即同步待下发人员数据") |
| | | @PostMapping("/syncUserData") |
| | | @RequiresPermissions("business:member:syncdata") |
| | | public ApiResponse syncUserData(@RequestBody Member member) { |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp) { |
| | | //如果是ERP系统同步下发 |
| | | hkSyncOrgUserService.syncUserData(); |
| | | } |
| | | return ApiResponse.success(null); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("【海康】全量同步门禁设备接口") |
| | | @PostMapping("/syncDevices") |
| | |
| | | String result = hkSyncPushService.dealVisitEvent(param,response); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @ApiOperation("【海康】访客ICCM事件订阅推送对接处理接口") |
| | | @PostMapping("/push/visitIccm") |
| | | public ApiResponse pushVisitIccm(@RequestBody EventVisitIccmRequest param, HttpServletResponse response) { |
| | | String result = hkSyncPushService.dealVisitEventIccm(param,response); |
| | | return ApiResponse.success(result); |
| | | } |
| | | // @PreventRepeat |
| | | @ApiOperation("【海康】停车场事件订阅推送对接处理接口") |
| | | @PostMapping("/push/parks") |