Commit 5d7f2bac authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.基础信息配置模块创建风资源历史数据表和风资源预测数据表,同时生成对应代码;
2.修改天气数据获取处理定时任务,修改光伏预测数据插入逻辑,同时增加风资源数据插入逻辑,完成功能测试;
3.开发风资源预测中期10天预测接口,完成接口冒烟测试并添加线上接口文档同时生成接口用例;
4.开发风资源预测中期3天预测接口,完成接口冒烟测试并添加线上接口文档同时生成接口用例;
5.开发风资源预测超短期4小时预测接口,完成接口冒烟测试并添加线上接口文档同时生成接口用例;
6.修改天气数据获取定时任务,解决风资源数据入库重复并且时间没有补齐的问题;
7.修改基础信息配置风电站配置模块详情接口,增加字段,添加回显地区逻辑,完成接口冒烟测试并修改接口文档;
8.修改系统关联模块代码,修改部分代码sql注入问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 8676f539
...@@ -346,11 +346,7 @@ public class SysDictionaryService { ...@@ -346,11 +346,7 @@ public class SysDictionaryService {
SysDictionaryView sysDictionaryView = new SysDictionaryView(); SysDictionaryView sysDictionaryView = new SysDictionaryView();
StringBuilder idsStr = new StringBuilder(); StringBuilder idsStr = new StringBuilder();
for (int i = 0; i < ids.size(); i++) { for (int i = 0; i < ids.size(); i++) {
if (i == 0) { idsStr.append(ids.get(i)).append(',');
idsStr.append("'").append(ids.get(i)).append("'");
} else {
idsStr.append(",'").append(ids.get(i)).append("'");
}
} }
sysDictionaryView.setPid(idsStr.toString()); sysDictionaryView.setPid(idsStr.toString());
sysDictionaryView.setEndTime(new Date()); sysDictionaryView.setEndTime(new Date());
...@@ -486,9 +482,7 @@ public class SysDictionaryService { ...@@ -486,9 +482,7 @@ public class SysDictionaryService {
StringBuilder idsStr = new StringBuilder(); StringBuilder idsStr = new StringBuilder();
for (int i = 0; i < ids.size(); i++) { for (int i = 0; i < ids.size(); i++) {
if (i == 0) { if (i == 0) {
idsStr.append("'").append(ids.get(i)).append("'"); idsStr.append(ids.get(i)).append(',');
} else {
idsStr.append(",'").append(ids.get(i)).append("'");
} }
} }
sysDictionaryView.setPid(idsStr.toString()); sysDictionaryView.setPid(idsStr.toString());
......
...@@ -67,7 +67,10 @@ ...@@ -67,7 +67,10 @@
from sys_dictionary from sys_dictionary
where end_time &gt; #{endTime} where end_time &gt; #{endTime}
<if test="pid != null and pid !=''"> <if test="pid != null and pid !=''">
and pid in (${pid}) and pid in
<foreach item="item" index="index" collection="pid.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if> </if>
order by sort order by sort
</select> </select>
...@@ -78,7 +81,10 @@ ...@@ -78,7 +81,10 @@
from sys_dictionary from sys_dictionary
<where> <where>
<if test="alias != null and alias !=''"> <if test="alias != null and alias !=''">
and alias in (${alias}) and alias in
<foreach item="item" index="index" collection="alias.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if> </if>
</where> </where>
order by create_time desc order by create_time desc
...@@ -104,10 +110,18 @@ ...@@ -104,10 +110,18 @@
from sys_dictionary from sys_dictionary
<where> <where>
<if test="alias != null and alias !=''"> <if test="alias != null and alias !=''">
and (pid in(${pid}) or id in (${pid})) and (pid in
<foreach item="item" index="index" collection="alias.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
or id in
<foreach item="item" index="index" collection="alias.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
)
</if> </if>
<if test="dicName != null and dicName !=''"> <if test="dicName != null and dicName !=''">
and dic_name like '%${dicName}%' and dic_name like concat('%',#{dicName},'%')
</if> </if>
</where> </where>
order by create_time desc order by create_time desc
...@@ -181,7 +195,7 @@ ...@@ -181,7 +195,7 @@
left join sys_organization so on so.id =sod.ou_id left join sys_organization so on so.id =sod.ou_id
where sod.end_time >now() and sod.dic_code is not null where sod.end_time >now() and sod.dic_code is not null
<if test="dicName != null and dicName != ''"> <if test="dicName != null and dicName != ''">
and sd.dic_name like '%${dicName}%' and sd.dic_name like concat('%',#{dicName},'%')
</if> </if>
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
and sod.ou_id=#{ouId} and sod.ou_id=#{ouId}
...@@ -199,16 +213,16 @@ ...@@ -199,16 +213,16 @@
from sys_organization_dictionary sod from sys_organization_dictionary sod
left join sys_dictionary sd on sod.dic_code =sd.id left join sys_dictionary sd on sod.dic_code =sd.id
left join sys_organization so on so.id =sod.ou_id left join sys_organization so on so.id =sod.ou_id
where sod.end_time >'${endTime}' and sod.dic_code is not null where sod.end_time >#{endTime} and sod.dic_code is not null
<if test="dicName != null and dicName != ''"> <if test="dicName != null and dicName != ''">
and sd.dic_name like '%${dicName}%' and sd.dic_name like concat('%',#{dicName},'%')
</if> </if>
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
and sod.ou_id=#{ouId} and sod.ou_id=#{ouId}
</if>)a </if>)a
left join sys_dictionary asd on asd.id = a.id left join sys_dictionary asd on asd.id = a.id
order by asd.effect_time desc order by asd.effect_time desc
limit ${startRow},${endRow} limit #{startRow},#{endRow}
</select> </select>
<select id="selectListByConditionByCount" parameterType="pps.core.system.entity.SysDictionaryView" <select id="selectListByConditionByCount" parameterType="pps.core.system.entity.SysDictionaryView"
resultType="java.lang.Integer"> resultType="java.lang.Integer">
...@@ -218,9 +232,9 @@ ...@@ -218,9 +232,9 @@
from sys_organization_dictionary sod from sys_organization_dictionary sod
left join sys_dictionary sd on sod.dic_code =sd.id left join sys_dictionary sd on sod.dic_code =sd.id
left join sys_organization so on so.id =sod.ou_id left join sys_organization so on so.id =sod.ou_id
where sod.end_time >'${endTime}' and sod.dic_code is not null where sod.end_time >#{endTime} and sod.dic_code is not null
<if test="dicName != null and dicName != ''"> <if test="dicName != null and dicName != ''">
and sd.dic_name like '%${dicName}%' and sd.dic_name like concat('%',#{dicName},'%')
</if> </if>
<if test="ouId != null and ouId != ''"> <if test="ouId != null and ouId != ''">
and sod.ou_id=#{ouId} and sod.ou_id=#{ouId}
...@@ -257,7 +271,7 @@ ...@@ -257,7 +271,7 @@
with RECURSIVE temps as with RECURSIVE temps as
(select id, pid (select id, pid
from sys_dictionary sd from sys_dictionary sd
where (dic_path like '%${id}%' or id = #{id}) where (dic_path like concat('%', #{id}, '%') or id = #{id})
and dic_key = #{dicKey} and dic_key = #{dicKey}
union all union all
select a.id, a.pid select a.id, a.pid
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
from sys_organization_rel r from sys_organization_rel r
left join sys_organization s on r.ou_id = s.id left join sys_organization s on r.ou_id = s.id
where s.is_deleted = #{isDeleted} where s.is_deleted = #{isDeleted}
and (r.ou_id = #{id} or r.ou_id_path like '%${id}%') and (r.ou_id = #{id} or r.ou_id_path like concat('%',#{id},'%'))
<if test="ouLevel != null and ouLevel !=''"> <if test="ouLevel != null and ouLevel !=''">
and s.ou_level = #{ouLevel} and s.ou_level = #{ouLevel}
</if> </if>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
and ou_id= #{ouId} and ou_id= #{ouId}
</if> </if>
<if test="userGroupName != null and userGroupName !=''"> <if test="userGroupName != null and userGroupName !=''">
and user_group_name like '%${userGroupName}%' and user_group_name like concat('%',#{userGroupName},'%')
</if> </if>
</where> </where>
</select> </select>
......
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
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
and a.user_name like '%${userName}%' limit 5 and a.user_name like concat('%', #{userName}, '%') limit 5
</select> </select>
<select id="getSysUserAndOuByUserId" resultType="pps.core.system.entity.CurrentSysUserView"> <select id="getSysUserAndOuByUserId" resultType="pps.core.system.entity.CurrentSysUserView">
select su.id, select su.id,
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
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 '%${lineName}%' and c.line_name like concat('%',#{lineName},'%')
</if> </if>
<if test="wellOuId!=null and wellOuId !=''"> <if test="wellOuId!=null and wellOuId !=''">
and c.well_ou_id =#{wellOuId} and c.well_ou_id =#{wellOuId}
......
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