改成查视图
This commit is contained in:
parent
271243ee4f
commit
95440ef85f
|
@ -11,56 +11,7 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="entity_list_base" resultMap="get-CInvoiceImportHEntity-result" parameterType="com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity">
|
<select id="entity_list_base" resultMap="get-CInvoiceImportHEntity-result" parameterType="com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity">
|
||||||
select * from (
|
select * from v_hzya_invoice_import f
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
'formmain_0327' as tab_name,
|
|
||||||
'field0370' as yd_res_field,
|
|
||||||
'对公付款单' as bill_type,
|
|
||||||
field0146 as bill_code
|
|
||||||
FROM
|
|
||||||
formmain_0327
|
|
||||||
WHERE
|
|
||||||
finishedflag = 1
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
'formmain_0533' as tab_name,
|
|
||||||
'field0383' as yd_res_field,
|
|
||||||
'差旅费报销单' as bill_type,
|
|
||||||
field0094 as bill_code
|
|
||||||
FROM
|
|
||||||
formmain_0533
|
|
||||||
WHERE
|
|
||||||
finishedflag = 1
|
|
||||||
UNION ALL
|
|
||||||
-- 日常费用报销
|
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
'formmain_0314' as tab_name,
|
|
||||||
'field0338' as yd_res_field,
|
|
||||||
'日常报销单' as bill_type,
|
|
||||||
field0220 as bill_code
|
|
||||||
FROM
|
|
||||||
formmain_0314
|
|
||||||
WHERE
|
|
||||||
finishedflag = 1
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- 业务招待费
|
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
'formmain_0294' as tab_name,
|
|
||||||
'field0218' as yd_res_field,
|
|
||||||
'招待报销单' as bill_type,
|
|
||||||
field0053 as bill_code
|
|
||||||
FROM
|
|
||||||
formmain_0294
|
|
||||||
WHERE
|
|
||||||
finishedflag = 1
|
|
||||||
) f
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="id != null and id != ''">f.id = #{id}</if>
|
<if test="id != null and id != ''">f.id = #{id}</if>
|
||||||
<if test="bill_code != null and bill_code != ''">and f.bill_code = #{bill_code}</if>
|
<if test="bill_code != null and bill_code != ''">and f.bill_code = #{bill_code}</if>
|
||||||
|
|
Loading…
Reference in New Issue