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; ...@@ -7,7 +7,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
@TableName("sys_area") @TableName("SYS_AREA")
public class SysAreaEnt implements Serializable { public class SysAreaEnt implements Serializable {
@TableField @TableField
private Integer id; private Integer id;
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_auth_ou_scope") @TableName("SYS_AUTH_OU_SCOPE")
public class SysAuthOuScopeEnt implements Serializable { public class SysAuthOuScopeEnt implements Serializable {
@XText("范围授权id(主键)") @XText("范围授权id(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -10,7 +10,7 @@ import xstartup.annotation.XText; ...@@ -10,7 +10,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_dictionary") @TableName("SYS_DICTIONARY")
public class SysDictionaryEnt implements Serializable, ICommonEnt { public class SysDictionaryEnt implements Serializable, ICommonEnt {
@XText("主键") @XText("主键")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_menu") @TableName("SYS_MENU")
public class SysMenuEnt implements Serializable { public class SysMenuEnt implements Serializable {
@XText("菜单ID(主键)") @XText("菜单ID(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_organization_dictionary") @TableName("SYS_ORGANIZATION_DICTIONARY")
public class SysOrganizationDictionaryEnt implements Serializable { public class SysOrganizationDictionaryEnt implements Serializable {
@XText("组织机构字典id(主键)") @XText("组织机构字典id(主键)")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -11,7 +11,7 @@ import java.io.Serializable; ...@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("sys_organization") @TableName("SYS_ORGANIZATION")
public class SysOrganizationEnt implements Serializable { public class SysOrganizationEnt implements Serializable {
@XText("主键") @XText("主键")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_organization_property") @TableName("SYS_ORGANIZATION_PROPERTY")
public class SysOrganizationPropertyEnt implements Serializable { public class SysOrganizationPropertyEnt implements Serializable {
@XText("组织机构属性id(主键)") @XText("组织机构属性id(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_organization_rel") @TableName("SYS_ORGANIZATION_REL")
public class SysOrganizationRelEnt implements Serializable { public class SysOrganizationRelEnt implements Serializable {
@XText("主键") @XText("主键")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_role") @TableName("SYS_ROLE")
public class SysRoleEnt implements Serializable { public class SysRoleEnt implements Serializable {
@XText("角色ID(主键)") @XText("角色ID(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_role_menu_auth") @TableName("SYS_ROLE_MENU_AUTH")
public class SysRoleMenuAuthEnt implements Serializable { public class SysRoleMenuAuthEnt implements Serializable {
@XText("角色菜单授权id(主键)") @XText("角色菜单授权id(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_user") @TableName("SYS_USER")
public class SysUserEnt implements Serializable { public class SysUserEnt implements Serializable {
@XText("主键") @XText("主键")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -11,7 +11,7 @@ import java.io.Serializable; ...@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("sys_user_login_log") @TableName("SYS_USER_LOGIN_LOG")
public class SysUserLoginLogEnt implements Serializable { public class SysUserLoginLogEnt implements Serializable {
@XText("主键") @XText("主键")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_user_organization_rel") @TableName("SYS_USER_ORGANIZATION_REL")
public class SysUserOrganizationRelEnt implements Serializable { public class SysUserOrganizationRelEnt implements Serializable {
@XText("用户所属组织机构关系id(主键)") @XText("用户所属组织机构关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("sys_user_role_rel") @TableName("SYS_USER_ROLE_REL")
public class SysUserRoleRelEnt implements Serializable { public class SysUserRoleRelEnt implements Serializable {
@XText("用户角色关系id(主键)") @XText("用户角色关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID) @TableId(type = IdType.ASSIGN_UUID)
......
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_area from SYS_AREA
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_area from SYS_AREA
where where
id=#{id} id=#{id}
</select> </select>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_area from SYS_AREA
WHERE WHERE
id &lt;&gt; 120 id &lt;&gt; 120
ORDER BY ORDER BY
...@@ -46,14 +46,14 @@ ...@@ -46,14 +46,14 @@
WITH RECURSIVE area_tree (n, id, parent_id) AS (SELECT 0 AS n, WITH RECURSIVE area_tree (n, id, parent_id) AS (SELECT 0 AS n,
id, id,
parent_id parent_id
FROM sys_area FROM SYS_AREA
WHERE parent_id = 20 WHERE parent_id = 20
UNION ALL UNION ALL
SELECT n + 1, SELECT n + 1,
a.id, a.id,
a.parent_id a.parent_id
FROM area_tree AS t 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, SELECT t.id,
t.parent_id, t.parent_id,
t.n AS lev, t.n AS lev,
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
a.city_code, a.city_code,
a.province_code a.province_code
FROM area_tree t, FROM area_tree t,
sys_area a SYS_AREA a
WHERE t.id = a.id WHERE t.id = a.id
ORDER BY t.parent_id, ORDER BY t.parent_id,
t.id t.id
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
<select id="selectSysAreaPath" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap"> <select id="selectSysAreaPath" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
SELECT CONCAT(b.`name`, '/', c.`name`) AS `name` SELECT CONCAT(b.`name`, '/', c.`name`) AS `name`
FROM sys_area b FROM SYS_AREA b
JOIN sys_area c ON b.id = c.parent_id JOIN SYS_AREA c ON b.id = c.parent_id
WHERE b.lev = 1 WHERE b.lev = 1
AND c.lev = 2 AND c.lev = 2
AND (b.id = #{id} OR c.id = #{id}) LIMIT 1 AND (b.id = #{id} OR c.id = #{id}) LIMIT 1
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
a.`name` AS city, a.`name` AS city,
a.city_code, a.city_code,
a.id a.id
FROM sys_area p FROM SYS_AREA p
LEFT JOIN sys_area a ON p.id = a.parent_id LEFT JOIN SYS_AREA a ON p.id = a.parent_id
WHERE p.`name` IN WHERE p.`name` IN
<foreach collection="list" item="item" open="(" close=")" separator=","> <foreach collection="list" item="item" open="(" close=")" separator=",">
#{item} #{item}
......
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_auth_ou_scope from SYS_AUTH_OU_SCOPE
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap"> <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 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 where a.id =c.ou_id and b.id = c.menu_id
and c.user_id = #{userId} and c.user_id = #{userId}
<if test="menuName!=null and menuName!='' "> <if test="menuName!=null and menuName!='' ">
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
sau.modify_by_id, sau.modify_by_id,
sau.modify_by_name, sau.modify_by_name,
sau.modify_time,sm.menu_name sau.modify_time,sm.menu_name
from sys_auth_ou_scope sau from SYS_AUTH_OU_SCOPE sau
left join sys_menu sm on sm.id=sau.menu_id left join SYS_MENU sm on sm.id=sau.menu_id
where where
<if test="userGroupId!=null and userGroupId!='' "> <if test="userGroupId!=null and userGroupId!='' ">
and sau.user_group_id =#{userGroupId} and sau.user_group_id =#{userGroupId}
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
select ou_id, ou_name select ou_id, ou_name
from ( from (
(select distinct ou_id (select distinct ou_id
from sys_auth_ou_scope from SYS_AUTH_OU_SCOPE
where user_id = #{userId}) saos 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> </select>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
from ( from (
( (
select distinct ou_id select distinct ou_id
from sys_auth_ou_scope from SYS_AUTH_OU_SCOPE
<where> <where>
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and user_id = #{userId} and user_id = #{userId}
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</if> </if>
</where> </where>
) saos ) 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>
<select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView" <select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
...@@ -111,11 +111,11 @@ ...@@ -111,11 +111,11 @@
su.iam_login_name, su.iam_login_name,
so.id, so.id,
so.ou_name so.ou_name
from sys_auth_ou_scope saos, from SYS_AUTH_OU_SCOPE saos,
sys_user su, SYS_USER su,
sys_organization so, SYS_ORGANIZATION so,
sys_menu sm, SYS_MENU sm,
sys_user_organization_rel suor SYS_USER_ORGANIZATION_REL suor
where saos.user_id = su.id where saos.user_id = su.id
and suor.ou_id = so.id and suor.ou_id = so.id
and saos.menu_id = sm.id and saos.menu_id = sm.id
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</select> </select>
<insert id="batchInsert" parameterType="java.util.List"> <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) (id, ou_id, user_id, user_group_id, menu_id, create_by_id, create_by_name, create_time)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -57,20 +57,20 @@ ...@@ -57,20 +57,20 @@
menu_icon menu_icon
</sql> </sql>
<update id="updateShowChildren" parameterType="pps.core.system.entity.SysMenuView"> <update id="updateShowChildren" parameterType="pps.core.system.entity.SysMenuView">
update sys_menu update SYS_MENU
set show_children=#{showChildren} set show_children=#{showChildren}
</update> </update>
<select id="selectOne" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_menu from SYS_MENU
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_menu from SYS_MENU
where where
id=#{id} id=#{id}
</select> </select>
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
t3.url, t3.url,
t3.sort, t3.sort,
t3.menu_icon t3.menu_icon
from sys_user_role_rel t1 from SYS_USER_ROLE_REL t1
left join sys_role_menu_auth t2 on t1.role_id = t2.role_id 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 left join SYS_MENU t3 on t2.menu_id = t3.id
where t1.user_id = #{userId} where t1.user_id = #{userId}
order by t3.sort asc order by t3.sort asc
</select> </select>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<select id="selectSysMenuList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap"> <select id="selectSysMenuList" parameterType="pps.core.system.entity.SysMenuView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_menu from SYS_MENU
<where> <where>
<if test="menuName !=null and menuName!=''"> <if test="menuName !=null and menuName!=''">
AND menu_name like concat('%',#{menuName},'%') AND menu_name like concat('%',#{menuName},'%')
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysMenuView"> <select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysMenuView">
select max(sm.sort) as sort, select max(sm.sort) as sort,
sm.parent_menu_id sm.parent_menu_id
from sys_menu sm from SYS_MENU sm
where sm.parent_menu_id = #{parentMenuId} where sm.parent_menu_id = #{parentMenuId}
group by sm.parent_menu_id limit 1 group by sm.parent_menu_id limit 1
</select> </select>
...@@ -131,12 +131,12 @@ ...@@ -131,12 +131,12 @@
apply_scene, apply_scene,
menu_describe, menu_describe,
menu_icon menu_icon
from sys_menu sm from SYS_MENU sm
where apply_scene = #{applyScene} where apply_scene = #{applyScene}
and sm.id in (select menu_id 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 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 surr.user_id = #{userId}))) a
where media_type like concat('%', #{mediaType}, '%') where media_type like concat('%', #{mediaType}, '%')
or media_type = 'ALL' or media_type = 'ALL'
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
a.menu_describe, a.menu_describe,
a.menu_icon a.menu_icon
from temps 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.* select distinct temps.*
from temps from temps
...@@ -165,12 +165,12 @@ ...@@ -165,12 +165,12 @@
select t.id, t.menu_name, t.parent_menu_id select t.id, t.menu_name, t.parent_menu_id
from (with RECURSIVE temps as from (with RECURSIVE temps as
(select id, menu_name, parent_menu_id (select id, menu_name, parent_menu_id
from sys_menu sm from SYS_MENU sm
where sm.id = #{id} where sm.id = #{id}
union union
select a.id, a.menu_name, a.parent_menu_id select a.id, a.menu_name, a.parent_menu_id
from temps 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.* select temps.*
from temps) t from temps) t
where t.id !=#{id} where t.id !=#{id}
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
menu_describe, menu_describe,
show_children, show_children,
menu_icon menu_icon
from sys_menu from SYS_MENU
where url like '/%' where url like '/%'
order by sort asc order by sort asc
</select> </select>
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
sm.menu_pattern, sm.menu_pattern,
sm.menu_describe, sm.menu_describe,
sm.menu_icon sm.menu_icon
from sys_menu sm from SYS_MENU sm
where menu_name like concat('%', #{menuName}, '%') where menu_name like concat('%', #{menuName}, '%')
and apply_scene = #{applyScene} and apply_scene = #{applyScene}
union union
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
sm.menu_describe, sm.menu_describe,
sm.menu_icon sm.menu_icon
from temps 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.* select temps.*
from temps from temps
</select> </select>
...@@ -251,11 +251,11 @@ ...@@ -251,11 +251,11 @@
cast(substring(url, position('=' in url) + 1) as varchar) as fill_conf_id, cast(substring(url, position('=' in url) + 1) as varchar) as fill_conf_id,
true as show_home, true as show_home,
menu_icon menu_icon
from sys_menu sm from SYS_MENU sm
where sm.id in (select menu_id 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 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 surr.user_id = #{userId})))
where media_type like concat('%', #{mediaType}, '%') where media_type like concat('%', #{mediaType}, '%')
or media_type = 'ALL') or media_type = 'ALL')
...@@ -273,11 +273,11 @@ ...@@ -273,11 +273,11 @@
url, url,
menu_describe, menu_describe,
menu_icon menu_icon
FROM sys_menu sm FROM SYS_MENU sm
WHERE sm.id IN (SELECT menu_id 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 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 surr.user_id = #{userId}))
UNION UNION
SELECT a.id, SELECT a.id,
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
a.menu_describe, a.menu_describe,
a.menu_icon a.menu_icon
FROM temps 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.* SELECT DISTINCT temps.*
FROM temps FROM temps
</select> </select>
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
select select
count(so.id) as id, count(so.id) as id,
so.parent_menu_id so.parent_menu_id
from sys_menu so from SYS_MENU so
where so.parent_menu_id in where so.parent_menu_id in
<foreach collection="list" open="(" close=")" separator="," item="item"> <foreach collection="list" open="(" close=")" separator="," item="item">
#{item} #{item}
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_dictionary from SYS_ORGANIZATION_DICTIONARY
where where
id=#{id} id=#{id}
</select> </select>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_dictionary from SYS_ORGANIZATION_DICTIONARY
where where
id=#{id} id=#{id}
</select> </select>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
dic_code,parent_dic_code dic_code,parent_dic_code
from sys_organization_dictionary from SYS_ORGANIZATION_DICTIONARY
where end_time &gt; #{endTime} where end_time &gt; #{endTime}
<if test="ouId != null and ouId !=''"> <if test="ouId != null and ouId !=''">
and ou_id=#{ouId} and ou_id=#{ouId}
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
a.parent_dic_code, a.parent_dic_code,
b.dic_key, b.dic_key,
b.dic_name b.dic_name
from sys_organization_dictionary a from SYS_ORGANIZATION_DICTIONARY a
left join sys_dictionary b on b.id = a.dic_code left join SYS_DICTIONARY b on b.id = a.dic_code
where a.end_time &gt; #{endTime} where a.end_time &gt; #{endTime}
and a.ou_id = #{ouId} and a.ou_id = #{ouId}
</select> </select>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_property from SYS_ORGANIZATION_PROPERTY
where where
id=#{id} id=#{id}
</select> </select>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_property from SYS_ORGANIZATION_PROPERTY
where where
ou_id=#{ouId} and end_time &gt;= #{endTime} ou_id=#{ouId} and end_time &gt;= #{endTime}
</select> </select>
......
...@@ -39,27 +39,27 @@ ...@@ -39,27 +39,27 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_rel from SYS_ORGANIZATION_REL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_rel from SYS_ORGANIZATION_REL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectEffective" resultMap="BaseResultMap"> <select id="selectEffective" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_organization_rel from SYS_ORGANIZATION_REL
where effect_time &lt;= now() and end_time &gt;= now() where effect_time &lt;= now() and end_time &gt;= now()
</select> </select>
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView"> <select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView">
select max(sor.sort) as sort, select max(sor.sort) as sort,
sor.parent_ou_id sor.parent_ou_id
from sys_organization_rel sor from SYS_ORGANIZATION_REL sor
where sor.parent_ou_id = #{parentOuId} where sor.parent_ou_id = #{parentOuId}
and sor.effect_time &lt;= now() and sor.effect_time &lt;= now()
and sor.end_time &gt;= now() and sor.end_time &gt;= now()
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
<select id="selectListByOuId" parameterType="String" resultMap="BaseResultMap"> <select id="selectListByOuId" parameterType="String" resultMap="BaseResultMap">
select sor.* select sor.*
from sys_organization_rel sor from SYS_ORGANIZATION_REL sor
left join sys_organization_rel sor2 on sor.parent_ou_id = sor2.ou_id left join SYS_ORGANIZATION_REL sor2 on sor.parent_ou_id = sor2.ou_id
where sor2.parent_ou_id = #{ouId} where sor2.parent_ou_id = #{ouId}
</select> </select>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</sql> </sql>
<insert id="batchInsert" parameterType="java.util.List"> <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 values
<foreach collection="list" item="roleMenuAuth" separator=","> <foreach collection="list" item="roleMenuAuth" separator=",">
( (
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_role_menu_auth from SYS_ROLE_MENU_AUTH
where where
id=#{id} id=#{id}
</select> </select>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<select id="selectList" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysRoleMenuAuthView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_role_menu_auth from SYS_ROLE_MENU_AUTH
where where
id=#{id} id=#{id}
</select> </select>
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
srma.modify_by_id, srma.modify_by_id,
srma.modify_by_name, srma.modify_by_name,
srma.modify_time srma.modify_time
from sys_role_menu_auth srma from SYS_ROLE_MENU_AUTH srma
right join sys_menu sm on srma.menu_id = sm.id right join SYS_MENU sm on srma.menu_id = sm.id
where sm.url !='#' and where sm.url !='#' and
srma.role_id=#{roleId} srma.role_id=#{roleId}
</select> </select>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<update id="batchUpdateSysRoleSetBpsRoleId" parameterType="java.util.List"> <update id="batchUpdateSysRoleSetBpsRoleId" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> <foreach collection="list" item="item" index="index" open="" close="" separator=";">
update sys_role update SYS_ROLE
<set> <set>
bps_role_id=#{item.bpsRoleId} bps_role_id=#{item.bpsRoleId}
</set> </set>
...@@ -57,14 +57,14 @@ ...@@ -57,14 +57,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_role from SYS_ROLE
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysRoleView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_role from SYS_ROLE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -82,9 +82,9 @@ ...@@ -82,9 +82,9 @@
is_inheritable, is_inheritable,
role_type, role_type,
is_overall is_overall
from sys_role sr from SYS_ROLE sr
left join sys_organization so on sr.ou_id = so.id left join SYS_ORGANIZATION so on sr.ou_id = so.id
left join sys_dictionary sd sr.media_type = sd.id left join SYS_DICTIONARY sd sr.media_type = sd.id
<where> <where>
ou_id = #{ouId} ou_id = #{ouId}
<if test="mediaType != null and mediaType != ''"> <if test="mediaType != null and mediaType != ''">
...@@ -114,8 +114,8 @@ ...@@ -114,8 +114,8 @@
sr.is_inheritable, sr.is_inheritable,
sr.role_type, sr.role_type,
sr.is_overall sr.is_overall
from sys_role sr from SYS_ROLE sr
left join sys_organization so on sr.ou_id = so.id left join SYS_ORGANIZATION so on sr.ou_id = so.id
<where> <where>
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
AND sr.ou_id = #{ouId} AND sr.ou_id = #{ouId}
...@@ -149,8 +149,8 @@ ...@@ -149,8 +149,8 @@
sr.is_inheritable, sr.is_inheritable,
sr.role_type, sr.role_type,
sr.is_overall sr.is_overall
from sys_role sr from SYS_ROLE sr
left join sys_organization so on sr.ou_id = so.id left join SYS_ORGANIZATION so on sr.ou_id = so.id
<where> <where>
<if test="roleName != null and roleName != ''"> <if test="roleName != null and roleName != ''">
AND sr.role_name like concat('%',#{roleName},'%') AND sr.role_name like concat('%',#{roleName},'%')
...@@ -186,10 +186,10 @@ ...@@ -186,10 +186,10 @@
sr.role_name as roleName, sr.role_name as roleName,
surr.user_id as userId, surr.user_id as userId,
su.user_name as userName su.user_name as userName
from sys_user_role_rel surr from SYS_USER_ROLE_REL surr
left join sys_role sr on sr.id = surr.role_id 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_USER su on su.id = surr.user_id
left join sys_organization so on so.id = sr.ou_id left join SYS_ORGANIZATION so on so.id = sr.ou_id
where sr.ou_id = #{ouId} where sr.ou_id = #{ouId}
<if test="roleIdList !=null and roleIdList.size()>0"> <if test="roleIdList !=null and roleIdList.size()>0">
and surr.role_id in and surr.role_id in
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
select select
sr.id as roleId, sr.id as roleId,
sr.role_name as roleName sr.role_name as roleName
from sys_role sr from SYS_ROLE sr
<where> <where>
<if test="roleIdList !=null and roleIdList.size()>0"> <if test="roleIdList !=null and roleIdList.size()>0">
and sr.id not in and sr.id not in
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
select select
sr.id as roleId, sr.id as roleId,
sr.role_name as roleName sr.role_name as roleName
from sys_role sr from SYS_ROLE sr
<where> <where>
<if test="roleIdList !=null and roleIdList.size()>0"> <if test="roleIdList !=null and roleIdList.size()>0">
and sr.id in and sr.id in
...@@ -234,9 +234,9 @@ ...@@ -234,9 +234,9 @@
<select id="getRoleListUserId" parameterType="String" resultType="pps.core.system.entity.SysRoleExtendView"> <select id="getRoleListUserId" parameterType="String" resultType="pps.core.system.entity.SysRoleExtendView">
select sr.id as roleId, select sr.id as roleId,
sr.role_name as roleName sr.role_name as roleName
from sys_role sr, from SYS_ROLE sr,
sys_user_role_rel sur, SYS_USER_ROLE_REL sur,
sys_user su SYS_USER su
where sr.id = sur.role_id where sr.id = sur.role_id
and sur.user_id = su.id and sur.user_id = su.id
and su.id = #{userId} and su.id = #{userId}
......
...@@ -35,21 +35,21 @@ ...@@ -35,21 +35,21 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user_organization_rel from SYS_USER_ORGANIZATION_REL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user_organization_rel from SYS_USER_ORGANIZATION_REL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" <select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultType="pps.core.system.entity.SysOrganizationView"> resultType="pps.core.system.entity.SysOrganizationView">
select * select *
from sys_organization from SYS_ORGANIZATION
where is_deleted = 1 where is_deleted = 1
</select> </select>
<select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView" <select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
os.station_name, os.station_name,
os.station_code, os.station_code,
os.medium_type os.medium_type
from sys_user_organization_rel suor from SYS_USER_ORGANIZATION_REL suor
left join sys_organization so on suor.ou_id = so.id 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 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} osor.end_time &gt;= #{endTime}
left join base_station os on osor.station_id = os.id left join base_station os on osor.station_id = os.id
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select suor.ou_id, select suor.ou_id,
so.ou_name so.ou_name
from sys_user_organization_rel suor from SYS_USER_ORGANIZATION_REL suor
left join sys_organization so on suor.ou_id = so.id left join SYS_ORGANIZATION so on suor.ou_id = so.id
where so.is_deleted = 1 where so.is_deleted = 1
and suor.user_id = #{userId} and suor.user_id = #{userId}
and suor.effect_time &lt;= now() and suor.effect_time &lt;= now()
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user_role_rel from SYS_USER_ROLE_REL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select b.id,b.role_id ,a.role_name 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} where a.id =b.role_id and b.user_id =#{userId}
<if test="roleName!=null and roleName!='' "> <if test="roleName!=null and roleName!='' ">
and a.role_name like concat('%',#{roleName,jdbcType=VARCHAR},'%') and a.role_name like concat('%',#{roleName,jdbcType=VARCHAR},'%')
...@@ -42,16 +42,16 @@ ...@@ -42,16 +42,16 @@
</select> </select>
<select id="selectUserList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap"> <select id="selectUserList" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select a.login_name, a.user_name, a.iam_login_name select a.login_name, a.user_name, a.iam_login_name
from sys_user a, from SYS_USER a,
sys_user_role_rel b, SYS_USER_ROLE_REL b,
sys_user_organization_rel c SYS_USER_ORGANIZATION_REL c
where a.id = b.user_id where a.id = b.user_id
and a.id = c.user_id and a.id = c.user_id
and b.role_id = #{roleId} and b.role_id = #{roleId}
and c.end_time > now() and c.end_time > now()
and c.ou_id in (select ou_id and c.ou_id in (select ou_id
from sys_organization_rel sor, from SYS_ORGANIZATION_REL sor,
sys_organization so SYS_ORGANIZATION so
where sor.ou_id = so.id where sor.ou_id = so.id
and so.ou_level in ('OFFICE_KS', 'OFFICE_CS', #{ouLevel,jdbcType=VARCHAR}) and so.ou_level in ('OFFICE_KS', 'OFFICE_CS', #{ouLevel,jdbcType=VARCHAR})
and ou_id_path like concat('%', #{ouId,jdbcType=VARCHAR}, '%') and ou_id_path like concat('%', #{ouId,jdbcType=VARCHAR}, '%')
...@@ -69,13 +69,13 @@ ...@@ -69,13 +69,13 @@
so.ou_name, so.ou_name,
su.login_name, su.login_name,
concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name
from sys_role sr from SYS_ROLE sr
left join sys_user_role_rel surr on sr.id =surr.role_id 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 su on surr.user_id =su.id
left join sys_user_organization_rel suor on su.id = suor.user_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 so on suor.ou_id = so.id
left join sys_organization_rel sor on so.id = sor.ou_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 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 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} suor.effect_time &lt;= #{endTime} and suor.end_time &gt;= #{endTime}
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
<select id="selectListByUserId" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap"> <select id="selectListByUserId" parameterType="pps.core.system.entity.SysUserRoleRelView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user_role_rel from SYS_USER_ROLE_REL
where where
user_id=#{userId} user_id=#{userId}
</select> </select>
<insert id="batchInsert" parameterType="java.util.List"> <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 values
<foreach collection="list" item="userRole" separator=","> <foreach collection="list" item="userRole" separator=",">
(#{userRole.id}, #{userRole.roleId}, #{userRole.userId}, #{userRole.ouId}, #{userRole.createById}, (#{userRole.id}, #{userRole.roleId}, #{userRole.userId}, #{userRole.ouId}, #{userRole.createById},
...@@ -111,9 +111,9 @@ ...@@ -111,9 +111,9 @@
su.user_name, su.user_name,
su.login_name, su.login_name,
su.phone su.phone
from sys_role sr from SYS_ROLE sr
left join sys_user_role_rel surr on sr.id =surr.role_id 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 su on surr.user_id =su.id
<where> <where>
<if test="roleIds != null and roleIds.size()>0"> <if test="roleIds != null and roleIds.size()>0">
and sr.id in and sr.id in
...@@ -130,10 +130,10 @@ ...@@ -130,10 +130,10 @@
su.user_name, su.user_name,
su.login_name, su.login_name,
su.phone su.phone
from sys_role sr from SYS_ROLE sr
left join sys_user_role_rel surr on sr.id = surr.role_id 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 su on surr.user_id = su.id
left join sys_user_organization_rel suor on su.id = suor.user_id left join SYS_USER_ORGANIZATION_REL suor on su.id = suor.user_id
where sr.id = #{roleId} where sr.id = #{roleId}
and suor.ou_id = #{ouId} and suor.ou_id = #{ouId}
</select> </select>
...@@ -149,13 +149,13 @@ ...@@ -149,13 +149,13 @@
so.ou_name, so.ou_name,
su.login_name, su.login_name,
concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name concat_ws('->', so2.ou_name, so.ou_name) as concat_ou_name
from sys_role sr from SYS_ROLE sr
left join sys_user_role_rel surr on sr.id =surr.role_id 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 su on surr.user_id =su.id
left join sys_user_organization_rel suor on su.id = suor.user_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 so on suor.ou_id = so.id
left join sys_organization_rel sor on so.id = sor.ou_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 left join SYS_ORGANIZATION so2 on sor.parent_ou_id = so2.id
<where> <where>
sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime} and suor.effect_time &lt;= #{endTime} and sor.effect_time &lt;= #{endTime} and sor.end_time &gt;= #{endTime} and suor.effect_time &lt;= #{endTime} and
......
...@@ -84,14 +84,14 @@ ...@@ -84,14 +84,14 @@
<select id="selectOne" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user from SYS_USER
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.system.entity.SysUserView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from sys_user from SYS_USER
where where
id=#{id} id=#{id}
</select> </select>
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
so.ou_name, so.ou_name,
su.status, su.status,
concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor on suor.user_id=su.id 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 so on suor.ou_id=so.id
left join sys_organization_rel sor on so.id=sor.ou_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 left join SYS_ORGANIZATION so2 on sor.parent_ou_id=so2.id
<where> <where>
suor.end_time &gt;= #{endTime} suor.end_time &gt;= #{endTime}
and sor.end_time &gt;= #{endTime} and sor.end_time &gt;= #{endTime}
...@@ -190,11 +190,11 @@ ...@@ -190,11 +190,11 @@
so.ou_name, so.ou_name,
su.status, su.status,
concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name concat_ws('->',so2.ou_name,so.ou_name) as concat_ou_name
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor on suor.user_id=su.id 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 so on suor.ou_id=so.id
left join sys_organization_rel sor on so.id=sor.ou_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 left join SYS_ORGANIZATION so2 on sor.parent_ou_id=so2.id
<where> <where>
<if test="hasOuId != null and hasOuId != '' and hasOuId == '1'.toString()"> <if test="hasOuId != null and hasOuId != '' and hasOuId == '1'.toString()">
and suor.end_time &gt;= #{endTime} and suor.end_time &gt;= #{endTime}
...@@ -234,8 +234,8 @@ ...@@ -234,8 +234,8 @@
su.user_name, su.user_name,
su.duty, su.duty,
su.phone su.phone
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor on suor.user_id=su.id left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where> <where>
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
AND suor.ou_id = #{ouId} AND suor.ou_id = #{ouId}
...@@ -249,8 +249,8 @@ ...@@ -249,8 +249,8 @@
su.user_name, su.user_name,
su.duty, su.duty,
su.phone su.phone
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor on suor.user_id=su.id left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where> <where>
<if test="ouIds != null and ouIds.size()>0"> <if test="ouIds != null and ouIds.size()>0">
and su.phone is not null and suor.ou_id in and su.phone is not null and suor.ou_id in
...@@ -269,8 +269,8 @@ ...@@ -269,8 +269,8 @@
su.user_name, su.user_name,
su.duty, su.duty,
su.phone su.phone
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor on suor.user_id=su.id left join SYS_USER_ORGANIZATION_REL suor on suor.user_id=su.id
<where> <where>
<if test="ouId != null and ouId !=''"> <if test="ouId != null and ouId !=''">
and su.phone is not null and suor.ou_id =#{ouId} and su.phone is not null and suor.ou_id =#{ouId}
...@@ -284,9 +284,9 @@ ...@@ -284,9 +284,9 @@
<select id="selectUserByTrade" parameterType="pps.core.system.entity.SysUserView" resultMap="TradeResultMap"> <select id="selectUserByTrade" parameterType="pps.core.system.entity.SysUserView" resultMap="TradeResultMap">
select a.user_name, a.login_name, c.ou_name select a.user_name, a.login_name, c.ou_name
from sys_user a, from SYS_USER a,
sys_user_organization_rel b, SYS_USER_ORGANIZATION_REL b,
sys_organization c SYS_ORGANIZATION c
where a.id = b.user_id where a.id = b.user_id
and b.ou_id = c.id and b.ou_id = c.id
and a.is_trade = 1 and a.is_trade = 1
...@@ -328,10 +328,10 @@ ...@@ -328,10 +328,10 @@
so.id as ou_id, so.id as ou_id,
so.ou_code, so.ou_code,
so.ou_name so.ou_name
from sys_user su from SYS_USER su
left join sys_user_organization_rel suor left join SYS_USER_ORGANIZATION_REL suor
on su.id = suor.user_id on su.id = suor.user_id
left join sys_organization so left join SYS_ORGANIZATION so
on suor.ou_id = so.id on suor.ou_id = so.id
where su.id = #{userId} where su.id = #{userId}
and suor.end_time > now() and suor.end_time > now()
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_data") @TableName("BASE_DATA")
public class BaseDataEnt implements Serializable { public class BaseDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -9,7 +9,7 @@ import xstartup.annotation.XText; ...@@ -9,7 +9,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@TableName("base_data_import_log") @TableName("BASE_DATA_IMPORT_LOG")
public class BaseDataImportLogEnt implements Serializable { public class BaseDataImportLogEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08 * @date 2023/09/08
*/ */
@Data @Data
@TableName("base_diesel_generator") @TableName("BASE_DIESEL_GENERATOR")
public class BaseDieselGeneratorEnt extends BaseModel implements Serializable { public class BaseDieselGeneratorEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08 * @date 2023/09/08
*/ */
@Data @Data
@TableName("base_energy_storage_device") @TableName("BASE_ENERGY_STORAGE_DEVICE")
public class BaseEnergyStorageDeviceEnt extends BaseModel implements Serializable { public class BaseEnergyStorageDeviceEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_line_attenuation_rate") @TableName("BASE_LINE_ATTENUATION_RATE")
public class BaseLineAttenuationRateEnt implements Serializable { public class BaseLineAttenuationRateEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_line") @TableName("BASE_LINE")
public class BaseLineEnt implements Serializable { public class BaseLineEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -8,7 +8,7 @@ import java.io.Serializable; ...@@ -8,7 +8,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_model_val") @TableName("BASE_MODEL_VAL")
public class BaseModelValEnt implements Serializable { public class BaseModelValEnt implements Serializable {
@XText("实际数据") @XText("实际数据")
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08 * @date 2023/09/08
*/ */
@Data @Data
@TableName("base_photovoltaic_plant") @TableName("BASE_PHOTOVOLTAIC_PLANT")
public class BasePhotovoltaicPlantEnt extends BaseModel implements Serializable { public class BasePhotovoltaicPlantEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_photovoltaic_plant_mape_adj") @TableName("BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ")
public class BasePhotovoltaicPlantMapeAdjEnt implements Serializable { public class BasePhotovoltaicPlantMapeAdjEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@TableName("base_power_line_diesel") @TableName("BASE_POWER_LINE_DIESEL")
public class BasePowerLineDieselEnt extends BaseModel implements Serializable { public class BasePowerLineDieselEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@TableName("base_power_line") @TableName("BASE_POWER_LINE")
public class BasePowerLineEnt extends BaseModel implements Serializable { public class BasePowerLineEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@TableName("base_power_line_plant") @TableName("BASE_POWER_LINE_PLANT")
public class BasePowerLinePlantEnt extends BaseModel implements Serializable { public class BasePowerLinePlantEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@TableName("base_power_line_storage") @TableName("BASE_POWER_LINE_STORAGE")
public class BasePowerLineStorageEnt extends BaseModel implements Serializable { public class BasePowerLineStorageEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@TableName("base_power_line_wellhead") @TableName("BASE_POWER_LINE_WELLHEAD")
public class BasePowerLineWellheadEnt extends BaseModel implements Serializable { public class BasePowerLineWellheadEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2023/08/24 * @date 2023/08/24
*/ */
@Data @Data
@TableName("base_price_strategy_detail") @TableName("BASE_PRICE_STRATEGY_DETAIL")
public class BasePriceStrategyDetailEnt extends BaseModel implements Serializable { public class BasePriceStrategyDetailEnt extends BaseModel implements Serializable {
@XText("市电峰谷配置ID") @XText("市电峰谷配置ID")
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/08/24 * @date 2023/08/24
*/ */
@Data @Data
@TableName("base_price_strategy") @TableName("BASE_PRICE_STRATEGY")
public class BasePriceStrategyEnt extends BaseModel implements Serializable { public class BasePriceStrategyEnt extends BaseModel implements Serializable {
@XText("策略名称") @XText("策略名称")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/08/24 * @date 2023/08/24
*/ */
@Data @Data
@TableName("base_price_strategy_month") @TableName("BASE_PRICE_STRATEGY_MONTH")
public class BasePriceStrategyMonthEnt extends BaseModel implements Serializable { public class BasePriceStrategyMonthEnt extends BaseModel implements Serializable {
@XText("市电峰谷配置ID") @XText("市电峰谷配置ID")
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_project_info") @TableName("BASE_PROJECT_INFO")
public class BaseProjectInfoEnt implements Serializable { public class BaseProjectInfoEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_project_info_predicted_data") @TableName("BASE_PROJECT_INFO_PREDICTED_DATA")
public class BaseProjectInfoPredictedDataEnt implements Serializable { public class BaseProjectInfoPredictedDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -8,7 +8,7 @@ import xstartup.annotation.XText; ...@@ -8,7 +8,7 @@ import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
@TableName("base_wather") @TableName("BASE_WATHER")
public class BaseWatherEnt implements Serializable { public class BaseWatherEnt implements Serializable {
@XText("主键") @XText("主键")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/08 * @date 2023/09/08
*/ */
@Data @Data
@TableName("base_wellhead") @TableName("BASE_WELLHEAD")
public class BaseWellheadEnt extends BaseModel implements Serializable { public class BaseWellheadEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2024/08/28 * @date 2024/08/28
*/ */
@Data @Data
@TableName("base_wind_tower") @TableName("BASE_WIND_TOWER")
public class BaseWindTowerEnt extends BaseModel implements Serializable { public class BaseWindTowerEnt extends BaseModel implements Serializable {
@XText("风机电站ID") @XText("风机电站ID")
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2024/08/28 * @date 2024/08/28
*/ */
@Data @Data
@TableName("base_wind_turbine") @TableName("BASE_WIND_TURBINE")
public class BaseWindTurbineEnt extends BaseModel implements Serializable { public class BaseWindTurbineEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2024/06/25 * @date 2024/06/25
*/ */
@Data @Data
@TableName("config_oil_field") @TableName("CONFIG_OIL_FIELD")
public class ConfigOilFieldEnt implements Serializable { public class ConfigOilFieldEnt implements Serializable {
@XText("ID") @XText("ID")
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@TableName("plant_predicted_power_data") @TableName("PLANT_PREDICTED_POWER_DATA")
public class PlantPredictedPowerDataEnt implements Serializable { public class PlantPredictedPowerDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/04/23 * @date 2024/04/23
*/ */
@Data @Data
@TableName("third_weather_data") @TableName("THIRD_WEATHER_DATA")
public class ThirdWeatherDataEnt implements Serializable { public class ThirdWeatherDataEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/09/03 * @date 2024/09/03
*/ */
@Data @Data
@TableName("third_wind_power_generation") @TableName("THIRD_WIND_POWER_GENERATION")
public class ThirdWindPowerGenerationEnt implements Serializable { public class ThirdWindPowerGenerationEnt implements Serializable {
@XText("ID") @XText("ID")
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/09/04 * @date 2024/09/04
*/ */
@Data @Data
@TableName("third_wind_power_generation_update") @TableName("THIRD_WIND_POWER_GENERATION_UPDATE")
public class ThirdWindPowerGenerationUpdateEnt implements Serializable { public class ThirdWindPowerGenerationUpdateEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/08/30 * @date 2024/08/30
*/ */
@Data @Data
@TableName("weather_bureau_data") @TableName("WEATHER_BUREAU_DATA")
public class WeatherBureauDataEnt implements Serializable { public class WeatherBureauDataEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -24,7 +24,7 @@ import java.util.Date; ...@@ -24,7 +24,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@TableName("wind_prediction_future") @TableName("WIND_PREDICTION_FUTURE")
public class WindPredictionFutureEnt implements Serializable { public class WindPredictionFutureEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/08/29 * @date 2024/08/29
*/ */
@Data @Data
@TableName("wind_prediction_history") @TableName("WIND_PREDICTION_HISTORY")
public class WindPredictionHistoryEnt implements Serializable { public class WindPredictionHistoryEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -36,20 +36,20 @@ ...@@ -36,20 +36,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_data from BASE_DATA
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_data from BASE_DATA
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsert"> <insert id="batchInsert">
insert into base_data( insert into BASE_DATA(
ou_id, ou_id,
line_id, line_id,
data_date, data_date,
......
...@@ -41,20 +41,20 @@ ...@@ -41,20 +41,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_diesel_generator from BASE_DIESEL_GENERATOR
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseDieselGeneratorView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_diesel_generator from BASE_DIESEL_GENERATOR
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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, modify_by_name, modify_time, ou_id, ou_name, device_name, maker_number, unit_type_name,
normal_power, standby_power) VALUES normal_power, standby_power) VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -47,20 +47,20 @@ ...@@ -47,20 +47,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_energy_storage_device from BASE_ENERGY_STORAGE_DEVICE
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseEnergyStorageDeviceView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_energy_storage_device from BASE_ENERGY_STORAGE_DEVICE
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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, 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, apparatus_capacity, rated_discharge_power, rated_charging_power, rated_discharge_depth,
rated_discharge_efficiency) VALUES rated_discharge_efficiency) VALUES
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseLineAttenuationRateView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseLineAttenuationRateView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_line_attenuation_rate from BASE_LINE_ATTENUATION_RATE
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsert"> <insert id="batchInsert">
insert into base_line_attenuation_rate( insert into BASE_LINE_ATTENUATION_RATE(
line_id, line_id,
particular_year, particular_year,
attenuation_rate, attenuation_rate,
......
...@@ -90,15 +90,15 @@ ...@@ -90,15 +90,15 @@
c.array_toward, c.array_toward,
c.production_year, c.production_year,
c.service_length c.service_length
from base_line c from BASE_LINE c
left join left join
sys_organization a on c.well_ou_id = a.id SYS_ORGANIZATION a on c.well_ou_id = a.id
left join left join
sys_organization_rel b on a.id = b.ou_id SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join left join
base_line e on c.parent_id = e.id BASE_LINE e on c.parent_id = e.id
left join 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} where c.id = #{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseLineView" resultMap="AllResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseLineView" resultMap="AllResultMap">
...@@ -117,15 +117,15 @@ ...@@ -117,15 +117,15 @@
c.array_incidence, c.array_incidence,
c.array_toward c.array_toward
FROM FROM
base_line c BASE_LINE c
left join left join
sys_organization a on c.well_ou_id = a.id SYS_ORGANIZATION a on c.well_ou_id = a.id
left join left join
sys_organization_rel b on a.id = b.ou_id SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join left join
base_line e on c.parent_id = e.id BASE_LINE e on c.parent_id = e.id
left join left join
sys_organization d on b.parent_ou_id = d.id SYS_ORGANIZATION d on b.parent_ou_id = d.id
<where> <where>
<if test="lineName!=null and lineName !=''"> <if test="lineName!=null and lineName !=''">
and c.line_name like concat('%',#{lineName},'%') and c.line_name like concat('%',#{lineName},'%')
...@@ -157,13 +157,13 @@ ...@@ -157,13 +157,13 @@
a.elevation, a.elevation,
a.province a.province
FROM FROM
base_line c BASE_LINE c
left join left join
sys_organization a on c.well_ou_id = a.id SYS_ORGANIZATION a on c.well_ou_id = a.id
left join left join
sys_organization_rel b on a.id = b.ou_id SYS_ORGANIZATION_REL b on a.id = b.ou_id
left join left join
sys_organization d on b.parent_ou_id = d.id SYS_ORGANIZATION d on b.parent_ou_id = d.id
<where> <where>
<if test="id!=null and id !=''"> <if test="id!=null and id !=''">
and c.id = #{id} and c.id = #{id}
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
grid_type_key as grid_type, grid_type_key as grid_type,
line_type_key as line_type line_type_key as line_type
FROM FROM
base_power_line BASE_POWER_LINE
<where> <where>
<if test="lineName!=null and lineName !=''"> <if test="lineName!=null and lineName !=''">
and line_name like CONCAT( '%', #{lineName}, '%' ) and line_name like CONCAT( '%', #{lineName}, '%' )
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_photovoltaic_plant_mape_adj from BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ
<where> <where>
<if test="plantId != null and plantId != ''"> <if test="plantId != null and plantId != ''">
and plant_id = #{plantId} and plant_id = #{plantId}
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_photovoltaic_plant_mape_adj from BASE_PHOTOVOLTAIC_PLANT_MAPE_ADJ
where where
id=#{id} id=#{id}
</select> </select>
......
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_photovoltaic_plant from BASE_PHOTOVOLTAIC_PLANT
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BasePhotovoltaicPlantView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_photovoltaic_plant from BASE_PHOTOVOLTAIC_PLANT
where where
id=#{id} id=#{id}
</select> </select>
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
p.array_orientation, p.array_orientation,
sa.city_code, sa.city_code,
sa.province_code sa.province_code
from base_photovoltaic_plant p from BASE_PHOTOVOLTAIC_PLANT p
join sys_organization so on so.id = p.ou_id join SYS_ORGANIZATION so on so.id = p.ou_id
left join sys_area sa on sa.id = so.province left join SYS_AREA sa on sa.id = so.province
where p.is_deleted = #{isDeleted} where p.is_deleted = #{isDeleted}
</select> </select>
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
p.array_orientation, p.array_orientation,
p.area_code, p.area_code,
a.city_code a.city_code
FROM base_photovoltaic_plant p FROM BASE_PHOTOVOLTAIC_PLANT p
JOIN sys_area a ON a.id = p.area_code JOIN SYS_AREA a ON a.id = p.area_code
WHERE p.is_deleted = 1 WHERE p.is_deleted = 1
AND p.area_code IS NOT NULL AND p.area_code IS NOT NULL
<if test="ouIdNotIn != null and ouIdNotIn.size() > 0"> <if test="ouIdNotIn != null and ouIdNotIn.size() > 0">
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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, 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, mounting_angle, total_power, array_orientation, longitude, latitude, elevation,
area_code) area_code)
...@@ -166,9 +166,9 @@ ...@@ -166,9 +166,9 @@
<select id="selectPlantStrategyList" resultMap="ExtendResultMap"> <select id="selectPlantStrategyList" resultMap="ExtendResultMap">
SELECT l.strategy_id, SELECT l.strategy_id,
t.station_name t.station_name
FROM base_power_line l FROM BASE_POWER_LINE l
LEFT JOIN base_power_line_plant p ON l.id = p.line_id 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 LEFT JOIN BASE_PHOTOVOLTAIC_PLANT t ON p.plant_id = t.id
WHERE l.is_deleted = 1 WHERE l.is_deleted = 1
AND l.strategy_id &lt;&gt; '' AND l.strategy_id &lt;&gt; ''
AND p.is_deleted = 1 AND p.is_deleted = 1
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineDieselView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineDieselView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_power_line_diesel from BASE_POWER_LINE_DIESEL
where where
id=#{id} id=#{id}
</select> </select>
...@@ -47,14 +47,14 @@ ...@@ -47,14 +47,14 @@
l.diesel_id, l.diesel_id,
g.device_name, g.device_name,
g.standby_power g.standby_power
FROM base_power_line_diesel l FROM BASE_POWER_LINE_DIESEL l
LEFT JOIN base_diesel_generator g ON l.diesel_id = g.id LEFT JOIN BASE_DIESEL_GENERATOR g ON l.diesel_id = g.id
AND g.is_deleted = 1 AND g.is_deleted = 1
WHERE l.line_id = #{lineId} WHERE l.line_id = #{lineId}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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 ) modify_by_name, modify_time, line_id, diesel_id, ou_id )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLinePlantView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLinePlantView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_power_line_plant from BASE_POWER_LINE_PLANT
where where
id=#{id} id=#{id}
</select> </select>
...@@ -50,14 +50,14 @@ ...@@ -50,14 +50,14 @@
l.plant_id, l.plant_id,
p.station_name, p.station_name,
p.total_power p.total_power
FROM base_power_line_plant l FROM BASE_POWER_LINE_PLANT l
LEFT JOIN base_photovoltaic_plant p ON l.plant_id = p.id LEFT JOIN BASE_PHOTOVOLTAIC_PLANT p ON l.plant_id = p.id
AND p.is_deleted = 1 AND p.is_deleted = 1
WHERE l.line_id = #{lineId} WHERE l.line_id = #{lineId}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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 ) modify_by_name, modify_time, line_id, plant_id, ou_id )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
p.latitude, p.latitude,
p.station_name, p.station_name,
p.total_power p.total_power
FROM base_power_line b FROM BASE_POWER_LINE b
JOIN base_power_line_plant l ON b.id = l.line_id JOIN BASE_POWER_LINE_PLANT l ON b.id = l.line_id
JOIN base_photovoltaic_plant p ON l.plant_id = p.id JOIN BASE_PHOTOVOLTAIC_PLANT p ON l.plant_id = p.id
WHERE WHERE
b.is_deleted = 1 b.is_deleted = 1
AND l.is_deleted = 1 AND l.is_deleted = 1
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineStorageView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineStorageView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_power_line_storage from BASE_POWER_LINE_STORAGE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
l.storage_id, l.storage_id,
d.device_name, d.device_name,
d.apparatus_capacity d.apparatus_capacity
FROM base_power_line_storage l FROM BASE_POWER_LINE_STORAGE l
LEFT JOIN base_energy_storage_device d ON l.storage_id = d.id LEFT JOIN BASE_ENERGY_STORAGE_DEVICE d ON l.storage_id = d.id
AND d.is_deleted = 1 AND d.is_deleted = 1
WHERE l.line_id = #{lineId} WHERE l.line_id = #{lineId}
</select> </select>
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
ROUND( AVG( d.rated_discharge_efficiency ) / 100, 2 ) AS rated_discharge_efficiency, ROUND( AVG( d.rated_discharge_efficiency ) / 100, 2 ) AS rated_discharge_efficiency,
AVG( d.rated_discharge_power ) AS rated_discharge_power AVG( d.rated_discharge_power ) AS rated_discharge_power
FROM FROM
base_power_line_storage s BASE_POWER_LINE_STORAGE s
JOIN base_energy_storage_device d ON s.storage_id = d.id JOIN BASE_ENERGY_STORAGE_DEVICE d ON s.storage_id = d.id
WHERE WHERE
s.line_id IN s.line_id IN
<foreach collection="list" open="(" close=")" separator="," item="item"> <foreach collection="list" open="(" close=")" separator="," item="item">
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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 ) modify_by_name, modify_time, line_id, storage_id, ou_id )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineView" resultMap="ExtendsResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineView" resultMap="ExtendsResultMap">
select select
<include refid="Base_Column_List"/> <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 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 , ( SELECT policy_name FROM BASE_PRICE_STRATEGY s WHERE s.id = BASE_POWER_LINE.strategy_id ) AS policy_name
from base_power_line from BASE_POWER_LINE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
b.is_share_dispatch, b.is_share_dispatch,
b.is_reverse_dispatch, b.is_reverse_dispatch,
b.start_interval, b.start_interval,
( SELECT line_name FROM base_power_line l WHERE l.id = b.upper_line_id ) AS upper_line_name, ( 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 COUNT( 1 ) FROM BASE_POWER_LINE_WELLHEAD w WHERE b.id = w.line_id ) AS wellhead_count,
o.ou_name o.ou_name
from base_power_line b from BASE_POWER_LINE b
LEFT JOIN sys_organization o ON b.ou_id = o.id LEFT JOIN SYS_ORGANIZATION o ON b.ou_id = o.id
where where
b.is_deleted = 1 b.is_deleted = 1
AND o.is_deleted = 1 AND o.is_deleted = 1
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_power_line_wellhead from BASE_POWER_LINE_WELLHEAD
where where
id=#{id} id=#{id}
</select> </select>
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
w.well_number, w.well_number,
w.run_type_key, w.run_type_key,
w.service_rating w.service_rating
FROM base_power_line_wellhead l FROM BASE_POWER_LINE_WELLHEAD l
LEFT JOIN base_wellhead w ON l.wellhead_id = w.id LEFT JOIN BASE_WELLHEAD w ON l.wellhead_id = w.id
AND w.is_deleted = 1 AND w.is_deleted = 1
WHERE l.line_id = #{lineId} WHERE l.line_id = #{lineId}
<if test="wellheadId != null and wellheadId != ''"> <if test="wellheadId != null and wellheadId != ''">
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
w.run_type_name, w.run_type_name,
w.rated_power w.rated_power
FROM FROM
base_power_line p BASE_POWER_LINE p
JOIN base_power_line_wellhead l ON p.id = l.line_id JOIN BASE_POWER_LINE_WELLHEAD l ON p.id = l.line_id
JOIN base_wellhead w ON l.wellhead_id = w.id JOIN BASE_WELLHEAD w ON l.wellhead_id = w.id
WHERE WHERE
p.is_deleted = 1 p.is_deleted = 1
AND l.is_deleted = 1 AND l.is_deleted = 1
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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 ) modify_by_name, modify_time, line_id, wellhead_id, ou_id, start_seq )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
...@@ -137,9 +137,9 @@ ...@@ -137,9 +137,9 @@
<select id="selectWellheadListByPlant" parameterType="pps.core.base.entity.BasePowerLineWellheadView" <select id="selectWellheadListByPlant" parameterType="pps.core.base.entity.BasePowerLineWellheadView"
resultMap="ExtendsResultMap"> resultMap="ExtendsResultMap">
SELECT b.well_number SELECT b.well_number
FROM base_power_line_plant p FROM BASE_POWER_LINE_PLANT p
JOIN base_power_line_wellhead w ON p.line_id = w.line_id JOIN BASE_POWER_LINE_WELLHEAD w ON p.line_id = w.line_id
JOIN base_wellhead b ON w.wellhead_id = b.id JOIN BASE_WELLHEAD b ON w.wellhead_id = b.id
WHERE p.is_deleted = 1 WHERE p.is_deleted = 1
AND w.is_deleted = 1 AND w.is_deleted = 1
AND b.is_deleted = 1 AND b.is_deleted = 1
......
...@@ -39,20 +39,20 @@ ...@@ -39,20 +39,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_price_strategy_detail from BASE_PRICE_STRATEGY_DETAIL
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyDetailView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_price_strategy_detail from BASE_PRICE_STRATEGY_DETAIL
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO base_price_strategy_detail ( INSERT INTO BASE_PRICE_STRATEGY_DETAIL (
id, id,
create_by_id, create_by_id,
create_by_name, create_by_name,
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
d.start_time, d.start_time,
d.end_time, d.end_time,
d.electrovalence d.electrovalence
FROM base_price_strategy_month m FROM BASE_PRICE_STRATEGY_MONTH m
LEFT JOIN base_price_strategy_detail d ON m.strategy_month = d.strategy_month LEFT JOIN BASE_PRICE_STRATEGY_DETAIL d ON m.strategy_month = d.strategy_month
AND m.strategy_id = d.strategy_id AND m.strategy_id = d.strategy_id
WHERE m.is_deleted = 1 WHERE m.is_deleted = 1
AND d.is_deleted = 1 AND d.is_deleted = 1
......
...@@ -29,20 +29,20 @@ ...@@ -29,20 +29,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_price_strategy_month from BASE_PRICE_STRATEGY_MONTH
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BasePriceStrategyMonthView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_price_strategy_month from BASE_PRICE_STRATEGY_MONTH
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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 ) modify_by_name, modify_time, strategy_id, strategy_month )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePriceStrategyView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_price_strategy from BASE_PRICE_STRATEGY
where where
id=#{id} id=#{id}
</select> </select>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
'是' '是'
ELSE '否' ELSE '否'
END is_fixed_price_value END is_fixed_price_value
FROM base_price_strategy FROM BASE_PRICE_STRATEGY
WHERE WHERE
is_deleted = 1 is_deleted = 1
<if test=" param.policyName != null and param.policyName != '' "> <if test=" param.policyName != null and param.policyName != '' ">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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"> <mapper namespace="pps.core.base.mapper.BaseProjectInfoPredictedDataViewMapper">
<insert id="batchInsert"> <insert id="batchInsert">
insert into base_project_info_predicted_data( insert into BASE_PROJECT_INFO_PREDICTED_DATA(
project_id, project_id,
particular_year, particular_year,
predicted_power, predicted_power,
......
...@@ -39,20 +39,20 @@ ...@@ -39,20 +39,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_wellhead from BASE_WELLHEAD
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseWellheadView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_wellhead from BASE_WELLHEAD
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <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, modify_by_name, modify_time, ou_id, ou_name, well_number, run_type_key, run_type_name, service_rating,
rated_power) VALUES rated_power) VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -31,20 +31,20 @@ ...@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_wind_tower from BASE_WIND_TOWER
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseWindTowerView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_wind_tower from BASE_WIND_TOWER
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsert" parameterType="list"> <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 modify_by_name, modify_time, station_id, tower_id, tower_name) VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( (
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<select id="selectList" parameterType="pps.core.base.entity.BaseWindTurbineView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.BaseWindTurbineView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from base_wind_turbine from BASE_WIND_TURBINE
where where
is_deleted = 1 is_deleted = 1
AND ou_id in AND ou_id in
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
t.area_code, t.area_code,
a.city_code, a.city_code,
a.`name` AS city_name a.`name` AS city_name
FROM base_wind_turbine t FROM BASE_WIND_TURBINE t
LEFT JOIN sys_area a ON t.area_code = a.id LEFT JOIN SYS_AREA a ON t.area_code = a.id
WHERE t.is_deleted = 1 WHERE t.is_deleted = 1
AND t.id = #{id} LIMIT 1 AND t.id = #{id} LIMIT 1
</select> </select>
...@@ -108,8 +108,8 @@ ...@@ -108,8 +108,8 @@
p.elevation, p.elevation,
p.area_code, p.area_code,
a.city_code a.city_code
FROM base_wind_turbine p FROM BASE_WIND_TURBINE p
JOIN sys_area a ON a.id = p.area_code JOIN SYS_AREA a ON a.id = p.area_code
WHERE p.is_deleted = 1 WHERE p.is_deleted = 1
AND p.area_code IS NOT NULL AND p.area_code IS NOT NULL
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
......
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from config_oil_field from CONFIG_OIL_FIELD
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.ConfigOilFieldView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from config_oil_field from CONFIG_OIL_FIELD
where where
id=#{id} id=#{id}
</select> </select>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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"> <mapper namespace="pps.core.base.mapper.PlantPredictedPowerDataViewMapper">
<insert id="insertBatch" parameterType="java.util.List"> <insert id="insertBatch" parameterType="java.util.List">
INSERT INTO plant_predicted_power_data INSERT INTO PLANT_PREDICTED_POWER_DATA
(plant_id, (plant_id,
data_date, data_date,
year_time, year_time,
......
...@@ -61,19 +61,19 @@ ...@@ -61,19 +61,19 @@
<select id="selectOne" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_weather_data from THIRD_WEATHER_DATA
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.ThirdWeatherDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_weather_data from THIRD_WEATHER_DATA
order by forecast_time order by forecast_time
</select> </select>
<insert id="insertBatch" parameterType="java.util.List"> <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, prs_qfe, vis, clo, uvb, uvi, phs, wep, wnd_100m, wns_100m, wns_grd_100m, update_time, create_time, longitude,
latitude) VALUES latitude) VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_wind_power_generation_update from THIRD_WIND_POWER_GENERATION_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_wind_power_generation_update from THIRD_WIND_POWER_GENERATION_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
IFNULL( SUM( actual_generation ), 0 ) AS actual_generation, IFNULL( SUM( actual_generation ), 0 ) AS actual_generation,
MONTH ( collect_time ) AS actual_wind_direction MONTH ( collect_time ) AS actual_wind_direction
FROM FROM
third_wind_power_generation_update THIRD_WIND_POWER_GENERATION_UPDATE
WHERE WHERE
station_id IN station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</select> </select>
<insert id="batchInsert" parameterType="list"> <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 actual_power, actual_generation, accurate_wind_direction, actual_wind_direction, input_time, system_source) VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
( (
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</insert> </insert>
<delete id="deleteBatch" parameterType="list"> <delete id="deleteBatch" parameterType="list">
DELETE FROM third_wind_power_generation_update DELETE FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE WHERE
station_id IN station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -114,48 +114,48 @@ ...@@ -114,48 +114,48 @@
<select id="stationPowerGeneration" resultMap="ExtResultMap"> <select id="stationPowerGeneration" resultMap="ExtResultMap">
SELECT IFNULL(SUM(actual_generation), 0) AS today_power, SELECT IFNULL(SUM(actual_generation), 0) AS today_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[2]} AND #{dateList[3]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS month_power, ) AS month_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[4]} AND #{dateList[5]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS last_month_power, ) AS last_month_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[6]} AND #{dateList[7]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS season_power, ) AS season_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[8]} AND #{dateList[9]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS last_season_power, ) AS last_season_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[10]} AND #{dateList[11]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS year_power, ) AS year_power,
(SELECT IFNULL(SUM(actual_generation), 0) (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 WHERE collect_time BETWEEN #{dateList[12]} AND #{dateList[13]} AND station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
) AS last_year_power ) AS last_year_power
FROM third_wind_power_generation_update FROM THIRD_WIND_POWER_GENERATION_UPDATE
WHERE collect_time BETWEEN #{dateList[0]} WHERE collect_time BETWEEN #{dateList[0]}
AND #{dateList[1]} AND #{dateList[1]}
AND station_id IN AND station_id IN
......
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
<select id="selectOne" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_wind_power_generation from THIRD_WIND_POWER_GENERATION
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.ThirdWindPowerGenerationView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_wind_power_generation from THIRD_WIND_POWER_GENERATION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
f.wind_direction AS actual_wind_direction, f.wind_direction AS actual_wind_direction,
f.wind_direction AS accurate_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 ROW_NUMBER() OVER ( PARTITION BY f.station_id ORDER BY f.data_time DESC ) AS rn
FROM base_wind_turbine t FROM BASE_WIND_TURBINE t
LEFT JOIN wind_prediction_future f ON t.id = f.station_id LEFT JOIN WIND_PREDICTION_FUTURE f ON t.id = f.station_id
WHERE t.is_deleted = 1 WHERE t.is_deleted = 1
AND f.data_time BETWEEN #{startTime} AND f.data_time BETWEEN #{startTime}
AND #{endTime}) AND #{endTime})
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</select> </select>
<insert id="batchInsert" parameterType="list"> <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) actual_power, actual_generation, accurate_wind_direction, actual_wind_direction, input_time, system_source)
VALUES VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
......
...@@ -31,20 +31,20 @@ ...@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from weather_bureau_data from WEATHER_BUREAU_DATA
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.WeatherBureauDataView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from weather_bureau_data from WEATHER_BUREAU_DATA
where where
id=#{id} id=#{id}
</select> </select>
<delete id="deleteBatch" parameterType="list"> <delete id="deleteBatch" parameterType="list">
DELETE FROM weather_bureau_data DELETE FROM WEATHER_BUREAU_DATA
WHERE WHERE
area_code IN area_code IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</delete> </delete>
<insert id="insertBatch" parameterType="java.util.List"> <insert id="insertBatch" parameterType="java.util.List">
INSERT INTO weather_bureau_data ( INSERT INTO WEATHER_BUREAU_DATA (
data_time, data_time,
weather_icon, weather_icon,
air_temperature, air_temperature,
......
...@@ -31,20 +31,20 @@ ...@@ -31,20 +31,20 @@
<select id="selectOne" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wind_prediction_future from WIND_PREDICTION_FUTURE
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.WindPredictionFutureView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wind_prediction_future from WIND_PREDICTION_FUTURE
where where
id=#{id} id=#{id}
</select> </select>
<delete id="deleteBatch" parameterType="list"> <delete id="deleteBatch" parameterType="list">
DELETE FROM wind_prediction_future DELETE FROM WIND_PREDICTION_FUTURE
WHERE WHERE
station_id IN station_id IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</delete> </delete>
<insert id="insertBatch" parameterType="java.util.List"> <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 humidity, pressure ,actual_wind_speed ,actual_power ,predicted_power) VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
( (
......
...@@ -39,27 +39,27 @@ ...@@ -39,27 +39,27 @@
<select id="selectOne" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wind_prediction_history from WIND_PREDICTION_HISTORY
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.base.entity.WindPredictionHistoryView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wind_prediction_history from WIND_PREDICTION_HISTORY
where where
id=#{id} id=#{id}
</select> </select>
<delete id="deleteByTimeRange"> <delete id="deleteByTimeRange">
DELETE DELETE
FROM wind_prediction_history FROM WIND_PREDICTION_HISTORY
WHERE data_time BETWEEN #{startTime} WHERE data_time BETWEEN #{startTime}
AND #{endTime} AND #{endTime}
</delete> </delete>
<insert id="batchInsert" parameterType="list"> <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, humidity, pressure, actual_wind_direction, actual_wind_speed, actual_power, predicted_power, wnd_100m,
wns_100m, wns_grd_100m) VALUES wns_100m, wns_grd_100m) VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
......
...@@ -16,7 +16,7 @@ import java.io.Serializable; ...@@ -16,7 +16,7 @@ import java.io.Serializable;
* @date 2024/07/04 * @date 2024/07/04
*/ */
@Data @Data
@TableName("config_time_task") @TableName("CONFIG_TIME_TASK")
public class ConfigTimeTaskEnt implements Serializable { public class ConfigTimeTaskEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
<select id="selectOne" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from config_time_task from CONFIG_TIME_TASK
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.task.entity.ConfigTimeTaskView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from config_time_task from CONFIG_TIME_TASK
where where
id=#{id} id=#{id}
</select> </select>
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/05/22 * @date 2024/05/22
*/ */
@Data @Data
@TableName("line_daily_electricity_trend") @TableName("LINE_DAILY_ELECTRICITY_TREND")
public class LineDailyElectricityTrendEnt implements Serializable { public class LineDailyElectricityTrendEnt implements Serializable {
@XText("ID") @XText("ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_calibration_history") @TableName("SPACE_CALIBRATION_HISTORY")
public class SpaceCalibrationHistoryEnt extends BaseModel implements Serializable { public class SpaceCalibrationHistoryEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -15,7 +15,7 @@ import java.io.Serializable; ...@@ -15,7 +15,7 @@ import java.io.Serializable;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_calibration_period") @TableName("SPACE_CALIBRATION_PERIOD")
public class SpaceCalibrationPeriodEnt extends BaseModel implements Serializable { public class SpaceCalibrationPeriodEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_institution_detail") @TableName("SPACE_INSTITUTION_DETAIL")
public class SpaceInstitutionDetailEnt extends BaseModel implements Serializable { public class SpaceInstitutionDetailEnt extends BaseModel implements Serializable {
@XText("组织机构ID") @XText("组织机构ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_institution_duration") @TableName("SPACE_INSTITUTION_DURATION")
public class SpaceInstitutionDurationEnt extends BaseModel implements Serializable { public class SpaceInstitutionDurationEnt extends BaseModel implements Serializable {
@XText("间开制度ID") @XText("间开制度ID")
......
...@@ -16,7 +16,7 @@ import java.math.BigDecimal; ...@@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_institution_wellhead") @TableName("SPACE_INSTITUTION_WELLHEAD")
public class SpaceInstitutionWellheadEnt extends BaseModel implements Serializable { public class SpaceInstitutionWellheadEnt extends BaseModel implements Serializable {
@XText("间开制度ID") @XText("间开制度ID")
......
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
* @date 2024/10/31 * @date 2024/10/31
*/ */
@Data @Data
@TableName("space_optimize_effect") @TableName("SPACE_OPTIMIZE_EFFECT")
public class SpaceOptimizeEffectEnt extends BaseModel implements Serializable { public class SpaceOptimizeEffectEnt extends BaseModel implements Serializable {
@XText("优化周期ID") @XText("优化周期ID")
......
...@@ -22,7 +22,7 @@ import java.util.Date; ...@@ -22,7 +22,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@TableName("space_optimize_long_duration") @TableName("SPACE_OPTIMIZE_LONG_DURATION")
public class SpaceOptimizeLongDurationEnt extends BaseModel implements Serializable { public class SpaceOptimizeLongDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID") @XText("井口记录ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_optimize_long_period") @TableName("SPACE_OPTIMIZE_LONG_PERIOD")
public class SpaceOptimizeLongPeriodEnt extends BaseModel implements Serializable { public class SpaceOptimizeLongPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_optimize_long_wellhead") @TableName("SPACE_OPTIMIZE_LONG_WELLHEAD")
public class SpaceOptimizeLongWellheadEnt extends BaseModel implements Serializable { public class SpaceOptimizeLongWellheadEnt extends BaseModel implements Serializable {
@XText("长期优化周期ID") @XText("长期优化周期ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_optimize_mid_duration") @TableName("SPACE_OPTIMIZE_MID_DURATION")
public class SpaceOptimizeMidDurationEnt extends BaseModel implements Serializable { public class SpaceOptimizeMidDurationEnt extends BaseModel implements Serializable {
@XText("井口记录ID") @XText("井口记录ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_optimize_mid_period") @TableName("SPACE_OPTIMIZE_MID_PERIOD")
public class SpaceOptimizeMidPeriodEnt extends BaseModel implements Serializable { public class SpaceOptimizeMidPeriodEnt extends BaseModel implements Serializable {
@XText("线路ID") @XText("线路ID")
......
...@@ -16,7 +16,7 @@ import java.util.Date; ...@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2023/09/05 * @date 2023/09/05
*/ */
@Data @Data
@TableName("space_optimize_mid_wellhead") @TableName("SPACE_OPTIMIZE_MID_WELLHEAD")
public class SpaceOptimizeMidWellheadEnt extends BaseModel implements Serializable { public class SpaceOptimizeMidWellheadEnt extends BaseModel implements Serializable {
@XText("中短期优化周期ID") @XText("中短期优化周期ID")
......
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