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
0b77d3d1
Commit
0b77d3d1
authored
Sep 20, 2019
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
95692cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
0 deletions
+92
-0
PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
src/main/database/View/PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
+92
-0
No files found.
src/main/database/View/PRJ_PROJECT_LEASE_ITEM_HEAD_LV.sql
0 → 100644
View file @
0b77d3d1
CREATE
OR
REPLACE
VIEW
PRJ_PROJECT_LEASE_ITEM_HEAD_LV
AS
select
t
.
vehicle_class
,
t
.
Lease_Item_Seq
,
t
.
Brand_Id
,
t
.
Series_Id
,
t
.
Truck_Class
,
t
.
Price
,
t
.
Quantity
,
t
.
Item_Engine_Number
,
t
.
Horsepower
,
t
.
NOTICE_NUMBER
,
t
.
Gps_Flag
,
(
SELECT
a
.
description
value_name
FROM
hls_car_brands_vl
a
WHERE
t
.
brand_id
=
a
.
brand_id
AND
a
.
enabled_flag
=
'Y'
)
brand_id_n
,
(
SELECT
a
.
description
FROM
hls_car_series_vl
a
WHERE
a
.
series_id
=
t
.
series_id
)
series_id_n
,
(
select
code_value_name
from
sys_code_values_v
scv
where
scv
.
code
=
'TRUCK_CLASS'
and
scv
.
code_value
=
t
.
Truck_Class
)
Truck_Class_n
,
(
t
.
price
*
t
.
quantity
)
TOTAL_AMOUNT
,
t
.
project_id
,
t
.
project_lease_item_id
,
t
.
lease_item_id
,
(
select
i
.
full_name
from
hls_lease_item
i
where
i
.
lease_item_id
=
t
.
lease_item_id
)
lease_item_id_n
,
t
.
Vehicles_Number
,
(
select
COUNT
(
1
)
from
CON_CONTRACT_LEASE_ITEM
CI
where
CI
.
PROJECT_LEASE_ITEM_ID
=
T
.
PROJECT_LEASE_ITEM_ID
)
CONFIRM_NUMBER
,
t
.
insurance_price
,
t
.
gps_amount
,
t
.
Purchase_Tax
,
t
.
model_id
,
(
SELECT
a
.
description
FROM
hls_car_model_vl
a
WHERE
a
.
model_id
=
t
.
model_id
)
model_id_n
,
t
.
guide_price
,
t
.
VEHICLE_TYPE
,
(
select
a
.
code_value_name
from
sys_code_values_v
a
where
a
.
code
=
'HLS_VEHICLE_TYPE'
and
a
.
code_value
=
t
.
vehicle_type
)
vehicle_type_n
,
--add by chenlingfeng
t
.
ton_code
,
t
.
short_name
,
t
.
full_name
,
t
.
pattern
,
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'DS_TON_NAME'
and
t
.
ton_code
=
v
.
code_value
)
ton_code_n
,
t
.
ITEM_TYPE
,
--物件类型
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'DS_ITEM_TYPE'
and
t
.
ITEM_TYPE
=
v
.
code_value
)
ITEM_TYPE_n
,
t
.
machine_number
,
--机号
t
.
equipment_type
,
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'EQUIPMENT_TYPE'
and
t
.
EQUIPMENT_TYPE
=
v
.
code_value
)
EQUIPMENT_TYPE_n
,
t
.
FACTORY_price
,
t
.
DELIVERY_DATE
,
t
.
sale_date
,
--add by lijingjing
t
.
division
,
t
.
machine_model
,
t
.
equipments
,
t
.
accessories
,
t
.
origin_place
,
t
.
machine_model_class
,
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'MACHINE_MODEL_CLASS'
and
t
.
machine_model_class
=
v
.
code_value
)
machine_model_class_n
,
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'ORIGIN_PLACE'
and
t
.
origin_place
=
v
.
code_value
)
origin_place_n
,
(
select
v
.
code_value_name
as
value_name
from
sys_code_values_v
v
where
v
.
code
=
'DIVISION'
and
t
.
division
=
v
.
code_value
)
division_n
,
t
.
full_name
full_name_n
--end
from
prj_project_lease_item
t
;
\ No newline at end of file
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