Commit d5cf265b authored by 18083's avatar 18083

对账单提前结清部分核销数据处理

parent 3889d68e
......@@ -12,8 +12,7 @@
<select id="selectCashflowList" parameterType="integer" resultType="java.util.LinkedHashMap">
Select
Select
contract_id,
cashflow_id,
write_off_id,
......@@ -120,7 +119,7 @@
And nvl(cwo.reversed_flag, 'N') = 'N'
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -142,7 +141,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -157,7 +156,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -193,7 +192,7 @@
And nvl(cwo.reversed_flag, 'N') = 'N'
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -228,7 +227,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -243,7 +242,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -259,7 +258,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -273,7 +272,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -290,7 +289,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -303,7 +302,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -368,7 +367,7 @@
And h.bp_id = c.bp_id_tenant
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -391,7 +390,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -406,7 +405,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -442,7 +441,7 @@
And nvl(cwo.reversed_flag, 'N') = 'N'
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -492,7 +491,7 @@
And cc1.times = ccc.times
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') != 'NOT'))
......@@ -503,7 +502,7 @@
And cc1.times = ccc.times
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') != 'NOT'))
......@@ -514,7 +513,7 @@
And cc1.times = ccc.times
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') != 'NOT'))
......@@ -525,7 +524,7 @@
And cc1.times = ccc.times
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') != 'NOT'))
......@@ -535,7 +534,7 @@
And ccc.contract_id = c.contract_id
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -661,7 +660,7 @@
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') !=
......@@ -684,7 +683,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -699,7 +698,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -739,7 +738,7 @@
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') !=
......@@ -767,7 +766,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -783,7 +782,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -800,7 +799,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -815,7 +814,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
......@@ -832,7 +831,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -846,7 +845,7 @@
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
......@@ -907,7 +906,7 @@
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') !=
......@@ -931,7 +930,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -946,7 +945,7 @@
And ((ccn.cf_direction = 'INFLOW' And
ccn.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccn.cf_direction = 'NONCASH' And
ccn.cf_status = 'BLOCK' And
nvl(ccn.write_off_flag, 'NOT') !=
......@@ -986,7 +985,7 @@
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') !=
......@@ -1023,7 +1022,7 @@
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') !=
......@@ -1036,7 +1035,7 @@
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') !=
......@@ -1049,7 +1048,7 @@
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') !=
......@@ -1063,7 +1062,7 @@
And ((cc1.cf_direction = 'INFLOW' And
cc1.cf_status = 'RELEASE') Or
(c.contract_status In
('REPURING', 'REPUR') And
('REPURING', 'REPUR','ETING','ET') And
cc1.cf_direction = 'NONCASH' And
cc1.cf_status = 'BLOCK' And
nvl(cc1.write_off_flag, 'NOT') !=
......@@ -1074,7 +1073,7 @@
And ccc.contract_id = c.contract_id
And ((ccc.cf_direction = 'INFLOW' And
ccc.cf_status = 'RELEASE') Or
(c.contract_status In ('REPURING', 'REPUR') And
(c.contract_status In ('REPURING', 'REPUR','ETING','ET') And
ccc.cf_direction = 'NONCASH' And
ccc.cf_status = 'BLOCK' And
nvl(ccc.write_off_flag, 'NOT') != 'NOT'))
......@@ -1093,16 +1092,18 @@
cf_item,
write_off_id)
</select>
<select id="selectContractDetailList" parameterType="integer" resultType="java.util.HashMap">
Select hb.bp_name,
c.contract_number,
(Select cl.machine_number
From con_contract_lease_item cl
Where cl.contract_id = c.contract_id) As machine_number,
to_char(Sysdate, 'yyyy"年"mm"月"dd"日"') As today
Select
hb.bp_name,
c.contract_number,
(Select cl.machine_number
From con_contract_lease_item cl
Where cl.contract_id = c.contract_id) As machine_number,
to_char(Sysdate, 'yyyy"年"mm"月"dd"日"') As today
From con_contract c, hls_bp_master hb
Where c.bp_id_tenant = hb.bp_id
and c.contract_id = #{contractId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment