物联设备BUG处理
This commit is contained in:
parent
8fdd37fdac
commit
9ad0b7da2e
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.modules.manager.entity.DeviceBindLog;
|
import com.nu.modules.manager.entity.DeviceBindLog;
|
||||||
import com.nu.modules.manager.entity.DeviceManager;
|
import com.nu.modules.manager.entity.DeviceManager;
|
||||||
|
import com.nu.modules.manager.entity.DeviceManagerHz;
|
||||||
import com.nu.modules.manager.service.IDeviceManagerService;
|
import com.nu.modules.manager.service.IDeviceManagerService;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
||||||
|
|
@ -177,49 +178,33 @@ public class DeviceManagerController extends JeecgController<DeviceManager, IDev
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, DeviceManager DeviceManager) {
|
public ModelAndView exportXls(HttpServletRequest request, DeviceManager DeviceManager) {
|
||||||
|
return super.exportXls(request, DeviceManager, DeviceManager.class, "物联设备清单");
|
||||||
// Step.1 组装查询条件
|
|
||||||
QueryWrapper<DeviceManager> queryWrapper = QueryGenerator.initQueryWrapper(DeviceManager, request.getParameterMap());
|
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
|
|
||||||
// 过滤选中数据
|
|
||||||
String selections = request.getParameter("selections");
|
|
||||||
if (oConvertUtils.isNotEmpty(selections)) {
|
|
||||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
|
||||||
queryWrapper.in("id",selectionList);
|
|
||||||
}
|
|
||||||
// Step.2 获取导出数据
|
|
||||||
List<DeviceManager> exportList = service.list(queryWrapper);
|
|
||||||
|
|
||||||
// Step.3 AutoPoi 导出Excel
|
|
||||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
|
||||||
//此处设置的filename无效 ,前端会重更新设置一下
|
|
||||||
mv.addObject(NormalExcelConstants.FILE_NAME, "物联设备清单");
|
|
||||||
mv.addObject(NormalExcelConstants.CLASS, DeviceManager.class);
|
|
||||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
|
||||||
ExportParams exportParams=new ExportParams("物联设备清单", "导出人:" + sysUser.getRealname(), "物联设备清单");
|
|
||||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
|
||||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
|
||||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
|
||||||
|
|
||||||
Map<String, Integer> result = new HashMap<>();
|
|
||||||
for (DeviceManager device : exportList) {
|
|
||||||
String name = device.getDeviceName();
|
|
||||||
result.put(name, result.getOrDefault(name, 0) + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Map.Entry<String, Integer> entry : result.entrySet()) {
|
|
||||||
String deviceName = entry.getKey();
|
|
||||||
Integer count = entry.getValue();
|
|
||||||
DeviceManager dm = new DeviceManager();
|
|
||||||
dm.setDeviceName(deviceName + ", 数量: " + count);
|
|
||||||
exportList.add(dm);
|
|
||||||
}
|
|
||||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
|
||||||
return mv;
|
|
||||||
// return super.exportXls(request, DeviceManager, DeviceManager.class, "物联设备清单");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param deviceManager
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportDeviceHzExcel")
|
||||||
|
public ModelAndView exportDeviceHzExcel(HttpServletRequest request, DeviceManagerHz deviceManager) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
List<DeviceManagerHz> exportList = service.exportDeviceHzExcel(deviceManager);
|
||||||
|
// Step.3 AutoPoi 导出Excel
|
||||||
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
|
//此处设置的filename无效 ,前端会重更新设置一下
|
||||||
|
mv.addObject(NormalExcelConstants.FILE_NAME, "物联设备清单汇总");
|
||||||
|
mv.addObject(NormalExcelConstants.CLASS, DeviceManagerHz.class);
|
||||||
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||||
|
ExportParams exportParams=new ExportParams("物联设备清单汇总", "导出人:" + sysUser.getRealname(), "物联设备清单汇总");
|
||||||
|
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||||
|
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||||
|
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||||
|
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ public class DeviceManager implements Serializable {
|
||||||
private String nuId;
|
private String nuId;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String nuName;
|
private String nuName;
|
||||||
|
@Excel(name = "批次", width = 15)
|
||||||
private String batchNo;//批次号
|
private String batchNo;//批次号
|
||||||
@Excel(name = "设备名称", width = 15)
|
@Excel(name = "设备名称", width = 15)
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.nu.modules.manager.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("nu_iot_device_preview")
|
||||||
|
public class DeviceManagerHz implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**ID*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private Integer id;
|
||||||
|
private String nuId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nuName;
|
||||||
|
@Excel(name = "批次", width = 15)
|
||||||
|
private String batchNo;//批次号
|
||||||
|
@Excel(name = "设备名称", width = 15)
|
||||||
|
private String deviceName;
|
||||||
|
@Excel(name = "设备类型", width = 15, dicCode = "tplink_device_type")
|
||||||
|
@Dict(dicCode = "tplink_device_type")
|
||||||
|
private String deviceType;
|
||||||
|
@Excel(name = "规格型号", width = 15)
|
||||||
|
private String deviceModel;
|
||||||
|
@Excel(name = "生产厂家", width = 15)
|
||||||
|
private String factory;
|
||||||
|
@Excel(name = "设备维度", width = 15)
|
||||||
|
private String dimension;
|
||||||
|
private String sn;
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
private String remarks;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String onlineStatus;//在线状态
|
||||||
|
private String deviceStatus;//设备状态
|
||||||
|
private Integer ywId;//运维ID
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(name = "数量", width = 15)
|
||||||
|
private Integer hz;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.modules.manager.entity.DeviceBindLog;
|
import com.nu.modules.manager.entity.DeviceBindLog;
|
||||||
import com.nu.modules.manager.entity.DeviceManager;
|
import com.nu.modules.manager.entity.DeviceManager;
|
||||||
|
import com.nu.modules.manager.entity.DeviceManagerHz;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
||||||
import com.nu.modules.tq.water.entity.WaterMeter;
|
import com.nu.modules.tq.water.entity.WaterMeter;
|
||||||
|
|
@ -26,6 +27,7 @@ public interface DeviceManagerMapper extends BaseMapper<DeviceManager> {
|
||||||
IPage<DeviceBindLog> findBingLogPage(Page<DeviceBindLog> page, @Param("params") DeviceBindLog deviceBindLog);
|
IPage<DeviceBindLog> findBingLogPage(Page<DeviceBindLog> page, @Param("params") DeviceBindLog deviceBindLog);
|
||||||
void addLog(DeviceBindLog deviceBindLog);
|
void addLog(DeviceBindLog deviceBindLog);
|
||||||
List<DeviceManager> queryNuList(DeviceManager deviceManager);
|
List<DeviceManager> queryNuList(DeviceManager deviceManager);
|
||||||
|
List<DeviceManagerHz> exportDeviceHzExcel(DeviceManagerHz deviceManager);
|
||||||
|
|
||||||
List<CameraInfo> cameraInfoList(DeviceManager deviceManager);
|
List<CameraInfo> cameraInfoList(DeviceManager deviceManager);
|
||||||
IPage<CameraInfo> findCameraInfoUnbindPage(Page<CameraInfo> page, @Param("params") DeviceManager deviceManager);
|
IPage<CameraInfo> findCameraInfoUnbindPage(Page<CameraInfo> page, @Param("params") DeviceManager deviceManager);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<select id="findPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
<select id="findPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
|
a.batch_no,
|
||||||
a.nu_id,
|
a.nu_id,
|
||||||
c.nu_name,
|
c.nu_name,
|
||||||
a.dimension,
|
a.dimension,
|
||||||
|
|
@ -54,12 +55,13 @@
|
||||||
<if test="params.deviceType != null and params.deviceType != ''">
|
<if test="params.deviceType != null and params.deviceType != ''">
|
||||||
AND a.device_type = #{params.deviceType}
|
AND a.device_type = #{params.deviceType}
|
||||||
</if>
|
</if>
|
||||||
order by a.dimension,a.device_type,a.device_model,a.sn
|
order by a.batch_no,a.dimension,a.device_type,a.device_model,a.sn
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findAllPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
<select id="findAllPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
|
a.batch_no,
|
||||||
a.dimension,
|
a.dimension,
|
||||||
a.device_name,
|
a.device_name,
|
||||||
a.device_type,
|
a.device_type,
|
||||||
|
|
@ -79,12 +81,13 @@
|
||||||
<if test="params.deviceType != null and params.deviceType != ''">
|
<if test="params.deviceType != null and params.deviceType != ''">
|
||||||
AND a.device_type = #{params.deviceType}
|
AND a.device_type = #{params.deviceType}
|
||||||
</if>
|
</if>
|
||||||
order by a.dimension,a.device_type,a.device_model,a.sn
|
order by a.batch_no,a.dimension,a.device_type,a.device_model,a.sn
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findBySn" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
<select id="findBySn" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.manager.entity.DeviceManager">
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
|
a.batch_no,
|
||||||
a.dimension,
|
a.dimension,
|
||||||
a.device_name,
|
a.device_name,
|
||||||
a.device_type,
|
a.device_type,
|
||||||
|
|
@ -112,7 +115,8 @@
|
||||||
sn,
|
sn,
|
||||||
factory,
|
factory,
|
||||||
opt_date,
|
opt_date,
|
||||||
opt_type
|
opt_type,
|
||||||
|
remarks
|
||||||
from nu_iot_device_bind_log
|
from nu_iot_device_bind_log
|
||||||
<where>
|
<where>
|
||||||
<if test="params.dimension != null and params.dimension != ''">
|
<if test="params.dimension != null and params.dimension != ''">
|
||||||
|
|
@ -163,8 +167,16 @@
|
||||||
order by nu_id asc
|
order by nu_id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="exportDeviceHzExcel" parameterType="com.nu.modules.manager.entity.DeviceManagerHz" resultType="com.nu.modules.manager.entity.DeviceManagerHz">
|
||||||
|
select batch_no,device_name,device_type,device_model,factory,dimension,count(*) as hz
|
||||||
|
from nu_iot_device_preview
|
||||||
|
where ifnull(device_status,'') != '损坏'
|
||||||
|
group by batch_no,device_name,device_type,device_model,factory,dimension
|
||||||
|
order by batch_no,dimension,factory,device_type,device_model,device_name
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="cameraInfoList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="cameraInfoList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.device_status,b.device_index
|
select a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.device_status,b.device_index
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
inner join nu_iot_tplink_camera b on a.sn = b.mac
|
inner join nu_iot_tplink_camera b on a.sn = b.mac
|
||||||
where a.nu_id = #{nuId}
|
where a.nu_id = #{nuId}
|
||||||
|
|
@ -172,7 +184,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findCameraInfoUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="findCameraInfoUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.id,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.device_status,b.device_index
|
select a.id,a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.device_status,b.device_index
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
left join nu_iot_tplink_camera b on a.sn = b.mac
|
left join nu_iot_tplink_camera b on a.sn = b.mac
|
||||||
where a.nu_id is null
|
where a.nu_id is null
|
||||||
|
|
@ -181,7 +193,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="waterMeterList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.water.entity.WaterMeter">
|
<select id="waterMeterList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.water.entity.WaterMeter">
|
||||||
select a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.cid,b.address,b.water_value
|
select a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.cid,b.address,b.water_value
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
inner join nu_iot_tq_water_meter b on a.sn = b.cid
|
inner join nu_iot_tq_water_meter b on a.sn = b.cid
|
||||||
where a.nu_id = #{nuId}
|
where a.nu_id = #{nuId}
|
||||||
|
|
@ -189,7 +201,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findWaterMeterUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.water.entity.WaterMeter">
|
<select id="findWaterMeterUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.water.entity.WaterMeter">
|
||||||
select a.id,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.cid,b.address,b.water_value
|
select a.id,a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.cid,b.address,b.water_value
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
left join nu_iot_tq_water_meter b on a.sn = b.cid
|
left join nu_iot_tq_water_meter b on a.sn = b.cid
|
||||||
where a.nu_id is null
|
where a.nu_id is null
|
||||||
|
|
@ -198,7 +210,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="electricityMeterList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.electricity.entity.ElectricityMeter">
|
<select id="electricityMeterList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.electricity.entity.ElectricityMeter">
|
||||||
select a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.ele_value
|
select a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.ele_value
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
inner join nu_iot_ds_electricity_meter b on a.sn = b.sn
|
inner join nu_iot_ds_electricity_meter b on a.sn = b.sn
|
||||||
where a.nu_id = #{nuId}
|
where a.nu_id = #{nuId}
|
||||||
|
|
@ -206,7 +218,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findElectricityMeterUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.electricity.entity.ElectricityMeter">
|
<select id="findElectricityMeterUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.tq.electricity.entity.ElectricityMeter">
|
||||||
select a.id,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.ele_value
|
select a.id,a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.relay_state,b.ele_value
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
left join nu_iot_ds_electricity_meter b on a.sn = b.sn
|
left join nu_iot_ds_electricity_meter b on a.sn = b.sn
|
||||||
where a.nu_id is null
|
where a.nu_id is null
|
||||||
|
|
@ -215,7 +227,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="humidDeviceList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.yiweilian.humid.entity.HumidDevice">
|
<select id="humidDeviceList" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.yiweilian.humid.entity.HumidDevice">
|
||||||
select a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.status,b.temperature,b.humidity
|
select a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.status,b.temperature,b.humidity
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
inner join nu_iot_yiweilian_humid_device b on a.sn = b.sn
|
inner join nu_iot_yiweilian_humid_device b on a.sn = b.sn
|
||||||
where a.nu_id = #{nuId}
|
where a.nu_id = #{nuId}
|
||||||
|
|
@ -223,7 +235,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findHumidDeviceUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.yiweilian.humid.entity.HumidDevice">
|
<select id="findHumidDeviceUnbindPage" parameterType="com.nu.modules.manager.entity.DeviceManager" resultType="com.nu.modules.yiweilian.humid.entity.HumidDevice">
|
||||||
select a.id,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.status,b.temperature,b.humidity
|
select a.id,a.batch_no,a.nu_id,a.dimension,a.sn,a.device_type,a.device_model,a.device_status as maintainStatus,b.status,b.temperature,b.humidity
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
left join nu_iot_yiweilian_humid_device b on a.sn = b.sn
|
left join nu_iot_yiweilian_humid_device b on a.sn = b.sn
|
||||||
where a.nu_id is null
|
where a.nu_id is null
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.nu.modules.manager.entity.DeviceBindLog;
|
import com.nu.modules.manager.entity.DeviceBindLog;
|
||||||
import com.nu.modules.manager.entity.DeviceManager;
|
import com.nu.modules.manager.entity.DeviceManager;
|
||||||
|
import com.nu.modules.manager.entity.DeviceManagerHz;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
import com.nu.modules.tq.electricity.entity.ElectricityMeter;
|
||||||
import com.nu.modules.tq.water.entity.WaterMeter;
|
import com.nu.modules.tq.water.entity.WaterMeter;
|
||||||
|
|
@ -27,6 +28,7 @@ public interface IDeviceManagerService extends IService<DeviceManager> {
|
||||||
Result<String> updateManager(DeviceManager deviceManager);
|
Result<String> updateManager(DeviceManager deviceManager);
|
||||||
void addLog(DeviceBindLog deviceBindLog);
|
void addLog(DeviceBindLog deviceBindLog);
|
||||||
List<DeviceManager> queryNuList(DeviceManager deviceManager);
|
List<DeviceManager> queryNuList(DeviceManager deviceManager);
|
||||||
|
List<DeviceManagerHz> exportDeviceHzExcel(DeviceManagerHz deviceManager);
|
||||||
|
|
||||||
Map<String, Object> bindedList(DeviceManager deviceManager);
|
Map<String, Object> bindedList(DeviceManager deviceManager);
|
||||||
IPage<CameraInfo> findCameraInfoUnbindPage(Page<CameraInfo> page, DeviceManager deviceManager);
|
IPage<CameraInfo> findCameraInfoUnbindPage(Page<CameraInfo> page, DeviceManager deviceManager);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.nu.dto.DevicePreviewMqDto;
|
||||||
import com.nu.dto.ElderTagTypeMQDto;
|
import com.nu.dto.ElderTagTypeMQDto;
|
||||||
import com.nu.modules.manager.entity.DeviceBindLog;
|
import com.nu.modules.manager.entity.DeviceBindLog;
|
||||||
import com.nu.modules.manager.entity.DeviceManager;
|
import com.nu.modules.manager.entity.DeviceManager;
|
||||||
|
import com.nu.modules.manager.entity.DeviceManagerHz;
|
||||||
import com.nu.modules.manager.mapper.DeviceManagerMapper;
|
import com.nu.modules.manager.mapper.DeviceManagerMapper;
|
||||||
import com.nu.modules.manager.service.IDeviceManagerService;
|
import com.nu.modules.manager.service.IDeviceManagerService;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
|
|
@ -95,6 +96,11 @@ public class DeviceManagerServiceImpl extends ServiceImpl<DeviceManagerMapper, D
|
||||||
return baseMapper.queryNuList(deviceManager);
|
return baseMapper.queryNuList(deviceManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceManagerHz> exportDeviceHzExcel(DeviceManagerHz deviceManager){
|
||||||
|
return baseMapper.exportDeviceHzExcel(deviceManager);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> bindedList(DeviceManager deviceManager) {
|
public Map<String, Object> bindedList(DeviceManager deviceManager) {
|
||||||
List<CameraInfo> cameraInfoList = baseMapper.cameraInfoList(deviceManager);
|
List<CameraInfo> cameraInfoList = baseMapper.cameraInfoList(deviceManager);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue