去掉过滤条件

This commit is contained in:
xiang2lin 2024-06-19 17:51:28 +08:00
parent ed316c2cdc
commit 026fcab189
1 changed files with 27 additions and 33 deletions

View File

@ -215,34 +215,34 @@
v_hzya_oa_cbs--> v_hzya_oa_cbs-->
-- 差旅费报销单 -- 差旅费报销单
SELECT SELECT
formson_0210.id as oaId, -- 主表id formson_0210.id as oaId,
'formson_0210' as tableName, -- 表名 'formson_0210' as tableName,
COL_SUMMARY.SUBJECT as title, -- 单据标题 COL_SUMMARY.SUBJECT as title,
unit.name as payCompany, -- 付款公司 unit.name as payCompany,
'差旅费报销单' as billName, '差旅费报销单' as billName,
'field0072' as payResultField, -- 支付结果字段 'field0072' as payResultField,
'field0073' as payDateField, -- 打款日期字段 'field0073' as payDateField,
'' as receiptFiled,-- 电子回单字段 '' as receiptFiled,
COL_SUMMARY.id as summaryId, COL_SUMMARY.id as summaryId,
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号 formmain_0209.field0017||'-'||formson_0210.sort as referenceNum,
formmain_0209.START_DATE as startDate, -- 单据日期 formmain_0209.START_DATE as startDate,
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态 formmain_0209.FINISHEDFLAG as finishedflag,
formson_0210.field0073 as payDate, -- 打款日期 formson_0210.field0073 as payDate,
formson_0210.field0072 as payResult, -- 支付结果 formson_0210.field0072 as payResult,
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户 REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount,
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行 REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName,
formson_0210.field0031 as amount, -- 金额 formson_0210.field0031 as amount,
formmain_0209.field0038 as purpose, -- 用途 formmain_0209.field0038 as purpose,
formmain_0209.field0038 as cbsAbstract, -- 摘要 formmain_0209.field0038 as cbsAbstract,
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户 REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount,
formson_0210.field0068 as revBankName, -- 收款开户行 formson_0210.field0068 as revBankName,
'' as revAccountName, -- 收款人 '' as revAccountName,
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号 REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode,
item.showvalue as personalFlag,-- 公私标记 item.showvalue as personalFlag,
'' as revBankType,-- 收款银行类型 '' as revBankType,
'10' as currency,-- 币种 '10' as currency,
'' as busType,-- 业务类型 '' as busType,
'' as receipt -- 电子回单 '' as receipt
from from
formson_0210 formson_0210
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id 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_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070 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 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"> <trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if> <if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and busType = #{busType} </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="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
<if test="payType != null and payType !='' "> and payType = #{payType} </if> <if test="payType != null and payType !='' "> and payType = #{payType} </if>
<if test="finishedflag != null and finishedflag !='' "> and finishedflag = #{finishedflag} </if> <if test="finishedflag != null and finishedflag !='' "> and finishedflag = #{finishedflag} </if>
and payResult is null and 1=1
and oaId not in (select field0001 from formmain_1283)
and startDate >= #{startDate}
</trim> </trim>
</select> </select>