标准比对 以及产品规划部 批量关闭 加导出
This commit is contained in:
+90
@@ -88,5 +88,95 @@
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findExportData" resultMap="ProductIssuePage">
|
||||
|
||||
select a.* from (
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.LAWS_NUMBER,
|
||||
laws.LAWS_NAME ,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_laws_stand_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE 1=1
|
||||
AND laws.LAWS_NAME is NOT NULL AND laws.LAWS_NUMBER is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
CONCAT(laws.
|
||||
STAND_SORT,' ',laws.STAND_NUMBER,'-',laws.STAND_YEAR)as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_SORT is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_CODE is NOT NULL AND laws.STAND_NAME is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
)a
|
||||
where 1=1
|
||||
<if test="null != ew.lawsNumber and ew.lawsNumber != ''">
|
||||
and ( a.LAWS_NUMBER like concat('%',#{ew.lawsNumber},'%') or a.LAWS_NAME like concat('%',#{ew.lawsNumber},'%') )
|
||||
</if>
|
||||
<if test="null != ew.responseInsName and ew.responseInsName != ''">
|
||||
and a.responseInsName like concat('%',#{ew.responseInsName},'%')
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user