feat: 迁移标准属性自定义 修改相关问题
This commit is contained in:
+91
-13
@@ -107,20 +107,57 @@
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<select id="selectNameByField" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT attr_name
|
||||
<!-- 根据id查询 SAR_STAND_ATTR_DETAILS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where attr_field = #{attrField} and valid_flag=0
|
||||
<if test='sarType != null and sarType == "INLAND_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
|
||||
and sar_type=#{sarType}
|
||||
</if>
|
||||
limit 0,1
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_ATTR_DETAILS
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_ATTR_DETAILS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_ATTR_DETAILS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" />,areaName from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List_Show" />,UT_AREA.area_name as areaName from SAR_STAND_ATTR_DETAILS
|
||||
left join UT_AREA on SAR_STAND_ATTR_DETAILS.show_region_id = UT_AREA.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by SAR_STAND_ATTR_DETAILS.order_num,SAR_STAND_ATTR_DETAILS.id
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<update id="deleteByIds" parameterType="java.lang.String" >
|
||||
delete from SAR_STAND_ATTR_DETAILS
|
||||
where id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectAllFieldToStr" resultType="java.lang.String" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT listagg ( attr_field, ',' ) within GROUP ( ORDER BY attr_field )
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<select id="selectFieldByName" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
@@ -139,4 +176,45 @@
|
||||
limit 0,1
|
||||
</select>
|
||||
|
||||
<select id="selectFileFieldForSel" resultType="com.adc.da.sys.common.SelectionResult" parameterType="java.lang.String">
|
||||
SELECT attr_field as value, attr_name as label
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where valid_flag=0 and attr_type='FILE' and
|
||||
(sar_type='STAND' or sar_type='INLAND_STAND' or sar_type='FOREIGN_STAND')
|
||||
<if test="attrField != null">
|
||||
and attr_field=#{attrField}
|
||||
</if>
|
||||
group by attr_field,attr_name
|
||||
</select>
|
||||
|
||||
<!-- 标准拆分在用-->
|
||||
<select id="selectFileFieldForSel1" resultType="com.adc.da.sys.common.SelectionResult"
|
||||
parameterType="java.lang.String">
|
||||
SELECT attr_field as value, attr_name as label
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where valid_flag=0 and attr_type='FILE' and
|
||||
(sar_type='STAND' or sar_type='INLAND_STAND' or sar_type='FOREIGN_STAND' or SAR_TYPE = 'FOREIGN_LAWS')
|
||||
<if test="attrField != null">
|
||||
and attr_field=#{attrField}
|
||||
</if>
|
||||
group by attr_field,attr_name
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNameByField" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT attr_name
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where attr_field = #{attrField} and valid_flag=0
|
||||
<if test='sarType != null and sarType == "INLAND_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
|
||||
and sar_type=#{sarType}
|
||||
</if>
|
||||
limit 0,1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user