| | |
| | | boolean saveLed(LedPlayerEntity ledPlayerEntity); |
| | | |
| | | List<LedPlayerEntity> ledPlayerEntityList(String keyword, Long userid); |
| | | |
| | | List<LedPlayerEntity> ledPlayerEntityListOnBinding(String keyword, Long userid); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<String> listCode(Long userId, String keyword, String deviceCode); |
| | | |
| | | |
| | | /*** |
| | | * 用在绑定设备 |
| | | * @param clientId |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | List<LightBo> listLightOnBinding(Long clientId, String keyword); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<PoleLightemitEntity> listLed(String keyword, Long userid, String orderBy); |
| | | |
| | | List<PoleLightemitEntity> listLedOnBinding(String keyword, Long userid); |
| | | |
| | | Pole getpole(String lightemitControlCode); |
| | | } |
| | | |
| | |
| | | boolean updateDeviceCode(Long id); |
| | | |
| | | List<Pole> queryPoleOnLineStatesList(Long userid, Integer isTrue, Integer bingStates, Long groupid, String keyword, String orderBy); |
| | | |
| | | List<Pole> getPoleListOnBinding(Long userid, String keyword); |
| | | } |
| | | |
| | | |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="ledPlayerEntityListOnBinding" resultType="com.sandu.ximon.dao.domain.LedPlayerEntity"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name, t3.id |
| | | FROM |
| | | led t1 |
| | | LEFT JOIN pole_binding t2 ON t1.sn = t2.device_code |
| | | AND t2.device_type = 1 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t1.name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.player_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.sn LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | </if> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="listLightOnBinding" resultType="com.sandu.ximon.dao.bo.LightBo"> |
| | | SELECT |
| | | t1.*, |
| | | t2.id AS pole_id, |
| | | t2.pole_code, |
| | | t2.pole_name, |
| | | t4.task_name |
| | | FROM |
| | | light t1 |
| | | LEFT JOIN pole t2 USING ( device_code ) |
| | | LEFT JOIN light_task_pole_relation t3 ON t3.pole_id = t2.id |
| | | LEFT JOIN light_task t4 ON t3.task_id = t4.task_id |
| | | <where> |
| | | <if test="clientId != null"> |
| | | AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId}) |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND ( |
| | | t1.device_code LIKE CONCAT('%', #{keyword},'%') |
| | | OR t1.light_id LIKE CONCAT('%', #{keyword},'%') |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="listLed" resultType="com.sandu.ximon.dao.domain.PoleLightemitEntity"> |
| | | SELECT |
| | | t1.*, t2.pole_id as streetlight_id, |
| | | t3.pole_name as streetlight_name, t3.id |
| | | t3.pole_name as streetlight_name, t3.id |
| | | FROM |
| | | pole_lightemit t1 |
| | | LEFT JOIN pole_binding t2 ON t1.lightemit_control_code = t2.device_code |
| | |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t1.lightemit_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | AND (t1.lightemit_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.lightemit_control_code LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.lightemit_id LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.lightemit_id LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | |
| | | AND t3.lightemit_control_code = #{lightemitControlCode} |
| | | </if> |
| | | </select> |
| | | <select id="listLedOnBinding" resultType="com.sandu.ximon.dao.domain.PoleLightemitEntity"> |
| | | SELECT |
| | | t1.*, t2.pole_id as streetlight_id, |
| | | t3.pole_name as streetlight_name, t3.id |
| | | FROM |
| | | pole_lightemit t1 |
| | | LEFT JOIN pole_binding t2 ON t1.lightemit_control_code = t2.device_code |
| | | AND t2.device_type = 10 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND (t1.lightemit_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.lightemit_control_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | </where> |
| | | GROUP BY t1.id |
| | | <if test="orderBy != null"> |
| | | ORDER BY ${orderBy} |
| | | ORDER BY ${orderBy} |
| | | </if> |
| | | </select> |
| | | <select id="getPoleListOnBinding" resultType="com.sandu.ximon.dao.domain.Pole"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | pole t1 |
| | | LEFT JOIN pole_group_relation t2 ON t1.id = t2.pole_id |
| | | LEFT JOIN pole_group t3 ON t3.group_id = t2.pole_group_id |
| | | <where> |
| | | <if test="userid != null"> |
| | | AND (t1.user_id = #{userid} OR t1.client_id = #{userid}) |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND ( t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | </where> |
| | | GROUP BY t1.id |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | private final PoleMapper poleMapper; |
| | | |
| | | @GetMapping("/getPoleList") |
| | | public ResponseVO<Object> getPoleList() { |
| | | public ResponseVO<Object> getPoleList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<Pole> poleList; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, null, null, null, null, null); |
| | | poleList = poleMapper.getPoleListOnBinding(null, keyword); |
| | | } else { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), null, null, null, null, null); |
| | | poleList = poleMapper.getPoleListOnBinding(SecurityUtils.getUserId(), keyword); |
| | | } |
| | | |
| | | List<Map> mapList = new ArrayList<>(); |
| | |
| | | private final LightMapper lightMapper; |
| | | |
| | | @GetMapping("/getLightList") |
| | | public ResponseVO<Object> getLightList() { |
| | | List<LightBo> listLight = lightMapper.listLight(SecurityUtils.getClientId(), null); |
| | | public ResponseVO<Object> getLightList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<LightBo> listLight = lightMapper.listLightOnBinding(SecurityUtils.getClientId(), keyword); |
| | | |
| | | |
| | | List<Map> mapList = new ArrayList<>(); |
| | |
| | | * NLED列表(诺瓦设备) |
| | | */ |
| | | @GetMapping("/getLedPlayerEntityList") |
| | | public ResponseVO<Object> getLedPlayerEntityList() { |
| | | public ResponseVO<Object> getLedPlayerEntityList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<LedPlayerEntity> list = SpringContextHolder.getBean(LedPlayerEntityService.class). |
| | | ledPlayerEntityList(null, null, null, null); |
| | | ledPlayerEntityListOnBinding(keyword); |
| | | |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | |
| | | private final LEDProgramService ledProgramService; |
| | | |
| | | @GetMapping("/getNledProgeamList") |
| | | public ResponseVO<Object> getNledProgeamList() { |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null, null, null); |
| | | public ResponseVO<Object> getNledProgeamList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgramOnBinding(keyword); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (LEDProgram bean : ledPrograms) { |
| | |
| | | private final PoleLightemitService sLedService; |
| | | |
| | | @GetMapping("/getSledList") |
| | | public ResponseVO<Object> getSledList() { |
| | | List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLed(null, null, null, false); |
| | | public ResponseVO<Object> getSledList(@RequestParam(required = false, value = "keyword") String keyword) { |
| | | List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLedOnBinding(keyword); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (PoleLightemitEntity bean : poleLightemitEntities) { |
| | |
| | | return param; |
| | | } |
| | | |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO,Integer order,Integer seq, String keyword) { |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO, Integer order, Integer seq, String keyword) { |
| | | LambdaQueryWrapper<LEDProgram> wrapper = listPrograms(); |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | |
| | | return list(wrapper); |
| | | } |
| | | |
| | | public List<LEDProgram> listProgramOnBinding(String keyword) { |
| | | LambdaQueryWrapper<LEDProgram> wrapper = listPrograms(); |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | | wrapper.like(LEDProgram::getName, keyword); |
| | | } |
| | | |
| | | return list(wrapper); |
| | | } |
| | | |
| | | |
| | | public LambdaQueryWrapper<LEDProgram> listPrograms() { |
| | | if (SecurityUtils.getClientId() == null) { |
| | |
| | | return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | } |
| | | |
| | | public List<LedPlayerEntity> ledPlayerEntityListOnBinding(String keyword) { |
| | | |
| | | List<LedPlayerEntity> list; |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, null); |
| | | } else { |
| | | list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | } |
| | | |
| | | } |
| | |
| | | return temp; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 绑定使用 |
| | | * |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | public List<PoleLightemitEntity> listLedOnBinding(String keyword) { |
| | | List<PoleLightemitEntity> poleLightemitEntityList; |
| | | |
| | | |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleLightemitEntityList = poleLightemitDao.listLedOnBinding(keyword, null); |
| | | } else { |
| | | poleLightemitEntityList = poleLightemitDao.listLedOnBinding(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | |
| | | for (PoleLightemitEntity poleLightemitEntity : poleLightemitEntityList) { |
| | | //查询设备在线状态 |
| | | boolean onLine = lightemitUtils.getLedOnLine(poleLightemitEntity.getLightemitControlCode()); |
| | | //查询屏幕的开启状态 |
| | | String isOpen = lightemitUtils.getIsScreenOpen(poleLightemitEntity.getLightemitControlCode()); |
| | | poleLightemitEntity.setIsOpen(String.valueOf(isOpen)); |
| | | poleLightemitEntity.setOnLine(onLine); |
| | | } |
| | | return poleLightemitEntityList; |
| | | } |
| | | |
| | | /** |
| | | * 取出在线的熙讯 |
| | | * |