|  |  |  | 
|---|
|  |  |  | package com.doumee.service.business.impl.hksync; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.aliyun.tea.TeaException; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.dao.business.DeviceMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.ParksMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Device; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Parks; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | public class HkSyncDeviceServiceImpl extends HkSyncBaseServiceImpl { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private DeviceMapper deviceMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 同步海康门禁设备数据 | 
|---|
|  |  |  | * @param param | 
|---|
|  |  |  | 
|---|
|  |  |  | private boolean isDeletedLedDevice(Device device, List<LedRecordsInfoResponse> allHkList) { | 
|---|
|  |  |  | if(allHkList.size()>0){ | 
|---|
|  |  |  | for(LedRecordsInfoResponse r : allHkList){ | 
|---|
|  |  |  | if(StringUtils.equals(device.getDoorId(), r.getModel_data_id())){ | 
|---|
|  |  |  | if(StringUtils.equals(device.getHkId(), r.getModel_data_id())){ | 
|---|
|  |  |  | //表示未删除 | 
|---|
|  |  |  | return  false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private boolean isDeletedBroadcastDevice(Device device, List<FetchAudioChannelInfoResponse> allHkList) { | 
|---|
|  |  |  | if(allHkList.size()>0){ | 
|---|
|  |  |  | for(FetchAudioChannelInfoResponse r : allHkList){ | 
|---|
|  |  |  | if(StringUtils.equals(device.getDoorId(), r.getAudioChannelIndexCode())){ | 
|---|
|  |  |  | if(StringUtils.equals(device.getHkId(), r.getAudioChannelIndexCode())){ | 
|---|
|  |  |  | //表示未删除 | 
|---|
|  |  |  | return  false; | 
|---|
|  |  |  | } | 
|---|