Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
b5f315ea
Commit
b5f315ea
authored
Sep 25, 2019
by
homunculus
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://hel.hand-china.com/hlcm/leaf-hlcm
into develop
parents
023726e0
cc8fa4ab
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1811 additions
and
4 deletions
+1811
-4
PRJ_PROJECT_BP_TENANT_LV.sql
src/main/database/View/PRJ_PROJECT_BP_TENANT_LV.sql
+493
-0
PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
src/main/database/View/PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
+3
-2
PRJ_PROJECT_LV.sql
src/main/database/View/PRJ_PROJECT_LV.sql
+627
-0
bp_tenant_rate_detail_lv.sql
src/main/database/View/bp_tenant_rate_detail_lv.sql
+181
-0
con_contract_sign_lv.sql
src/main/database/View/con_contract_sign_lv.sql
+214
-0
hls_document_use_seal_vl.sql
src/main/database/View/hls_document_use_seal_vl.sql
+9
-2
prj_hls_fin_calculator_ln_lv.sql
src/main/database/View/prj_hls_fin_calculator_ln_lv.sql
+17
-0
prj_project_detail_bp_lv.sql
src/main/database/View/prj_project_detail_bp_lv.sql
+77
-0
prj_project_history_lv.sql
src/main/database/View/prj_project_history_lv.sql
+27
-0
prj_quotation_new_lv.sql
src/main/database/View/prj_quotation_new_lv.sql
+163
-0
No files found.
src/main/database/View/PRJ_PROJECT_BP_TENANT_LV.sql
0 → 100644
View file @
b5f315ea
This diff is collapsed.
Click to expand it.
src/main/database/View/PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
View file @
b5f315ea
CREATE
OR
REPLACE
VIEW
PRJ_PROJECT_LEASE_ITEM_HEAD_LV
AS
CREATE
OR
REPLACE
VIEW
PRJ_PROJECT_LEASE_ITEM_HEAD_LV
AS
select
t
.
vehicle_class
,
t
.
Lease_Item_Seq
,
t
.
Brand_Id
,
...
...
@@ -89,4 +89,5 @@ select t.vehicle_class,
t
.
full_name
full_name_n
--end
from
prj_project_lease_item
t
;
\ No newline at end of file
from
prj_project_lease_item
t
;
src/main/database/View/PRJ_PROJECT_LV.sql
0 → 100644
View file @
b5f315ea
This diff is collapsed.
Click to expand it.
src/main/database/View/bp_tenant_rate_detail_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
bp_tenant_rate_detail_lv
as
select
"BP_DETAL_ID"
,
"PROJECT_ID"
,
"BP_BIRTH"
,
"BP_MARRIAGE"
,
"BP_HEALTH"
,
"BP_BORN"
,
"PROPERTY_BELONG"
,
"OWN_PROPERTY_ADDRESS"
,
"HOUSE_AREA"
,
"HOUSE_VALUE"
,
"OWN_MONEY"
,
"BANK_CREDIT_APPROVAL"
,
"OTHER_OWN_ASSETS"
,
"FAMILY_SOURCE_INCOME"
,
"FAMILY_AVG_INCOME"
,
"FAMILY_MONTH_AVG_OUTCOME"
,
"BANK_LOAN"
,
"OTHER_LOAN"
,
"FIXED_ASSETS"
,
"CAPITAL"
,
"CAPITAL_PLACE"
,
"CAR_TYPE"
,
"CAR_BRAND"
,
"CAR_NUM"
,
"CAR_BUY_DATE"
,
"CAR_BUY_MONEY"
,
"WORK_EXPERIENCE"
,
"WORK_OPERATOR"
,
"WORK_TYPE"
,
"WORK_AVG_MONTH_INCOME"
,
"WORK_AVG_MONTH_OUTCOME"
,
"OTHER_DESCRIPTION"
,
"PAYMENT_SOURCE"
,
"E_PLACE"
,
"E_CONTRACT_AMOUNT"
,
"CONTRACT_COPY"
,
"E_CON_AUTHENTICITY"
,
"SURVEY_FIT"
,
"DAILY_CREDIT"
,
"BORROW_SITUATION"
,
"RENT_REPAYMENT"
,
"RENTAL_BALANCE"
,
"LIQUIDATED_DAMAGES"
,
"GUAR_MORTGAGE_STATUS"
,
"PAST_CONT_EXE_STATUS"
,
"INDUSTRY_JUDGEMENT"
,
"THIRD_PARTY_GUARANTEE"
,
"THIRD_PARTY_CREDIBILITY"
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'MARITAL_STATUS'
and
scv
.
code_value
=
t1
.
bp_marriage
and
scv
.
code_enabled_flag
=
'Y'
)
bp_marriage_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HEALTH_STATUS'
and
scv
.
code_value
=
t1
.
bp_health
and
scv
.
code_enabled_flag
=
'Y'
)
bp_health_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HOUSEHOLD_CODE'
and
scv
.
code_value
=
t1
.
bp_born
and
scv
.
code_enabled_flag
=
'Y'
)
bp_born_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'A51000000'
and
scv
.
code_value
=
t1
.
property_belong
and
scv
.
code_enabled_flag
=
'Y'
)
property_belong_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HOUSEHOLD_ASSET'
and
scv
.
code_value
=
t1
.
house_value
and
scv
.
code_enabled_flag
=
'Y'
)
house_value_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'BANK_CREDIT_APPROVAL'
and
scv
.
code_value
=
t1
.
bank_credit_approval
and
scv
.
code_enabled_flag
=
'Y'
)
bank_credit_approval_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HLS_YEARLY_INCOME'
and
scv
.
code_value
=
t1
.
family_avg_income
and
scv
.
code_enabled_flag
=
'Y'
)
family_avg_income_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HLS_CUS_WORKING_AGE_TYPE'
and
scv
.
code_value
=
t1
.
work_experience
and
scv
.
code_enabled_flag
=
'Y'
)
work_experience_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'WORK_OPERATOR'
and
scv
.
code_value
=
t1
.
work_operator
and
scv
.
code_enabled_flag
=
'Y'
)
work_operator_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'WORK_STYLE'
and
scv
.
code_value
=
t1
.
work_type
and
scv
.
code_enabled_flag
=
'Y'
)
work_type_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'WORK_AVG_MONTH_INCOME'
and
scv
.
code_value
=
t1
.
work_avg_month_income
and
scv
.
code_enabled_flag
=
'Y'
)
work_avg_month_income_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'HOUSEHOLD_CODE'
and
scv
.
code_value
=
t1
.
e_place
and
scv
.
code_enabled_flag
=
'Y'
)
e_place_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'E_CONTRACT_AMOUNT'
and
scv
.
code_value
=
t1
.
e_contract_amount
and
scv
.
code_enabled_flag
=
'Y'
)
e_contract_amount_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'YES_OR_NO'
and
scv
.
code_value
=
t1
.
contract_copy
and
scv
.
code_enabled_flag
=
'Y'
)
contract_copy_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'E_CON_AUTHENTICITY'
and
scv
.
code_value
=
t1
.
e_con_authenticity
and
scv
.
code_enabled_flag
=
'Y'
)
e_con_authenticity_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'SURVEY_FIT'
and
scv
.
code_value
=
t1
.
survey_fit
and
scv
.
code_enabled_flag
=
'Y'
)
survey_fit_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'BP_CREDIT_CONSCIOUS'
and
scv
.
code_value
=
t1
.
daily_credit
and
scv
.
code_enabled_flag
=
'Y'
)
daily_credit_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'REPAYMENT_STATE'
and
scv
.
code_value
=
t1
.
borrow_situation
and
scv
.
code_enabled_flag
=
'Y'
)
borrow_situation_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'YES_OR_NO'
and
scv
.
code_value
=
t1
.
guar_mortgage_status
and
scv
.
code_enabled_flag
=
'Y'
)
guar_mortgage_status_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'PAST_CONT_EXE_STATUS'
and
scv
.
code_value
=
t1
.
past_cont_exe_status
and
scv
.
code_enabled_flag
=
'Y'
)
past_cont_exe_status_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'INDUSTRY_JUDGEMENT'
and
scv
.
code_value
=
t1
.
industry_judgement
and
scv
.
code_enabled_flag
=
'Y'
)
industry_judgement_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'YES_OR_NO'
and
scv
.
code_value
=
t1
.
third_party_guarantee
and
scv
.
code_enabled_flag
=
'Y'
)
third_party_guarantee_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'THIRD_PARTY_CREDIBILITY'
and
scv
.
code_value
=
t1
.
third_party_credibility
and
scv
.
code_enabled_flag
=
'Y'
)
third_party_credibility_n
from
bp_tenant_rate_detail
t1
;
src/main/database/View/con_contract_sign_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
con_contract_sign_lv
as
Select
t1
.
data_class
,
(
Select
sc
.
code_value_name
From
sys_code_values_v
sc
Where
sc
.
code
=
'HLS_DATA_CLASS'
And
sc
.
code_value
=
t1
.
data_class
)
data_class_n
,
t1
.
contract_id
,
t1
.
calc_session_id
,
t1
.
contract_number
,
t1
.
contract_name
,
t1
.
business_type
,
t1
.
district
,
t1
.
finance_amount
,
--融资金额
(
Select
p
.
province
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
)
As
province
,
(
Select
tg
.
description
From
fnd_province
tg
Where
tg
.
province_id
=
(
Select
p
.
province
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
))
As
province_n
,
--省
(
Select
p
.
city
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
)
As
city
,
(
Select
tc
.
description
From
fnd_city
tc
Where
tc
.
city_id
=
(
Select
p
.
city
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
))
As
city_n
,
--市
t1
.
departing_date
,
t1
.
departed_date
,
t1
.
depart_status
,
--li.item_frame_number,
(
Select
v
.
code_value_name
From
sys_code_values_v
v
Where
v
.
code
=
'DEPART_STATUS'
And
v
.
code_value
=
t1
.
depart_status
)
As
depart_status_n
,
(
Select
h1
.
code_value_name
From
sys_code_values_v
h1
Where
h1
.
code
=
'PRJ500N_DISTRICT_AREAS'
And
t1
.
district
=
h1
.
code_value
)
district_n
,
(
Select
bt
.
description
From
hls_business_type
bt
Where
bt
.
business_type
=
t1
.
business_type
)
As
business_type_n
,
t1
.
document_type
,
(
Select
p
.
document_type
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
)
As
prj_document_type
,
(
Select
dt
.
description
From
hls_document_type
dt
Where
dt
.
document_type
=
t1
.
document_type
)
As
document_type_n
,
t1
.
document_category
,
(
Select
dc
.
description
From
hls_document_category
dc
Where
dc
.
document_category
=
t1
.
document_category
)
As
document_category_n
,
t1
.
project_id
,
(
Select
p
.
project_number
From
prj_project
p
Where
t1
.
project_id
=
p
.
project_id
)
As
project_id_c
,
(
Select
p
.
project_name
From
prj_project
p
Where
t1
.
project_id
=
p
.
project_id
)
As
project_id_n
,
t1
.
company_id
,
(
Select
c
.
company_short_name
From
fnd_companies_vl
c
Where
c
.
company_id
=
t1
.
company_id
)
As
company_id_n
,
t1
.
spv_company_id
,
(
Select
c
.
company_code
From
fnd_companies_vl
c
Where
c
.
company_id
=
t1
.
spv_company_id
)
As
spv_company_code
,
(
Select
c
.
company_short_name
From
fnd_companies_vl
c
Where
c
.
company_id
=
t1
.
spv_company_id
)
As
spv_company_id_n
,
t1
.
lease_organization
,
(
Select
o
.
description
From
hls_lease_organization
o
Where
o
.
lease_organization
=
t1
.
lease_organization
)
As
lease_organization_n
,
t1
.
lease_channel
,
(
Select
p
.
lease_channel
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
)
As
prj_lease_channel
,
(
Select
p
.
special_permit_flag
From
prj_project
p
Where
p
.
project_id
=
t1
.
project_id
)
As
special_permit_flag
,
(
Select
ch
.
description
From
hls_lease_channel
ch
Where
ch
.
lease_channel
=
t1
.
lease_channel
)
As
lease_channel_n
,
t1
.
division
,
(
Select
d
.
description
From
hls_division
d
Where
d
.
division
=
t1
.
division
)
As
division_n
,
t1
.
bp_id_tenant
,
(
Select
m
.
bp_code
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_tenant
)
As
bp_code
,
(
Select
m
.
bp_name
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_tenant
)
As
bp_id_tenant_n
,
(
Select
m
.
bp_name
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_tenant
)
As
bp_name
,
(
Select
ma
.
bp_name
From
hls_bp_master
ma
Where
ma
.
bp_id
=
t1
.
bp_id_tenant
)
bp_id_tenant_name
,
t1
.
bp_id_agent_level1
,
(
Select
m
.
bp_name
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_agent_level1
)
As
bp_id_agent_level1_n
,
t1
.
bp_id_agent_level2
,
(
Select
m
.
bp_code
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_agent_level2
)
As
bp_id_agent_level2_n
,
t1
.
bp_id_agent_level3
,
(
Select
m
.
bp_code
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_agent_level3
)
As
bp_id_agent_level3_n
,
t1
.
owner_user_id
,
(
Select
a
.
description
From
sys_user
a
Where
a
.
user_id
=
t1
.
owner_user_id
)
owner_user_id_n
,
t1
.
employee_id
,
(
Select
e
.
name
From
exp_employees
e
Where
e
.
employee_id
=
t1
.
employee_id
)
As
employee_id_n
,
t1
.
unit_id
,
(
Select
h
.
bp_name
From
hls_bp_master
h
Where
h
.
bp_id
=
t1
.
unit_id
)
As
unit_id_n
,
t1
.
employee_id_of_manager
,
(
Select
e
.
name
From
exp_employees
e
Where
e
.
employee_id
=
t1
.
employee_id_of_manager
)
As
employee_id_of_manager_n
,
t1
.
factoring_type
,
t1
.
description
,
t1
.
price_list
,
(
Select
l
.
description
From
hls_price_list
l
Where
l
.
price_list
=
t1
.
price_list
)
As
price_list_n
,
t1
.
calc_method
,
to_date
(
to_char
(
t1
.
inception_of_lease
,
'yyyy-mm-dd'
),
'yyyy-mm-dd'
)
inception_of_lease
,
--起租日
t1
.
contract_status
,
------------------------
(
Select
v
.
code_value_name
From
sys_code_values_v
v
Where
v
.
code
=
'CON500_CONTRACT_STATUS'
And
v
.
code_value
=
t1
.
contract_status
)
As
contract_status_n
,
----------------------
t1
.
con_maintain_flag
,
------------------------
(
Select
a
.
project_number
From
prj_project
a
Where
a
.
project_id
=
t1
.
project_id
)
project_number
,
(
Select
a
.
document_type
From
prj_project
a
Where
a
.
project_id
=
t1
.
project_id
)
project_document_type
,
-----------------
(
Select
bm
.
bp_class
From
hls_bp_master
bm
Where
bm
.
bp_id
=
t1
.
bp_id_tenant
)
bp_class
,
-----------------
(
Select
bm
.
bp_class_n
From
hls_bp_master_lv
bm
Where
bm
.
bp_id
=
t1
.
bp_id_tenant
)
bp_class_n
,
-------------------
Null
version_number
,
(
Select
su
.
description
From
sys_user
su
Where
su
.
user_id
=
t1
.
owner_user_id
)
owner
,
-- 单据所有者
-- t1.cancel_reason, --合同取消原因
t1
.
closed_date
,
-- 合同取消日期----------------------------------
(
Select
to_date
(
to_char
(
pp
.
create_con_date
,
'yyyy-mm-dd'
),
'yyyy-mm-dd'
)
From
prj_project
pp
Where
pp
.
project_id
=
t1
.
project_id
)
contract_creation_date
,
-- 项目创建合同时间--------------------------------
t1
.
wfl_instance_id
,
--------------------------
(
Select
to_date
(
to_char
(
zi
.
creation_date
,
'yyyy-mm-dd'
),
'yyyy-mm-dd'
)
From
zj_wfl_workflow_instance
zi
Where
zi
.
instance_id
=
t1
.
wfl_instance_id
)
submit_date_detail
,
---------------------------
nvl
(
t1
.
archive_status
,
'10'
)
archive_status
,
-------------------
nvl
((
Select
v
.
code_value_name
As
value_name
From
sys_code_values_v
v
Where
v
.
code
=
'ARCHIVE_STATUS'
And
v
.
code_value
=
t1
.
archive_status
),
'未归档'
)
archive_status_n
,
------------------------
--add by chenlingfeng
(
Select
hbm
.
large_area
From
hls_bp_master
hbm
Where
hbm
.
bp_id
=
t1
.
bp_id_tenant
)
large_area
,
--end
t1
.
content_type
,
(
Select
v
.
code_value_name
From
sys_code_values_v
v
Where
v
.
code
=
'CON1010_CONTENT_TYPE'
And
v
.
code_value
=
t1
.
content_type
)
content_type_n
,
t1
.
sys_level
,
t1
.
bs_level
,
t1
.
lease_execution_date
,
--执行日期
(
Select
m
.
extra_nam
From
hls_bp_master
m
Where
m
.
bp_id
=
t1
.
bp_id_agent_level1
)
As
extra_nam
,
t1
.
wfl_contract_status
,
(
Select
v
.
code_value_name
From
sys_code_values_v
v
Where
v
.
code
=
'HLS303_WFL_STATUS'
And
v
.
code_value
=
t1
.
wfl_contract_status
and
v
.
code_enabled_flag
=
'Y'
and
v
.
code_value_enabled_flag
=
'Y'
)
wfl_contract_status_n
From
con_contract
t1
Where
t1
.
data_class
=
'NORMAL'
--t1.contract_status In ('NEW','SIGN','INCEPT')
-- And
order
by
t1
.
creation_date
desc
;
src/main/database/View/hls_document_use_seal_vl.sql
View file @
b5f315ea
create
or
replace
view
hls_document_use_seal_vl
as
create
or
replace
view
hls_document_use_seal_vl
as
select
t
.
document_use_seal_id
,
t
.
document_table
,
t
.
document_id
AS
contract_id
,
...
...
@@ -37,5 +37,12 @@ select t.document_use_seal_id,
from
sys_code_values_v
v
where
v
.
code_value
=
t
.
supervisio_seal
and
v
.
code
=
'YES_OR_NO'
)
as
supervisio_seal_n
,
t
.
seal_number
as
SEAL_QUANTITY
t
.
seal_number
as
SEAL_QUANTITY
,
t
.
seal_number
,
(
select
v
.
code_value_name
from
sys_code_values_v
v
where
v
.
code_value
=
t
.
seal_number
and
v
.
code
=
'SEAL_NUMBER'
and
v
.
code_enabled_flag
=
'Y'
and
v
.
code_value_enabled_flag
=
'Y'
)
seal_number_n
from
HLS_DOCUMENT_USE_SEAL
t
;
src/main/database/View/prj_hls_fin_calculator_ln_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
prj_hls_fin_calculator_ln_lv
as
select
ln
.
times
,
ln
.
calc_date
,
ln
.
RENTAL_EQ_PYMT_RAW
,
LN
.
RENTAL
,
LN
.
PRINCIPAL
,
LN
.
INTEREST
,
LN
.
OUTSTANDING_PRIN_TAX_INCLD
,
LN
.
CALC_SESSION_ID
,
pq
.
document_id
project_id
,
pq
.
quotation_id
from
hls_fin_calculator_ln
ln
,
hls_fin_calculator_hd
hd
,
prj_quotation
pq
where
hd
.
calc_session_id
=
ln
.
calc_session_id
and
pq
.
calc_session_id
=
hd
.
calc_session_id
and
pq
.
document_category
=
'PROJECT'
ORDER
BY
(
ln
.
times
+
0
)
;
src/main/database/View/prj_project_detail_bp_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
prj_project_detail_bp_lv
as
Select
t1
.
project_id
,
t1
.
prj_bp_id
,
t1
.
bp_id
,
(
select
hls
.
bp_name
from
hls_bp_master
hls
where
hls
.
bp_id
=
t1
.
bp_id
)
bp_id_n
,
t1
.
bp_category
,
(
select
b
.
description
from
hls_bp_category
b
where
b
.
bp_category
=
t1
.
bp_category
)
bp_category_n
,
(
Select
bt
.
description
From
hls_bp_type
bt
,
hls_bp_master
hls
Where
bt
.
bp_type
=
hls
.
bp_type
And
hls
.
bp_id
=
t1
.
bp_id
)
As
bp_type_n
,
(
Select
scv
.
code_value_name
From
sys_code_values_v
scv
,
hls_bp_master
hls
Where
scv
.
code
=
'HLS_SYS_UNIT_PROPERTY'
And
scv
.
code_value
=
hls
.
legal_form
And
hls
.
bp_id
=
t1
.
bp_id
)
legal_form_n
,
(
select
hls
.
legal_form
from
hls_bp_master
hls
where
hls
.
bp_id
=
t1
.
bp_id
)
legal_form
,
(
Select
hls
.
bp_code
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
bp_code
,
(
Select
hls
.
bp_class
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
bp_class
,
(
Select
v
.
code_value_name
From
sys_code_values_v
v
,
hls_bp_master
hls
Where
v
.
code
=
'HLS211_BP_CLASS'
And
v
.
code_value
=
hls
.
bp_class
And
hls
.
bp_id
=
t1
.
bp_id
)
As
bp_class_n
,
(
Select
hls
.
founded_date
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
founded_date
,
(
Select
hls
.
registered_capital
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
registered_capital
,
(
Select
hls
.
work_force
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
work_force
,
(
Select
hls
.
work_unit_phone
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
work_unit_phone
,
(
Select
hls
.
office_space
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
office_space
,
(
Select
v
.
code_value_name
From
sys_code_values_v
v
,
hls_bp_master
hls
Where
v
.
code
=
'PROPERTY_ATTRIBUTE'
And
v
.
code_enabled_flag
=
'Y'
And
v
.
code_value_enabled_flag
=
'Y'
And
v
.
code_value
=
hls
.
property_attribute
And
hls
.
bp_id
=
t1
.
bp_id
)
property_attribute_n
,
(
select
hls
.
property_attribute
from
hls_bp_master
hls
where
hls
.
bp_id
=
t1
.
bp_id
)
property_attribute
,
(
Select
hls
.
source_of_income_db
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
source_of_income_db
,
(
Select
hls
.
business_license_num
From
hls_bp_master
hls
Where
hls
.
bp_id
=
t1
.
bp_id
)
business_license_num
,
t1
.
Number_Of_Car
,
t1
.
Manage_Of_Car
,
t1
.
Number_Of_Cus
,
t1
.
PERIOD_OF_YEAR
,
t1
.
ASSET_SIZE
,
t1
.
Debt
,
t1
.
Revenue
,
t1
.
Net_Profit
,
t1
.
Land_Situation
,
t1
.
Mortgage_Guarantee
,
t1
.
Estimation_Lease
,
t1
.
Guarantee_Of_Repayment
,
t1
.
Risk_Measure
,
t1
.
CREDIT_RECORD
,
t1
.
Company_Credit_Record
,
t1
.
Criminal_Record
,
t1
.
EXECUTED_ASSET
From
prj_project_bp
t1
;
src/main/database/View/prj_project_history_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
prj_project_history_lv
as
select
(
select
pp
.
project_number
from
prj_project
pp
where
pp
.
project_id
=
bp
.
project_id
)
project_number
,
(
select
cc
.
contract_number
from
con_contract
cc
where
cc
.
project_id
=
bp
.
project_id
)
contract_number
,
(
select
cc
.
contract_id
from
con_contract
cc
where
cc
.
project_id
=
bp
.
project_id
)
contract_id
,
bp
.
bp_code
,
bp
.
bp_name
,
(
select
cc
.
overdue_max_days
from
con_contract
cc
where
cc
.
project_id
=
bp
.
project_id
)
overdue_max_days
,
(
select
max
(
cc
.
overdue_amount
)
from
con_contract
cc
where
cc
.
project_id
=
bp
.
project_id
)
overdue_max_amount
,
bp
.
bp_type
,
bp
.
bp_id
,
bp
.
project_id
,
bp
.
bp_class
,
(
select
hbt
.
description
from
hls_bp_type
hbt
where
hbt
.
bp_type
=
bp
.
bp_type
)
description
from
prj_project_bp
bp
;
src/main/database/View/prj_quotation_new_lv.sql
0 → 100644
View file @
b5f315ea
create
or
replace
view
prj_quotation_new_lv
as
select
"QUOTATION_ID"
,
t1
.
document_category
,
t1
.
calc_session_id
,
"DOCUMENT_ID"
,
t1
.
lease_start_date
,
t1
.
price_list
,
(
select
l
.
description
as
value_name
from
hls_price_list
l
where
l
.
price_list
=
t1
.
price_list
)
price_list_n
,
t1
.
lease_times
,
t1
.
annual_pay_times
,
"DOWN_PAYMENT"
,
t1
.
down_payment_ratio
,
t1
.
residual_value
,
t1
.
guide_price
,
t1
.
invoice_price
,
t1
.
purchase_tax
,
t1
.
insurance_price
,
t1
.
plate_price
,
"LEASE_CHARGE"
,
"LEASE_CHARGE_RATIO"
,
"MAIN_CONTRACT_FLAG"
,
"DOCUMENT_NUMBER"
,
"LEASE_ITEM_AMOUNT"
,
"REVERSE_FLAG"
,
"WFL_STATUS"
,
t1
.
wfl_instance_id
,
"REVIEW_FLAG"
,
"DOCUMENT_STATUS"
,
"REVIEW_BY"
,
"REVERSE_DATE"
,
"RENT_TYPE"
,
"RENT_DATE"
,
"RENT_DAY"
,
"INSURANCE_FEE"
,
"BP_ID_INSURE"
,
"INSURE_TYPE"
,
"CREATED_CONTRACT_FLAG"
,
"HD_USER_COL_V09"
,
"HD_USER_COL_N06"
,
"HD_USER_COL_N15"
,
"HD_USER_COL_N14"
,
"HD_USER_COL_N13"
,
"DEPOSIT_DEDUCTION"
,
"TOTAL_SALESTAX"
,
"HD_USER_COL_N08"
,
"INT_RATE_DISPLAY"
,
"PAY_TYPE"
,
"HD_USER_COL_N02"
,
"HD_USER_COL_N07"
,
"LEASE_ITEM_PRICE_AGENT"
,
"GPS_INSTALL"
,
"HD_USER_COL_N05"
,
"GPS_FEE_PAY"
,
"GPS_FEE"
,
"INVESTIGATION_FEE"
,
"FIRST_INSURANCE_FEE"
,
"OTHER_FEE"
,
"LEASE_TERM"
,
"HD_USER_COL_V01"
,
"HD_USER_COL_N12"
,
"HD_USER_COL_N04"
,
"BTB_TOTAL_FEE_PV"
,
"BTB_INTEREST_MARGIN"
,
"DEPOSIT_RATIO"
,
"NOTARIAL_FEE_PAYABLE"
,
"OTHER_FEE3"
,
t1
.
btb_fee_after_tax
,
(
select
h1
.
code_value_name
value_code
from
sys_code_values_v
h1
where
h1
.
code
=
'HLS500_ANNUAL_PAY_TIMES'
and
t1
.
annual_pay_times
=
h1
.
code_value
)
annual_pay_times_n
,
-- (select h1.code_value_name value_code
-- from sys_code_values_v h1
-- where h1.code = 'HLS500_ANNUAL_PAY_TIMES'
-- and t1.btb_fee_after_tax = h1.code_value) btb_fee_after_tax_n,
(
select
h1
.
code_value_name
value_code
from
sys_code_values_v
h1
where
h1
.
code
=
'HLS500_ANNUAL_PAY_TIMES'
and
h1
.
code_value
=
t1
.
btb_fee_after_tax
)
btb_fee_after_tax_n
,
(
select
h1
.
code_value_name
value_code
from
sys_code_values_v
h1
where
h1
.
code
=
'HLS_052_FINANCIAL_SCALE'
and
t1
.
hd_user_col_v01
=
h1
.
code_value
)
hd_user_col_v01_n
,
/* decode(t1.lease_times, 12, 12, 24, 24, 36, 36, 48, 48) lease_times_n,*/
(
select
h1
.
code_value_name
value_code
from
sys_code_values_v
h1
where
h1
.
code
=
'TIMES'
and
t1
.
lease_times
=
h1
.
code_value
)
lease_times_n
,
a
.
project_id
,
t1
.
product_id
,
(
select
t2
.
special_note
from
hls_product_plan_definition
t2
where
t2
.
product_plan_id
=
t1
.
product_id
)
product_id_n
,
(
select
t2
.
if_self_definition
from
hls_product_plan_definition
t2
where
t2
.
product_plan_id
=
t1
.
product_id
)
if_self_definition
,
--是否自定义产品
(
select
decode
(
t2
.
if_self_definition
,
'N'
,
'否'
,
'Y'
,
'是'
,
'否'
)
from
hls_product_plan_definition
t2
where
t2
.
product_plan_id
=
t1
.
product_id
)
if_self_definition_n
,
--是否自定义产品
t1
.
base_rate
,
t1
.
base_rate_type
,
(
select
d
.
description
from
fnd_base_rate_type
d
where
d
.
base_rate_type
=
t1
.
base_rate_type
)
base_rate_type_n
,
t1
.
currency
,
t1
.
btb_net_finance_amount
,
t1
.
btb_finance_amount
,
(
select
hd
.
deposit
from
hls_fin_calculator_hd
hd
where
hd
.
calc_session_id
=
t1
.
calc_session_id
)
deposit
,
(
select
hd
.
irr
from
hls_fin_calculator_hd
hd
where
hd
.
calc_session_id
=
t1
.
calc_session_id
)
irr
,
t1
.
third_party_deposit
,
(
select
b
.
code_value_name
value_name
from
sys_code_values_v
b
where
b
.
code
=
'HLS500_DEPOSIT_DEDUCTION'
and
b
.
code_value
=
t1
.
deposit_deduction
)
deposit_deduction_n
,
a
.
business_type
,
t1
.
commission_receivable
,
t1
.
finance_amount
,
t1
.
other_payment3
,
t1
.
btb_total_fee
,
t1
.
hd_user_col_v03
,
t1
.
hd_user_col_v05
,
(
select
b
.
code_value_name
from
sys_codes
a
,
sys_code_values_vl
b
where
b
.
code_id
=
a
.
code_id
and
a
.
code
=
'MORTGAGE_TIME'
and
b
.
code_value
=
t1
.
hd_user_col_v05
)
hd_user_col_v05_n
,
nvl
(
t1
.
promise_to_pay
,
0
)
promise_to_pay
,
decode
(
t1
.
price_list
,
'DR_PRICE_25'
,
'Y'
,
'N'
)
quote_rent
,
--add by chenlingfeng
t1
.
pmt_first
,
t1
.
direct_lease_charge
,
t1
.
cus_charge_allocate_flag
,
t1
.
insurance_pck_flag
,
t1
.
product_name
,
t1
.
product_type
,
t1
.
INSURANCE_METHOD
,
(
select
v
.
code_value_name
from
sys_code_values_v
v
where
v
.
code
=
'INSURANCE_METHOD'
and
v
.
code_value
=
t1
.
INSURANCE_METHOD
)
INSURANCE_METHOD_n
,
(
select
h
.
price_list
from
hls_fin_calculator_hd
h
where
h
.
calc_session_id
=
t1
.
calc_session_id
)
cal_hd_price_list
,
t1
.
sub_price_list
,
--商品名2type
(
select
v
.
code_value_name
from
sys_code_values_v
v
where
v
.
code
=
'PRICE_LIST_NAME'
and
v
.
code_value
=
t1
.
sub_price_list
)
sub_price_list_n
,
t1
.
lease_mgt_fee_ratio
,
--代理商手续费比例
--add by lijingjing
t1
.
other_fee2
,
t1
.
total_rental
,
t1
.
hd_user_col_n11
-- t1.lease_start_date
from
prj_quotation
t1
,
prj_project
a
where
t1
.
document_id
=
a
.
project_id
and
t1
.
document_category
=
'PROJECT'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment