辽宁版本台账管理调整
This commit is contained in:
@@ -0,0 +1,83 @@
|
|||||||
|
package com.njcn.device.pq.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站扩展信息VO
|
||||||
|
*
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2026-07-29
|
||||||
|
* @Description: 变电站扩展信息,含地市和名称
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PqSubstationExpendVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(变电站ID)
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负载容量
|
||||||
|
*/
|
||||||
|
private BigDecimal loadCap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最高电压等级
|
||||||
|
*/
|
||||||
|
private Integer maxVoltageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投运日期
|
||||||
|
*/
|
||||||
|
private Date operateDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态
|
||||||
|
*/
|
||||||
|
private Integer operateState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属业主
|
||||||
|
*/
|
||||||
|
private String owner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phoneNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场站类型
|
||||||
|
*/
|
||||||
|
private String plantType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告附件地址
|
||||||
|
*/
|
||||||
|
private String reportUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<?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.njcn.device.pq.mapper.PqSubstationExpendMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.device.pq.pojo.po.PqSubstationExpend">
|
||||||
|
<id column="ID" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="LOAD_CAP" jdbcType="DECIMAL" property="loadCap" />
|
||||||
|
<result column="ADDRESS" jdbcType="VARCHAR" property="address" />
|
||||||
|
<result column="OPERATE_DATE" jdbcType="TIMESTAMP" property="operateDate" />
|
||||||
|
<result column="OPERATE_STATE" jdbcType="INTEGER" property="operateState" />
|
||||||
|
<result column="OWNER" jdbcType="VARCHAR" property="owner" />
|
||||||
|
<result column="PHONE_NO" jdbcType="VARCHAR" property="phoneNo" />
|
||||||
|
<result column="PLANT_TYPE" jdbcType="VARCHAR" property="plantType" />
|
||||||
|
<result column="REPORT_URL" jdbcType="VARCHAR" property="reportUrl" />
|
||||||
|
<result column="SORT" jdbcType="INTEGER" property="sort" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="VOResultMap" type="com.njcn.device.pq.pojo.vo.PqSubstationExpendVO">
|
||||||
|
<id column="ID" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="LOAD_CAP" jdbcType="DECIMAL" property="loadCap" />
|
||||||
|
<result column="ADDRESS" jdbcType="VARCHAR" property="address" />
|
||||||
|
<result column="OPERATE_DATE" jdbcType="TIMESTAMP" property="operateDate" />
|
||||||
|
<result column="OPERATE_STATE" jdbcType="INTEGER" property="operateState" />
|
||||||
|
<result column="OWNER" jdbcType="VARCHAR" property="owner" />
|
||||||
|
<result column="PHONE_NO" jdbcType="VARCHAR" property="phoneNo" />
|
||||||
|
<result column="PLANT_TYPE" jdbcType="VARCHAR" property="plantType" />
|
||||||
|
<result column="REPORT_URL" jdbcType="VARCHAR" property="reportUrl" />
|
||||||
|
<result column="SORT" jdbcType="INTEGER" property="sort" />
|
||||||
|
<result column="CITY" jdbcType="VARCHAR" property="city" />
|
||||||
|
<result column="NAME" jdbcType="VARCHAR" property="name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="joinClause">
|
||||||
|
INNER JOIN pq_substation s ON e.ID = s.id
|
||||||
|
INNER JOIN pq_line l3 ON s.id = l3.id AND l3.level = 3 AND l3.state = 1
|
||||||
|
LEFT JOIN pq_line l2 ON l3.pid = l2.id AND l2.state = 1
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="selectColumns">
|
||||||
|
e.*,
|
||||||
|
l2.name AS city,
|
||||||
|
l3.name AS name,
|
||||||
|
s.scale,
|
||||||
|
s.lng,
|
||||||
|
s.lat
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="whereClause">
|
||||||
|
<if test="param.id != null and param.id != ''">
|
||||||
|
AND e.ID = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.name != null and param.name != ''">
|
||||||
|
AND l3.name LIKE '%' || #{param.name} || '%'
|
||||||
|
</if>
|
||||||
|
<if test="param.loadCap != null">
|
||||||
|
AND e.LOAD_CAP = #{param.loadCap}
|
||||||
|
</if>
|
||||||
|
<if test="param.address != null and param.address != ''">
|
||||||
|
AND e.ADDRESS LIKE '%' || #{param.address} || '%'
|
||||||
|
</if>
|
||||||
|
<if test="param.maxVoltageType != null">
|
||||||
|
AND e.MAX_VOLTAGE_TYPE = #{param.maxVoltageType}
|
||||||
|
</if>
|
||||||
|
<if test="param.operateDate != null">
|
||||||
|
AND e.OPERATE_DATE = #{param.operateDate}
|
||||||
|
</if>
|
||||||
|
<if test="param.operateState != null">
|
||||||
|
AND e.OPERATE_STATE = #{param.operateState}
|
||||||
|
</if>
|
||||||
|
<if test="param.owner != null and param.owner != ''">
|
||||||
|
AND e.OWNER LIKE '%' || #{param.owner} || '%'
|
||||||
|
</if>
|
||||||
|
<if test="param.phoneNo != null and param.phoneNo != ''">
|
||||||
|
AND e.PHONE_NO LIKE '%' || #{param.phoneNo} || '%'
|
||||||
|
</if>
|
||||||
|
<if test="param.plantType != null and param.plantType != ''">
|
||||||
|
AND e.PLANT_TYPE = #{param.plantType}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="pageJoin" resultMap="VOResultMap">
|
||||||
|
SELECT <include refid="selectColumns" />
|
||||||
|
FROM PQ_SUBSTATION_EXPEND e
|
||||||
|
<include refid="joinClause" />
|
||||||
|
WHERE 1=1
|
||||||
|
<include refid="whereClause" />
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIdVO" resultMap="VOResultMap">
|
||||||
|
SELECT <include refid="selectColumns" />
|
||||||
|
FROM PQ_SUBSTATION_EXPEND e
|
||||||
|
<include refid="joinClause" />
|
||||||
|
WHERE e.ID = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="listVO" resultMap="VOResultMap">
|
||||||
|
SELECT <include refid="selectColumns" />
|
||||||
|
FROM PQ_SUBSTATION_EXPEND e
|
||||||
|
<include refid="joinClause" />
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user