| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.google.gson.Gson; |
| | | import com.sandu.common.execption.BusinessException; |
| | |
| | | |
| | | @Autowired |
| | | PoleLightemitEntityMapper poleLightemitDao; |
| | | |
| | | @Autowired |
| | | LedSFileService xiXunFileService; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | |
| | | } |
| | | } |
| | | return temp; |
| | | } |
| | | |
| | | /** |
| | | * 熙讯设备列表(用于首页数据统计) |
| | | * |
| | | * @return |
| | | */ |
| | | public List<PoleLightemitEntity> listLedOnHome() { |
| | | List<PoleLightemitEntity> poleLightemitEntityList; |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleLightemitEntityList = poleLightemitDao.listLed(null, null, null); |
| | | } else { |
| | | poleLightemitEntityList = poleLightemitDao.listLed(null, SecurityUtils.getUserId(), null); |
| | | } |
| | | |
| | | return poleLightemitEntityList; |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public EquipmentInfomation getLedByLightControlCodeInfo(String lightControlCode) { |
| | | EquipmentInfomation equipmentInfo = new EquipmentInfomation(); |
| | | equipmentInfo.setEquipmentType("熙讯LED"); |
| | | equipmentInfo.setEquipmentType("SLED"); |
| | | if (lightControlCode == null || lightControlCode.trim().length() == 0) { |
| | | return equipmentInfo; |
| | | } |
| | |
| | | lightemitUtils.setBrightness(lightemitControlCode, brightness); |
| | | } |
| | | |
| | | public Object getProgram(Long lightemitId) { |
| | | PoleLightemitEntity xiXun = getById(lightemitId); |
| | | |
| | | String requestBody = xiXun.getRequestBody(); |
| | | if (requestBody == null || requestBody.isEmpty()) { |
| | | throw new BusinessException("未找到节目"); |
| | | } |
| | | |
| | | Map map = JSON.parseObject(requestBody, Map.class); |
| | | return map; |
| | | } |
| | | } |