| | |
| | | |
| | | |
| | | /** |
| | | * 诺瓦-节目列表 |
| | | */ |
| | | //创建时间 |
| | | LED_N_PROGRAM_CREATE_TIME("create_date"), |
| | | |
| | | |
| | | /** |
| | | * 诺瓦-播放计划列表 |
| | | */ |
| | | //创建时间 |
| | | LED_N_PLAY_PLAN_CREATE_TIME("create_date"), |
| | | |
| | | /** |
| | | * 熙迅-列表 |
| | | */ |
| | | //板卡编号、名称、绑定灯杆名称、创建时间) |
| | | LED_S_CODE("t1.lightemit_control_code"), |
| | | //名称 |
| | | LED_S_NAME("t1.lightemit_name"), |
| | | //绑定灯杆名称 |
| | | LED_S_POLE_NAME("t3.pole_name"), |
| | | //创建时间 |
| | | LED_S_CREATE_TIME("t1.create_date"), |
| | | |
| | | |
| | | /** |
| | | * 熙迅-节目列表 |
| | | */ |
| | | LED_S_PROGRAM_CREATE_TIME("create_date"), |
| | | |
| | | |
| | | /** |
| | | * 熙迅-播放计划 |
| | | */ |
| | | //创建时间 |
| | | LED_S_PLAY_PLAN_CREATE_TIME("create_date"), |
| | | |
| | | /** |
| | | * 摄像头列表 |
| | | */ |
| | | //灯杆名称 |
| | | MONITOR_POLE_NAME("t3.pole_name"), |
| | | //添加时间 |
| | | MONITOR_CREATE_TIME("t1.update_time"), |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | POLE_NAME("pole_name"), |
| | | POLE_ID("id"), |
| | | POLE_CREATE_TIME("create_time"), |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | public interface PoleLightemitEntityMapper extends BaseMapper<PoleLightemitEntity> { |
| | | |
| | | |
| | | void updateRequestBody(@Param("ledCode")String ledCode, @Param("postBody")String postBody); |
| | | void updateRequestBody(@Param("ledCode") String ledCode, @Param("postBody") String postBody); |
| | | |
| | | List<PoleLightemitEntity> listLed(String keyword, Long userid); |
| | | List<PoleLightemitEntity> listLed(String keyword, Long userid, String orderBy); |
| | | |
| | | Pole getpole(String lightemitControlCode); |
| | | } |
| | |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | </where> |
| | | <if test="orderBy != null"> |
| | | ORDER BY ${orderBy} |
| | | </if> |
| | | </select> |
| | | <select id="getpole" resultType="com.sandu.ximon.dao.domain.Pole" parameterType="java.lang.String"> |
| | | SELECT |
| | |
| | | |
| | | @GetMapping("/getNledProgeamList") |
| | | public ResponseVO<Object> getNledProgeamList() { |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null); |
| | | List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null,null,null); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (LEDProgram bean : ledPrograms) { |
| | |
| | | |
| | | @GetMapping("/getSledList") |
| | | public ResponseVO<Object> getSledList() { |
| | | List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLed(null, false); |
| | | List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLed(null, null, null, false); |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | | for (PoleLightemitEntity bean : poleLightemitEntities) { |
| | |
| | | List<MonitorBo> monitorBos; |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2,null); |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2, null); |
| | | } else { |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2,null); |
| | | monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2, null); |
| | | } |
| | | List<Map> mapList = new ArrayList<>(); |
| | | Map map; |
| | |
| | | |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listProgram(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> listProgram(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.LED_PROGRAM_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.successPage(ledProgramService.listProgram(baseConditionVO, keyword)); |
| | | return ResponseUtil.successPage(ledProgramService.listProgram(baseConditionVO, order, seq, keyword)); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.security.annotation.AnonymousAccess; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.param.PlayPlanParam; |
| | | import com.sandu.ximon.admin.security.PermissionConfig; |
| | |
| | | import com.sandu.ximon.admin.vo.NovaPushResultVO; |
| | | import com.sandu.ximon.dao.domain.PlayPlanNv; |
| | | import com.sandu.ximon.dao.enums.MenuEnum; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | |
| | | @GetMapping("/listPlan") |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.PLAYPLAN_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.LED_N_PLAY_PLAN_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | LambdaQueryWrapper<PlayPlanNv> wrapper = Wrappers.lambdaQuery(PlayPlanNv.class); |
| | | |
| | | if (SecurityUtils.getClientId() != null) { |
| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.CommonPage; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.LED_PROGRAM_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | LambdaQueryWrapper<PoleXixunPlayerEntity> wrapper = xiXunPlayerService.XixunPlayerList(keyword); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | |
| | | return ResponseUtil.success(xiXunPlayerService.list(wrapper)); |
| | | List<PoleXixunPlayerEntity> list = xiXunPlayerService.listProgram(baseConditionVO, order, seq, keyword); |
| | | return ResponseUtil.success(list); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listLed") |
| | | public ResponseVO<Object> listLed(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword, |
| | | public ResponseVO<Object> listLed(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword, |
| | | @RequestParam(value = "isOnLine", required = false) boolean isOnLine) { |
| | | if (!permissionConfig.check(MenuEnum.LED_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | List<PoleLightemitEntity> poleLightemitEntityList = poleLightemitService.listLed(keyword, isOnLine); |
| | | List<PoleLightemitEntity> poleLightemitEntityList = poleLightemitService.listLed(keyword, order, seq, isOnLine); |
| | | poleLightemitEntityList.forEach(led -> { |
| | | led.setStreetlightId(led.getPoleId()); |
| | | led.setStreetlightName(led.getPoleName()); |
| | |
| | | |
| | | |
| | | @GetMapping("/listSchedule") |
| | | public ResponseVO<Object> listSchedule(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> listSchedule(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.PLAYPLAN_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return ResponseUtil.success(scheduleService.listSchedule(baseConditionVO, keyword)); |
| | | return ResponseUtil.success(scheduleService.listSchedule(baseConditionVO, order, seq, keyword)); |
| | | } |
| | | |
| | | |
| | |
| | | import com.sandu.ximon.dao.mapper.IpVolumeFileMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | public boolean addFile(IpVolumeFileParam fileParam) { |
| | | IpVolumeFile file = new IpVolumeFile(); |
| | | // if(SecurityUtils.getClientId()!=null){ |
| | | // file.setUserName(SecurityUtils.getUsername()); |
| | | // } |
| | | // |
| | | if (SecurityUtils.getClientId() != null) { |
| | | file.setUserName(SecurityUtils.getUsername()); |
| | | file.setUserId(SecurityUtils.getClientId()); |
| | | file.setClientId(clientService.getClientId()); |
| | | } |
| | | |
| | | file.setUserName(SecurityUtils.getUsername()); |
| | | file.setUserId(SecurityUtils.getClientId()); |
| | | file.setClientId(clientService.getClientId()); |
| | | |
| | | file.setFileName(fileParam.getFileName()); |
| | | file.setFileUrl(fileParam.getFileUrl()); |
| | |
| | | import com.sandu.ximon.admin.param.LEDProgramParam; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.dao.domain.LEDProgram; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.LEDProgramMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return param; |
| | | } |
| | | |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO, String keyword) { |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO,Integer order,Integer seq, String keyword) { |
| | | LambdaQueryWrapper<LEDProgram> wrapper = listPrograms(); |
| | | if (baseConditionVO != null) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | } |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | | wrapper.like(LEDProgram::getName, keyword); |
| | | } |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.LED_N_PROGRAM_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | if (baseConditionVO != null) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | } |
| | | return list(wrapper); |
| | | } |
| | | |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | LedSFile sFile = new LedSFile(); |
| | | BeanUtils.copyProperties(fileUploadDto, sFile); |
| | | sFile.setCilentId(SecurityUtils.getClientId()); |
| | | if (SecurityUtils.getClientId() != null) { |
| | | sFile.setUserId(SecurityUtils.getUserId()); |
| | | sFile.setUserName(SecurityUtils.getUsername()); |
| | | if (clientService.findClientId()) { |
| | | sFile.setCilentId(clientService.getClientId()); |
| | | } |
| | | sFile.setUserId(SecurityUtils.getUserId()); |
| | | sFile.setUserName(SecurityUtils.getUsername()); |
| | | if (clientService.findClientId()) { |
| | | sFile.setCilentId(clientService.getClientId()); |
| | | } |
| | | /** |
| | | * 熙汛文件上传 日志记录开始 |
| | |
| | | import com.sandu.ximon.admin.vo.LedScheduleVO; |
| | | import com.sandu.ximon.dao.domain.LedScheduleEntity; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.LedScheduleEntityMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | public List listSchedule(BaseConditionVO baseConditionVO, String keyword) { |
| | | public List listSchedule(BaseConditionVO baseConditionVO,Integer order,Integer seq, String keyword) { |
| | | LambdaQueryWrapper<LedScheduleEntity> eq = Wrappers.lambdaQuery(LedScheduleEntity.class); |
| | | //用户类型判断 |
| | | if (SecurityUtils.getClientId() != null) { |
| | |
| | | eq = eq.like(LedScheduleEntity::getName, keyword); |
| | | } |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.LED_S_PLAY_PLAN_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(),orderBy); |
| | | return list(eq); |
| | | } |
| | | |
| | |
| | | import com.sandu.ximon.admin.vo.EquipmentInfomation; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.enums.PoleBindingEnums; |
| | | import com.sandu.ximon.dao.mapper.PoleLightemitEntityMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @param isOnLine |
| | | * @return |
| | | */ |
| | | public List<PoleLightemitEntity> listLed(String keyword, boolean isOnLine) { |
| | | public List<PoleLightemitEntity> listLed(String keyword,Integer order,Integer seq, boolean isOnLine) { |
| | | List<PoleLightemitEntity> poleLightemitEntityList; |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.LED_S_CODE.getCode(); |
| | | break; |
| | | case 2: |
| | | orderByResult = OrderByEnums.LED_S_NAME.getCode(); |
| | | break; |
| | | case 3: |
| | | orderByResult = OrderByEnums.LED_S_POLE_NAME.getCode(); |
| | | break; |
| | | case 4: |
| | | orderByResult = OrderByEnums.LED_S_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleLightemitEntityList = poleLightemitDao.listLed(keyword, null); |
| | | poleLightemitEntityList = poleLightemitDao.listLed(keyword, null,orderBy); |
| | | } else { |
| | | poleLightemitEntityList = poleLightemitDao.listLed(keyword, SecurityUtils.getUserId()); |
| | | poleLightemitEntityList = poleLightemitDao.listLed(keyword, SecurityUtils.getUserId(),orderBy); |
| | | } |
| | | |
| | | List<PoleLightemitEntity> temp = new ArrayList<>(); |
| | |
| | | MonitorParam monitorParam = new MonitorParam(); |
| | | monitorParam.setEquipmentState(2); |
| | | monitorParam.setBindingState(2); |
| | | List<MonitorBo> monitorBos = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null,null,null, monitorParam).getList(); |
| | | List<MonitorBo> monitorBos = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null, null, null, monitorParam).getList(); |
| | | monitorParam.setEquipmentState(1); |
| | | List<MonitorBo> online = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null,null,null, monitorParam).getList(); |
| | | List<MonitorBo> online = SpringContextHolder.getBean(MonitorService.class).listMonitorByKeyword(null, null, null, monitorParam).getList(); |
| | | result.put("monitorOnlineCount", online.size()); |
| | | result.put("monitorTotalCount", monitorBos.size()); |
| | | |
| | |
| | | result.put("LightPoleHeelingTotalCount", lightPoleHeelings.size()); |
| | | |
| | | //熙讯 |
| | | List<PoleLightemitEntity> poleLightemitEntities = SpringContextHolder.getBean(PoleLightemitService.class).listLed(null, false); |
| | | List<PoleLightemitEntity> poleLightemitEntityOnlineList = SpringContextHolder.getBean(PoleLightemitService.class).listLed(null, true); |
| | | List<PoleLightemitEntity> poleLightemitEntities = SpringContextHolder.getBean(PoleLightemitService.class).listLed(null, null, null, false); |
| | | List<PoleLightemitEntity> poleLightemitEntityOnlineList = SpringContextHolder.getBean(PoleLightemitService.class).listLed(null, null, null, true); |
| | | |
| | | result.put("XiXunOnlineCount", poleLightemitEntityOnlineList.size()); |
| | | result.put("XiXunTotalCount", poleLightemitEntities.size()); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.config.RealtimeServerBean; |
| | | import com.sandu.ximon.admin.entity.*; |
| | |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.sandu.ximon.dao.domain.PoleXixunPlayerEntity; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.PoleXixunPlayerEntityMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | }).like(PoleXixunPlayerEntity::getProgramName, keyword); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public List<PoleXixunPlayerEntity> listProgram(BaseConditionVO baseConditionVO, Integer order, Integer seq, String keyword) { |
| | | LambdaQueryWrapper<PoleXixunPlayerEntity> wrapper = XixunPlayerList(keyword); |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.LED_S_PROGRAM_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | return list(wrapper); |
| | | } |
| | | |
| | | public boolean insert(ProgramPro programPro) { |
| | |
| | | try { |
| | | Gson gson = new GsonBuilder().disableHtmlEscaping().create(); |
| | | // programPro = JsonUtil.convertJsonStringToObject(json, ProgramPro.class); |
| | | programPro=gson.fromJson(json,ProgramPro.class); |
| | | programPro = gson.fromJson(json, ProgramPro.class); |
| | | programPro.setProgramId(pid); |
| | | programPro.setScreenShot(byId.getScreenShot()); |
| | | programPro.getLayers().forEach( |