Commit 16c4a660 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.开发间开优化结果统计功能,创建间开优化效果统计表,生成对应代码;
2.修改15天,10天,3天,1天间开优化功能,修改代码结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 8d54e588
......@@ -7,7 +7,7 @@ import lombok.Data;
import java.io.Serializable;
@Data
@TableName("sys_area")
@TableName("SYS_AREA")
public class SysAreaEnt implements Serializable {
@TableField
private Integer id;
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_auth_ou_scope")
@TableName("SYS_AUTH_OU_SCOPE")
public class SysAuthOuScopeEnt implements Serializable {
@XText("范围授权id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -10,7 +10,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_dictionary")
@TableName("SYS_DICTIONARY")
public class SysDictionaryEnt implements Serializable, ICommonEnt {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_menu")
@TableName("SYS_MENU")
public class SysMenuEnt implements Serializable {
@XText("菜单ID(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_organization_dictionary")
@TableName("SYS_ORGANIZATION_DICTIONARY")
public class SysOrganizationDictionaryEnt implements Serializable {
@XText("组织机构字典id(主键)")
@TableId(type = IdType.AUTO)
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("sys_organization")
@TableName("SYS_ORGANIZATION")
public class SysOrganizationEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_organization_property")
@TableName("SYS_ORGANIZATION_PROPERTY")
public class SysOrganizationPropertyEnt implements Serializable {
@XText("组织机构属性id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_organization_rel")
@TableName("SYS_ORGANIZATION_REL")
public class SysOrganizationRelEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_role")
@TableName("SYS_ROLE")
public class SysRoleEnt implements Serializable {
@XText("角色ID(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_role_menu_auth")
@TableName("SYS_ROLE_MENU_AUTH")
public class SysRoleMenuAuthEnt implements Serializable {
@XText("角色菜单授权id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user")
@TableName("SYS_USER")
public class SysUserEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.util.Date;
@Data
@TableName("sys_user_login_log")
@TableName("SYS_USER_LOGIN_LOG")
public class SysUserLoginLogEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user_organization_rel")
@TableName("SYS_USER_ORGANIZATION_REL")
public class SysUserOrganizationRelEnt implements Serializable {
@XText("用户所属组织机构关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user_role_rel")
@TableName("SYS_USER_ROLE_REL")
public class SysUserRoleRelEnt implements Serializable {
@XText("用户角色关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
......
......@@ -19,14 +19,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_area
from SYS_AREA
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_area
from SYS_AREA
where
id=#{id}
</select>
......@@ -34,7 +34,7 @@
<select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_area
from SYS_AREA
WHERE
id &lt;&gt; 120
ORDER BY
......@@ -46,14 +46,14 @@
WITH RECURSIVE area_tree (n, id, parent_id) AS (SELECT 0 AS n,
id,
parent_id
FROM sys_area
FROM SYS_AREA
WHERE parent_id = 20
UNION ALL
SELECT n + 1,
a.id,
a.parent_id
FROM area_tree AS t
JOIN sys_area AS a ON a.parent_id = t.id)
JOIN SYS_AREA AS a ON a.parent_id = t.id)
SELECT t.id,
t.parent_id,
t.n AS lev,
......@@ -61,7 +61,7 @@
a.city_code,
a.province_code
FROM area_tree t,
sys_area a
SYS_AREA a
WHERE t.id = a.id
ORDER BY t.parent_id,
t.id
......@@ -69,8 +69,8 @@
<select id="selectSysAreaPath" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
SELECT CONCAT(b.`name`, '/', c.`name`) AS `name`
FROM sys_area b
JOIN sys_area c ON b.id = c.parent_id
FROM SYS_AREA b
JOIN SYS_AREA c ON b.id = c.parent_id
WHERE b.lev = 1
AND c.lev = 2
AND (b.id = #{id} OR c.id = #{id}) LIMIT 1
......@@ -86,8 +86,8 @@
a.`name` AS city,
a.city_code,
a.id
FROM sys_area p
LEFT JOIN sys_area a ON p.id = a.parent_id
FROM SYS_AREA p
LEFT JOIN SYS_AREA a ON p.id = a.parent_id
WHERE p.`name` IN
<foreach collection="list" item="item" open="(" close=")" separator=",">
#{item}
......
......@@ -33,13 +33,13 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_auth_ou_scope
from SYS_AUTH_OU_SCOPE
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
select c.id,c.ou_id,c.menu_id,a.ou_name,b.menu_name,c.create_by_name,c.create_time
from sys_organization a ,sys_menu b,sys_auth_ou_scope c
from SYS_ORGANIZATION a ,SYS_MENU b,SYS_AUTH_OU_SCOPE c
where a.id =c.ou_id and b.id = c.menu_id
and c.user_id = #{userId}
<if test="menuName!=null and menuName!='' ">
......@@ -61,8 +61,8 @@
sau.modify_by_id,
sau.modify_by_name,
sau.modify_time,sm.menu_name
from sys_auth_ou_scope sau
left join sys_menu sm on sm.id=sau.menu_id
from SYS_AUTH_OU_SCOPE sau
left join SYS_MENU sm on sm.id=sau.menu_id
where
<if test="userGroupId!=null and userGroupId!='' ">
and sau.user_group_id =#{userGroupId}
......@@ -73,9 +73,9 @@
select ou_id, ou_name
from (
(select distinct ou_id
from sys_auth_ou_scope
from SYS_AUTH_OU_SCOPE
where user_id = #{userId}) saos
left join sys_organization so on saos.ou_id = so.id and so.is_deleted = 1
left join SYS_ORGANIZATION so on saos.ou_id = so.id and so.is_deleted = 1
)
</select>
......@@ -86,7 +86,7 @@
from (
(
select distinct ou_id
from sys_auth_ou_scope
from SYS_AUTH_OU_SCOPE
<where>
<if test="userId != null and userId != ''">
and user_id = #{userId}
......@@ -96,7 +96,7 @@
</if>
</where>
) saos
left join sys_organization so on saos.ou_id=so.id and so.is_deleted =1
left join SYS_ORGANIZATION so on saos.ou_id=so.id and so.is_deleted =1
)
</select>
<select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
......@@ -111,11 +111,11 @@
su.iam_login_name,
so.id,
so.ou_name
from sys_auth_ou_scope saos,
sys_user su,
sys_organization so,
sys_menu sm,
sys_user_organization_rel suor
from SYS_AUTH_OU_SCOPE saos,
SYS_USER su,
SYS_ORGANIZATION so,
SYS_MENU sm,
SYS_USER_ORGANIZATION_REL suor
where saos.user_id = su.id
and suor.ou_id = so.id
and saos.menu_id = sm.id
......@@ -125,7 +125,7 @@
</select>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO sys_auth_ou_scope
INSERT INTO SYS_AUTH_OU_SCOPE
(id, ou_id, user_id, user_group_id, menu_id, create_by_id, create_by_name, create_time)
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -49,14 +49,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
where
id=#{id}
</select>
......@@ -64,7 +64,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
where end_time &gt; #{endTime}
<if test="pid != null and pid !=''">
and pid in
......@@ -78,7 +78,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
<where>
<if test="alias != null and alias !=''">
and alias in
......@@ -92,9 +92,9 @@
<select id="selectListsByAlias" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
where pid in
(select id from sys_dictionary
(select id from SYS_DICTIONARY
<where>
<if test="alias != null and alias !=''">
and alias = #{alias}
......@@ -107,7 +107,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_dictionary
from SYS_DICTIONARY
<where>
<if test="alias != null and alias !=''">
and (pid in
......@@ -129,9 +129,9 @@
<select id="selectSysDictionaryTree" resultType="pps.core.system.entity.SysDictionaryView">
select distinct sd.id, sd.pid, sd.dic_name, sd.sort
from sys_dictionary sd
left join sys_dictionary sd1 on sd.id = sd1.pid
left join sys_dictionary sd2 on sd1.id = sd2.pid
from SYS_DICTIONARY sd
left join SYS_DICTIONARY sd1 on sd.id = sd1.pid
left join SYS_DICTIONARY sd2 on sd1.id = sd2.pid
where sd.pid = '30'
and sd.effect_time &lt;= now()
and sd.end_time &gt;= now()
......@@ -143,9 +143,9 @@
sd1.pid,
sd1.dic_name,
sd1.sort
from sys_dictionary sd
left join sys_dictionary sd1 on sd.id = sd1.pid
left join sys_dictionary sd2 on sd1.id = sd2.pid
from SYS_DICTIONARY sd
left join SYS_DICTIONARY sd1 on sd.id = sd1.pid
left join SYS_DICTIONARY sd2 on sd1.id = sd2.pid
where sd.pid = '30'
and sd1.effect_time &lt;= now()
and sd1.end_time &gt;= now()
......@@ -157,9 +157,9 @@
sd2.pid,
sd2.dic_name,
sd2.sort
from sys_dictionary sd
left join sys_dictionary sd1 on sd.id = sd1.pid
left join sys_dictionary sd2 on sd1.id = sd2.pid
from SYS_DICTIONARY sd
left join SYS_DICTIONARY sd1 on sd.id = sd1.pid
left join SYS_DICTIONARY sd2 on sd1.id = sd2.pid
where sd.pid = '30'
and sd2.effect_time &lt;= now()
and sd2.end_time &gt;= now()
......@@ -169,7 +169,7 @@
<select id="selectListsByDicPath" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
select id, pid, dic_key, dic_name
from sys_dictionary sd
from SYS_DICTIONARY sd
where dic_path like concat('%/', #{dicPath}, '%')
and sd.effect_time &lt;= now()
and sd.end_time &gt;= now()
......@@ -179,7 +179,7 @@
<select id="selectListsByDicPathIncludeSelf" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
select id, pid, dic_key, dic_name
from sys_dictionary sd
from SYS_DICTIONARY sd
where id = #{dicPath}
or dic_path like concat('%', #{dicPath}, '%')
and sd.effect_time &lt;= now() and sd.end_time &gt;= now()
......@@ -190,9 +190,9 @@
select a.*,asd.dic_name,asd.effect_time,asd.end_time,asd.remark,asd.dic_key,a.ou_id,aasd.use_lower_level from (
select distinct so.ou_name,so.id as ou_id,
case when split_part(dic_path,'/',2) is null then sd.id else split_part(dic_path,'/',2) end as id
from sys_organization_dictionary sod
left join sys_dictionary sd on sod.dic_code =sd.id
left join sys_organization so on so.id =sod.ou_id
from SYS_ORGANIZATION_DICTIONARY sod
left join SYS_DICTIONARY sd on sod.dic_code =sd.id
left join SYS_ORGANIZATION so on so.id =sod.ou_id
where sod.end_time >now() and sod.dic_code is not null
<if test="dicName != null and dicName != ''">
and sd.dic_name like concat('%',#{dicName},'%')
......@@ -200,8 +200,8 @@
<if test="ouId != null and ouId != ''">
and sod.ou_id=#{ouId}
</if>)a
left join sys_dictionary asd on asd.id = a.id
left join sys_organization_dictionary aasd on a.ou_id = aasd.ou_id and a.id=aasd.dic_code
left join SYS_DICTIONARY asd on asd.id = a.id
left join SYS_ORGANIZATION_DICTIONARY aasd on a.ou_id = aasd.ou_id and a.id=aasd.dic_code
where aasd.end_time >now()
</select>
<select id="selectListByConditionByPage" parameterType="pps.core.system.entity.SysDictionaryView"
......@@ -210,9 +210,9 @@
parent_dic_code,asd.dic_name,asd.effect_time,asd.end_time,asd.remark,asd.dic_key from (
select distinct so.ou_name,so.id as ou_id,
case when split_part(dic_path,'/',2) is null then sd.id else split_part(dic_path,'/',2) end as id
from sys_organization_dictionary sod
left join sys_dictionary sd on sod.dic_code =sd.id
left join sys_organization so on so.id =sod.ou_id
from SYS_ORGANIZATION_DICTIONARY sod
left join SYS_DICTIONARY sd on sod.dic_code =sd.id
left join SYS_ORGANIZATION so on so.id =sod.ou_id
where sod.end_time >#{endTime} and sod.dic_code is not null
<if test="dicName != null and dicName != ''">
and sd.dic_name like concat('%',#{dicName},'%')
......@@ -220,7 +220,7 @@
<if test="ouId != null and ouId != ''">
and sod.ou_id=#{ouId}
</if>)a
left join sys_dictionary asd on asd.id = a.id
left join SYS_DICTIONARY asd on asd.id = a.id
order by asd.effect_time desc
limit #{startRow},#{endRow}
</select>
......@@ -229,9 +229,9 @@
select count(0) from (
select distinct so.ou_name,so.id as ou_id,
case when split_part(dic_path,'/',2) is null then sd.id else split_part(dic_path,'/',2) end as id
from sys_organization_dictionary sod
left join sys_dictionary sd on sod.dic_code =sd.id
left join sys_organization so on so.id =sod.ou_id
from SYS_ORGANIZATION_DICTIONARY sod
left join SYS_DICTIONARY sd on sod.dic_code =sd.id
left join SYS_ORGANIZATION so on so.id =sod.ou_id
where sod.end_time >#{endTime} and sod.dic_code is not null
<if test="dicName != null and dicName != ''">
and sd.dic_name like concat('%',#{dicName},'%')
......@@ -257,26 +257,26 @@
dic_code as id,
sod.use_lower_level
from (select *
from sys_organization_dictionary
from SYS_ORGANIZATION_DICTIONARY
where parent_dic_code = #{pid}
and ou_id = #{ouId}) sod
left join sys_dictionary sd on sod.dic_code = sd.id
left join sys_organization so on so.id = sod.ou_id
left join SYS_DICTIONARY sd on sod.dic_code = sd.id
left join SYS_ORGANIZATION so on so.id = sod.ou_id
where sod.end_time > #{endTimeStr}
and sod.dic_code is not null) a
left join sys_dictionary asd on asd.id = a.id
left join SYS_DICTIONARY asd on asd.id = a.id
</select>
<select id="selectListByEquipmentType" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
with RECURSIVE temps as
(select id, pid
from sys_dictionary sd
from SYS_DICTIONARY sd
where (dic_path like concat('%', #{id}, '%') or id = #{id})
and dic_key = #{dicKey}
union all
select a.id, a.pid
from temps
inner join sys_dictionary a on temps.pid = a.id)
inner join SYS_DICTIONARY a on temps.pid = a.id)
select temps.*
from temps
</select>
......@@ -286,7 +286,7 @@
(
select
sd.id,sd.pid,sd.dic_name,sd.short_name,sd.remark,sd.sort,sd.levels,sd.be_default,sd.be_has_children,sd.dic_type,sd.effect_time,sd.end_time,sd.create_name,sd.create_time,sd.modify_name,sd.modify_time,sd.alias,sd.dic_path,sd.dic_key
from sys_dictionary sd
from SYS_DICTIONARY sd
<where>
<if test="dicKey != null and dicKey != ''">
and sd.dic_key like concat('%',#{dicKey},'%')
......@@ -298,7 +298,7 @@
union
select
sd.id,sd.pid,sd.dic_name,sd.short_name,sd.remark,sd.sort,sd.levels,sd.be_default,sd.be_has_children,sd.dic_type,sd.effect_time,sd.end_time,sd.create_name,sd.create_time,sd.modify_name,sd.modify_time,sd.alias,sd.dic_path,sd.dic_key
from temps inner join sys_dictionary sd on temps.pid = sd.id
from temps inner join SYS_DICTIONARY sd on temps.pid = sd.id
)
select temps.* from temps
</select>
......@@ -307,7 +307,7 @@
SELECT
*
FROM
sys_dictionary
SYS_DICTIONARY
<where>
<if test="pid != null and pid != ''">
and pid = #{pid}
......@@ -316,7 +316,7 @@
and pid = (SELECT
id
FROM
sys_dictionary
SYS_DICTIONARY
WHERE
alias = #{alias})
</if>
......
......@@ -57,20 +57,20 @@
menu_icon
</sql>
<update id="updateShowChildren" parameterType="pps.core.system.entity.SysMenuView">
update sys_menu
update SYS_MENU
set show_children=#{showChildren}
</update>
<select id="selectOne" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_menu
from SYS_MENU
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_menu
from SYS_MENU
where
id=#{id}
</select>
......@@ -86,9 +86,9 @@
t3.url,
t3.sort,
t3.menu_icon
from sys_user_role_rel t1
left join sys_role_menu_auth t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id
from SYS_USER_ROLE_REL t1
left join SYS_ROLE_MENU_AUTH t2 on t1.role_id = t2.role_id
left join SYS_MENU t3 on t2.menu_id = t3.id
where t1.user_id = #{userId}
order by t3.sort asc
</select>
......@@ -96,7 +96,7 @@
<select id="selectSysMenuList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_menu
from SYS_MENU
<where>
<if test="menuName !=null and menuName!=''">
AND menu_name like concat('%',#{menuName},'%')
......@@ -110,7 +110,7 @@
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysMenuView">
select max(sm.sort) as sort,
sm.parent_menu_id
from sys_menu sm
from SYS_MENU sm
where sm.parent_menu_id = #{parentMenuId}
group by sm.parent_menu_id limit 1
</select>
......@@ -131,12 +131,12 @@
apply_scene,
menu_describe,
menu_icon
from sys_menu sm
from SYS_MENU sm
where apply_scene = #{applyScene}
and sm.id in (select menu_id
from sys_role_menu_auth srma
from SYS_ROLE_MENU_AUTH srma
where srma.role_id in (select role_id
from sys_user_role_rel surr
from SYS_USER_ROLE_REL surr
where surr.user_id = #{userId}))) a
where media_type like concat('%', #{mediaType}, '%')
or media_type = 'ALL'
......@@ -153,7 +153,7 @@
a.menu_describe,
a.menu_icon
from temps
inner join sys_menu a on temps.parent_menu_id = a.id)
inner join SYS_MENU a on temps.parent_menu_id = a.id)
select distinct temps.*
from temps
......@@ -165,12 +165,12 @@
select t.id, t.menu_name, t.parent_menu_id
from (with RECURSIVE temps as
(select id, menu_name, parent_menu_id
from sys_menu sm
from SYS_MENU sm
where sm.id = #{id}
union
select a.id, a.menu_name, a.parent_menu_id
from temps
inner join sys_menu a on temps.parent_menu_id = a.id)
inner join SYS_MENU a on temps.parent_menu_id = a.id)
select temps.*
from temps) t
where t.id !=#{id}
......@@ -201,7 +201,7 @@
menu_describe,
show_children,
menu_icon
from sys_menu
from SYS_MENU
where url like '/%'
order by sort asc
</select>
......@@ -219,7 +219,7 @@
sm.menu_pattern,
sm.menu_describe,
sm.menu_icon
from sys_menu sm
from SYS_MENU sm
where menu_name like concat('%', #{menuName}, '%')
and apply_scene = #{applyScene}
union
......@@ -234,7 +234,7 @@
sm.menu_describe,
sm.menu_icon
from temps
inner join sys_menu sm on temps.parent_menu_id = sm.id)
inner join SYS_MENU sm on temps.parent_menu_id = sm.id)
select temps.*
from temps
</select>
......@@ -251,11 +251,11 @@
cast(substring(url, position('=' in url) + 1) as varchar) as fill_conf_id,
true as show_home,
menu_icon
from sys_menu sm
from SYS_MENU sm
where sm.id in (select menu_id
from sys_role_menu_auth srma
from SYS_ROLE_MENU_AUTH srma
where srma.role_id in (select role_id
from sys_user_role_rel surr
from SYS_USER_ROLE_REL surr
where surr.user_id = #{userId})))
where media_type like concat('%', #{mediaType}, '%')
or media_type = 'ALL')
......@@ -273,11 +273,11 @@
url,
menu_describe,
menu_icon
FROM sys_menu sm
FROM SYS_MENU sm
WHERE sm.id IN (SELECT menu_id
FROM sys_role_menu_auth srma
FROM SYS_ROLE_MENU_AUTH srma
WHERE srma.role_id IN (SELECT role_id
FROM sys_user_role_rel surr
FROM SYS_USER_ROLE_REL surr
WHERE surr.user_id = #{userId}))
UNION
SELECT a.id,
......@@ -291,7 +291,7 @@
a.menu_describe,
a.menu_icon
FROM temps
INNER JOIN sys_menu a ON temps.parent_menu_id = a.id)
INNER JOIN SYS_MENU a ON temps.parent_menu_id = a.id)
SELECT DISTINCT temps.*
FROM temps
</select>
......@@ -301,7 +301,7 @@
select
count(so.id) as id,
so.parent_menu_id
from sys_menu so
from SYS_MENU so
where so.parent_menu_id in
<foreach collection="list" open="(" close=")" separator="," item="item">
#{item}
......
......@@ -34,7 +34,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_dictionary
from SYS_ORGANIZATION_DICTIONARY
where
id=#{id}
</select>
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_dictionary
from SYS_ORGANIZATION_DICTIONARY
where
id=#{id}
</select>
......@@ -50,7 +50,7 @@
resultMap="BaseResultMap">
select
dic_code,parent_dic_code
from sys_organization_dictionary
from SYS_ORGANIZATION_DICTIONARY
where end_time &gt; #{endTime}
<if test="ouId != null and ouId !=''">
and ou_id=#{ouId}
......@@ -62,8 +62,8 @@
a.parent_dic_code,
b.dic_key,
b.dic_name
from sys_organization_dictionary a
left join sys_dictionary b on b.id = a.dic_code
from SYS_ORGANIZATION_DICTIONARY a
left join SYS_DICTIONARY b on b.id = a.dic_code
where a.end_time &gt; #{endTime}
and a.ou_id = #{ouId}
</select>
......
......@@ -33,7 +33,7 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_property
from SYS_ORGANIZATION_PROPERTY
where
id=#{id}
</select>
......@@ -41,7 +41,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_property
from SYS_ORGANIZATION_PROPERTY
where
ou_id=#{ouId} and end_time &gt;= #{endTime}
</select>
......
......@@ -39,27 +39,27 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_rel
from SYS_ORGANIZATION_REL
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_rel
from SYS_ORGANIZATION_REL
where
id=#{id}
</select>
<select id="selectEffective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization_rel
from SYS_ORGANIZATION_REL
where effect_time &lt;= now() and end_time &gt;= now()
</select>
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView">
select max(sor.sort) as sort,
sor.parent_ou_id
from sys_organization_rel sor
from SYS_ORGANIZATION_REL sor
where sor.parent_ou_id = #{parentOuId}
and sor.effect_time &lt;= now()
and sor.end_time &gt;= now()
......@@ -68,8 +68,8 @@
<select id="selectListByOuId" parameterType="String" resultMap="BaseResultMap">
select sor.*
from sys_organization_rel sor
left join sys_organization_rel sor2 on sor.parent_ou_id = sor2.ou_id
from SYS_ORGANIZATION_REL sor
left join SYS_ORGANIZATION_REL sor2 on sor.parent_ou_id = sor2.ou_id
where sor2.parent_ou_id = #{ouId}
</select>
......
......@@ -63,21 +63,21 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization
from SYS_ORGANIZATION
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization
from SYS_ORGANIZATION
where
id=#{id}
</select>
<select id="selectEffective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_organization
from SYS_ORGANIZATION
where is_deleted =1
</select>
<select id="selectSysOrganizationList" parameterType="pps.core.system.entity.SysOrganizationView"
......@@ -102,10 +102,10 @@
ou.longitude,
ou.latitude,
ou.elevation,
( SELECT so.ou_name FROM sys_organization so WHERE sor.parent_ou_id = so.id ) AS partent_name
( SELECT so.ou_name FROM SYS_ORGANIZATION so WHERE sor.parent_ou_id = so.id ) AS partent_name
FROM
sys_organization_rel sor
LEFT JOIN sys_organization ou ON ou.id = sor.ou_id
SYS_ORGANIZATION_REL sor
LEFT JOIN SYS_ORGANIZATION ou ON ou.id = sor.ou_id
<where>
sor.end_time >= NOW()
and ou.is_deleted = #{isDeleted}
......@@ -132,8 +132,8 @@
short_name,
sor.sort,
sor.parent_ou_id
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
where so.is_deleted = #{isDeleted}
and sor.effect_time &lt;= #{endTime}
and sor.end_time &gt;= #{endTime}
......@@ -147,8 +147,8 @@
short_name,
sor.sort,
sor.parent_ou_id
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
where so.is_deleted = #{isDeleted}
and so.ou_name = #{ouName}
and sor.effect_time &lt;= #{endTime}
......@@ -166,8 +166,8 @@
sor.parent_ou_id,
so.ou_level,
'ou' as type
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
where so.is_deleted = #{isDeleted} and sor.end_time >= NOW()
<if test="parentOuId != null and parentOuId != ''">
and parent_ou_id =#{parentOuId}
......@@ -183,8 +183,8 @@
short_name,
sor.sort,
sor.parent_ou_id
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
<where>
so.is_deleted = #{isDeleted}
and sor.effect_time &lt;= now() and sor.end_time &gt;= now()
......@@ -202,8 +202,8 @@
short_name,
sor.sort,
sor.parent_ou_id
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
<where>
so.is_deleted = #{isDeleted}
and sor.effect_time &lt;= now() and sor.end_time &gt;= now()
......@@ -219,8 +219,8 @@
s.short_name,
s.longitude,
s.latitude
from sys_organization_rel r
left join sys_organization s on r.ou_id = s.id
from SYS_ORGANIZATION_REL r
left join SYS_ORGANIZATION s on r.ou_id = s.id
where s.is_deleted = #{isDeleted}
and (r.ou_id = #{id} or r.ou_id_path like concat('%',#{id},'%'))
<if test="ouLevel != null and ouLevel !=''">
......@@ -230,8 +230,8 @@
</select>
<select id="selectListByOuIds" parameterType="java.util.List" resultMap="BaseResultMap">
select r.ou_id as id,r.parent_ou_id,s.ou_name,s.short_name from sys_organization_rel r
left join sys_organization s on r.ou_id = s.id
select r.ou_id as id,r.parent_ou_id,s.ou_name,s.short_name from SYS_ORGANIZATION_REL r
left join SYS_ORGANIZATION s on r.ou_id = s.id
where s.is_deleted = 1
AND r.effect_time &lt;= now() AND r.end_time &gt;= now()
and r.ou_id in
......@@ -246,8 +246,8 @@
select
count(so.id) as id,
sor.parent_ou_id
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id
where so.is_deleted = 1
and sor.parent_ou_id in
<foreach collection="list" open="(" close=")" separator="," item="item">
......@@ -262,8 +262,8 @@
with RECURSIVE temps as
(
select so.ou_level ,so.id,so.ou_name ,sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from
sys_organization so
left join sys_organization_rel sor on sor.ou_id=so.id and so.is_deleted =1
SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id=so.id and so.is_deleted =1
where so.id=#{id} and sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime} and so.is_deleted =1
union
......@@ -272,10 +272,10 @@
from temps inner join (
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime}
)tt
left join sys_organization so on tt.ou_id=so.id and so.is_deleted =1
left join SYS_ORGANIZATION so on tt.ou_id=so.id and so.is_deleted =1
) a on temps.parent_ou_id = a.id
)
select temps.* from temps
......@@ -294,13 +294,13 @@
with RECURSIVE temps as
(
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor where sor.effect_time
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor where sor.effect_time
&lt;= #{endTime} and sor.end_time &gt;= #{endTime} and ou_id =
(select ou_id from sys_user_organization_rel suor
(select ou_id from SYS_USER_ORGANIZATION_REL suor
where suor.user_id = #{userId}
and suor.effect_time &lt;= #{endTime} and suor.end_time &gt;= #{endTime})
)tt
left join sys_organization so on tt.ou_id=so.id and so.is_deleted =1
left join SYS_ORGANIZATION so on tt.ou_id=so.id and so.is_deleted =1
union
......@@ -308,10 +308,10 @@
from temps inner join (
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime}
)tt
left join sys_organization so on tt.ou_id=so.id and so.is_deleted =1
left join SYS_ORGANIZATION so on tt.ou_id=so.id and so.is_deleted =1
) a on temps.parent_ou_id = a.id
)
select temps.* from temps
......@@ -332,16 +332,16 @@
with RECURSIVE temps as
(
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where
sor.effect_time &lt;= #{endTime} and sor.end_time >= #{endTime} and
ou_id =
(select ou_id from sys_user_organization_rel suor
(select ou_id from SYS_USER_ORGANIZATION_REL suor
where suor.user_id = #{userId}
and suor.effect_time &lt;= #{endTime} and suor.end_time >= #{endTime}
)
)tt
left join sys_organization so on tt.ou_id=so.id
left join SYS_ORGANIZATION so on tt.ou_id=so.id
and so.is_deleted =1
union
......@@ -349,12 +349,12 @@
select a.ou_level,a.id,a.ou_name ,a.ou_id ,a.parent_ou_id ,a.ou_id_path ,a.sort
from (
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime} and sor.end_time >= #{endTime}
)tt
left join sys_organization so on tt.ou_id=so.id
left join SYS_ORGANIZATION so on tt.ou_id=so.id
and so.is_deleted =1
) a where a.parent_ou_id=(select ou_id from sys_user_organization_rel suor
) a where a.parent_ou_id=(select ou_id from SYS_USER_ORGANIZATION_REL suor
where suor.user_id = #{userId}
and suor.effect_time &lt;= #{endTime} and suor.end_time >= #{endTime}
)
......@@ -364,16 +364,16 @@
select a.ou_level,a.id,a.ou_name ,a.ou_id ,a.parent_ou_id ,a.ou_id_path ,a.sort
from (
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime} and sor.end_time >= #{endTime}
)tt
left join sys_organization so on tt.ou_id=so.id
left join SYS_ORGANIZATION so on tt.ou_id=so.id
and so.is_deleted =1
) a where a.id=(select sor.parent_ou_id from sys_organization_rel sor
) a where a.id=(select sor.parent_ou_id from SYS_ORGANIZATION_REL sor
where
sor.effect_time &lt;= #{endTime} and sor.end_time >= #{endTime} and
ou_id =
(select ou_id from sys_user_organization_rel suor
(select ou_id from SYS_USER_ORGANIZATION_REL suor
where suor.user_id = #{userId}
and suor.effect_time &lt;= #{endTime} and suor.end_time >= #{endTime}
)
......@@ -394,16 +394,16 @@
with RECURSIVE temps as
(select so.ou_level, so.id, so.ou_name, tt.ou_id, tt.parent_ou_id, tt.ou_id_path, tt.sort
from (select sor.ou_id, sor.parent_ou_id, sor.ou_id_path, sor.sort
from sys_organization_rel sor
from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime}
and sor.end_time &gt;= #{endTime}
and ou_id =
(select ou_id
from sys_user_organization_rel suor
from SYS_USER_ORGANIZATION_REL suor
where suor.user_id = #{userId}
and suor.effect_time &lt;= #{endTime}
and suor.end_time &gt;= #{endTime})) tt
left join sys_organization so on tt.ou_id = so.id and so.is_deleted = 1
left join SYS_ORGANIZATION so on tt.ou_id = so.id and so.is_deleted = 1
union
......@@ -417,10 +417,10 @@
tt.ou_id_path,
tt.sort
from (select sor.ou_id, sor.parent_ou_id, sor.ou_id_path, sor.sort
from sys_organization_rel sor
from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime}
and sor.end_time &gt;= #{endTime}) tt
right join sys_organization so on tt.ou_id = so.id and so.is_deleted = 1) a
right join SYS_ORGANIZATION so on tt.ou_id = so.id and so.is_deleted = 1) a
on temps.ou_id = a.parent_ou_id)
select temps.*
from temps
......@@ -429,12 +429,12 @@
with RECURSIVE temps as
(select ou_id, parent_ou_id
from sys_organization_rel
from SYS_ORGANIZATION_REL
where ou_id = #{id}
union all
select a.ou_id, a.parent_ou_id
from temps
inner join sys_organization_rel a on temps.ou_id = a.parent_ou_id)
inner join SYS_ORGANIZATION_REL a on temps.ou_id = a.parent_ou_id)
select temps.*
from temps
</select>
......@@ -443,8 +443,8 @@
resultMap="BaseResultMap">
with RECURSIVE temps as
(select so.ou_level, so.id, so.ou_name, sor.ou_id, sor.parent_ou_id, sor.ou_id_path, sor.sort
from sys_organization so
left join sys_organization_rel sor on sor.ou_id = so.id and so.is_deleted = 1
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id = so.id and so.is_deleted = 1
where so.ou_name like concat('%', #{ouName}, '%')
and sor.effect_time &lt;= #{endTime}
and sor.end_time &gt;= #{endTime}
......@@ -462,10 +462,10 @@
tt.ou_id_path,
tt.sort
from (select sor.ou_id, sor.parent_ou_id, sor.ou_id_path, sor.sort
from sys_organization_rel sor
from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime}
and sor.end_time &gt;= #{endTime}) tt
left join sys_organization so on tt.ou_id = so.id and so.is_deleted = 1) a
left join SYS_ORGANIZATION so on tt.ou_id = so.id and so.is_deleted = 1) a
on temps.parent_ou_id = a.id)
select temps.*
from temps
......@@ -479,8 +479,8 @@
ou_name as partent_name,
sor.ou_id as id,
sor.end_time
from sys_organization so
left join sys_organization_rel sor on sor.parent_ou_id = so.id
from SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.parent_ou_id = so.id
<where>
sor.end_time >= NOW()
AND sor.ou_id in
......@@ -505,7 +505,7 @@
is_deleted,
ou_level,
'ou' AS type
from sys_organization
from SYS_ORGANIZATION
where id = #{id}
and is_deleted = 1
</select>
......@@ -514,8 +514,8 @@
with RECURSIVE temps as
(
select so.ou_level ,so.id,so.ou_name ,sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort,'ou' as type from
sys_organization so
left join sys_organization_rel sor on sor.ou_id=so.id and so.is_deleted =1
SYS_ORGANIZATION so
left join SYS_ORGANIZATION_REL sor on sor.ou_id=so.id and so.is_deleted =1
where so.ou_name like concat('%',#{ouName},'%')
and sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime}
and so.is_deleted =1
......@@ -532,10 +532,10 @@
from temps inner join (
select so.ou_level ,so.id,so.ou_name ,tt.ou_id ,tt.parent_ou_id ,tt.ou_id_path ,tt.sort from(
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from sys_organization_rel sor
select sor.ou_id ,sor.parent_ou_id ,sor.ou_id_path ,sor.sort from SYS_ORGANIZATION_REL sor
where sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime}
)tt
left join sys_organization so on tt.ou_id=so.id and so.is_deleted =1
left join SYS_ORGANIZATION so on tt.ou_id=so.id and so.is_deleted =1
) a on temps.parent_ou_id = a.id
)
select temps.* from temps
......@@ -547,8 +547,8 @@
o.id,
o.ou_name
FROM
sys_organization_rel r,
sys_organization o
SYS_ORGANIZATION_REL r,
SYS_ORGANIZATION o
WHERE
r.ou_id = o.id
AND r.end_time >= NOW()
......@@ -578,7 +578,7 @@
line_name AS ou_name,
id AS line_id,
'LINE' AS ou_level
FROM base_power_line
FROM BASE_POWER_LINE
<where>
<if test="id != null and id != ''">
AND ou_id = #{id}
......@@ -596,7 +596,7 @@
station_name AS ou_name,
id AS station_id,
'STATION' AS ou_level
FROM base_wind_turbine
FROM BASE_WIND_TURBINE
<where>
<if test="id != null and id != ''">
AND ou_id = #{id}
......@@ -615,8 +615,8 @@
'' AS line_id,
'ORG' AS ou_level,
'' AS grid_type_key
FROM sys_organization o
LEFT JOIN sys_organization_rel r ON o.id = r.ou_id
FROM SYS_ORGANIZATION o
LEFT JOIN SYS_ORGANIZATION_REL r ON o.id = r.ou_id
WHERE r.parent_ou_id = #{id}
AND r.end_time >= NOW()
AND o.is_deleted = 1
......@@ -627,7 +627,7 @@
id AS line_id,
'LINE' AS ou_level,
grid_type_key
FROM base_power_line
FROM BASE_POWER_LINE
WHERE ou_id = #{id}
AND is_deleted = 1
AND line_type_key = '10'
......@@ -638,7 +638,7 @@
id AS line_id,
'LINE' AS ou_level,
grid_type_key
FROM base_power_line
FROM BASE_POWER_LINE
WHERE ou_id = #{id}
AND is_deleted = 1
AND upper_line_id &lt;&gt; NULL
......@@ -652,8 +652,8 @@
o.ou_name AS ou_name,
'' AS station_id,
'ORG' AS ou_level
FROM sys_organization o
LEFT JOIN sys_organization_rel r ON o.id = r.ou_id
FROM SYS_ORGANIZATION o
LEFT JOIN SYS_ORGANIZATION_REL r ON o.id = r.ou_id
WHERE r.parent_ou_id = #{id}
AND r.end_time >= NOW()
AND o.is_deleted = 1
......@@ -663,7 +663,7 @@
station_name AS ou_name,
id AS station_id,
'STATION' AS ou_level
FROM base_wind_turbine
FROM BASE_WIND_TURBINE
WHERE ou_id = #{id}
AND is_deleted = 1
ORDER BY station_name)
......@@ -676,7 +676,7 @@
id AS line_id,
'LINE' AS ou_level,
grid_type_key
FROM base_power_line
FROM BASE_POWER_LINE
WHERE upper_line_id = #{id}
AND is_deleted = 1
ORDER BY line_name
......@@ -685,8 +685,8 @@
<select id="selectOrgProvince" parameterType="pps.core.system.entity.SysOrganizationView" resultMap="BaseResultMap">
SELECT province,
sa.name province_name
from sys_organization so
left join sys_area sa on
from SYS_ORGANIZATION so
left join SYS_AREA sa on
sa.id = so.province
where so.id = #{id}
</select>
......@@ -698,8 +698,8 @@
'' AS line_id,
'ORG' AS ou_level,
'' AS grid_type_key
FROM sys_organization o
LEFT JOIN sys_organization_rel r ON o.id = r.ou_id
FROM SYS_ORGANIZATION o
LEFT JOIN SYS_ORGANIZATION_REL r ON o.id = r.ou_id
WHERE o.id = #{id}
AND r.end_time >= NOW()
AND o.is_deleted = 1
......@@ -714,8 +714,8 @@
'' AS station_id,
'STATION' AS ou_level,
'' AS grid_type_key
FROM sys_organization o
LEFT JOIN sys_organization_rel r ON o.id = r.ou_id
FROM SYS_ORGANIZATION o
LEFT JOIN SYS_ORGANIZATION_REL r ON o.id = r.ou_id
WHERE o.id = #{id}
AND r.end_time >= NOW()
AND o.is_deleted = 1
......
......@@ -26,7 +26,7 @@
</sql>
<insert id="batchInsert" parameterType="java.util.List">
insert into sys_role_menu_auth (id,role_id,menu_id,create_by_id,create_by_name,create_time)
insert into SYS_ROLE_MENU_AUTH (id,role_id,menu_id,create_by_id,create_by_name,create_time)
values
<foreach collection="list" item="roleMenuAuth" separator=",">
(
......@@ -43,7 +43,7 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_role_menu_auth
from SYS_ROLE_MENU_AUTH
where
id=#{id}
</select>
......@@ -51,7 +51,7 @@
<select id="selectList" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_role_menu_auth
from SYS_ROLE_MENU_AUTH
where
id=#{id}
</select>
......@@ -66,8 +66,8 @@
srma.modify_by_id,
srma.modify_by_name,
srma.modify_time
from sys_role_menu_auth srma
right join sys_menu sm on srma.menu_id = sm.id
from SYS_ROLE_MENU_AUTH srma
right join SYS_MENU sm on srma.menu_id = sm.id
where sm.url !='#' and
srma.role_id=#{roleId}
</select>
......
......@@ -46,7 +46,7 @@
<update id="batchUpdateSysRoleSetBpsRoleId" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update sys_role
update SYS_ROLE
<set>
bps_role_id=#{item.bpsRoleId}
</set>
......@@ -57,14 +57,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_role
from SYS_ROLE
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_role
from SYS_ROLE
where
id=#{id}
</select>
......@@ -82,9 +82,9 @@
is_inheritable,
role_type,
is_overall
from sys_role sr
left join sys_organization so on sr.ou_id = so.id
left join sys_dictionary sd sr.media_type = sd.id
from SYS_ROLE sr
left join SYS_ORGANIZATION so on sr.ou_id = so.id
left join SYS_DICTIONARY sd sr.media_type = sd.id
<where>
ou_id = #{ouId}
<if test="mediaType != null and mediaType != ''">
......@@ -114,8 +114,8 @@
sr.is_inheritable,
sr.role_type,
sr.is_overall
from sys_role sr
left join sys_organization so on sr.ou_id = so.id
from SYS_ROLE sr
left join SYS_ORGANIZATION so on sr.ou_id = so.id
<where>
<if test="ouId != null and ouId != ''">
AND sr.ou_id = #{ouId}
......@@ -149,8 +149,8 @@
sr.is_inheritable,
sr.role_type,
sr.is_overall
from sys_role sr
left join sys_organization so on sr.ou_id = so.id
from SYS_ROLE sr
left join SYS_ORGANIZATION so on sr.ou_id = so.id
<where>
<if test="roleName != null and roleName != ''">
AND sr.role_name like concat('%',#{roleName},'%')
......@@ -186,10 +186,10 @@
sr.role_name as roleName,
surr.user_id as userId,
su.user_name as userName
from sys_user_role_rel surr
left join sys_role sr on sr.id = surr.role_id
left join sys_user su on su.id = surr.user_id
left join sys_organization so on so.id = sr.ou_id
from SYS_USER_ROLE_REL surr
left join SYS_ROLE sr on sr.id = surr.role_id
left join SYS_USER su on su.id = surr.user_id
left join SYS_ORGANIZATION so on so.id = sr.ou_id
where sr.ou_id = #{ouId}
<if test="roleIdList !=null and roleIdList.size()>0">
and surr.role_id in
......@@ -204,7 +204,7 @@
select
sr.id as roleId,
sr.role_name as roleName
from sys_role sr
from SYS_ROLE sr
<where>
<if test="roleIdList !=null and roleIdList.size()>0">
and sr.id not in
......@@ -220,7 +220,7 @@
select
sr.id as roleId,
sr.role_name as roleName
from sys_role sr
from SYS_ROLE sr
<where>
<if test="roleIdList !=null and roleIdList.size()>0">
and sr.id in
......@@ -234,9 +234,9 @@
<select id="getRoleListUserId" parameterType="String" resultType="pps.core.system.entity.SysRoleExtendView">
select sr.id as roleId,
sr.role_name as roleName
from sys_role sr,
sys_user_role_rel sur,
sys_user su
from SYS_ROLE sr,
SYS_USER_ROLE_REL sur,
SYS_USER su
where sr.id = sur.role_id
and sur.user_id = su.id
and su.id = #{userId}
......
......@@ -35,21 +35,21 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_organization_rel
from SYS_USER_ORGANIZATION_REL
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_organization_rel
from SYS_USER_ORGANIZATION_REL
where
id=#{id}
</select>
<select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultType="pps.core.system.entity.SysOrganizationView">
select *
from sys_organization
from SYS_ORGANIZATION
where is_deleted = 1
</select>
<select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
......@@ -62,8 +62,8 @@
os.station_name,
os.station_code,
os.medium_type
from sys_user_organization_rel suor
left join sys_organization so on suor.ou_id = so.id
from SYS_USER_ORGANIZATION_REL suor
left join SYS_ORGANIZATION so on suor.ou_id = so.id
left join base_station_ou_rel osor on suor.ou_id = osor.ou_id and osor.effect_time &lt;= #{endTime} and
osor.end_time &gt;= #{endTime}
left join base_station os on osor.station_id = os.id
......@@ -79,8 +79,8 @@
resultMap="BaseResultMap">
select suor.ou_id,
so.ou_name
from sys_user_organization_rel suor
left join sys_organization so on suor.ou_id = so.id
from SYS_USER_ORGANIZATION_REL suor
left join SYS_ORGANIZATION so on suor.ou_id = so.id
where so.is_deleted = 1
and suor.user_id = #{userId}
and suor.effect_time &lt;= now()
......
......@@ -28,13 +28,13 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_role_rel
from SYS_USER_ROLE_REL
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select b.id,b.role_id ,a.role_name
from sys_role a ,sys_user_role_rel b
from SYS_ROLE a ,SYS_USER_ROLE_REL b
where a.id =b.role_id and b.user_id =#{userId}
<if test="roleName!=null and roleName!='' ">
and a.role_name like concat('%',#{roleName,jdbcType=VARCHAR},'%')
......@@ -42,16 +42,16 @@
</select>
<select id="selectUserList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select a.login_name, a.user_name, a.iam_login_name
from sys_user a,
sys_user_role_rel b,
sys_user_organization_rel c
from SYS_USER a,
SYS_USER_ROLE_REL b,
SYS_USER_ORGANIZATION_REL c
where a.id = b.user_id
and a.id = c.user_id
and b.role_id = #{roleId}
and c.end_time > now()
and c.ou_id in (select ou_id
from sys_organization_rel sor,
sys_organization so
from SYS_ORGANIZATION_REL sor,
SYS_ORGANIZATION so
where sor.ou_id = so.id
and so.ou_level in ('OFFICE_KS', 'OFFICE_CS', #{ouLevel,jdbcType=VARCHAR})
and ou_id_path like concat('%', #{ouId,jdbcType=VARCHAR}, '%')
......@@ -69,13 +69,13 @@
so.ou_name,
su.login_name,
concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name
from sys_role sr
left join sys_user_role_rel surr on sr.id =surr.role_id
left join sys_user su on surr.user_id =su.id
left join sys_user_organization_rel suor on su.id = suor.user_id
left join sys_organization so on suor.ou_id = so.id
left join sys_organization_rel sor on so.id = sor.ou_id
left join sys_organization so2 on sor.parent_ou_id = so2.id
from SYS_ROLE sr
left join SYS_USER_ROLE_REL surr on sr.id =surr.role_id
left join SYS_USER su on surr.user_id =su.id
left join SYS_USER_ORGANIZATION_REL suor on su.id = suor.user_id
left join SYS_ORGANIZATION so on suor.ou_id = so.id
left join SYS_ORGANIZATION_REL sor on so.id = sor.ou_id
left join SYS_ORGANIZATION so2 on sor.parent_ou_id = so2.id
where sr.id =#{roleId} and sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime} and
suor.effect_time &lt;= #{endTime} and suor.end_time &gt;= #{endTime}
<if test="userName != null and userName != ''">
......@@ -90,13 +90,13 @@
<select id="selectListByUserId" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_role_rel
from SYS_USER_ROLE_REL
where
user_id=#{userId}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into sys_user_role_rel (id,role_id,user_id,ou_id,create_by_id,create_by_name,create_time)
insert into SYS_USER_ROLE_REL (id,role_id,user_id,ou_id,create_by_id,create_by_name,create_time)
values
<foreach collection="list" item="userRole" separator=",">
(#{userRole.id}, #{userRole.roleId}, #{userRole.userId}, #{userRole.ouId}, #{userRole.createById},
......@@ -111,9 +111,9 @@
su.user_name,
su.login_name,
su.phone
from sys_role sr
left join sys_user_role_rel surr on sr.id =surr.role_id
left join sys_user su on surr.user_id =su.id
from SYS_ROLE sr
left join SYS_USER_ROLE_REL surr on sr.id =surr.role_id
left join SYS_USER su on surr.user_id =su.id
<where>
<if test="roleIds != null and roleIds.size()>0">
and sr.id in
......@@ -130,10 +130,10 @@
su.user_name,
su.login_name,
su.phone
from sys_role sr
left join sys_user_role_rel surr on sr.id = surr.role_id
left join sys_user su on surr.user_id = su.id
left join sys_user_organization_rel suor on su.id = suor.user_id
from SYS_ROLE sr
left join SYS_USER_ROLE_REL surr on sr.id = surr.role_id
left join SYS_USER su on surr.user_id = su.id
left join SYS_USER_ORGANIZATION_REL suor on su.id = suor.user_id
where sr.id = #{roleId}
and suor.ou_id = #{ouId}
</select>
......@@ -149,13 +149,13 @@
so.ou_name,
su.login_name,
concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name
from sys_role sr
left join sys_user_role_rel surr on sr.id =surr.role_id
left join sys_user su on surr.user_id =su.id
left join sys_user_organization_rel suor on su.id = suor.user_id
left join sys_organization so on suor.ou_id = so.id
left join sys_organization_rel sor on so.id = sor.ou_id
left join sys_organization so2 on sor.parent_ou_id = so2.id
from SYS_ROLE sr
left join SYS_USER_ROLE_REL surr on sr.id =surr.role_id
left join SYS_USER su on surr.user_id =su.id
left join SYS_USER_ORGANIZATION_REL suor on su.id = suor.user_id
left join SYS_ORGANIZATION so on suor.ou_id = so.id
left join SYS_ORGANIZATION_REL sor on so.id = sor.ou_id
left join SYS_ORGANIZATION so2 on sor.parent_ou_id = so2.id
<where>
sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime} and suor.effect_time &lt;= #{endTime} and
......
......@@ -84,14 +84,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user
from SYS_USER
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user
from SYS_USER
where
id=#{id}
</select>
......@@ -123,11 +123,11 @@
so.ou_name,
su.status,
concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name
from sys_user su
left join sys_user_organization_rel suor on suor.user_id=su.id
left join sys_organization so on suor.ou_id=so.id
left join sys_organization_rel sor on so.id=sor.ou_id
left join sys_organization so2 on sor.parent_ou_id=so2.id
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
left join SYS_ORGANIZATION so on suor.ou_id=so.id
left join SYS_ORGANIZATION_REL sor on so.id=sor.ou_id
left join SYS_ORGANIZATION so2 on sor.parent_ou_id=so2.id
<where>
suor.end_time &gt;= #{endTime}
and sor.end_time &gt;= #{endTime}
......@@ -190,11 +190,11 @@
so.ou_name,
su.status,
concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name
from sys_user su
left join sys_user_organization_rel suor on suor.user_id=su.id
left join sys_organization so on suor.ou_id=so.id
left join sys_organization_rel sor on so.id=sor.ou_id
left join sys_organization so2 on sor.parent_ou_id=so2.id
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
left join SYS_ORGANIZATION so on suor.ou_id=so.id
left join SYS_ORGANIZATION_REL sor on so.id=sor.ou_id
left join SYS_ORGANIZATION so2 on sor.parent_ou_id=so2.id
<where>
<if test="hasOuId != null and hasOuId != '' and hasOuId == '1'.toString()">
and suor.end_time &gt;= #{endTime}
......@@ -234,8 +234,8 @@
su.user_name,
su.duty,
su.phone
from sys_user su
left join sys_user_organization_rel suor on suor.user_id=su.id
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where>
<if test="ouId != null and ouId != ''">
AND suor.ou_id = #{ouId}
......@@ -249,8 +249,8 @@
su.user_name,
su.duty,
su.phone
from sys_user su
left join sys_user_organization_rel suor on suor.user_id=su.id
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where>
<if test="ouIds != null and ouIds.size()>0">
and su.phone is not null and suor.ou_id in
......@@ -269,8 +269,8 @@
su.user_name,
su.duty,
su.phone
from sys_user su
left join sys_user_organization_rel suor on suor.user_id=su.id
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where>
<if test="ouId != null and ouId !=''">
and su.phone is not null and suor.ou_id =#{ouId}
......@@ -284,9 +284,9 @@
<select id="selectUserByTrade" parameterType="pps.core.system.entity.SysUserView" resultMap="TradeResultMap">
select a.user_name, a.login_name, c.ou_name
from sys_user a,
sys_user_organization_rel b,
sys_organization c
from SYS_USER a,
SYS_USER_ORGANIZATION_REL b,
SYS_ORGANIZATION c
where a.id = b.user_id
and b.ou_id = c.id
and a.is_trade = 1
......@@ -328,10 +328,10 @@
so.id as ou_id,
so.ou_code,
so.ou_name
from sys_user su
left join sys_user_organization_rel suor
from SYS_USER su
left join SYS_USER_ORGANIZATION_REL suor
on su.id = suor.user_id
left join sys_organization so
left join SYS_ORGANIZATION so
on suor.ou_id = so.id
where su.id = #{userId}
and suor.end_time > now()
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_data")
@TableName("BASE_DATA")
public class BaseDataEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("base_data_import_log")
@TableName("BASE_DATA_IMPORT_LOG")
public class BaseDataImportLogEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08
*/
@Data
@TableName("base_diesel_generator")
@TableName("BASE_DIESEL_GENERATOR")
public class BaseDieselGeneratorEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08
*/
@Data
@TableName("base_energy_storage_device")
@TableName("BASE_ENERGY_STORAGE_DEVICE")
public class BaseEnergyStorageDeviceEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_line_attenuation_rate")
@TableName("BASE_LINE_ATTENUATION_RATE")
public class BaseLineAttenuationRateEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_line")
@TableName("BASE_LINE")
public class BaseLineEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -8,7 +8,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_model_val")
@TableName("BASE_MODEL_VAL")
public class BaseModelValEnt implements Serializable {
@XText("实际数据")
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08
*/
@Data
@TableName("base_photovoltaic_plant")
@TableName("BASE_PHOTOVOLTAIC_PLANT")
public class BasePhotovoltaicPlantEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_photovoltaic_plant_mape_adj")
@TableName("BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ")
public class BasePhotovoltaicPlantMapeAdjEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25
*/
@Data
@TableName("base_power_line_diesel")
@TableName("BASE_POWER_LINE_DIESEL")
public class BasePowerLineDieselEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25
*/
@Data
@TableName("base_power_line")
@TableName("BASE_POWER_LINE")
public class BasePowerLineEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25
*/
@Data
@TableName("base_power_line_plant")
@TableName("BASE_POWER_LINE_PLANT")
public class BasePowerLinePlantEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25
*/
@Data
@TableName("base_power_line_storage")
@TableName("BASE_POWER_LINE_STORAGE")
public class BasePowerLineStorageEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25
*/
@Data
@TableName("base_power_line_wellhead")
@TableName("BASE_POWER_LINE_WELLHEAD")
public class BasePowerLineWellheadEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy_detail")
@TableName("BASE_PRICE_STRATEGY_DETAIL")
public class BasePriceStrategyDetailEnt extends BaseModel implements Serializable {
@XText("市电峰谷配置ID")
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy")
@TableName("BASE_PRICE_STRATEGY")
public class BasePriceStrategyEnt extends BaseModel implements Serializable {
@XText("策略名称")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy_month")
@TableName("BASE_PRICE_STRATEGY_MONTH")
public class BasePriceStrategyMonthEnt extends BaseModel implements Serializable {
@XText("市电峰谷配置ID")
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_project_info")
@TableName("BASE_PROJECT_INFO")
public class BaseProjectInfoEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("base_project_info_predicted_data")
@TableName("BASE_PROJECT_INFO_PREDICTED_DATA")
public class BaseProjectInfoPredictedDataEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -8,7 +8,7 @@ import xstartup.annotation.XText;
import java.io.Serializable;
@TableName("base_wather")
@TableName("BASE_WATHER")
public class BaseWatherEnt implements Serializable {
@XText("主键")
@TableId(type = IdType.AUTO)
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08
*/
@Data
@TableName("base_wellhead")
@TableName("BASE_WELLHEAD")
public class BaseWellheadEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2024/08/28
*/
@Data
@TableName("base_wind_tower")
@TableName("BASE_WIND_TOWER")
public class BaseWindTowerEnt extends BaseModel implements Serializable {
@XText("风机电站ID")
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2024/08/28
*/
@Data
@TableName("base_wind_turbine")
@TableName("BASE_WIND_TURBINE")
public class BaseWindTurbineEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2024/06/25
*/
@Data
@TableName("config_oil_field")
@TableName("CONFIG_OIL_FIELD")
public class ConfigOilFieldEnt implements Serializable {
@XText("ID")
......
......@@ -18,7 +18,7 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("plant_predicted_power_data")
@TableName("PLANT_PREDICTED_POWER_DATA")
public class PlantPredictedPowerDataEnt implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/04/23
*/
@Data
@TableName("third_weather_data")
@TableName("THIRD_WEATHER_DATA")
public class ThirdWeatherDataEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/09/03
*/
@Data
@TableName("third_wind_power_generation")
@TableName("THIRD_WIND_POWER_GENERATION")
public class ThirdWindPowerGenerationEnt implements Serializable {
@XText("ID")
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/09/04
*/
@Data
@TableName("third_wind_power_generation_update")
@TableName("THIRD_WIND_POWER_GENERATION_UPDATE")
public class ThirdWindPowerGenerationUpdateEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/08/30
*/
@Data
@TableName("weather_bureau_data")
@TableName("WEATHER_BUREAU_DATA")
public class WeatherBureauDataEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -24,7 +24,7 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("wind_prediction_future")
@TableName("WIND_PREDICTION_FUTURE")
public class WindPredictionFutureEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/08/29
*/
@Data
@TableName("wind_prediction_history")
@TableName("WIND_PREDICTION_HISTORY")
public class WindPredictionHistoryEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -36,20 +36,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_data
from BASE_DATA
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_data
from BASE_DATA
where
id=#{id}
</select>
<insert id="batchInsert">
insert into base_data(
insert into BASE_DATA(
ou_id,
line_id,
data_date,
......
......@@ -41,20 +41,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_diesel_generator
from BASE_DIESEL_GENERATOR
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_diesel_generator
from BASE_DIESEL_GENERATOR
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_diesel_generator (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_DIESEL_GENERATOR (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, ou_id, ou_name, device_name, maker_number, unit_type_name,
normal_power, standby_power) VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -47,20 +47,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_energy_storage_device
from BASE_ENERGY_STORAGE_DEVICE
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_energy_storage_device
from BASE_ENERGY_STORAGE_DEVICE
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_energy_storage_device (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_ENERGY_STORAGE_DEVICE (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, ou_id, ou_name, device_name, maker_number, storage_model_name,
apparatus_capacity, rated_discharge_power, rated_charging_power, rated_discharge_depth,
rated_discharge_efficiency) VALUES
......
......@@ -32,13 +32,13 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseLineAttenuationRateView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_line_attenuation_rate
from BASE_LINE_ATTENUATION_RATE
where
id=#{id}
</select>
<insert id="batchInsert">
insert into base_line_attenuation_rate(
insert into BASE_LINE_ATTENUATION_RATE(
line_id,
particular_year,
attenuation_rate,
......
......@@ -90,15 +90,15 @@
c.array_toward,
c.production_year,
c.service_length
from base_line c
from BASE_LINE c
left join
sys_organization a on c.well_ou_id = a.id
SYS_ORGANIZATION a on c.well_ou_id = a.id
left join
sys_organization_rel b on a.id = b.ou_id
SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join
base_line e on c.parent_id = e.id
BASE_LINE e on c.parent_id = e.id
left join
sys_organization d on b.parent_ou_id = d.id
SYS_ORGANIZATION d on b.parent_ou_id = d.id
where c.id = #{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseLineView" resultMap="AllResultMap">
......@@ -117,15 +117,15 @@
c.array_incidence,
c.array_toward
FROM
base_line c
BASE_LINE c
left join
sys_organization a on c.well_ou_id = a.id
SYS_ORGANIZATION a on c.well_ou_id = a.id
left join
sys_organization_rel b on a.id = b.ou_id
SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join
base_line e on c.parent_id = e.id
BASE_LINE e on c.parent_id = e.id
left join
sys_organization d on b.parent_ou_id = d.id
SYS_ORGANIZATION d on b.parent_ou_id = d.id
<where>
<if test="lineName!=null and lineName !=''">
and c.line_name like concat('%',#{lineName},'%')
......@@ -157,13 +157,13 @@
a.elevation,
a.province
FROM
base_line c
BASE_LINE c
left join
sys_organization a on c.well_ou_id = a.id
SYS_ORGANIZATION a on c.well_ou_id = a.id
left join
sys_organization_rel b on a.id = b.ou_id
SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join
sys_organization d on b.parent_ou_id = d.id
SYS_ORGANIZATION d on b.parent_ou_id = d.id
<where>
<if test="id!=null and id !=''">
and c.id = #{id}
......@@ -187,7 +187,7 @@
grid_type_key as grid_type,
line_type_key as line_type
FROM
base_power_line
BASE_POWER_LINE
<where>
<if test="lineName!=null and lineName !=''">
and line_name like CONCAT( '%', #{lineName}, '%' )
......
......@@ -30,7 +30,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_photovoltaic_plant_mape_adj
from BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ
<where>
<if test="plantId != null and plantId != ''">
and plant_id = #{plantId}
......@@ -49,7 +49,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_photovoltaic_plant_mape_adj
from BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ
where
id=#{id}
</select>
......
......@@ -53,14 +53,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_photovoltaic_plant
from BASE_PHOTOVOLTAIC_PLANT
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_photovoltaic_plant
from BASE_PHOTOVOLTAIC_PLANT
where
id=#{id}
</select>
......@@ -85,9 +85,9 @@
p.array_orientation,
sa.city_code,
sa.province_code
from base_photovoltaic_plant p
join sys_organization so on so.id = p.ou_id
left join sys_area sa on sa.id = so.province
from BASE_PHOTOVOLTAIC_PLANT p
join SYS_ORGANIZATION so on so.id = p.ou_id
left join SYS_AREA sa on sa.id = so.province
where p.is_deleted = #{isDeleted}
</select>
......@@ -111,8 +111,8 @@
p.array_orientation,
p.area_code,
a.city_code
FROM base_photovoltaic_plant p
JOIN sys_area a ON a.id = p.area_code
FROM BASE_PHOTOVOLTAIC_PLANT p
JOIN SYS_AREA a ON a.id = p.area_code
WHERE p.is_deleted = 1
AND p.area_code IS NOT NULL
<if test="ouIdNotIn != null and ouIdNotIn.size() > 0">
......@@ -128,7 +128,7 @@
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_photovoltaic_plant (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_PHOTOVOLTAIC_PLANT (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, ou_id, ou_name, station_name, maker_number, photovoltaic_model_name,
mounting_angle, total_power, array_orientation, longitude, latitude, elevation,
area_code)
......@@ -166,9 +166,9 @@
<select id="selectPlantStrategyList" resultMap="ExtendResultMap">
SELECT l.strategy_id,
t.station_name
FROM base_power_line l
LEFT JOIN base_power_line_plant p ON l.id = p.line_id
LEFT JOIN base_photovoltaic_plant t ON p.plant_id = t.id
FROM BASE_POWER_LINE l
LEFT JOIN BASE_POWER_LINE_PLANT p ON l.id = p.line_id
LEFT JOIN BASE_PHOTOVOLTAIC_PLANT t ON p.plant_id = t.id
WHERE l.is_deleted = 1
AND l.strategy_id &lt;&gt; ''
AND p.is_deleted = 1
......
......@@ -37,7 +37,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineDieselView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_power_line_diesel
from BASE_POWER_LINE_DIESEL
where
id=#{id}
</select>
......@@ -47,14 +47,14 @@
l.diesel_id,
g.device_name,
g.standby_power
FROM base_power_line_diesel l
LEFT JOIN base_diesel_generator g ON l.diesel_id = g.id
FROM BASE_POWER_LINE_DIESEL l
LEFT JOIN BASE_DIESEL_GENERATOR g ON l.diesel_id = g.id
AND g.is_deleted = 1
WHERE l.line_id = #{lineId}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_power_line_diesel ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_POWER_LINE_DIESEL ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, diesel_id, ou_id )
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -40,7 +40,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLinePlantView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_power_line_plant
from BASE_POWER_LINE_PLANT
where
id=#{id}
</select>
......@@ -50,14 +50,14 @@
l.plant_id,
p.station_name,
p.total_power
FROM base_power_line_plant l
LEFT JOIN base_photovoltaic_plant p ON l.plant_id = p.id
FROM BASE_POWER_LINE_PLANT l
LEFT JOIN BASE_PHOTOVOLTAIC_PLANT p ON l.plant_id = p.id
AND p.is_deleted = 1
WHERE l.line_id = #{lineId}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_power_line_plant ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_POWER_LINE_PLANT ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, plant_id, ou_id )
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -86,9 +86,9 @@
p.latitude,
p.station_name,
p.total_power
FROM base_power_line b
JOIN base_power_line_plant l ON b.id = l.line_id
JOIN base_photovoltaic_plant p ON l.plant_id = p.id
FROM BASE_POWER_LINE b
JOIN BASE_POWER_LINE_PLANT l ON b.id = l.line_id
JOIN BASE_PHOTOVOLTAIC_PLANT p ON l.plant_id = p.id
WHERE
b.is_deleted = 1
AND l.is_deleted = 1
......
......@@ -40,7 +40,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineStorageView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_power_line_storage
from BASE_POWER_LINE_STORAGE
where
id=#{id}
</select>
......@@ -50,8 +50,8 @@
l.storage_id,
d.device_name,
d.apparatus_capacity
FROM base_power_line_storage l
LEFT JOIN base_energy_storage_device d ON l.storage_id = d.id
FROM BASE_POWER_LINE_STORAGE l
LEFT JOIN BASE_ENERGY_STORAGE_DEVICE d ON l.storage_id = d.id
AND d.is_deleted = 1
WHERE l.line_id = #{lineId}
</select>
......@@ -64,8 +64,8 @@
ROUND( AVG( d.rated_discharge_efficiency ) / 100, 2 ) AS rated_discharge_efficiency,
AVG( d.rated_discharge_power ) AS rated_discharge_power
FROM
base_power_line_storage s
JOIN base_energy_storage_device d ON s.storage_id = d.id
BASE_POWER_LINE_STORAGE s
JOIN BASE_ENERGY_STORAGE_DEVICE d ON s.storage_id = d.id
WHERE
s.line_id IN
<foreach collection="list" open="(" close=")" separator="," item="item">
......@@ -76,7 +76,7 @@
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_power_line_storage ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_POWER_LINE_STORAGE ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, storage_id, ou_id )
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -51,9 +51,9 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineView" resultMap="ExtendsResultMap">
select
<include refid="Base_Column_List"/>
, ( SELECT line_name FROM base_power_line l WHERE l.id = base_power_line.upper_line_id ) AS upper_line_name
, ( SELECT policy_name FROM base_price_strategy s WHERE s.id = base_power_line.strategy_id ) AS policy_name
from base_power_line
, ( SELECT line_name FROM BASE_POWER_LINE l WHERE l.id = BASE_POWER_LINE.upper_line_id ) AS upper_line_name
, ( SELECT policy_name FROM BASE_PRICE_STRATEGY s WHERE s.id = BASE_POWER_LINE.strategy_id ) AS policy_name
from BASE_POWER_LINE
where
id=#{id}
</select>
......@@ -70,11 +70,11 @@
b.is_share_dispatch,
b.is_reverse_dispatch,
b.start_interval,
( SELECT line_name FROM base_power_line l WHERE l.id = b.upper_line_id ) AS upper_line_name,
( SELECT COUNT( 1 ) FROM base_power_line_wellhead w WHERE b.id = w.line_id ) AS wellhead_count,
( SELECT line_name FROM BASE_POWER_LINE l WHERE l.id = b.upper_line_id ) AS upper_line_name,
( SELECT COUNT( 1 ) FROM BASE_POWER_LINE_WELLHEAD w WHERE b.id = w.line_id ) AS wellhead_count,
o.ou_name
from base_power_line b
LEFT JOIN sys_organization o ON b.ou_id = o.id
from BASE_POWER_LINE b
LEFT JOIN SYS_ORGANIZATION o ON b.ou_id = o.id
where
b.is_deleted = 1
AND o.is_deleted = 1
......
......@@ -43,7 +43,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_power_line_wellhead
from BASE_POWER_LINE_WELLHEAD
where
id=#{id}
</select>
......@@ -55,8 +55,8 @@
w.well_number,
w.run_type_key,
w.service_rating
FROM base_power_line_wellhead l
LEFT JOIN base_wellhead w ON l.wellhead_id = w.id
FROM BASE_POWER_LINE_WELLHEAD l
LEFT JOIN BASE_WELLHEAD w ON l.wellhead_id = w.id
AND w.is_deleted = 1
WHERE l.line_id = #{lineId}
<if test="wellheadId != null and wellheadId != ''">
......@@ -77,9 +77,9 @@
w.run_type_name,
w.rated_power
FROM
base_power_line p
JOIN base_power_line_wellhead l ON p.id = l.line_id
JOIN base_wellhead w ON l.wellhead_id = w.id
BASE_POWER_LINE p
JOIN BASE_POWER_LINE_WELLHEAD l ON p.id = l.line_id
JOIN BASE_WELLHEAD w ON l.wellhead_id = w.id
WHERE
p.is_deleted = 1
AND l.is_deleted = 1
......@@ -114,7 +114,7 @@
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_power_line_wellhead ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_POWER_LINE_WELLHEAD ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, wellhead_id, ou_id, start_seq )
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -137,9 +137,9 @@
<select id="selectWellheadListByPlant" parameterType="pps.core.base.entity.BasePowerLineWellheadView"
resultMap="ExtendsResultMap">
SELECT b.well_number
FROM base_power_line_plant p
JOIN base_power_line_wellhead w ON p.line_id = w.line_id
JOIN base_wellhead b ON w.wellhead_id = b.id
FROM BASE_POWER_LINE_PLANT p
JOIN BASE_POWER_LINE_WELLHEAD w ON p.line_id = w.line_id
JOIN BASE_WELLHEAD b ON w.wellhead_id = b.id
WHERE p.is_deleted = 1
AND w.is_deleted = 1
AND b.is_deleted = 1
......
......@@ -39,20 +39,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_price_strategy_detail
from BASE_PRICE_STRATEGY_DETAIL
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_price_strategy_detail
from BASE_PRICE_STRATEGY_DETAIL
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_price_strategy_detail (
INSERT INTO BASE_PRICE_STRATEGY_DETAIL (
id,
create_by_id,
create_by_name,
......@@ -96,8 +96,8 @@
d.start_time,
d.end_time,
d.electrovalence
FROM base_price_strategy_month m
LEFT JOIN base_price_strategy_detail d ON m.strategy_month = d.strategy_month
FROM BASE_PRICE_STRATEGY_MONTH m
LEFT JOIN BASE_PRICE_STRATEGY_DETAIL d ON m.strategy_month = d.strategy_month
AND m.strategy_id = d.strategy_id
WHERE m.is_deleted = 1
AND d.is_deleted = 1
......
......@@ -29,20 +29,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_price_strategy_month
from BASE_PRICE_STRATEGY_MONTH
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_price_strategy_month
from BASE_PRICE_STRATEGY_MONTH
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_price_strategy_month ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_PRICE_STRATEGY_MONTH ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, strategy_id, strategy_month )
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -35,7 +35,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_price_strategy
from BASE_PRICE_STRATEGY
where
id=#{id}
</select>
......@@ -57,7 +57,7 @@
'是'
ELSE '否'
END is_fixed_price_value
FROM base_price_strategy
FROM BASE_PRICE_STRATEGY
WHERE
is_deleted = 1
<if test=" param.policyName != null and param.policyName != '' ">
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.base.mapper.BaseProjectInfoPredictedDataViewMapper">
<insert id="batchInsert">
insert into base_project_info_predicted_data(
insert into BASE_PROJECT_INFO_PREDICTED_DATA(
project_id,
particular_year,
predicted_power,
......
......@@ -39,20 +39,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_wellhead
from BASE_WELLHEAD
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_wellhead
from BASE_WELLHEAD
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO base_wellhead (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_WELLHEAD (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, ou_id, ou_name, well_number, run_type_key, run_type_name, service_rating,
rated_power) VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_wind_tower
from BASE_WIND_TOWER
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_wind_tower
from BASE_WIND_TOWER
where
id=#{id}
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO base_wind_tower (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO BASE_WIND_TOWER (id, is_deleted, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, station_id, tower_id, tower_name) VALUES
<foreach collection="list" item="item" separator=",">
(
......
......@@ -48,7 +48,7 @@
<select id="selectList" parameterType="pps.core.base.entity.BaseWindTurbineView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_wind_turbine
from BASE_WIND_TURBINE
where
is_deleted = 1
AND ou_id in
......@@ -81,8 +81,8 @@
t.area_code,
a.city_code,
a.`name` AS city_name
FROM base_wind_turbine t
LEFT JOIN sys_area a ON t.area_code = a.id
FROM BASE_WIND_TURBINE t
LEFT JOIN SYS_AREA a ON t.area_code = a.id
WHERE t.is_deleted = 1
AND t.id = #{id} LIMIT 1
</select>
......@@ -108,8 +108,8 @@
p.elevation,
p.area_code,
a.city_code
FROM base_wind_turbine p
JOIN sys_area a ON a.id = p.area_code
FROM BASE_WIND_TURBINE p
JOIN SYS_AREA a ON a.id = p.area_code
WHERE p.is_deleted = 1
AND p.area_code IS NOT NULL
<if test="ouId != null and ouId != ''">
......
......@@ -33,14 +33,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from config_oil_field
from CONFIG_OIL_FIELD
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from config_oil_field
from CONFIG_OIL_FIELD
where
id=#{id}
</select>
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.base.mapper.PlantPredictedPowerDataViewMapper">
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO plant_predicted_power_data
INSERT INTO PLANT_PREDICTED_POWER_DATA
(plant_id,
data_date,
year_time,
......
......@@ -61,19 +61,19 @@
<select id="selectOne" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_weather_data
from THIRD_WEATHER_DATA
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_weather_data
from THIRD_WEATHER_DATA
order by forecast_time
</select>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO third_weather_data ( dni, ghi, dhi, forecast_time, tem, rhu, wns, wnd, wns_grd, gust, pre,
INSERT INTO THIRD_WEATHER_DATA ( dni, ghi, dhi, forecast_time, tem, rhu, wns, wnd, wns_grd, gust, pre,
prs_qfe, vis, clo, uvb, uvi, phs, wep, wnd_100m, wns_100m, wns_grd_100m, update_time, create_time, longitude,
latitude) VALUES
<foreach collection="list" separator="," item="item">
......
......@@ -32,7 +32,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_wind_power_generation_update
from THIRD_WIND_POWER_GENERATION_UPDATE
where
id=#{id}
</select>
......@@ -40,7 +40,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_wind_power_generation_update
from THIRD_WIND_POWER_GENERATION_UPDATE
where
id=#{id}
</select>
......@@ -56,7 +56,7 @@
IFNULL( SUM( actual_generation ), 0 ) AS actual_generation,
MONTH ( collect_time ) AS actual_wind_direction
FROM
third_wind_power_generation_update
THIRD_WIND_POWER_GENERATION_UPDATE
WHERE
station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
......@@ -72,7 +72,7 @@
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO third_wind_power_generation_update (station_name, station_id, collect_time, actual_wind_speed,
INSERT INTO THIRD_WIND_POWER_GENERATION_UPDATE (station_name, station_id, collect_time, actual_wind_speed,
actual_power, actual_generation, accurate_wind_direction, actual_wind_direction, input_time, system_source) VALUES
<foreach collection="list" separator="," item="item">
(
......@@ -91,7 +91,7 @@
</insert>
<delete id="deleteBatch" parameterType="list">
DELETE FROM third_wind_power_generation_update
DELETE FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE
station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
......@@ -114,48 +114,48 @@
<select id="stationPowerGeneration" resultMap="ExtResultMap">
SELECT IFNULL(SUM(actual_generation), 0) AS today_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[2]} AND #{dateList[3]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS month_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[4]} AND #{dateList[5]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS last_month_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[6]} AND #{dateList[7]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS season_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[8]} AND #{dateList[9]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS last_season_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[10]} AND #{dateList[11]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS year_power,
(SELECT IFNULL(SUM(actual_generation), 0)
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[12]} AND #{dateList[13]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) AS last_year_power
FROM third_wind_power_generation_update
FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[0]}
AND #{dateList[1]}
AND station_id IN
......
......@@ -30,14 +30,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_wind_power_generation
from THIRD_WIND_POWER_GENERATION
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from third_wind_power_generation
from THIRD_WIND_POWER_GENERATION
where
id=#{id}
</select>
......@@ -52,8 +52,8 @@
f.wind_direction AS actual_wind_direction,
f.wind_direction AS accurate_wind_direction,
ROW_NUMBER() OVER ( PARTITION BY f.station_id ORDER BY f.data_time DESC ) AS rn
FROM base_wind_turbine t
LEFT JOIN wind_prediction_future f ON t.id = f.station_id
FROM BASE_WIND_TURBINE t
LEFT JOIN WIND_PREDICTION_FUTURE f ON t.id = f.station_id
WHERE t.is_deleted = 1
AND f.data_time BETWEEN #{startTime}
AND #{endTime})
......@@ -70,7 +70,7 @@
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO third_wind_power_generation (station_name, station_id, collect_time, actual_wind_speed,
INSERT INTO THIRD_WIND_POWER_GENERATION (station_name, station_id, collect_time, actual_wind_speed,
actual_power, actual_generation, accurate_wind_direction, actual_wind_direction, input_time, system_source)
VALUES
<foreach collection="list" separator="," item="item">
......
......@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from weather_bureau_data
from WEATHER_BUREAU_DATA
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from weather_bureau_data
from WEATHER_BUREAU_DATA
where
id=#{id}
</select>
<delete id="deleteBatch" parameterType="list">
DELETE FROM weather_bureau_data
DELETE FROM WEATHER_BUREAU_DATA
WHERE
area_code IN
<foreach collection="list" item="item" open="(" separator="," close=")">
......@@ -55,7 +55,7 @@
</delete>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO weather_bureau_data (
INSERT INTO WEATHER_BUREAU_DATA (
data_time,
weather_icon,
air_temperature,
......
......@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from wind_prediction_future
from WIND_PREDICTION_FUTURE
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from wind_prediction_future
from WIND_PREDICTION_FUTURE
where
id=#{id}
</select>
<delete id="deleteBatch" parameterType="list">
DELETE FROM wind_prediction_future
DELETE FROM WIND_PREDICTION_FUTURE
WHERE
station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")">
......@@ -55,7 +55,7 @@
</delete>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO wind_prediction_future (station_id, data_time, wind_direction, wind_speed, air_temperature,
INSERT INTO WIND_PREDICTION_FUTURE (station_id, data_time, wind_direction, wind_speed, air_temperature,
humidity, pressure ,actual_wind_speed ,actual_power ,predicted_power) VALUES
<foreach collection="list" separator="," item="item">
(
......
......@@ -39,27 +39,27 @@
<select id="selectOne" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from wind_prediction_history
from WIND_PREDICTION_HISTORY
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from wind_prediction_history
from WIND_PREDICTION_HISTORY
where
id=#{id}
</select>
<delete id="deleteByTimeRange">
DELETE
FROM wind_prediction_history
FROM WIND_PREDICTION_HISTORY
WHERE data_time BETWEEN #{startTime}
AND #{endTime}
</delete>
<insert id="batchInsert" parameterType="list">
INSERT INTO wind_prediction_history (station_id, data_time, wind_direction, wind_speed, air_temperature,
INSERT INTO WIND_PREDICTION_HISTORY (station_id, data_time, wind_direction, wind_speed, air_temperature,
humidity, pressure, actual_wind_direction, actual_wind_speed, actual_power, predicted_power, wnd_100m,
wns_100m, wns_grd_100m) VALUES
<foreach collection="list" separator="," item="item">
......
......@@ -16,7 +16,7 @@ import java.io.Serializable;
* @date 2024/07/04
*/
@Data
@TableName("config_time_task")
@TableName("CONFIG_TIME_TASK")
public class ConfigTimeTaskEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -25,14 +25,14 @@
<select id="selectOne" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from config_time_task
from CONFIG_TIME_TASK
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from config_time_task
from CONFIG_TIME_TASK
where
id=#{id}
</select>
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/05/22
*/
@Data
@TableName("line_daily_electricity_trend")
@TableName("LINE_DAILY_ELECTRICITY_TREND")
public class LineDailyElectricityTrendEnt implements Serializable {
@XText("ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_calibration_history")
@TableName("SPACE_CALIBRATION_HISTORY")
public class SpaceCalibrationHistoryEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/09/05
*/
@Data
@TableName("space_calibration_period")
@TableName("SPACE_CALIBRATION_PERIOD")
public class SpaceCalibrationPeriodEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_institution_detail")
@TableName("SPACE_INSTITUTION_DETAIL")
public class SpaceInstitutionDetailEnt extends BaseModel implements Serializable {
@XText("组织机构ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_institution_duration")
@TableName("SPACE_INSTITUTION_DURATION")
public class SpaceInstitutionDurationEnt extends BaseModel implements Serializable {
@XText("间开制度ID")
......
......@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/05
*/
@Data
@TableName("space_institution_wellhead")
@TableName("SPACE_INSTITUTION_WELLHEAD")
public class SpaceInstitutionWellheadEnt extends BaseModel implements Serializable {
@XText("间开制度ID")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2024/10/31
*/
@Data
@TableName("space_optimize_effect")
@TableName("SPACE_OPTIMIZE_EFFECT")
public class SpaceOptimizeEffectEnt extends BaseModel implements Serializable {
@XText("优化周期ID")
......
......@@ -22,7 +22,7 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("space_optimize_long_duration")
@TableName("SPACE_OPTIMIZE_LONG_DURATION")
public class SpaceOptimizeLongDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_long_period")
@TableName("SPACE_OPTIMIZE_LONG_PERIOD")
public class SpaceOptimizeLongPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_long_wellhead")
@TableName("SPACE_OPTIMIZE_LONG_WELLHEAD")
public class SpaceOptimizeLongWellheadEnt extends BaseModel implements Serializable {
@XText("长期优化周期ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_mid_duration")
@TableName("SPACE_OPTIMIZE_MID_DURATION")
public class SpaceOptimizeMidDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_mid_period")
@TableName("SPACE_OPTIMIZE_MID_PERIOD")
public class SpaceOptimizeMidPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_mid_wellhead")
@TableName("SPACE_OPTIMIZE_MID_WELLHEAD")
public class SpaceOptimizeMidWellheadEnt extends BaseModel implements Serializable {
@XText("中短期优化周期ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_short_duration")
@TableName("SPACE_OPTIMIZE_SHORT_DURATION")
public class SpaceOptimizeShortDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_short_period")
@TableName("SPACE_OPTIMIZE_SHORT_PERIOD")
public class SpaceOptimizeShortPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_short_wellhead")
@TableName("SPACE_OPTIMIZE_SHORT_WELLHEAD")
public class SpaceOptimizeShortWellheadEnt extends BaseModel implements Serializable {
@XText("短期优化周期ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_ultra_duration")
@TableName("SPACE_OPTIMIZE_ULTRA_DURATION")
public class SpaceOptimizeUltraDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2024/03/22
*/
@Data
@TableName("space_optimize_ultra_period")
@TableName("SPACE_OPTIMIZE_ULTRA_PERIOD")
public class SpaceOptimizeUltraPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05
*/
@Data
@TableName("space_optimize_ultra_wellhead")
@TableName("SPACE_OPTIMIZE_ULTRA_WELLHEAD")
public class SpaceOptimizeUltraWellheadEnt extends BaseModel implements Serializable {
@XText("长期优化周期ID")
@TableField
......
......@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/05/24
*/
@Data
@TableName("well_daily_electricity_trend")
@TableName("WELL_DAILY_ELECTRICITY_TREND")
public class WellDailyElectricityTrendEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
......
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from line_daily_electricity_trend
from LINE_DAILY_ELECTRICITY_TREND
where
id=#{id}
</select>
......@@ -50,13 +50,13 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from line_daily_electricity_trend
from LINE_DAILY_ELECTRICITY_TREND
where
id=#{id}
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO line_daily_electricity_trend (station_name, total_power, photovoltaic_power, municipal_power,
INSERT INTO LINE_DAILY_ELECTRICITY_TREND (station_name, total_power, photovoltaic_power, municipal_power,
last_total_power, last_photovoltaic_power, last_municipal_power, total_ratio, photovoltaic_ratio,
municipal_ratio, valley_electric_open_hour, valley_electric_rate, sum_run_duration, create_date, system_source)
VALUES
......@@ -90,7 +90,7 @@
IFNULL( SUM( last_municipal_power ), 0 ) AS last_municipal_power,
DATE( create_date ) AS create_date
FROM
line_daily_electricity_trend
LINE_DAILY_ELECTRICITY_TREND
WHERE
station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item">
......@@ -123,7 +123,7 @@
IFNULL( SUM( sum_run_duration ), 0 ) AS sum_run_duration,
1 AS day_flag
FROM
line_daily_electricity_trend
LINE_DAILY_ELECTRICITY_TREND
WHERE
DATE ( create_date ) = #{createDate}
AND system_source = #{systemSource}
......@@ -137,7 +137,7 @@
IFNULL( SUM( sum_run_duration ), 0 ) AS sum_run_duration,
2 AS day_flag
FROM
line_daily_electricity_trend
LINE_DAILY_ELECTRICITY_TREND
WHERE
DATE ( create_date ) = #{startTime}
AND system_source = #{systemSource}
......@@ -151,7 +151,7 @@
IFNULL( SUM( sum_run_duration ), 0 ) AS sum_run_duration,
3 AS day_flag
FROM
line_daily_electricity_trend
LINE_DAILY_ELECTRICITY_TREND
WHERE
DATE ( create_date ) = #{endTime}
AND system_source = #{systemSource}
......
......@@ -34,7 +34,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceCalibrationHistoryView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_calibration_history
from SPACE_CALIBRATION_HISTORY
where
id=#{id}
</select>
......@@ -54,8 +54,8 @@
d.ou_id,
d.grid_type_key,
d.institution_name
FROM space_institution_detail d
JOIN space_calibration_history h ON d.id = h.institution_id
FROM SPACE_INSTITUTION_DETAIL d
JOIN SPACE_CALIBRATION_HISTORY h ON d.id = h.institution_id
WHERE h.is_deleted = 1
AND d.is_deleted = 1
AND d.is_current_basic = 0
......@@ -64,7 +64,7 @@
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_calibration_history ( id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO SPACE_CALIBRATION_HISTORY ( id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, institution_id, execution_cycle, calibration_date )
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -31,14 +31,14 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceCalibrationPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_calibration_period
from SPACE_CALIBRATION_PERIOD
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.space.entity.SpaceCalibrationPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_calibration_period
from SPACE_CALIBRATION_PERIOD
where
id=#{id}
</select>
......
......@@ -48,7 +48,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_detail
from SPACE_INSTITUTION_DETAIL
where
id=#{id}
</select>
......@@ -56,7 +56,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_detail
from SPACE_INSTITUTION_DETAIL
where
id=#{id}
</select>
......@@ -83,7 +83,7 @@
optimize_state,
is_current_basic,
start_interval
FROM space_institution_detail
FROM SPACE_INSTITUTION_DETAIL
WHERE is_current_basic = 0
AND is_deleted = 1
AND ou_id = #{ouId}),
......@@ -93,7 +93,7 @@
execution_cycle,
optimize_state,
optimize_deadline
FROM space_optimize_ultra_period
FROM SPACE_OPTIMIZE_ULTRA_PERIOD
WHERE institution_id IN (SELECT id FROM institution_detail)
AND is_deleted = 1),
mid_period
......@@ -102,7 +102,7 @@
optimize_date AS execution_cycle,
optimize_state,
optimize_date AS optimize_deadline
FROM space_optimize_short_period
FROM SPACE_OPTIMIZE_SHORT_PERIOD
WHERE institution_id IN (SELECT id FROM institution_detail)
AND is_deleted = 1)
SELECT d.id,
......
......@@ -37,7 +37,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceInstitutionDurationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_duration
from SPACE_INSTITUTION_DURATION
where
id=#{id}
</select>
......@@ -45,13 +45,13 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_duration
from SPACE_INSTITUTION_DURATION
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_institution_duration (
INSERT INTO SPACE_INSTITUTION_DURATION (
id,
create_by_id,
create_by_name,
......
......@@ -53,7 +53,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceInstitutionWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_wellhead
from SPACE_INSTITUTION_WELLHEAD
where
id=#{id}
</select>
......@@ -61,13 +61,13 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_institution_wellhead
from SPACE_INSTITUTION_WELLHEAD
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_institution_wellhead (
INSERT INTO SPACE_INSTITUTION_WELLHEAD (
id,
create_by_id,
create_by_name,
......@@ -133,7 +133,7 @@
close_well_day,
run_duration
FROM
space_institution_wellhead
SPACE_INSTITUTION_WELLHEAD
WHERE
is_deleted = 1
AND institution_id IN
......@@ -165,8 +165,8 @@
w.min_close,
b.service_rating
FROM
space_institution_wellhead w
JOIN base_wellhead b ON w.wellhead_id = b.id
SPACE_INSTITUTION_WELLHEAD w
JOIN BASE_WELLHEAD b ON w.wellhead_id = b.id
WHERE
w.is_deleted = 1
AND b.is_deleted = 1
......@@ -195,8 +195,8 @@
w.min_open,
w.max_close,
w.min_close
FROM space_institution_detail d
LEFT JOIN space_institution_wellhead w ON d.id = w.institution_id
FROM SPACE_INSTITUTION_DETAIL d
LEFT JOIN SPACE_INSTITUTION_WELLHEAD w ON d.id = w.institution_id
WHERE d.is_deleted = 1
AND d.is_current_basic = 0
AND d.institution_end_date &gt; NOW()
......
......@@ -93,20 +93,20 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeEffectView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_effect
from SPACE_OPTIMIZE_EFFECT
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.space.entity.SpaceOptimizeEffectView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_effect
from SPACE_OPTIMIZE_EFFECT
where
id=#{id}
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO space_optimize_effect ( id ,
INSERT INTO SPACE_OPTIMIZE_EFFECT ( id ,
is_deleted,
create_by_id,
create_by_name,
......
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_long_duration
from SPACE_OPTIMIZE_LONG_DURATION
where
id=#{id}
</select>
......@@ -50,13 +50,13 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_long_duration
from SPACE_OPTIMIZE_LONG_DURATION
where
id=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_optimize_long_duration (
INSERT INTO SPACE_OPTIMIZE_LONG_DURATION (
id,
create_by_id,
create_by_name,
......
......@@ -35,7 +35,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeLongPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_long_period
from SPACE_OPTIMIZE_LONG_PERIOD
where
id=#{id}
</select>
......@@ -56,15 +56,15 @@
d.ou_id,
d.grid_type_key,
d.institution_name
FROM space_institution_detail d
JOIN space_optimize_long_period p ON d.id = p.institution_id
FROM SPACE_INSTITUTION_DETAIL d
JOIN SPACE_OPTIMIZE_LONG_PERIOD p ON d.id = p.institution_id
WHERE p.is_deleted = 1
AND p.line_id = #{lineId}
ORDER BY p.create_time DESC
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_optimize_long_period ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_LONG_PERIOD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, line_id, institution_id, execution_cycle, optimize_state,
optimize_deadline )
VALUES
......
......@@ -34,7 +34,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_long_wellhead
from SPACE_OPTIMIZE_LONG_WELLHEAD
where
id=#{id}
</select>
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_long_wellhead
from SPACE_OPTIMIZE_LONG_WELLHEAD
where
id=#{id}
</select>
......@@ -63,8 +63,8 @@
24
ELSE w.run_duration
END run_duration
FROM space_optimize_long_wellhead s
LEFT JOIN space_institution_wellhead w ON s.wellhead_id = w.wellhead_id
FROM SPACE_OPTIMIZE_LONG_WELLHEAD s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD w ON s.wellhead_id = w.wellhead_id
WHERE s.is_deleted = 1
AND w.is_deleted = 1
AND s.long_period_id = #{longPeriodId}
......@@ -73,7 +73,7 @@
</select>
<insert id="batchInsertList" parameterType="list">
INSERT INTO space_optimize_long_wellhead ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_LONG_WELLHEAD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, long_period_id, wellhead_id, well_number )
VALUES
<foreach collection="list" item="item" separator=",">
......
......@@ -41,7 +41,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeMidDurationView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_mid_duration
from SPACE_OPTIMIZE_MID_DURATION
where
id=#{id}
</select>
......@@ -49,7 +49,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_mid_duration
from SPACE_OPTIMIZE_MID_DURATION
where
id=#{id}
</select>
......
......@@ -35,7 +35,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeMidPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_mid_period
from SPACE_OPTIMIZE_MID_PERIOD
where
id=#{id}
</select>
......@@ -56,8 +56,8 @@
d.ou_id,
d.grid_type_key,
d.institution_name
FROM space_institution_detail d
JOIN space_optimize_mid_period p ON d.id = p.institution_id
FROM SPACE_INSTITUTION_DETAIL d
JOIN SPACE_OPTIMIZE_MID_PERIOD p ON d.id = p.institution_id
WHERE p.is_deleted = 1
AND p.line_id = #{lineId}
ORDER BY p.create_time DESC
......
......@@ -33,7 +33,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeMidWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_mid_wellhead
from SPACE_OPTIMIZE_MID_WELLHEAD
where
id=#{id}
</select>
......@@ -41,7 +41,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_mid_wellhead
from SPACE_OPTIMIZE_MID_WELLHEAD
where
id=#{id}
</select>
......@@ -62,8 +62,8 @@
24
ELSE w.run_duration
END run_duration
FROM space_optimize_mid_wellhead s
LEFT JOIN space_institution_wellhead w ON s.wellhead_id = w.wellhead_id
FROM SPACE_OPTIMIZE_MID_WELLHEAD s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD w ON s.wellhead_id = w.wellhead_id
WHERE s.is_deleted = 1
AND w.is_deleted = 1
AND s.mid_period_id = #{midPeriodId}
......
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_short_duration
from SPACE_OPTIMIZE_SHORT_DURATION
where
id=#{id}
</select>
......@@ -50,7 +50,7 @@
<select id="selectList" parameterType="pps.core.space.entity.SpaceOptimizeShortDurationView"
resultMap="BaseResultMap">
WITH opt_short AS (SELECT wellhead_id, is_optimize, open_well_time, close_well_time, generation_type_key
FROM space_optimize_short_duration
FROM SPACE_OPTIMIZE_SHORT_DURATION
WHERE is_optimize = 0
AND short_period_id = #{shortPeriodId})
SELECT wellhead_id,
......@@ -63,7 +63,7 @@
open_well_time,
close_well_time,
generation_type_key
FROM space_optimize_short_duration
FROM SPACE_OPTIMIZE_SHORT_DURATION
WHERE is_optimize = 1
AND short_period_id = #{shortPeriodId}
AND wellhead_id NOT IN (SELECT wellhead_id FROM opt_short)
......@@ -98,9 +98,9 @@
i.interval_describe,
ROW_NUMBER() OVER ( PARTITION BY w.well_number ORDER BY d.open_well_time ASC ) AS rn
FROM
base_wellhead w
JOIN space_institution_wellhead i ON w.id = i.wellhead_id
JOIN space_optimize_short_duration d ON d.wellhead_id = i.wellhead_id
BASE_WELLHEAD w
JOIN SPACE_INSTITUTION_WELLHEAD i ON w.id = i.wellhead_id
JOIN SPACE_OPTIMIZE_SHORT_DURATION d ON d.wellhead_id = i.wellhead_id
WHERE
w.is_deleted = 1
AND i.is_deleted = 1
......@@ -138,13 +138,13 @@
d.open_well_time,
d.close_well_time,
IFNULL(CASE i.run_type_key WHEN 'CONTINUOUS' THEN 24 ELSE i.run_duration END, 0) AS run_duration
FROM space_optimize_short_period p
JOIN space_optimize_short_wellhead s ON p.id = s.short_period_id
JOIN space_optimize_short_duration d ON s.wellhead_id = d.wellhead_id
FROM SPACE_OPTIMIZE_SHORT_PERIOD p
JOIN SPACE_OPTIMIZE_SHORT_WELLHEAD s ON p.id = s.short_period_id
JOIN SPACE_OPTIMIZE_SHORT_DURATION d ON s.wellhead_id = d.wellhead_id
AND s.optimize_date = d.optimize_date
LEFT JOIN base_wellhead w ON s.wellhead_id = w.id
LEFT JOIN base_power_line l ON p.line_id = l.id
LEFT JOIN space_institution_wellhead i ON s.wellhead_id = i.wellhead_id
LEFT JOIN BASE_WELLHEAD w ON s.wellhead_id = w.id
LEFT JOIN BASE_POWER_LINE l ON p.line_id = l.id
LEFT JOIN SPACE_INSTITUTION_WELLHEAD i ON s.wellhead_id = i.wellhead_id
WHERE p.optimize_date = #{optimizeDate}
AND d.is_optimize = 0
AND p.is_deleted = 1
......
......@@ -33,7 +33,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeShortPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_short_period
from SPACE_OPTIMIZE_SHORT_PERIOD
where
id=#{id}
</select>
......@@ -54,8 +54,8 @@
d.ou_id,
d.grid_type_key,
d.institution_name
FROM space_institution_detail d
JOIN space_optimize_short_period p ON d.id = p.institution_id
FROM SPACE_INSTITUTION_DETAIL d
JOIN SPACE_OPTIMIZE_SHORT_PERIOD p ON d.id = p.institution_id
WHERE p.is_deleted = 1
AND p.line_id = #{lineId}
ORDER BY p.create_time DESC
......
......@@ -36,7 +36,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_short_wellhead
from SPACE_OPTIMIZE_SHORT_WELLHEAD
where
id=#{id}
</select>
......@@ -44,7 +44,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_short_wellhead
from SPACE_OPTIMIZE_SHORT_WELLHEAD
where
id=#{id}
</select>
......@@ -65,8 +65,8 @@
24
ELSE w.run_duration
END run_duration
FROM space_optimize_short_wellhead s
LEFT JOIN space_institution_wellhead w ON s.wellhead_id = w.wellhead_id
FROM SPACE_OPTIMIZE_SHORT_WELLHEAD s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD w ON s.wellhead_id = w.wellhead_id
WHERE s.is_deleted = 1
AND w.is_deleted = 1
AND s.short_period_id = #{shortPeriodId}
......
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_ultra_duration
from SPACE_OPTIMIZE_ULTRA_DURATION
where
id=#{id}
</select>
......@@ -50,7 +50,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_ultra_duration
from SPACE_OPTIMIZE_ULTRA_DURATION
where
id=#{id}
</select>
......
......@@ -35,7 +35,7 @@
<select id="selectOne" parameterType="pps.core.space.entity.SpaceOptimizeUltraPeriodView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_ultra_period
from SPACE_OPTIMIZE_ULTRA_PERIOD
where
id=#{id}
</select>
......@@ -57,8 +57,8 @@
d.ou_id,
d.grid_type_key,
d.institution_name
FROM space_institution_detail d
JOIN space_optimize_ultra_period p ON d.id = p.institution_id
FROM SPACE_INSTITUTION_DETAIL d
JOIN SPACE_OPTIMIZE_ULTRA_PERIOD p ON d.id = p.institution_id
WHERE p.is_deleted = 1
AND p.line_id = #{lineId}
ORDER BY p.create_time DESC
......
......@@ -34,7 +34,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_ultra_wellhead
from SPACE_OPTIMIZE_ULTRA_WELLHEAD
where
id=#{id}
</select>
......@@ -42,7 +42,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from space_optimize_ultra_wellhead
from SPACE_OPTIMIZE_ULTRA_WELLHEAD
where
id=#{id}
</select>
......@@ -63,8 +63,8 @@
24
ELSE w.run_duration
END run_duration
FROM space_optimize_ultra_wellhead s
LEFT JOIN space_institution_wellhead w ON s.wellhead_id = w.wellhead_id
FROM SPACE_OPTIMIZE_ULTRA_WELLHEAD s
LEFT JOIN SPACE_INSTITUTION_WELLHEAD w ON s.wellhead_id = w.wellhead_id
WHERE s.is_deleted = 1
AND w.is_deleted = 1
AND s.ultra_period_id = #{ultraPeriodId}
......
......@@ -3,7 +3,7 @@
<mapper namespace="pps.core.space.mapper.SpaceOptimizeViewMapper">
<insert id="longPeriodBatchInsertList" parameterType="list">
INSERT INTO space_optimize_long_period ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_LONG_PERIOD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, line_id, institution_id, execution_cycle, optimize_state,
optimize_deadline )
VALUES
......@@ -26,7 +26,7 @@
</insert>
<insert id="longWellheadBatchInsertList" parameterType="list">
INSERT INTO space_optimize_long_wellhead ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_LONG_WELLHEAD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, long_period_id, wellhead_id, well_number, start_seq, optimize_date)
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -48,7 +48,7 @@
</insert>
<insert id="longDurationBatchInsertList" parameterType="list">
INSERT INTO space_optimize_long_duration (
INSERT INTO SPACE_OPTIMIZE_LONG_DURATION (
id,
create_by_id,
create_by_name,
......@@ -96,7 +96,7 @@
</insert>
<insert id="midPeriodBatchInsertList" parameterType="list">
INSERT INTO space_optimize_mid_period ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_MID_PERIOD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, line_id, institution_id, execution_cycle, optimize_state,
optimize_deadline )
VALUES
......@@ -119,7 +119,7 @@
</insert>
<insert id="midWellheadBatchInsertList" parameterType="list">
INSERT INTO space_optimize_mid_wellhead ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_MID_WELLHEAD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, mid_period_id, wellhead_id, well_number, start_seq, optimize_date)
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -141,7 +141,7 @@
</insert>
<insert id="midDurationBatchInsertList" parameterType="list">
INSERT INTO space_optimize_mid_duration (
INSERT INTO SPACE_OPTIMIZE_MID_DURATION (
id,
create_by_id,
create_by_name,
......@@ -189,7 +189,7 @@
</insert>
<insert id="shortPeriodBatchInsertList" parameterType="list">
INSERT INTO space_optimize_short_period (id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO SPACE_OPTIMIZE_SHORT_PERIOD (id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, line_id, institution_id, optimize_state, optimize_date)
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -210,7 +210,7 @@
</insert>
<insert id="shortWellheadBatchInsertList" parameterType="list">
INSERT INTO space_optimize_short_wellhead (id, create_by_id, create_by_name, create_time, modify_by_id,
INSERT INTO SPACE_OPTIMIZE_SHORT_WELLHEAD (id, create_by_id, create_by_name, create_time, modify_by_id,
modify_by_name, modify_time, short_period_id, wellhead_id, well_number, start_seq,
optimize_date,frostproof_well)
VALUES
......@@ -234,7 +234,7 @@
</insert>
<insert id="shortDurationBatchInsertList" parameterType="list">
INSERT INTO space_optimize_short_duration (id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_SHORT_DURATION (id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, record_id, short_period_id, wellhead_id, is_optimize,
generation_type_key, open_well_time, close_well_time, first_start, optimize_date)
VALUES
......@@ -268,7 +268,7 @@
</insert>
<insert id="ultraPeriodBatchInsertList" parameterType="list">
INSERT INTO space_optimize_ultra_period ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_ULTRA_PERIOD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, line_id, institution_id, execution_cycle, optimize_state,
optimize_deadline )
VALUES
......@@ -291,7 +291,7 @@
</insert>
<insert id="ultraWellheadBatchInsertList" parameterType="list">
INSERT INTO space_optimize_ultra_wellhead ( id, create_by_id, create_by_name, create_time,
INSERT INTO SPACE_OPTIMIZE_ULTRA_WELLHEAD ( id, create_by_id, create_by_name, create_time,
modify_by_id, modify_by_name, modify_time, ultra_period_id, wellhead_id, well_number, start_seq, optimize_date)
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -313,7 +313,7 @@
</insert>
<insert id="ultraDurationBatchInsertList" parameterType="list">
INSERT INTO space_optimize_ultra_duration (
INSERT INTO SPACE_OPTIMIZE_ULTRA_DURATION (
id,
create_by_id,
create_by_name,
......
......@@ -38,7 +38,7 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from well_daily_electricity_trend
from WELL_DAILY_ELECTRICITY_TREND
where
id=#{id}
</select>
......@@ -46,13 +46,13 @@
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from well_daily_electricity_trend
from WELL_DAILY_ELECTRICITY_TREND
where
id=#{id}
</select>
<insert id="batchInsert" parameterType="list">
INSERT INTO well_daily_electricity_trend (well_number, space_run_duration, daily_open_hour,
INSERT INTO WELL_DAILY_ELECTRICITY_TREND (well_number, space_run_duration, daily_open_hour,
daily_green_open_hour, daily_green_consumption, daily_electricity_consumption, daily_liquid_production,
daily_carbon_reduction, green_electricity_rate, valley_electric_open_hour, valley_electric_rate, create_date,
system_source) VALUES
......@@ -106,13 +106,13 @@
y.year_space_run_duration,
y.year_daily_green_consumption,
y.year_valley_electric_open_hour
FROM well_daily_electricity_trend t
FROM WELL_DAILY_ELECTRICITY_TREND t
LEFT JOIN (SELECT well_number,
SUM(daily_green_open_hour) AS month_daily_green_open_hour,
SUM(space_run_duration) AS month_space_run_duration,
SUM(daily_green_consumption) AS month_daily_green_consumption,
SUM(valley_electric_open_hour) AS month_valley_electric_open_hour
FROM well_daily_electricity_trend
FROM WELL_DAILY_ELECTRICITY_TREND
WHERE
MONTH ( create_date ) = #{month}
AND well_number IN
......@@ -126,7 +126,7 @@
SUM(space_run_duration) AS year_space_run_duration,
SUM(daily_green_consumption) AS year_daily_green_consumption,
SUM(valley_electric_open_hour) AS year_valley_electric_open_hour
FROM well_daily_electricity_trend
FROM WELL_DAILY_ELECTRICITY_TREND
WHERE
YEAR ( create_date ) = #{year}
AND well_number IN
......
......@@ -36,20 +36,20 @@
<select id="selectOne" parameterType="pps.core.prediction.entity.BaseDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_data
from BASE_DATA
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.prediction.entity.BaseDataView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_data
from BASE_DATA
where
id=#{id}
</select>
<insert id="batchInsert">
insert into base_data(
insert into BASE_DATA(
ou_id,
line_id,
data_date,
......
......@@ -112,9 +112,9 @@
SELECT w.line_id AS line_id,
l.line_name AS line_name,
IFNULL(SUM(s.daily_electricity_consumption), 0) AS daily_electricity_consumption
FROM base_power_line_wellhead w
FROM BASE_POWER_LINE_WELLHEAD w
JOIN wellhead_daily_production_situation s ON w.wellhead_id = s.wellhead_id
LEFT JOIN base_power_line l ON w.line_id = l.id
LEFT JOIN BASE_POWER_LINE l ON w.line_id = l.id
WHERE w.is_deleted = 1
AND s.data_date = #{date}
<if test="systemSource != null">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment