feat: There is no way the, 56624 国家地区清单的详情页面,标准号查询条件无作用
This commit is contained in:
+74
-21
@@ -145,28 +145,81 @@
|
||||
|
||||
|
||||
<select id="selectLawsId" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.STAND_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
SELECT A.stand_id FROM (
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and (
|
||||
(trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER,'-',
|
||||
si.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ','')) and si.STAND_YEAR != '')
|
||||
or (trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{sar.standNumber}),'%')))
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by number
|
||||
</where>
|
||||
UNION
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_bussioness_stand si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and (si.STAND_CODE like concat('%', #{sar.standNumber}, '%')
|
||||
or REPLACE( si.STAND_CODE,' ','') like REPLACE( concat('%', #{sar.standNumber}, '%'),' ',''))
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
UNION
|
||||
select stand_id,number from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_laws_stand_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = si.LAWS_TYPE
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.LAWS_TYPE = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.LAWS_TYPE,' '),si.LAWS_NUMBER),'-'),si.LAWS_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.LAWS_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or dicstandSort.DIC_TYPE_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.LAWS_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
) A
|
||||
order by A.number
|
||||
LIMIT #{param3} , #{param2};
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user