test
This commit is contained in:
parent
20d271a167
commit
6db9c69da9
@ -1,7 +1,7 @@
|
|||||||
select
|
select
|
||||||
a.id
|
a.id
|
||||||
, a.zt status_id -- 状态id
|
, a.zt status_id -- 状态id
|
||||||
, case when a.zt = 0 then '正常'
|
, case when a.zt = 0 then '正常'
|
||||||
when a.zt = 1 then '待移交'
|
when a.zt = 1 then '待移交'
|
||||||
when a.zt = 2 then '不移交'
|
when a.zt = 2 then '不移交'
|
||||||
when a.zt = 3 then '不移交申请中'
|
when a.zt = 3 then '不移交申请中'
|
||||||
@ -14,20 +14,24 @@ select
|
|||||||
when a.zt = 10 then '终本'
|
when a.zt = 10 then '终本'
|
||||||
when a.zt = 11 then '强制退回中'
|
when a.zt = 11 then '强制退回中'
|
||||||
end status_name -- 状态名称
|
end status_name -- 状态名称
|
||||||
, a.kxmc payment_name -- 款项名称
|
, a.kxmc payment_name -- 款项名称
|
||||||
, a.sszy belong_resource -- 所属资源
|
, a.sszy belong_resource -- 所属资源
|
||||||
, a.ssxm project_id -- 项目id
|
, a.ssxm project_id -- 项目id
|
||||||
, b.xmmc project_name -- 项目名称
|
, b.xmmc project_name -- 项目名称
|
||||||
, d.pqbm district_code -- 片区id
|
, d.pqbm district_code -- 片区id
|
||||||
, d.pqmc district_name -- 片区名称
|
, d.pqmc district_name -- 片区名称
|
||||||
, a.fyrq fee_date -- 费用日期
|
, a.fyrq fee_date -- 费用日期
|
||||||
, a.qfje owed_amt -- 欠费金额
|
, a.qfje owed_amt -- 欠费金额
|
||||||
, a.yjje trans_amt -- 移交金额
|
, a.yjje trans_amt -- 移交金额
|
||||||
, b.xmbm project_code -- 项目编码
|
, b.xmbm project_code -- 项目编码
|
||||||
|
, a.skje collect_amt -- 收款金额
|
||||||
|
, a.fylx cost_type -- 费用类型
|
||||||
|
, a.fymc cost_name -- 费用名称
|
||||||
|
, a.hzls collect_unit -- 催收单位
|
||||||
from ods_oa_uf_wy_qf_d a
|
from ods_oa_uf_wy_qf_d a
|
||||||
left join (select id, xmmc, xmbm from ods_oa_uf_wy_xm_d) b -- 项目
|
left join (select id, xmmc, xmbm from ods_oa_uf_wy_xm_d) b -- 项目
|
||||||
on a.ssxm = b.id
|
on a.ssxm = b.id
|
||||||
left join (select id, left(pqbm,4) pqbm from ods_oa_uf_wy_pq_d where length(pqbm)=6) c -- 地区
|
left join (select id, left(pqbm,4) pqbm from ods_oa_uf_wy_pq_d where length(pqbm)=6) c -- 地区
|
||||||
on a.sspq = c.id
|
on a.sspq = c.id
|
||||||
left join (select pqbm, pqmc from ods_oa_uf_wy_pq_d where length(pqbm)=4) d -- 片区
|
left join (select pqbm, pqmc from ods_oa_uf_wy_pq_d where length(pqbm)=4) d -- 片区
|
||||||
on c.pqbm = d.pqbm
|
on c.pqbm = d.pqbm
|
Loading…
Reference in New Issue
Block a user