去掉过滤条件
This commit is contained in:
parent
ed316c2cdc
commit
026fcab189
|
@ -215,34 +215,34 @@
|
|||
v_hzya_oa_cbs-->
|
||||
-- 差旅费报销单
|
||||
SELECT
|
||||
formson_0210.id as oaId, -- 主表id
|
||||
'formson_0210' as tableName, -- 表名
|
||||
COL_SUMMARY.SUBJECT as title, -- 单据标题
|
||||
unit.name as payCompany, -- 付款公司
|
||||
formson_0210.id as oaId,
|
||||
'formson_0210' as tableName,
|
||||
COL_SUMMARY.SUBJECT as title,
|
||||
unit.name as payCompany,
|
||||
'差旅费报销单' as billName,
|
||||
'field0072' as payResultField, -- 支付结果字段
|
||||
'field0073' as payDateField, -- 打款日期字段
|
||||
'' as receiptFiled,-- 电子回单字段
|
||||
'field0072' as payResultField,
|
||||
'field0073' as payDateField,
|
||||
'' as receiptFiled,
|
||||
COL_SUMMARY.id as summaryId,
|
||||
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
|
||||
formmain_0209.START_DATE as startDate, -- 单据日期
|
||||
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
|
||||
formson_0210.field0073 as payDate, -- 打款日期
|
||||
formson_0210.field0072 as payResult, -- 支付结果
|
||||
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
|
||||
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
|
||||
formson_0210.field0031 as amount, -- 金额
|
||||
formmain_0209.field0038 as purpose, -- 用途
|
||||
formmain_0209.field0038 as cbsAbstract, -- 摘要
|
||||
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
|
||||
formson_0210.field0068 as revBankName, -- 收款开户行
|
||||
'' as revAccountName, -- 收款人
|
||||
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
|
||||
item.showvalue as personalFlag,-- 公私标记
|
||||
'' as revBankType,-- 收款银行类型
|
||||
'10' as currency,-- 币种
|
||||
'' as busType,-- 业务类型
|
||||
'' as receipt -- 电子回单
|
||||
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum,
|
||||
formmain_0209.START_DATE as startDate,
|
||||
formmain_0209.FINISHEDFLAG as finishedflag,
|
||||
formson_0210.field0073 as payDate,
|
||||
formson_0210.field0072 as payResult,
|
||||
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount,
|
||||
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName,
|
||||
formson_0210.field0031 as amount,
|
||||
formmain_0209.field0038 as purpose,
|
||||
formmain_0209.field0038 as cbsAbstract,
|
||||
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount,
|
||||
formson_0210.field0068 as revBankName,
|
||||
'' as revAccountName,
|
||||
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode,
|
||||
item.showvalue as personalFlag,
|
||||
'' as revBankType,
|
||||
'10' as currency,
|
||||
'' as busType,
|
||||
'' as receipt
|
||||
from
|
||||
formson_0210
|
||||
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
|
||||
|
@ -250,10 +250,6 @@
|
|||
LEFT JOIN CTP_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
|
||||
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
|
||||
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
|
||||
-- left join V_USER_VIEW_ALL us on us.staffid=formmain_0209.field0024
|
||||
WHERE 1=1
|
||||
-- and formson_0210.field0031>0
|
||||
and CTP_AFFAIR.node_name = '发起者' and CTP_AFFAIR.COMPLETE_TIME is null and CTP_AFFAIR.STATE = 3
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
|
||||
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
|
||||
|
@ -277,9 +273,7 @@
|
|||
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
|
||||
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
|
||||
<if test="finishedflag != null and finishedflag !='' "> and finishedflag = #{finishedflag} </if>
|
||||
and payResult is null
|
||||
and oaId not in (select field0001 from formmain_1283)
|
||||
and startDate >= #{startDate}
|
||||
and 1=1
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue