平台修改意见20251120-优化点位清单导出内容
This commit is contained in:
@ -16,6 +16,7 @@ import com.xzzn.common.core.controller.BaseController;
|
|||||||
import com.xzzn.common.core.domain.AjaxResult;
|
import com.xzzn.common.core.domain.AjaxResult;
|
||||||
import com.xzzn.common.enums.BusinessType;
|
import com.xzzn.common.enums.BusinessType;
|
||||||
import com.xzzn.ems.domain.EmsPointMatch;
|
import com.xzzn.ems.domain.EmsPointMatch;
|
||||||
|
import com.xzzn.ems.domain.vo.DevicePointMatchExportVo;
|
||||||
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
||||||
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
||||||
import com.xzzn.ems.service.IEmsPointMatchService;
|
import com.xzzn.ems.service.IEmsPointMatchService;
|
||||||
@ -43,8 +44,8 @@ public class EmsPointMatchController extends BaseController
|
|||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, EmsPointMatch emsPointMatch)
|
public void export(HttpServletResponse response, EmsPointMatch emsPointMatch)
|
||||||
{
|
{
|
||||||
List<EmsPointMatch> list = emsPointMatchService.selectEmsPointMatchList(emsPointMatch);
|
List<DevicePointMatchExportVo> list = emsPointMatchService.selectEmsPointMatchList(emsPointMatch);
|
||||||
ExcelUtil<EmsPointMatch> util = new ExcelUtil<EmsPointMatch>(EmsPointMatch.class);
|
ExcelUtil<DevicePointMatchExportVo> util = new ExcelUtil<>(DevicePointMatchExportVo.class);
|
||||||
util.exportExcel(response, list, "点位匹配数据");
|
util.exportExcel(response, list, "点位匹配数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,97 @@
|
|||||||
|
package com.xzzn.ems.domain.vo;
|
||||||
|
|
||||||
|
import com.xzzn.common.annotation.Excel;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位清单导出参数
|
||||||
|
*/
|
||||||
|
public class DevicePointMatchExportVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 点位匹配字段 */
|
||||||
|
@Excel(name = "点位匹配字段")
|
||||||
|
private String matchField;
|
||||||
|
|
||||||
|
/** 存储点位名称 */
|
||||||
|
@Excel(name = "点位匹配字段名称")
|
||||||
|
private String pointName;
|
||||||
|
|
||||||
|
/** 数据点位 */
|
||||||
|
@Excel(name = "数据点位")
|
||||||
|
private String dataPoint;
|
||||||
|
|
||||||
|
/** 数据点位名称 */
|
||||||
|
@Excel(name = "数据点位名称")
|
||||||
|
private String dataPointName;
|
||||||
|
|
||||||
|
/** 数据单位 */
|
||||||
|
@Excel(name = "数据单位")
|
||||||
|
private String dataUnit;
|
||||||
|
|
||||||
|
/** 是否告警点位 */
|
||||||
|
@Excel(name = "是否告警点位", readConverterExp = "0=否,1=是")
|
||||||
|
private String isAlarm;
|
||||||
|
|
||||||
|
/** 寄存器地址 */
|
||||||
|
@Excel(name = "寄存器地址")
|
||||||
|
private String ipAddress;
|
||||||
|
|
||||||
|
public String getPointName() {
|
||||||
|
return pointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointName(String pointName) {
|
||||||
|
this.pointName = pointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMatchField() {
|
||||||
|
return matchField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMatchField(String matchField) {
|
||||||
|
this.matchField = matchField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataPoint() {
|
||||||
|
return dataPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataPoint(String dataPoint) {
|
||||||
|
this.dataPoint = dataPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataPointName() {
|
||||||
|
return dataPointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataPointName(String dataPointName) {
|
||||||
|
this.dataPointName = dataPointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataUnit() {
|
||||||
|
return dataUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataUnit(String dataUnit) {
|
||||||
|
this.dataUnit = dataUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsAlarm() {
|
||||||
|
return isAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAlarm(String isAlarm) {
|
||||||
|
this.isAlarm = isAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpAddress() {
|
||||||
|
return ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpAddress(String ipAddress) {
|
||||||
|
this.ipAddress = ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -14,6 +14,10 @@ public class DevicePointMatchVo implements Serializable {
|
|||||||
@Excel(name = "点位匹配字段")
|
@Excel(name = "点位匹配字段")
|
||||||
private String matchField;
|
private String matchField;
|
||||||
|
|
||||||
|
/** 存储点位名称 */
|
||||||
|
@Excel(name = "点位匹配字段名称")
|
||||||
|
private String pointName;
|
||||||
|
|
||||||
/** 数据点位 */
|
/** 数据点位 */
|
||||||
@Excel(name = "数据点位")
|
@Excel(name = "数据点位")
|
||||||
private String dataPoint;
|
private String dataPoint;
|
||||||
@ -29,10 +33,6 @@ public class DevicePointMatchVo implements Serializable {
|
|||||||
/** 是否告警点位 */
|
/** 是否告警点位 */
|
||||||
@Excel(name = "是否告警点位", readConverterExp = "0=否,1=是")
|
@Excel(name = "是否告警点位", readConverterExp = "0=否,1=是")
|
||||||
private String isAlarm;
|
private String isAlarm;
|
||||||
//
|
|
||||||
// /** 数据点位来源设备 */
|
|
||||||
// @Excel(name = "数据点位来源设备")
|
|
||||||
// private String dataDevice;
|
|
||||||
|
|
||||||
/** 寄存器地址 */
|
/** 寄存器地址 */
|
||||||
@Excel(name = "寄存器地址")
|
@Excel(name = "寄存器地址")
|
||||||
@ -42,6 +42,14 @@ public class DevicePointMatchVo implements Serializable {
|
|||||||
@Excel(name = "错误信息")
|
@Excel(name = "错误信息")
|
||||||
private String errorMsg;
|
private String errorMsg;
|
||||||
|
|
||||||
|
public String getPointName() {
|
||||||
|
return pointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointName(String pointName) {
|
||||||
|
this.pointName = pointName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getMatchField() {
|
public String getMatchField() {
|
||||||
return matchField;
|
return matchField;
|
||||||
}
|
}
|
||||||
@ -74,15 +82,6 @@ public class DevicePointMatchVo implements Serializable {
|
|||||||
this.dataUnit = dataUnit;
|
this.dataUnit = dataUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public String getDataDevice() {
|
|
||||||
// return dataDevice;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setDataDevice(String dataDevice) {
|
|
||||||
// this.dataDevice = dataDevice;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
public String getIsAlarm() {
|
public String getIsAlarm() {
|
||||||
return isAlarm;
|
return isAlarm;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.xzzn.ems.domain.EmsPointMatch;
|
import com.xzzn.ems.domain.EmsPointMatch;
|
||||||
|
import com.xzzn.ems.domain.vo.DevicePointMatchExportVo;
|
||||||
|
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
||||||
import com.xzzn.ems.domain.vo.GeneralQueryDataVo;
|
import com.xzzn.ems.domain.vo.GeneralQueryDataVo;
|
||||||
import com.xzzn.ems.domain.vo.PointQueryResponse;
|
import com.xzzn.ems.domain.vo.PointQueryResponse;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -146,4 +148,6 @@ public interface EmsPointMatchMapper
|
|||||||
EmsPointMatch getOnePointMatch(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory, @Param("dataPoint") String dataPoint);
|
EmsPointMatch getOnePointMatch(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory, @Param("dataPoint") String dataPoint);
|
||||||
|
|
||||||
List<EmsPointMatch> getDevicePointMatchList(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory);
|
List<EmsPointMatch> getDevicePointMatchList(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory);
|
||||||
|
|
||||||
|
List<DevicePointMatchExportVo> selectEmsPointMatchExportList(EmsPointMatch emsPointMatch);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.xzzn.ems.service;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.xzzn.ems.domain.EmsPointMatch;
|
import com.xzzn.ems.domain.EmsPointMatch;
|
||||||
|
import com.xzzn.ems.domain.vo.DevicePointMatchExportVo;
|
||||||
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
||||||
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ public interface IEmsPointMatchService
|
|||||||
* @param emsPointMatch 点位匹配
|
* @param emsPointMatch 点位匹配
|
||||||
* @return 点位匹配集合
|
* @return 点位匹配集合
|
||||||
*/
|
*/
|
||||||
public List<EmsPointMatch> selectEmsPointMatchList(EmsPointMatch emsPointMatch);
|
public List<DevicePointMatchExportVo> selectEmsPointMatchList(EmsPointMatch emsPointMatch);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import org.springframework.util.CollectionUtils;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.xzzn.common.utils.poi.ExcelUtil;
|
import com.xzzn.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xzzn.ems.domain.vo.DevicePointMatchExportVo;
|
||||||
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
import com.xzzn.ems.domain.vo.DevicePointMatchVo;
|
||||||
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
import com.xzzn.ems.domain.vo.ImportPointDataRequest;
|
||||||
import com.xzzn.ems.enums.DeviceMatchTable;
|
import com.xzzn.ems.enums.DeviceMatchTable;
|
||||||
@ -62,9 +63,9 @@ public class EmsPointMatchServiceImpl implements IEmsPointMatchService
|
|||||||
* @return 点位匹配
|
* @return 点位匹配
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EmsPointMatch> selectEmsPointMatchList(EmsPointMatch emsPointMatch)
|
public List<DevicePointMatchExportVo> selectEmsPointMatchList(EmsPointMatch emsPointMatch)
|
||||||
{
|
{
|
||||||
return emsPointMatchMapper.selectEmsPointMatchList(emsPointMatch);
|
return emsPointMatchMapper.selectEmsPointMatchExportList(emsPointMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -196,9 +197,6 @@ public class EmsPointMatchServiceImpl implements IEmsPointMatchService
|
|||||||
if (StringUtils.isBlank(pointMatch.getDataPointName())) {
|
if (StringUtils.isBlank(pointMatch.getDataPointName())) {
|
||||||
errorMsg.append("数据点位名称不能为空;");
|
errorMsg.append("数据点位名称不能为空;");
|
||||||
}
|
}
|
||||||
// if (StringUtils.isBlank(pointMatch.getDataDevice())) {
|
|
||||||
// errorMsg.append("数据点位来源设备不能为空;");
|
|
||||||
// }
|
|
||||||
if (errorMsg.length() > 0) {
|
if (errorMsg.length() > 0) {
|
||||||
pointMatch.setErrorMsg(errorMsg.toString());
|
pointMatch.setErrorMsg(errorMsg.toString());
|
||||||
errorList.add(pointMatch);
|
errorList.add(pointMatch);
|
||||||
|
|||||||
@ -450,4 +450,22 @@
|
|||||||
where site_id = #{siteId}
|
where site_id = #{siteId}
|
||||||
and device_category = #{deviceCategory}
|
and device_category = #{deviceCategory}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEmsPointMatchExportList" parameterType="EmsPointMatch" resultType="com.xzzn.ems.domain.vo.DevicePointMatchExportVo">
|
||||||
|
select
|
||||||
|
point_name as pointName,
|
||||||
|
match_field as matchField,
|
||||||
|
data_point as dataPoint,
|
||||||
|
data_point_name as dataPointName,
|
||||||
|
data_unit as dataUnit,
|
||||||
|
is_alarm as isAlarm,
|
||||||
|
ip_address as ipAddress
|
||||||
|
from
|
||||||
|
ems_point_match
|
||||||
|
<where>
|
||||||
|
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||||
|
<if test="deviceCategory != null and deviceCategory != ''"> and device_category = #{deviceCategory}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user