清单部分高级查询
This commit is contained in:
+25
@@ -169,6 +169,31 @@
|
||||
LIMIT #{param3} , #{param2};
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsId" 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>
|
||||
|
||||
</where>
|
||||
order by number
|
||||
</select>
|
||||
|
||||
<select id="selectLawsId2" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
<where>
|
||||
|
||||
+32
@@ -21,6 +21,7 @@
|
||||
|
||||
|
||||
<select id="findPage" resultMap="BusinessIssuePage">
|
||||
select t.* from (
|
||||
SELECT
|
||||
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME
|
||||
FROM
|
||||
@@ -28,5 +29,36 @@
|
||||
LEFT JOIN sar_laws_stand_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
issue.*, CONCAT(
|
||||
laws.STAND_SORT,
|
||||
' ',
|
||||
laws.STAND_NUMBER,
|
||||
'-',
|
||||
laws.STAND_YEAR
|
||||
) AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
) t
|
||||
where t.LAWS_NAME is not null and t.LAWS_NUMBER is not null
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+30
@@ -1394,6 +1394,8 @@
|
||||
</sql>
|
||||
|
||||
|
||||
<!--<!–直接在这区分了 1是国内地区 2是车型类别 3是重点跟踪清单 4是其他清单 5是项目清单–>-->
|
||||
|
||||
<!-- 分页查询-->
|
||||
<select id="getSarStandardsInfoPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
@@ -1410,6 +1412,25 @@
|
||||
</if>
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
SELECT
|
||||
<include refid="Base_Column_List_DIS"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_in_left_2"/>
|
||||
<if test="null != list and list.size()>0">
|
||||
and SAR_STANDARDS_INFO.ID in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")" index="index">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='(page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "")
|
||||
or (page.standType != null and page.standType != "") '>
|
||||
<include refid="standSort_in"/>
|
||||
</if>
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
<!--FIELD(SAR_STANDARDS_INFO.issue_time,'已发布'), FIELD(SAR_STANDARDS_INFO.issue_time,'TBD'), FIELD(SAR_STANDARDS_INFO.issue_time,'N/A') ,-->
|
||||
<!--if(isnull(SAR_STANDARDS_INFO.issue_time),0,1) desc ,-->
|
||||
<!-- 分页查询条件查询一共有多少条数据,配合分页 -->
|
||||
@@ -1422,6 +1443,15 @@
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
<!-- left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)-->
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="getSarStandardsInfoCountWk1" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
|
||||
Reference in New Issue
Block a user