package com.dcsoft.system.service.impl;

import java.util.*;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dcsoft.common.core.utils.DateUtils;
import com.dcsoft.system.domain.SysEmpowerRecord;
import com.dcsoft.system.domain.SysPeople;
import com.dcsoft.system.domain.SysPoint;
import com.dcsoft.system.mapper.SysPointMapper;
import com.dcsoft.system.uniubi.domain.EwmInfo;
import com.dcsoft.system.uniubi.domain.LadderControlVo;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.dcsoft.system.mapper.SysEquipmentMapper;
import com.dcsoft.system.domain.SysEquipment;
import com.dcsoft.system.service.ISysEquipmentService;
import org.springframework.util.CollectionUtils;

/**
 * 设备信息Service业务层处理
 *
 * @author nichun
 * @date 2023-03-08
 */
@Service
public class SysEquipmentServiceImpl implements ISysEquipmentService
{
    @Autowired
    private SysEquipmentMapper sysEquipmentMapper;

    @Value("${artemis.url}")
    public String url;
    @Value("${artemis.appKey}")
    public String appKey;
    @Value("${artemis.appSecret}")
    public String appSecret;

    private static final String ARTEMIS_PATH = "/artemis";

    @Autowired
    private SysPointMapper sysPointMapper;

    /**
     * 查询设备信息
     *
     * @param id 设备信息主键
     * @return 设备信息
     */
    @Override
    public SysEquipment selectSysEquipmentById(Long id)
    {
        return sysEquipmentMapper.selectSysEquipmentById(id);
    }

    /**
     * 查询设备信息列表
     *
     * @param sysEquipment 设备信息
     * @return 设备信息
     */
    @Override
    public List<SysEquipment> selectSysEquipmentList(SysEquipment sysEquipment)
    {
        return sysEquipmentMapper.selectSysEquipmentList(sysEquipment);
    }

    /**
     * 新增设备信息
     *
     * @param sysEquipment 设备信息
     * @return 结果
     */
    @Override
    public int insertSysEquipment(SysEquipment sysEquipment)
    {
        sysEquipment.setCreateTime(DateUtils.getNowDate());
        return sysEquipmentMapper.insertSysEquipment(sysEquipment);
    }

    /**
     * 修改设备信息
     *
     * @param sysEquipment 设备信息
     * @return 结果
     */
    @Override
    public int updateSysEquipment(SysEquipment sysEquipment)
    {
        sysEquipment.setUpdateTime(DateUtils.getNowDate());
        return sysEquipmentMapper.updateSysEquipment(sysEquipment);
    }

    /**
     * 批量删除设备信息
     *
     * @param ids 需要删除的设备信息主键
     * @return 结果
     */
    @Override
    public int deleteSysEquipmentByIds(Long[] ids)
    {
        return sysEquipmentMapper.deleteSysEquipmentByIds(ids);
    }

    /**
     * 删除设备信息信息
     *
     * @param id 设备信息主键
     * @return 结果
     */
    @Override
    public int deleteSysEquipmentById(Long id)
    {
        return sysEquipmentMapper.deleteSysEquipmentById(id);
    }

    @Override
    public SysEquipment selectEquipmentBySequence(String deviceNo) {
        return sysEquipmentMapper.selectEquipmentBySequence(deviceNo);
    }

    /**
     * 查询设备信息
     */
    @Override
    public List<SysEquipment> queryEquipmentInfo(List<String> pointIds) {
        return sysEquipmentMapper.queryEquipmentInfo(pointIds);
    }

    /**
     * 查询人员信息
     */
    @Override
    public SysPeople queryPeopleInfo(SysPeople people) {
        return sysEquipmentMapper.queryPeopleInfo(people);
    }

    @Override
    public List<Map<String, Object>> selectSysEquipmentPeopleById(Long id) {
        return sysEquipmentMapper.selectSysEquipmentPeopleById(id);
    }

    /**
     * 根据设备序列号查询产品类型
     * @param deviceKey
     * @return
     */
    @Override
    public String queryDeviceSequence(String deviceKey) {
        return sysEquipmentMapper.queryDeviceSequence(deviceKey);
    }


    /**
     * 查询授权记录规则id
     * @param people
     * @return
     */
    @Override
    public List<SysEmpowerRecord> queryEmpowerRecord(SysPeople people) {
        return sysEquipmentMapper.queryEmpowerRecord(people);
    }

    /**
     * 查询人员信息
     * @param sysPeople
     * @return
     */
    @Override
    public SysPeople queryPeople(SysPeople sysPeople) {
        return sysEquipmentMapper.queryPeople(sysPeople);
    }


    @Override
    public SysEquipment queryEmpower(String sequence) {
        return sysEquipmentMapper.queryEmpower(sequence);
    }

    @Override
    public int syncEquipment() {
        /*ArtemisConfig config = new ArtemisConfig();
        config.setHost(url); // 代理API网关nginx服务器ip端口
        config.setAppKey(appKey);  // 秘钥appkey
        config.setAppSecret(appSecret);// 秘钥appSecret
        final String getCamsApi = ARTEMIS_PATH + "/api/resource/v1/acsDevice/advance/acsDeviceList";
        JSONArray list=new JSONArray();
        Map<String, Object> paramMaps = new HashMap<String, Object>();// post请求Form表单参数
        paramMaps.put("pageNo",1);
        paramMaps.put("pageSize",100);
        list.add(paramMaps);
        String body = JSON.toJSON(list).toString();
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                put("https://", getCamsApi);
            }
        };
        String request = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json");*/
        String  request="{\"code\":\"0\",\"msg\":\"success\",\"data\":{\"total\":63,\"pageNo\":1,\"pageSize\":100,\"list\":[{\"acsDevIndexCode\":\"8c0643b6e1554bab91e41fe22b811b0e\",\"acsDevName\":\"10.16.218.179\",\"regionIndexCode\":\"942967fa8e7048b8ba58b0be56579a23\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M230-G530\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.218.179\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-30T11:24:52.716+08:00\",\"updateTime\":\"2024-09-30T13:25:56.226+08:00\"},{\"acsDevIndexCode\":\"f8f58d75c4214a418fe676a47d7b7008\",\"acsDevName\":\"10.16.218.178\",\"regionIndexCode\":\"942967fa8e7048b8ba58b0be56579a23\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M230-G530\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.218.178\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-30T11:24:31.422+08:00\",\"updateTime\":\"2024-09-30T13:09:10.744+08:00\"},{\"acsDevIndexCode\":\"d1acd55900c94652acea4bf9280232e7\",\"acsDevName\":\"10.16.218.177\",\"regionIndexCode\":\"942967fa8e7048b8ba58b0be56579a23\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M230-G530\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.218.177\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-30T11:24:09.016+08:00\",\"updateTime\":\"2024-09-30T13:09:15.668+08:00\"},{\"acsDevIndexCode\":\"973e65f3c501447096704932b4ecc59e\",\"acsDevName\":\"10.16.218.176\",\"regionIndexCode\":\"942967fa8e7048b8ba58b0be56579a23\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M230-G530\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.218.176\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-30T11:23:41.562+08:00\",\"updateTime\":\"2024-09-30T13:09:09.166+08:00\"},{\"acsDevIndexCode\":\"3836141c346742d7ae7224d660bb27e1\",\"acsDevName\":\"研发中心后门\",\"regionIndexCode\":\"b286b857-c6ad-45cf-b8a3-d9d826a54c98\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.210\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-09-27T09:17:01.027+08:00\",\"updateTime\":\"2024-10-10T16:50:14.608+08:00\"},{\"acsDevIndexCode\":\"472e432e10fa4068b0143dea66e36320\",\"acsDevName\":\"新港北门1\",\"regionIndexCode\":\"root000000\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":null,\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.51\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-09-24T15:47:58.079+08:00\",\"updateTime\":\"2024-09-24T15:47:58.079+08:00\"},{\"acsDevIndexCode\":\"fca325ffded0472ebdbcd76c8a72baad\",\"acsDevName\":\"新港北门\",\"regionIndexCode\":\"root000000\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":null,\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.52\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-09-24T15:46:24.989+08:00\",\"updateTime\":\"2024-09-24T15:46:24.989+08:00\"},{\"acsDevIndexCode\":\"66a9f98e0b2f44988ffb6f1e2bb4a2e3\",\"acsDevName\":\"新港北门左2通道\",\"regionIndexCode\":\"68d5941e-47b8-4a32-9003-2e4243fdd3fb\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M220-B421TM\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.47\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-21T12:29:38.144+08:00\",\"updateTime\":\"2024-10-13T22:56:33.479+08:00\"},{\"acsDevIndexCode\":\"e1cb140a5582458c9740a6c5f6a9532f\",\"acsDevName\":\"新港北门左1通道\",\"regionIndexCode\":\"68d5941e-47b8-4a32-9003-2e4243fdd3fb\",\"treatyType\":\"isapi_net\",\"acsDevTypeDesc\":\"DS-K3M220-B421TM\",\"acsDevTypeCode\":\"201933056\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.46\",\"acsDevPort\":\"80\",\"acsDevCode\":null,\"createTime\":\"2024-09-21T12:11:09.307+08:00\",\"updateTime\":\"2024-10-13T22:56:35.264+08:00\"},{\"acsDevIndexCode\":\"b4765ed83fc1452ba92e46d3cd718713\",\"acsDevName\":\"5车间隔离门\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.38\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-07-26T16:21:39.856+08:00\",\"updateTime\":\"2024-10-13T23:30:08.222+08:00\"},{\"acsDevIndexCode\":\"31235973d0fa4efca0b25e2145f82d8a\",\"acsDevName\":\"西门入\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671B-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.159.7\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-06-17T16:47:29.526+08:00\",\"updateTime\":\"2024-09-28T16:24:09.401+08:00\"},{\"acsDevIndexCode\":\"9e8c0e96fa104d0192df39bec66b1cc4\",\"acsDevName\":\"电磁阀装配室\",\"regionIndexCode\":\"a72830bb-501b-41a7-82c0-04ca61723c97\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.190.12.205\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-04-25T17:31:18.756+08:00\",\"updateTime\":\"2024-08-18T06:30:33.719+08:00\"},{\"acsDevIndexCode\":\"da24d965097e4a9ab059d91cae42bfdb\",\"acsDevName\":\"北门人脸\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.11\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:39:49.912+08:00\",\"updateTime\":\"2024-09-10T10:30:27.167+08:00\"},{\"acsDevIndexCode\":\"debf60a6943945839b667186656680d6\",\"acsDevName\":\"南二门人脸\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.5\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:39:08.603+08:00\",\"updateTime\":\"2024-09-30T16:46:47.990+08:00\"},{\"acsDevIndexCode\":\"e8c9e3db2e294bec824129e4cd70b547\",\"acsDevName\":\"南一门人脸\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.150.11.253\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:38:17.311+08:00\",\"updateTime\":\"2024-10-10T01:59:39.513+08:00\"},{\"acsDevIndexCode\":\"32db148577ef4298b771deca72bcf07c\",\"acsDevName\":\"西门南\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.8.251\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:36:06.919+08:00\",\"updateTime\":\"2024-10-12T10:23:04.562+08:00\"},{\"acsDevIndexCode\":\"8d9a2d8b00214d88892db5548f843123\",\"acsDevName\":\"西门中\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.8.252\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:35:15.373+08:00\",\"updateTime\":\"2024-10-13T19:03:35.576+08:00\"},{\"acsDevIndexCode\":\"c4a3f17934cb4620bfd16256392644ea\",\"acsDevName\":\"西门北\",\"regionIndexCode\":\"61b1238e-ed81-43bb-a0aa-f0827f9bb079\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.16.8.253\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2024-02-23T15:28:42.535+08:00\",\"updateTime\":\"2024-10-13T11:40:38.591+08:00\"},{\"acsDevIndexCode\":\"81d025ecaa874ec3b34c9ef026c0177b\",\"acsDevName\":\"新港东门入口\",\"regionIndexCode\":\"68d5941e-47b8-4a32-9003-2e4243fdd3fb\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.41\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-28T11:16:30.362+08:00\",\"updateTime\":\"2024-10-13T22:57:03.213+08:00\"},{\"acsDevIndexCode\":\"53652d6709df44be92d5a5e1dbc6cf06\",\"acsDevName\":\"新港东门出口\",\"regionIndexCode\":\"68d5941e-47b8-4a32-9003-2e4243fdd3fb\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K5671-ZU\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.42\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-28T11:15:00.554+08:00\",\"updateTime\":\"2024-10-13T22:57:00.183+08:00\"},{\"acsDevIndexCode\":\"4cbaf440075e482996c326692d73e67f\",\"acsDevName\":\"5车间实验室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.44\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-28T11:08:19.431+08:00\",\"updateTime\":\"2024-10-13T22:56:54.047+08:00\"},{\"acsDevIndexCode\":\"c61bd3dfe54a48e08367e8fcb6bd636e\",\"acsDevName\":\"604卓海研发中心\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.12\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-28T08:51:53.882+08:00\",\"updateTime\":\"2024-10-14T08:25:47.833+08:00\"},{\"acsDevIndexCode\":\"fdb3a259466744f1b676bc3f1a0d2dcf\",\"acsDevName\":\"601正远研发\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.31\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T16:45:33.729+08:00\",\"updateTime\":\"2024-10-14T08:25:37.731+08:00\"},{\"acsDevIndexCode\":\"af538fa726174c45b4fb2040ee18b19b\",\"acsDevName\":\"605\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.11\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:14:38.520+08:00\",\"updateTime\":\"2024-10-13T22:56:45.880+08:00\"},{\"acsDevIndexCode\":\"5904820a7ef14621832102872f61bef5\",\"acsDevName\":\"王老师办公室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.13\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:14:08.680+08:00\",\"updateTime\":\"2024-10-14T08:25:38.604+08:00\"},{\"acsDevIndexCode\":\"8264ca1696ff48f4b760b43529e1aea8\",\"acsDevName\":\"606\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.14\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:13:51.274+08:00\",\"updateTime\":\"2024-10-14T08:25:42.799+08:00\"},{\"acsDevIndexCode\":\"301a2846471d4312b1037ca510dac87c\",\"acsDevName\":\"607工程技术中心\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.15\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:13:35.056+08:00\",\"updateTime\":\"2024-10-14T08:25:39.639+08:00\"},{\"acsDevIndexCode\":\"2817d40476cc4d0ab848acf105edceb8\",\"acsDevName\":\"6车间东防火门\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.16\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:13:16.881+08:00\",\"updateTime\":\"2024-10-14T08:25:46.738+08:00\"},{\"acsDevIndexCode\":\"c36c41fbfe294e6bbded0f8fcc4addca\",\"acsDevName\":\"6车间西防火门\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.17\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:12:58.789+08:00\",\"updateTime\":\"2024-10-14T08:25:45.509+08:00\"},{\"acsDevIndexCode\":\"c290e0fc38cb45c1997b1ef852d250f5\",\"acsDevName\":\"608正远销售\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.18\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:12:24.238+08:00\",\"updateTime\":\"2024-10-14T08:25:43.947+08:00\"},{\"acsDevIndexCode\":\"5cb0de9b70e14ad684b97311ddff1f5a\",\"acsDevName\":\"609三芯微电\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.19\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:11:42.916+08:00\",\"updateTime\":\"2024-10-14T08:25:40.831+08:00\"},{\"acsDevIndexCode\":\"d897ddc714a949f5ab38625418878a8e\",\"acsDevName\":\"504魏总办公室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.20\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:11:05.987+08:00\",\"updateTime\":\"2024-10-13T22:57:05.242+08:00\"},{\"acsDevIndexCode\":\"90669685ebab490d8841852023090c1b\",\"acsDevName\":\"507程总办公室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.21\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:10:48.293+08:00\",\"updateTime\":\"2024-10-13T22:57:08.301+08:00\"},{\"acsDevIndexCode\":\"0c25358fc91b4dee9ed2d281e24adf80\",\"acsDevName\":\"501会议室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.22\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:10:29.411+08:00\",\"updateTime\":\"2024-10-13T22:57:22.200+08:00\"},{\"acsDevIndexCode\":\"9c8cd89572054565990d615c74bc98c9\",\"acsDevName\":\"502财务管理部\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.23\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:10:11.749+08:00\",\"updateTime\":\"2024-10-13T22:56:44.856+08:00\"},{\"acsDevIndexCode\":\"53e724fac4b54b638825b21997b4fc1b\",\"acsDevName\":\"509营销中心\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.24\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:09:41.968+08:00\",\"updateTime\":\"2024-10-13T22:56:50.026+08:00\"},{\"acsDevIndexCode\":\"5b32d74ab29d41899af100d679efb3b2\",\"acsDevName\":\"508卓海人力办公室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.25\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:09:22.671+08:00\",\"updateTime\":\"2024-10-13T22:57:06.258+08:00\"},{\"acsDevIndexCode\":\"f80e204f7dd7470f8eec3ccbf0b5c84b\",\"acsDevName\":\"510卓海营销中心\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T673M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.26\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:09:06.301+08:00\",\"updateTime\":\"2024-10-13T22:57:02.198+08:00\"},{\"acsDevIndexCode\":\"cd2f599a56514396914082ce5fc03543\",\"acsDevName\":\"511电气作业室\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.27\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:08:27.730+08:00\",\"updateTime\":\"2024-10-13T22:56:43.853+08:00\"},{\"acsDevIndexCode\":\"d3202758acdd4fbfa5742ad3a343630f\",\"acsDevName\":\"5车间东防火门\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.28\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:08:07.773+08:00\",\"updateTime\":\"2024-10-13T22:56:46.903+08:00\"},{\"acsDevIndexCode\":\"f9c3867022f94324a01daf87f19a4bde\",\"acsDevName\":\"5车间西防火门\",\"regionIndexCode\":\"bbc314fc-2829-4bce-8fc2-fbdd3414f90e\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"20.20.0.29\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-27T11:07:25.392+08:00\",\"updateTime\":\"2024-10-13T22:56:49.008+08:00\"},{\"acsDevIndexCode\":\"b5686119a0044c5bb1dbd60d80b33611\",\"acsDevName\":\"E2派联大办公室\",\"regionIndexCode\":\"1b35455d-0f4d-48f6-8e06-165f8dd8dbc4\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.207\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T15:23:36.543+08:00\",\"updateTime\":\"2024-06-26T10:20:57.475+08:00\"},{\"acsDevIndexCode\":\"6346d25c92fc461aa4406385dfd36a13\",\"acsDevName\":\"E1供应链办公室\",\"regionIndexCode\":\"a72830bb-501b-41a7-82c0-04ca61723c97\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.208\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:45:40.409+08:00\",\"updateTime\":\"2024-10-08T00:15:18.480+08:00\"},{\"acsDevIndexCode\":\"f13f1c437c7845cba02ddda8f6a5f68d\",\"acsDevName\":\"E2派联北防火门\",\"regionIndexCode\":\"1b35455d-0f4d-48f6-8e06-165f8dd8dbc4\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.211\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:39:34.338+08:00\",\"updateTime\":\"2024-09-15T19:47:37.028+08:00\"},{\"acsDevIndexCode\":\"93c55eadef484cea92d1f6a2645ce96e\",\"acsDevName\":\"E3派联小办公室\",\"regionIndexCode\":\"d8e76a30-30c7-4afb-9ba0-abd3cd0b8e66\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.204\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:30:19.590+08:00\",\"updateTime\":\"2024-07-24T11:33:43.968+08:00\"},{\"acsDevIndexCode\":\"9fe87c725ff044dfb24c7d29921390f3\",\"acsDevName\":\"E3派联销售办公室\",\"regionIndexCode\":\"d8e76a30-30c7-4afb-9ba0-abd3cd0b8e66\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.205\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:29:10.165+08:00\",\"updateTime\":\"2024-07-24T11:33:45.207+08:00\"},{\"acsDevIndexCode\":\"4e44d46acb794d848d94d889331c2c43\",\"acsDevName\":\"N1展厅内南门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.226\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:26:33.797+08:00\",\"updateTime\":\"2024-10-13T06:37:56.572+08:00\"},{\"acsDevIndexCode\":\"db09369b24da49f5a693baee2762e2f0\",\"acsDevName\":\"N1展厅内北门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.225\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:07:14.628+08:00\",\"updateTime\":\"2024-10-12T08:51:10.572+08:00\"},{\"acsDevIndexCode\":\"85462ce04d804b9c948586aca8782faa\",\"acsDevName\":\"N1展厅南门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.224\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:06:34.718+08:00\",\"updateTime\":\"2024-10-10T21:37:51.526+08:00\"},{\"acsDevIndexCode\":\"b0d695df04f2419badb8c74c46b5065f\",\"acsDevName\":\"N1展厅北门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.223\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:04:23.655+08:00\",\"updateTime\":\"2024-10-11T19:39:38.597+08:00\"},{\"acsDevIndexCode\":\"f60c096104614916a75a328846526456\",\"acsDevName\":\"研发中心玻璃门\",\"regionIndexCode\":\"b286b857-c6ad-45cf-b8a3-d9d826a54c98\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.190.128.195\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T10:00:12.994+08:00\",\"updateTime\":\"2024-10-10T10:29:43.569+08:00\"},{\"acsDevIndexCode\":\"f565eaa7c52c4aa79a5fe5fd74c948c4\",\"acsDevName\":\"研发中心前门\",\"regionIndexCode\":\"b286b857-c6ad-45cf-b8a3-d9d826a54c98\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.190.128.151\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:56:56.184+08:00\",\"updateTime\":\"2024-09-21T09:13:31.129+08:00\"},{\"acsDevIndexCode\":\"a805490439e746838ed4f52015f50eb1\",\"acsDevName\":\"N1小会议室1西门029\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.213\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:33:01.446+08:00\",\"updateTime\":\"2024-05-10T08:43:11.370+08:00\"},{\"acsDevIndexCode\":\"7d2da5812dc848838f08019dee94214d\",\"acsDevName\":\"N1小会议室1北门035\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.212\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:32:41.670+08:00\",\"updateTime\":\"2024-10-04T09:45:32.868+08:00\"},{\"acsDevIndexCode\":\"8f2a5a50d67e4f5a835830e07cd64554\",\"acsDevName\":\"N1小会议室039\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.216\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:31:55.542+08:00\",\"updateTime\":\"2024-04-18T21:18:18.149+08:00\"},{\"acsDevIndexCode\":\"cb567274385b4508bd227603d5550817\",\"acsDevName\":\"N1小会议室038\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.215\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:31:25.899+08:00\",\"updateTime\":\"2024-07-24T11:33:55.110+08:00\"},{\"acsDevIndexCode\":\"620777c03a09485da0a6802252e44ac3\",\"acsDevName\":\"N1小会议室037\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.214\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:29:14.977+08:00\",\"updateTime\":\"2024-04-18T21:17:44.670+08:00\"},{\"acsDevIndexCode\":\"7183bbd3fe714dee8b63c3ccf8a53918\",\"acsDevName\":\"N1洽谈室016\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.220\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:27:28.640+08:00\",\"updateTime\":\"2024-04-18T21:17:45.657+08:00\"},{\"acsDevIndexCode\":\"890c9a0421b7402a9c421fb2ce60d130\",\"acsDevName\":\"N1洽谈室015\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.219\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:16:53.391+08:00\",\"updateTime\":\"2024-10-04T09:45:33.912+08:00\"},{\"acsDevIndexCode\":\"4065999acfbf4269b638ab57c8c87f1a\",\"acsDevName\":\"N1洽谈室014\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.218\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:16:31.420+08:00\",\"updateTime\":\"2024-04-18T21:18:24.847+08:00\"},{\"acsDevIndexCode\":\"bad65fa29099402e97542c3b316bfed3\",\"acsDevName\":\"N1洽谈室013\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T105AM\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.217\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-25T09:15:46.757+08:00\",\"updateTime\":\"2024-05-06T16:13:55.660+08:00\"},{\"acsDevIndexCode\":\"eb1c78de456e4830b4fb62a01788f67b\",\"acsDevName\":\"N1大会议室东门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.222\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-24T12:48:12.364+08:00\",\"updateTime\":\"2024-10-06T23:20:05.526+08:00\"},{\"acsDevIndexCode\":\"b455e57367404405933683cc99b899f2\",\"acsDevName\":\"N1大会议室西门\",\"regionIndexCode\":\"111bd4a4-333c-4729-a4bc-05be7703dc96\",\"treatyType\":\"hiksdk_net\",\"acsDevTypeDesc\":\"DS-K1T671M\",\"acsDevTypeCode\":\"201933568\",\"acsDevTypeName\":null,\"acsDevIp\":\"10.200.0.221\",\"acsDevPort\":\"8000\",\"acsDevCode\":null,\"createTime\":\"2023-11-24T12:44:39.698+08:00\",\"updateTime\":\"2024-10-11T12:54:18.606+08:00\"}]}}";
        JSONObject jsons= JSONObject.parseObject(request);
        JSONObject jsons1=(JSONObject) jsons.get("data");
        JSONArray list1= (JSONArray) jsons1.get("list");
        for(Object obj:list1){
            JSONObject objs= (JSONObject) obj;
            String acsDevIndexCode= (String) objs.get("acsDevIndexCode");
            String acsDevName= (String) objs.get("acsDevName");
            String acsDevIp= (String) objs.get("acsDevIp");
            SysPoint point=sysPointMapper.selectSysPointByIndexCode(acsDevIndexCode);
            if(point!=null){
                SysEquipment equipment=sysEquipmentMapper.selectEquipmentBySequence(acsDevIndexCode);
                if (equipment==null){
                    SysEquipment sysEquipment=new SysEquipment();
                    sysEquipment.setName(acsDevName);
                    sysEquipment.setConsumeFlag("9");
                    sysEquipment.setSequence(acsDevIndexCode);
                    sysEquipment.setIp(acsDevIp);
                    sysEquipment.setPointId(point.getId());
                    sysEquipment.setDoorIndexCode(point.getDoorIndexCode());
                    sysEquipmentMapper.insertSysEquipment(sysEquipment);
                }else{
                    SysEquipment sysEquipment=new SysEquipment();
                    sysEquipment.setName(acsDevName);
                    sysEquipment.setConsumeFlag("9");
                    sysEquipment.setSequence(acsDevIndexCode);
                    sysEquipment.setIp(acsDevIp);
                    sysEquipment.setId(equipment.getId());
                    sysEquipment.setPointId(point.getId());
                    sysEquipment.setDoorIndexCode(point.getDoorIndexCode());
                    sysEquipmentMapper.insertSysEquipment(sysEquipment);
                }
            }

        }
        return list1.size();
    }

    @Override
    public SysEquipment selectSysEquipmentByIp(String ip) {
        return sysEquipmentMapper.selectSysEquipmentByIp(ip);
    }


    /**
     * 根据设备序列好查询设备信息
     * @param sysEquipment
     * @return
     */
    @Override
    public SysEquipment queryEquipmentByDeviceKey(SysEquipment sysEquipment) {
        SysEquipment equipment = sysEquipmentMapper.queryEquipmentByDeviceKey(sysEquipment);
        return equipment;
    }

    /**
     * 根据设备序列号修改设备密码
     * @param sysEquipment
     */
    @Override
    public void updateEquipmentByDeviceKey(SysEquipment sysEquipment) {
        if(StringUtils.isNotEmpty(sysEquipment.getIp())) {
            sysEquipment.setDeviceIp(sysEquipment.getIp() + ":" + sysEquipment.getPort());
        }
        SysEquipment equipment = sysEquipmentMapper.selectEquipmentBySequence(sysEquipment.getDeviceKey());
        if(equipment != null) {
            sysEquipment.setId(equipment.getId());
        }
        sysEquipmentMapper.updateEquipmentByDeviceKey(sysEquipment);
    }


    /**
     * 根据设备序列号修改设备轮播文件
     * @param sysEquipment
     */
    @Override
    public void updateEquipmentFile(SysEquipment sysEquipment) {
        SysEquipment equipment = sysEquipmentMapper.queryEquipmentByDeviceKey(sysEquipment);
    }


}
