瀏覽代碼

云盒列表接口

zhj 2 年之前
父節點
當前提交
0c4365cb23

+ 117 - 0
src/main/java/com/welampiot/controller/NewLampPoleController.java

@@ -0,0 +1,117 @@
+package com.welampiot.controller;
+
+import com.welampiot.common.BaseResult;
+import com.welampiot.dto.WifiDTO;
+import com.welampiot.dto.WifiInfoLogDTO;
+import com.welampiot.service.WifiInfoLogService;
+import com.welampiot.service.WifiService;
+import com.welampiot.utils.ToolUtils;
+import com.welampiot.vo.WifiInfoLogVO;
+import com.welampiot.vo.WifiOutInfoVO;
+import com.welampiot.vo.WifiVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * ClassName: NewLampPoleController
+ * Package: com.welampiot.controller
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 19:53
+ * @Version: v1.0
+ */
+@RestController
+@CrossOrigin
+@RequestMapping("/api/newLampPole")
+public class NewLampPoleController {
+
+    @Autowired
+    private WifiService wifiService;
+
+    @Autowired
+    private WifiInfoLogService wifiInfoLogService;
+
+    @Autowired
+    private ToolUtils toolUtils;
+
+    /**
+     * 获取云盒列表
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/wifiList", method = RequestMethod.POST)
+    public BaseResult<WifiDTO> wifiList(HttpServletRequest request){
+        Integer page = request.getParameter("page") == null ? 1 : Integer.parseInt(request.getParameter("page"));
+        Integer count = request.getParameter("count") == null ? 16 : Integer.parseInt(request.getParameter("count"));
+        Integer online = request.getParameter("online") == null ? 0 : Integer.parseInt(request.getParameter("online"));
+        String keyword = request.getParameter("keyword") == null ? "" : request.getParameter("keyword");
+
+        WifiDTO dto = new WifiDTO();
+        dto.setPage(count * (page - 1));
+        dto.setCount(count);
+        dto.setKeyword(keyword);
+        dto.setOnlineState(online);
+        dto.setSectionList(toolUtils.getSectionList(request));
+        WifiVO vo = wifiService.getWifiList(dto);
+        return BaseResult.success(vo);
+    }
+
+    /**
+     * 获取云盒数据概览
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/wifiInfo", method = RequestMethod.POST)
+    public BaseResult<WifiDTO> wifiInfo(HttpServletRequest request){
+        WifiDTO dto = new WifiDTO();
+        dto.setSectionList(toolUtils.getSectionList(request));
+        WifiVO vo = wifiService.getWifiInfo(dto);
+        return BaseResult.success(vo);
+    }
+
+    /**
+     * 获取云盒电源设置
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/wifiOutInfo", method = RequestMethod.POST)
+    public BaseResult<WifiDTO> wifiOutInfo(HttpServletRequest request){
+        Integer version = request.getParameter("version") == null ? 0 : Integer.parseInt(request.getParameter("version"));
+        Integer id = request.getParameter("id") == null ? 0 : Integer.parseInt(request.getParameter("id"));
+        WifiOutInfoVO vo = wifiService.getWifiOutInfo(id, toolUtils.getSectionList(request));
+        if (vo == null) return toolUtils.response("0001",version);
+        return BaseResult.success(vo);
+    }
+
+    /**
+     * 获取云盒输出统计数据
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/wifiOutStatistics", method = RequestMethod.POST)
+    public BaseResult<WifiInfoLogDTO> wifiOutStatistics(HttpServletRequest request){
+        Integer id = request.getParameter("id") == null ? 0 : Integer.parseInt(request.getParameter("id"));
+        Integer version = request.getParameter("version") == null ? 0 : Integer.parseInt(request.getParameter("version"));
+        Integer dateType = request.getParameter("dateType") == null ? 0 : Integer.parseInt(request.getParameter("dateType"));
+        Integer date = request.getParameter("date") == null ? 0 : Integer.parseInt(request.getParameter("date"));
+        Integer dataType = request.getParameter("dataType") == null ? 0 : Integer.parseInt(request.getParameter("dataType"));
+
+        WifiInfoLogDTO dto = new WifiInfoLogDTO();
+        dto.setWifiId(id);
+        dto.setDateType(dateType);
+        dto.setDate(date);
+        dto.setDataType(dataType);
+        dto.setSectionList(toolUtils.getSectionList(request));
+
+        WifiInfoLogVO vo = wifiInfoLogService.getWifiOutStatisticsByDTO(dto);
+        if (vo == null) return toolUtils.response("0001",version);
+        return BaseResult.success(vo);
+    }
+
+}

+ 25 - 0
src/main/java/com/welampiot/dao/WifiDao.java

@@ -0,0 +1,25 @@
+package com.welampiot.dao;
+
+import com.welampiot.dto.WifiDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * ClassName: WifiDao
+ * Package: com.welampiot.dao
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 18:53
+ * @Version: v1.0
+ */
+public interface WifiDao {
+    List<WifiDTO> getWifiListByDTO(WifiDTO dto);
+
+    Integer getWifiTotalBySectionList(WifiDTO dto);
+
+    Integer getWifiOnlineTotalBySectionList(WifiDTO dto);
+
+    WifiDTO getWifiOutInfoByDTO(@Param("id") Integer id, @Param("sectionList") List<WifiDTO> sectionList);
+}

+ 16 - 0
src/main/java/com/welampiot/dao/WifiInfoLogDao.java

@@ -0,0 +1,16 @@
+package com.welampiot.dao;
+
+import com.welampiot.dto.WifiInfoLogDTO;
+
+/**
+ * ClassName: WifiInfoLogDao
+ * Package: com.welampiot.dao
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 14:08
+ * @Version: v1.0
+ */
+public interface WifiInfoLogDao {
+    WifiInfoLogDTO getWifiOutStatisticsByDTO(WifiInfoLogDTO dto);
+}

+ 300 - 0
src/main/java/com/welampiot/dto/WifiDTO.java

@@ -0,0 +1,300 @@
+package com.welampiot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: WifiDTO
+ * Package: com.welampiot.dto
+ * Description: wifi表
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 15:10
+ * @Version: v1.0
+ */
+@Data
+public class WifiDTO implements Serializable {
+    /** 主键 **/
+    private Integer id;
+
+    /** 型号(0 WE-GW-G100,1 WE-GW-G200,2 WE-GW-G40,
+     * 3 WE-GW-G300,4 WE-XA-G20(云盒加4G双控设备),
+     * 5 WE-GW-G260,6 WE-GW-G600)
+     **/
+    private Integer model;
+
+    /** 序列号IMEI **/
+    private String num;
+
+    /** 供电方式(0 = 适配器,1 = POE, 2 = 其他)**/
+    private Integer powerModel;
+
+    /** 功耗 **/
+    private Float powerWaste;
+
+    /** 防护等级(0 = IP65,1 = IP66,2 = IP67,3 = IP68,4 = 不防水)**/
+    private Integer protectLevel;
+
+    /** 支持频段(0 = 2.4G/5G,1 = 2.4G,2 = 5G,3 = 其他)**/
+    private Integer frequency;
+
+    /** 灯杆id **/
+    private Integer lampPoleId;
+
+    /** wifi开关状态(0 关,1 开)**/
+    private Integer status;
+
+    /** 网络类型(0 4G,1 WIFI ETH)**/
+    private Integer netType;
+
+    /** iccID **/
+    private String iccId;
+
+    /** 硬件版本 **/
+    private String firVersion;
+
+    /** 类型 **/
+    private Integer type;
+
+    /** 在线状态(0 不在线,1 在线) **/
+    private Integer online;
+
+    /** 固件版本号 **/
+    private String version;
+
+    /** 当天流量 **/
+    private Float dayFlow;
+
+    /** 累计流量 **/
+    private Float flow;
+
+    /** 当天设备连接数 **/
+    private Integer dayDeviceCount;
+
+    /** 累计设备连接数 **/
+    private Integer deviceCount;
+
+    /** 数据更新时间 **/
+    private String updateTime;
+
+    /** 网口状态 **/
+    private String lanStatus;
+
+    /** 灯光状态 **/
+    private String ledStatus;
+
+    /** AC220V输出1路备注 **/
+    private String remark1;
+
+    /** AC220V输出2路备注 **/
+    private String remark2;
+
+    /** AC220V输出3路备注 **/
+    private String remark3;
+
+    /** DC24V输出备注 **/
+    private String remark4;
+
+    /** DC12V输出1路备注 **/
+    private String remark5;
+
+    /** DC12V输出2路备注 **/
+    private String remark6;
+
+    /** 电压 **/
+    private Float voltage;
+
+    /** 电流 **/
+    private Float current;
+
+    /** 功率(WH)**/
+    private Float power;
+
+    /** 功率因数 **/
+    private Float powerFactor;
+
+    /** 频率 **/
+    private Float freq;
+
+    /** 累计用电量kWH **/
+    private Float totalCom;
+
+    /** DC24V输出开关状态(0 关,1 开)**/
+    private Integer lna1Status;
+
+    /** DC24V输出电压 **/
+    private Float lna1Vol;
+
+    /** DC24V输出电流 **/
+    private Float lna1Cur;
+
+    /** DC12V1路输出开关状态(0 关,1 开)**/
+    private Integer lna2Status;
+
+    /** DC12V1路输出电压 **/
+    private Float lna2Vol;
+
+    /** DC12V1路输出电流 **/
+    private Float lna2Cur;
+
+    /** DC12V2路输出开关状态(0 关,1 开)**/
+    private Integer lna3Status;
+
+    /** DC12V2路输出电压 **/
+    private Float lna3Vol;
+
+    /** DC12V2路输出电流 **/
+    private Float lna3Cur;
+
+    /** AC220V输出1路开关状态(0 关,1 开)**/
+    private Integer aC1;
+
+    /** AC220V输出2路开关状态(0 关,1 开)**/
+    private Integer aC2;
+
+    /** AC220V输出3路开关状态(0 关,1 开)**/
+    private Integer aC3;
+
+    /** AC220v输入状态(0 异常,1 正常)**/
+    private Integer aCI;
+
+    /** AC220v输出1路输出类型(0 手动,1 自动)**/
+    private Integer type1;
+
+    /** AC220v输出2路输出类型(0 手动,1 自动)**/
+    private Integer type2;
+
+    /** AC220v输出3路输出类型(0 手动,1 自动)**/
+    private Integer type3;
+
+    /** DC24V输出类型(0 手动,1 自动)**/
+    private Integer type4;
+
+    /** DC12V1路输出类型(0 手动,1 自动)**/
+    private Integer type5;
+
+    /** DC12V2路输出类型(0 手动,1 自动)**/
+    private Integer type6;
+
+    /** AC220V输出1路自动闭合时间 **/
+    private String closeTime1;
+
+    /** AC220V输出2路自动闭合时间 **/
+    private String closeTime2;
+
+    /** AC220V输出3路自动闭合时间 **/
+    private String closeTime3;
+
+    /** DC24V自动闭合时间 **/
+    private String closeTime4;
+
+    /** DC12V1路自动闭合时间 **/
+    private String closeTime5;
+
+    /** DC12V2路自动闭合时间 **/
+    private String closeTime6;
+
+    /** AC220V输出1路自动断开时间 **/
+    private String openTime1;
+
+    /** AC220V输出2路自动断开时间 **/
+    private String openTime2;
+
+    /** AC220V输出3路自动断开时间 **/
+    private String openTime3;
+
+    /** DC24V自动断开时间 **/
+    private String openTime4;
+
+    /** DC12V1路自动断开时间 **/
+    private String openTime5;
+
+    /** DC12V2路自动断开时间 **/
+    private String openTime6;
+
+    /** 220V B路电压 **/
+    private Float voltageB;
+
+    /** 220V B路电流 **/
+    private Float currentB;
+
+    /** 220V B路功率(WH) **/
+    private Float powerB;
+
+    /** 220V B路功率因数 **/
+    private Float powerFactorB;
+
+    /** 220V B路频率 **/
+    private Float freqB;
+
+    /** 220V C路电压 **/
+    private Float voltageC;
+
+    /** 220V C路电流 **/
+    private Float currentC;
+
+    /** 220V C路功率(WH) **/
+    private Float powerC;
+
+    /** 220V C路功率因数 **/
+    private Float powerFactorC;
+
+    /** 220V C路频率 **/
+    private Float freqC;
+
+    /** 222V A路累计用电量kWh **/
+    private Float totalComA;
+
+    /** 222V B路累计用电量kWh **/
+    private Float totalComB;
+
+    /** 222V C路累计用电量kWh **/
+    private Float totalComC;
+
+    /** IP地址 **/
+    private String ipAddr;
+
+    /** IN 0的状态(0 低,1 高) **/
+    private Integer dI0;
+
+    /** OUT 0 的状态(0 低,1 高) **/
+    private Integer dO0;
+
+    /** 信号值 **/
+    private Integer signal;
+
+    /** 安装时间 **/
+    private String installDate;
+
+    /** 过期时间 **/
+    private String expirationDate;
+
+    /** 灯杆名 **/
+    private String lampPoleName;
+
+    /** 时区 **/
+    private Integer timezone;
+
+    /** 区域id **/
+    private Integer areaId;
+
+    /** 路段id **/
+    private Integer sectionId;
+
+    private List<WifiDTO> sectionList;
+
+    private Integer onlineState;
+
+    /** 页码 **/
+    private Integer page;
+
+    /** 单页显示数量 **/
+    private Integer count;
+
+    /** 关键字搜索,可搜索云盒SN号 **/
+    private String keyword;
+
+    private static final long serialVersionUID = 1L;
+}

+ 110 - 0
src/main/java/com/welampiot/dto/WifiInfoLogDTO.java

@@ -0,0 +1,110 @@
+package com.welampiot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: WifiInfoLogDTO
+ * Package: com.welampiot.dto
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 11:16
+ * @Version: v1.0
+ */
+@Data
+public class WifiInfoLogDTO implements Serializable {
+    /** 主键 **/
+    private Integer id;
+
+    /** WiFi id **/
+    private Integer wifiId;
+
+    /** 连接设备数量 **/
+    private Integer deviceCount;
+
+    /** 使用流量数 **/
+    private Float flow;
+
+    /** 数据更新时间 **/
+    private String updateTime;
+
+    /** 当天使用流量 **/
+    private Float dayFlow;
+
+    /** 当天设备连接数 **/
+    private Integer dayDeviceCount;
+
+    /** 累计使用流量 **/
+    private Double totalCom;
+
+    /** 220v输入电压 **/
+    private Float voltage;
+
+    /** 220v输入电流 **/
+    private Float current;
+
+    /** 220v输入功率 **/
+    private Float power;
+
+    /** DC24V输出电压 **/
+    private Float lna1Vol;
+
+    /** DC24V输出电流 **/
+    private Float lna1Cur;
+
+    /** DC12V1路输出电压 **/
+    private Float lna2Vol;
+
+    /** DC12V1路输出电流 **/
+    private Float lna2Cur;
+
+    /** DC12V2路输出电压 **/
+    private Float lna3Vol;
+
+    /** DC12V2路输出电流 **/
+    private Float lna3Cur;
+
+    /** 220V B路电压 **/
+    private Float voltageB;
+
+    /** 220V B路电流 **/
+    private Float currentB;
+
+    /** 220V B路功率(WH) **/
+    private Float powerB;
+
+    /** 220V C路电压 **/
+    private Float voltageC;
+
+    /** 220V C路电流 **/
+    private Float currentC;
+
+    /** 220V C路功率(WH) **/
+    private Float powerC;
+
+    /** 222V A路累计用电量kWh **/
+    private Float totalComA;
+
+    /** 222V B路累计用电量kWh **/
+    private Float totalComB;
+
+    /** 222V C路累计用电量kWh **/
+    private Float totalComC;
+
+    /** 时间类型(0 一天,1 三天,2 七天,3 14天,4 时间范围,不能超过30天)**/
+    private Integer dateType;
+
+    /** 日期范围,dateType为4的时候使用,格式为(2020-11-12/2020-11-28)**/
+    private Integer date;
+
+    /** 数据类型(0 220V1路输出,1 24V输出,2 12V-1输出,3 12V-2输出,4 220V2路输出,5 220V3路输出)**/
+    private Integer dataType;
+
+    /** 获取路段id **/
+    private List<WifiInfoLogDTO> sectionList;
+
+    private static final long serialVersionUID = 1L;
+}

+ 17 - 0
src/main/java/com/welampiot/service/WifiInfoLogService.java

@@ -0,0 +1,17 @@
+package com.welampiot.service;
+
+import com.welampiot.dto.WifiInfoLogDTO;
+import com.welampiot.vo.WifiInfoLogVO;
+
+/**
+ * ClassName: WifiInfoLogService
+ * Package: com.welampiot.service
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 14:58
+ * @Version: v1.0
+ */
+public interface WifiInfoLogService {
+    WifiInfoLogVO getWifiOutStatisticsByDTO(WifiInfoLogDTO dto);
+}

+ 24 - 0
src/main/java/com/welampiot/service/WifiService.java

@@ -0,0 +1,24 @@
+package com.welampiot.service;
+
+import com.welampiot.dto.WifiDTO;
+import com.welampiot.vo.WifiOutInfoVO;
+import com.welampiot.vo.WifiVO;
+
+import java.util.List;
+
+/**
+ * ClassName: WifiService
+ * Package: com.welampiot.service
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 18:57
+ * @Version: v1.0
+ */
+public interface WifiService {
+    WifiVO getWifiList(WifiDTO dto);
+
+    WifiVO getWifiInfo(WifiDTO dto);
+
+    WifiOutInfoVO getWifiOutInfo(Integer id, List<WifiDTO> sectionList);
+}

+ 64 - 0
src/main/java/com/welampiot/service/impl/WifiInfoLogServiceImpl.java

@@ -0,0 +1,64 @@
+package com.welampiot.service.impl;
+
+import com.welampiot.dao.WifiInfoLogDao;
+import com.welampiot.dto.WifiInfoLogDTO;
+import com.welampiot.service.WifiInfoLogService;
+import com.welampiot.vo.WifiInfoLogVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * ClassName: WifiInfoLogServiceImpl
+ * Package: com.welampiot.service.impl
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 14:59
+ * @Version: v1.0
+ */
+@Service
+public class WifiInfoLogServiceImpl implements WifiInfoLogService {
+
+    @Autowired
+    private WifiInfoLogDao wifiInfoLogDao;
+
+    @Override
+    public WifiInfoLogVO getWifiOutStatisticsByDTO(WifiInfoLogDTO dto) {
+        WifiInfoLogVO vo = new WifiInfoLogVO();
+        WifiInfoLogDTO dto1 = wifiInfoLogDao.getWifiOutStatisticsByDTO(dto);
+        if (dto1 == null) return null;
+        switch (dto.getDataType()){
+            case 1 :
+                vo.getVolArr().add(dto1.getLna1Vol());
+                vo.getCurArr().add(dto1.getLna1Cur());
+                vo.getPowerArr().add(0.0f);
+                break;
+            case 2 :
+                vo.getVolArr().add(dto1.getLna2Vol());
+                vo.getCurArr().add(dto1.getLna2Cur());
+                vo.getPowerArr().add(0.0f);
+                break;
+            case 3 :
+                vo.getVolArr().add(dto1.getLna3Vol());
+                vo.getCurArr().add(dto1.getLna3Cur());
+                vo.getPowerArr().add(0.0f);
+                break;
+            case 4 :
+                vo.getVolArr().add(dto1.getVoltageB());
+                vo.getCurArr().add(dto1.getCurrentB());
+                vo.getPowerArr().add(dto1.getPowerB());
+                break;
+            case 5 :
+                vo.getVolArr().add(dto1.getVoltageC());
+                vo.getCurArr().add(dto1.getCurrentC());
+                vo.getPowerArr().add(dto1.getPowerC());
+                break;
+            default:
+                vo.getVolArr().add(dto1.getVoltage());
+                vo.getCurArr().add(dto1.getCurrent());
+                vo.getPowerArr().add(dto1.getPower());
+                break;
+        }
+        return vo;
+    }
+}

+ 123 - 0
src/main/java/com/welampiot/service/impl/WifiServiceImpl.java

@@ -0,0 +1,123 @@
+package com.welampiot.service.impl;
+
+import com.welampiot.dao.WifiDao;
+import com.welampiot.dto.WifiDTO;
+import com.welampiot.service.WifiService;
+import com.welampiot.vo.WifiOutInfoVO;
+import com.welampiot.vo.WifiVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * ClassName: WifiServiceImpl
+ * Package: com.welampiot.service.impl
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 19:51
+ * @Version: v1.0
+ */
+@Service
+public class WifiServiceImpl implements WifiService {
+    @Autowired
+    private WifiDao wifiDao;
+
+    @Override
+    public WifiVO getWifiList(WifiDTO dto) {
+        WifiVO vo = new WifiVO();
+        vo.setTotal(wifiDao.getWifiTotalBySectionList(dto));
+        List<WifiDTO> wifiList = wifiDao.getWifiListByDTO(dto);
+        List<WifiDTO> list = new ArrayList<>();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        wifiList.forEach(wifiDTO ->{
+            if (wifiDTO.getNetType() != null && wifiDTO.getNetType() == 1){
+                wifiDTO.setNetType(1);
+            }else {
+                wifiDTO.setNetType(0);
+            }
+            if (wifiDTO.getOnline() != null && wifiDTO.getOnline() == 1){
+                wifiDTO.setOnline(1);
+            }else {
+                wifiDTO.setOnline(0);
+            }
+            if (wifiDTO.getStatus() != null && wifiDTO.getStatus() == 1){
+                wifiDTO.setStatus(1);
+            }else {
+                wifiDTO.setStatus(0);
+            }
+            if (wifiDTO.getUpdateTime() != null){
+                Date cmdTime;
+                try {
+                    cmdTime = simpleDateFormat.parse(wifiDTO.getUpdateTime());
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+                //判断时区,为null默认东八区
+                long timezone = wifiDTO.getTimezone() == null ? 8 : wifiDTO.getTimezone();
+                long l = cmdTime.getTime() + timezone * 3600 * 1000;
+                cmdTime = new Date(l);
+                wifiDTO.setUpdateTime(simpleDateFormat.format(cmdTime));
+            }else {
+                wifiDTO.setUpdateTime("");
+            }
+            if (wifiDTO.getInstallDate() != null && !wifiDTO.getInstallDate().equals("")){
+                try {
+                    wifiDTO.setInstallDate(simpleDateFormat.format(simpleDateFormat.parse(wifiDTO.getInstallDate())));
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+            }else {
+                wifiDTO.setInstallDate("");
+            }
+            if (wifiDTO.getExpirationDate() != null && !wifiDTO.getExpirationDate().equals("")){
+                try {
+                    wifiDTO.setExpirationDate(simpleDateFormat.format(simpleDateFormat.parse(wifiDTO.getExpirationDate())));
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+            }else {
+                wifiDTO.setExpirationDate("");
+            }
+            if (wifiDTO.getDI0() != null && wifiDTO.getDI0() == 1){
+                wifiDTO.setDI0(1);
+            }else {
+                wifiDTO.setDI0(0);
+            }
+            if (wifiDTO.getDO0() != null && wifiDTO.getDO0() == 1){
+                wifiDTO.setDO0(1);
+            }else {
+                wifiDTO.setDO0(0);
+            }
+            if (wifiDTO.getSignal() == null){
+                wifiDTO.setSignal(0);
+            }
+            list.add(wifiDTO);
+        });
+        vo.setList(list);
+        return vo;
+    }
+
+    @Override
+    public WifiVO getWifiInfo(WifiDTO dto) {
+        WifiVO vo = new WifiVO();
+        vo.setDeviceCount(wifiDao.getWifiTotalBySectionList(dto));
+        vo.setOnlineCount(wifiDao.getWifiOnlineTotalBySectionList(dto));
+        return vo;
+    }
+
+    @Override
+    public WifiOutInfoVO getWifiOutInfo(Integer id, List<WifiDTO> sectionList) {
+        WifiOutInfoVO vo = new WifiOutInfoVO();
+        WifiDTO dto = wifiDao.getWifiOutInfoByDTO(id,sectionList);
+        if (dto == null) return null;
+        BeanUtils.copyProperties(dto,vo);
+        return vo;
+    }
+}

+ 33 - 0
src/main/java/com/welampiot/vo/WifiInfoLogVO.java

@@ -0,0 +1,33 @@
+package com.welampiot.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: WifiInfoLogVO
+ * Package: com.welampiot.vo
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 15:01
+ * @Version: v1.0
+ */
+@Data
+public class WifiInfoLogVO implements Serializable {
+    /** 时间 **/
+    private List<String> dateArr;
+
+    /** 电压 **/
+    private List<Float> volArr;
+
+    /** 电流 **/
+    private List<Float> curArr;
+
+    /** 功率 **/
+    private List<Float> powerArr;
+
+    /** 用电量 **/
+    private List<Float> comArr;
+}

+ 109 - 0
src/main/java/com/welampiot/vo/WifiOutInfoVO.java

@@ -0,0 +1,109 @@
+package com.welampiot.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * ClassName: WifiOutInfoVO
+ * Package: com.welampiot.vo
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/12 - 9:17
+ * @Version: v1.0
+ */
+@Data
+public class WifiOutInfoVO implements Serializable {
+    /** AC220V输出1路备注 **/
+    private String remark1;
+
+    /** AC220V输出2路备注 **/
+    private String remark2;
+
+    /** AC220V输出3路备注 **/
+    private String remark3;
+
+    /** DC24V输出备注 **/
+    private String remark4;
+
+    /** DC12V输出1路备注 **/
+    private String remark5;
+
+    /** DC12V输出2路备注 **/
+    private String remark6;
+
+    /** AC220V输出1路开关状态(0 关,1 开)**/
+    private Integer aC1;
+
+    /** AC220V输出2路开关状态(0 关,1 开)**/
+    private Integer aC2;
+
+    /** AC220V输出3路开关状态(0 关,1 开)**/
+    private Integer aC3;
+
+    /** DC24V输出开关状态(0 关,1 开)**/
+    private Integer lna1Status;
+
+    /** DC12V1路输出开关状态(0 关,1 开)**/
+    private Integer lna2Status;
+
+    /** DC12V2路输出开关状态(0 关,1 开)**/
+    private Integer lna3Status;
+
+    /** AC220v输出1路输出类型(0 手动,1 自动)**/
+    private Integer type1;
+
+    /** AC220v输出2路输出类型(0 手动,1 自动)**/
+    private Integer type2;
+
+    /** AC220v输出3路输出类型(0 手动,1 自动)**/
+    private Integer type3;
+
+    /** DC24V输出类型(0 手动,1 自动)**/
+    private Integer type4;
+
+    /** DC12V1路输出类型(0 手动,1 自动)**/
+    private Integer type5;
+
+    /** DC12V2路输出类型(0 手动,1 自动)**/
+    private Integer type6;
+
+    /** AC220V输出1路自动闭合时间 **/
+    private String closeTime1;
+
+    /** AC220V输出2路自动闭合时间 **/
+    private String closeTime2;
+
+    /** AC220V输出3路自动闭合时间 **/
+    private String closeTime3;
+
+    /** DC24V自动闭合时间 **/
+    private String closeTime4;
+
+    /** DC12V1路自动闭合时间 **/
+    private String closeTime5;
+
+    /** DC12V2路自动闭合时间 **/
+    private String closeTime6;
+
+    /** AC220V输出1路自动断开时间 **/
+    private String openTime1;
+
+    /** AC220V输出2路自动断开时间 **/
+    private String openTime2;
+
+    /** AC220V输出3路自动断开时间 **/
+    private String openTime3;
+
+    /** DC24V自动断开时间 **/
+    private String openTime4;
+
+    /** DC12V1路自动断开时间 **/
+    private String openTime5;
+
+    /** DC12V2路自动断开时间 **/
+    private String openTime6;
+
+    private static final long serialVersionUID = 1L;
+}

+ 34 - 0
src/main/java/com/welampiot/vo/WifiVO.java

@@ -0,0 +1,34 @@
+package com.welampiot.vo;
+
+import com.welampiot.dto.WifiDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: WifiVO
+ * Package: com.welampiot.vo
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/4/11 - 18:57
+ * @Version: v1.0
+ */
+@Data
+public class WifiVO implements Serializable {
+
+    /** 云盒总数 **/
+    private Integer total;
+
+    /** 设备总数 **/
+    private Integer deviceCount;
+
+    /** 在线数 **/
+    private Integer onlineCount;
+
+    /** 云盒列表 **/
+    private List<WifiDTO> list;
+
+    private static final long serialVersionUID = 1L;
+}

+ 20 - 0
src/main/resources/mapper/WifiInfoLogMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.welampiot.dao.WifiInfoLogDao">
+
+    <select id="getWifiOutStatisticsByDTO" resultType="WifiInfoLogDTO">
+        select w.updatetime as updateTime,w.voltage,w.current,w.power,w.lna1_cur lna1Cur,w.lna1_vol lna1Vol,
+               w.lna2_cur lna2Cur,w.lna2_vol lna2Vol,w.lna3_cur lna3Cur,w.lna3_vol lna3Vol,w.voltageB,w.currentB,
+               w.powerB,w.voltageC,w.currentC,w.powerC,w.total_comA totalComA,w.total_comB totalComB,w.total_comC totalComC
+        from wifi_info_log w left join wifi on w.wifiid = wifi.id
+            left join lamp_pole lp on wifi.lamp_pole_id = lp.id
+        where w.wifiid = #{wifiId}
+            <if test="sectionList != null and !sectionList.isEmpty()">
+                and lp.sectionid in
+                <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                    #{dto}
+                </foreach>
+            </if>
+    </select>
+    
+</mapper>

+ 71 - 0
src/main/resources/mapper/WifiMapper.xml

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.welampiot.dao.WifiDao">
+
+    <select id="getWifiListByDTO" resultType="WifiDTO">
+        select w.id,w.model,w.lamp_pole_id lampPoleId,w.online,w.device_count deviceCount,w.num,s.timezone,
+               w.day_flow dayFlow,w.flow,w.status,w.version,w.fir_version firVersion,w.updatetime,w.net_type netType,
+               w.DI0,w.DO0,w.signal,w.install_date installDate,w.expiration_date expirationDate,lp.name lampPoleName
+        from wifi w left join lamp_pole lp on w.lamp_pole_id = lp.id
+            left join section s on lp.sectionid = s.id
+        where 1=1 <if test="sectionList != null and !sectionList.isEmpty()">
+                    and lp.sectionid in
+                    <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                        #{dto}
+                    </foreach>
+            </if>
+            <choose>
+                <when test="onlineState == 0">
+                    and w.online = 0
+                </when>
+                <when test="onlineState == 1">
+                    and w.online = 1
+                </when>
+            </choose>
+            <if test="keyword != null and keyword != ''">
+                and w.num like '%${keyword}%'
+            </if>
+            order by w.id desc
+            <if test="page >= 0 and count > 0">
+                limit #{page},#{count}
+            </if>
+    </select>
+
+    <select id="getWifiTotalBySectionList" resultType="Integer" parameterType="WifiDTO">
+        select count(w.id) as total from wifi w left join lamp_pole lp on w.lamp_pole_id = lp.id
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            where lp.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getWifiOnlineTotalBySectionList" resultType="Integer" parameterType="WifiDTO">
+        select count(w.id) as total from wifi w left join lamp_pole lp on w.lamp_pole_id = lp.id
+        where w.online = 1
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and lp.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getWifiOutInfoByDTO" resultType="WifiDTO">
+        select w.remark1,w.remark2,w.remark3,w.remark4,w.remark5,w.remark6,w.AC1,w.AC2,w.AC3,
+               w.lna1_status lna1Status,w.lna2_status lna2Status,w.lna3_status lna3Status,w.type1,
+               w.type2,w.type3,w.type4,w.type5,w.type6,w.close_time1 closeTime1,w.close_time2 closeTime2,
+               w.close_time3 closeTime3,w.close_time4 closeTime4,w.close_time5 closeTime5,w.close_time6 closeTime6,
+               w.open_time1 openTime1,w.open_time2 openTime2,w.open_time3 openTime3,w.open_time4 openTime4,w.open_time5 openTime5,w.open_time6 openTime6
+        from wifi w left join lamp_pole lp on w.lamp_pole_id = lp.id
+        where w.id = #{id}
+            <if test="sectionList != null and !sectionList.isEmpty()">
+                and lp.sectionid in
+                <foreach collection="sectionList" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+    </select>
+
+</mapper>