Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@
|
|||||||
where sar_bussioness_stand.TEXT_STATUS_BUSS = '9z741h2m3j' AND sar_bussioness_stand.ISSUE_TIME IS NOT NULL and sar_bussioness_stand.VALID_FLAG = '0'
|
where sar_bussioness_stand.TEXT_STATUS_BUSS = '9z741h2m3j' AND sar_bussioness_stand.ISSUE_TIME IS NOT NULL and sar_bussioness_stand.VALID_FLAG = '0'
|
||||||
<trim suffixOverrides="," >
|
<trim suffixOverrides="," >
|
||||||
<if test="standCode != null and standCode != '' " >
|
<if test="standCode != null and standCode != '' " >
|
||||||
and STAND_CODE like concat(concat('%',#{standCode}),'%')
|
and (STAND_CODE like concat(concat('%',#{standCode}),'%') or STAND_NAME like concat(concat('%',#{standCode}),'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd != null and reviewTimeEnd != ''">
|
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd != null and reviewTimeEnd != ''">
|
||||||
and DATE_FORMAT(sar_buss_stand_attr_info.FSRQBUSS, '%Y-%m-%d') between DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
and DATE_FORMAT(sar_buss_stand_attr_info.FSRQBUSS, '%Y-%m-%d') between DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
||||||
|
|||||||
+74
-21
@@ -145,28 +145,81 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectLawsId" resultType="string">
|
<select id="selectLawsId" resultType="string">
|
||||||
select stand_id from sar_laws_attr_detailed_list
|
SELECT A.stand_id FROM (
|
||||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
select stand_id,number from sar_laws_attr_detailed_list
|
||||||
<where>
|
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||||
<if test="standId != null">
|
<where>
|
||||||
and detailed_list_id = #{standId}
|
<if test="standId != null">
|
||||||
</if>
|
and detailed_list_id = #{standId}
|
||||||
<if test="sar.standSort != null">
|
</if>
|
||||||
and si.STAND_SORT = #{sar.standSort}
|
<if test="sar.standSort != null">
|
||||||
</if>
|
and si.STAND_SORT = #{sar.standSort}
|
||||||
<if test="sar.standType != null">
|
</if>
|
||||||
and si.STAND_TYPE = #{sar.standType}
|
<if test="sar.standType != null">
|
||||||
</if>
|
and si.STAND_TYPE = #{sar.standType}
|
||||||
<if test="sar.standNumber != null">
|
</if>
|
||||||
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
<if test="sar.standNumber != null">
|
||||||
or si.STAND_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
and (
|
||||||
</if>
|
(trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER,'-',
|
||||||
<if test="sar.standName != null">
|
si.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ','')) and si.STAND_YEAR != '')
|
||||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
or (trim(replace(concat(si.STAND_SORT,' ',si.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{sar.standNumber}),'%'),' ',''))
|
||||||
</if>
|
)
|
||||||
|
<!-- 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>
|
</where>
|
||||||
order by number
|
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};
|
LIMIT #{param3} , #{param2};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user