Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
3381fa2a
Commit
3381fa2a
authored
Oct 24, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加车辆信息下载
parent
85649a1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
250 deletions
+6
-250
VehicleExcelVo.java
...n/java/com/xxfc/platform/vehicle/pojo/VehicleExcelVo.java
+1
-1
VehicleMapper.java
.../java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
+0
-3
VehicleInformationDownloadController.java
...icle/rest/admin/VehicleInformationDownloadController.java
+1
-1
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+4
-245
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleExcelVo.java
View file @
3381fa2a
...
...
@@ -29,7 +29,7 @@ public class VehicleExcelVo {
/**
*
*/
private
String
useType
;
private
String
useType
Name
;
/**
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
View file @
3381fa2a
...
...
@@ -16,9 +16,6 @@ public interface VehicleMapper extends Mapper<Vehicle> {
public
List
<
ResultVehicleVo
>
getByPageNotAllData
(
Map
<
String
,
Object
>
params
);
List
<
VehicleExcelVo
>
getVehicleExcelVo
(
Map
<
String
,
Object
>
params
);
List
<
VehicleExcelVo
>
getVehicleExcelVoNotAllData
(
Map
<
String
,
Object
>
params
);
public
int
updateStatusById
(
Map
<
String
,
Object
>
params
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleInformationDownloadController.java
View file @
3381fa2a
...
...
@@ -51,7 +51,7 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
writer
.
addHeaderAlias
(
"numberPlate"
,
"车牌号"
);
writer
.
addHeaderAlias
(
"code"
,
"车辆编码"
);
writer
.
addHeaderAlias
(
"vehicleType"
,
"车型"
);
writer
.
addHeaderAlias
(
"useType"
,
"用途"
);
writer
.
addHeaderAlias
(
"useType
Name
"
,
"用途"
);
writer
.
addHeaderAlias
(
"parkBranchCompanyName"
,
"停靠分公司"
);
// 一次性写出内容,使用默认样式,强制输出标题
writer
.
write
(
rows
,
true
);
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
3381fa2a
...
...
@@ -71,6 +71,7 @@
v.update_time,
v.model_id,
v.mileage_last_update as mileage,
c.val as useTypeName,
vm.name as vehicleType
<if
test=
" yearMonthAndParam != null "
>
,vbi.booked_date
...
...
@@ -89,6 +90,7 @@
LEFT JOIN vehicle_book_record v2 on v2.id = (select id from vehicle_book_record where vehicle_id = v.id order by update_time DESC LIMIT 1)
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
LEFT JOIN vehicle_model vm ON v.model_id = vm.id
LEFT JOIN (select * from constant where type = 2) c ON v.use_type = c.code
where
v.is_del=0
<if
test=
"mRangeDateEnd !=null"
>
...
...
@@ -214,6 +216,7 @@
v.update_time,
v.model_id,
v.mileage_last_update as mileage,
c.val as useTypeName,
vm.name as vehicleType
<if
test=
" yearMonthAndParam !=null "
>
,vbi.booked_date
...
...
@@ -232,6 +235,7 @@
LEFT JOIN vehicle_book_record v2 on v2.id = (select id from vehicle_book_record where vehicle_id = v.id order by update_time DESC LIMIT 1)
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
LEFT JOIN vehicle_model vm ON v.model_id = vm.id
LEFT JOIN (select * from constant where type = 2) c ON v.use_type = c.code
where
v.is_del=0
<if
test=
"companyList != null"
>
...
...
@@ -337,251 +341,6 @@
) r ORDER BY r.parkBranchCompanyName
</select>
<select
id=
"getVehicleExcelVo"
parameterType=
"java.util.Map"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleExcelVo"
>
SELECT r.* FROM (
select
v.`code`,
v.number_plate,
bc.name as parkBranchCompanyName,
c.val as useType,
vm.name as vehicleType
from vehicle v
<if
test=
" yearMonthAndParam != null "
>
left join
vehicle_book_info vbi on v.`id` = vbi.vehicle
</if>
-- LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
-- LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 停车分公司
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
-- 目的地分公司
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN vehicle_book_record v2 on v2.vehicle_id = v.id
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
LEFT JOIN vehicle_model vm ON v.model_id = vm.id
LEFT JOIN (select * from constant where type = 2) c ON v.use_type = c.code
where
v.is_del=0
<if
test=
"mRangeDateEnd !=null"
>
and v.maintenance_date
<
= #{mRangeDateEnd}
</if>
<if
test=
"modelId != null and modelId != ''"
>
and v.model_id = #{modelId}
</if>
<if
test=
"mRangeDateStart !=null"
>
and v.maintenance_date
>
= #{mRangeDateStart}
</if>
<if
test=
"aVRangeDateStart !=null"
>
and v.annual_verification_date
<
= #{aVRangeDateEnd}
</if>
<if
test=
"aVRangeDateEnd !=null"
>
and v.annual_verification_date
>
= #{aVRangeDateStart}
</if>
<if
test=
"insuranceDateRangeStart !=null"
>
and v.insurance_end_date
<
= #{insuranceDateRangeEnd}
</if>
<if
test=
"insuranceDateRangeEnd !=null"
>
and v.insurance_end_date
>
= #{insuranceDateRangeStart}
</if>
<if
test=
"insuranceCompany !=null"
>
and v.insurance_company = #{insuranceCompany}
</if>
<if
test=
"belongToName !=null"
>
and v.belong_to_name = #{belongToName}
</if>
<if
test=
"vin !=null and vin != ''"
>
and v.vin = #{vin}
</if>
<!-- <if test="subordinateBranch !=null">-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- </if>-->
<if
test=
"code !=null"
>
and v.code = #{code}
</if>
<if
test=
"status !=null and status != 6 and status != 7"
>
and v.status = #{status}
</if>
<if
test=
"status !=null and status == 6"
>
and v3.id is not NULL and v2.book_type = 3 and v3.state = 0
</if>
<if
test=
"status !=null and status == 7"
>
and v3.id is not NULL and v2.book_type = 6 and v3.state = 0
</if>
<if
test=
"numberPlate !=null and numberPlate != ''"
>
and v.number_plate like concat('%',#{numberPlate},'%')
</if>
<if
test=
"brand !=null"
>
and v.brand = #{brand}
</if>
<if
test=
"useType !=null"
>
and v.use_type = #{useType}
</if>
-- 添加所属大区搜索条件
<if
test=
"zoneId !=null"
>
and bc.zone_id=#{zoneId}
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<if
test=
" yearMonthAndParam !=null "
>
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
>
and
( (vbi.`year_month` = #{yearMonth} or vbi.`year_month` is null) and
ifnull(vbi.`booked_date`,0)
&
#{andOperation.andOperationFactor} = #{andOperation.andOperationRs}
)
</foreach>
</if>
<if
test=
"subordinateBranch !=null "
>
and ( v.park_branch_company_id = #{subordinateBranch})
</if>
<if
test=
" addrProvince !=null or addrCity !=null or zoneId !=null "
>
<if
test=
"addrProvince !=null"
>
and bc.addr_province=#{addrProvince}
</if>
<if
test=
"addrCity !=null"
>
and bc.addr_city=#{addrCity}
</if>
<if
test=
"zoneId !=null"
>
and bc.zone_id=#{zoneId}
</if>
</if>
order by v.code
) r ORDER BY r.parkBranchCompanyName
</select>
<select
id=
"getVehicleExcelVoNotAllData"
parameterType=
"java.util.Map"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleExcelVo"
>
SELECT r.* FROM (
select
v.`code`,
v.number_plate,
bc.name as parkBranchCompanyName,
c.val as useType,
vm.name as vehicleType
from vehicle v
<if
test=
" yearMonthAndParam !=null "
>
left join
vehicle_book_info vbi on v.`id` = vbi.vehicle
</if>
-- 停车分公司
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
-- 目的地分公司
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN vehicle_model vm ON v.model_id = vm.id
LEFT JOIN (select * from constant where type = 2) c ON v.use_type = c.code
where
v.is_del=0
<if
test=
"companyList != null"
>
and ( v.park_branch_company_id in (
<trim
suffixOverrides=
","
>
<foreach
collection=
"companyList"
item=
"companyId"
>
#{companyId},
</foreach>
</trim>
)
<!--or v.expect_destination_branch_company_id in (
<trim suffixOverrides=",">
<foreach collection="companyList" item="companyId">
#{companyId},
</foreach>
</trim>
)-->
<!-- or v.subordinate_branch in (-->
<!-- <trim suffixOverrides=",">-->
<!-- <foreach collection="companyList" item="companyId">-->
<!-- #{companyId},-->
<!-- </foreach>-->
<!-- </trim>-->
)
</if>
<if
test=
"mRangeDateEnd !=null"
>
and v.maintenance_date
<
= #{mRangeDateEnd}
</if>
<if
test=
"modelId != null and modelId != ''"
>
and v.model_id = #{modelId}
</if>
<if
test=
"mRangeDateStart !=null"
>
and v.maintenance_date
>
= #{mRangeDateStart}
</if>
<if
test=
"aVRangeDateStart !=null"
>
and v.annual_verification_date
<
= #{aVRangeDateEnd}
</if>
<if
test=
"aVRangeDateEnd !=null"
>
and v.annual_verification_date
>
= #{aVRangeDateStart}
</if>
<if
test=
"insuranceDateRangeStart !=null"
>
and v.insurance_end_date
<
= #{insuranceDateRangeEnd}
</if>
<if
test=
"insuranceDateRangeEnd !=null"
>
and v.insurance_end_date
>
= #{insuranceDateRangeStart}
</if>
<if
test=
"insuranceCompany !=null"
>
and v.insurance_company = #{insuranceCompany}
</if>
<if
test=
"belongToName !=null and belongToName != ''"
>
and v.belong_to_name like concat('%',#{belongToName},'%')
</if>
<if
test=
"vin !=null and vin != ''"
>
and v.vin = #{vin}
</if>
<!-- <if test="subordinateBranch !=null">-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- </if>-->
<if
test=
"code !=null"
>
and v.code = #{code}
</if>
<if
test=
"status !=null and status != 6 and status != 7"
>
and v.status = #{status}
</if>
<if
test=
"status !=null and status == 6"
>
and v3.id is not NULL and v2.book_type = 3 and v3.state = 0
</if>
<if
test=
"status !=null and status == 7"
>
and v3.id is not NULL and v2.book_type = 6 and v3.state = 0
</if>
<if
test=
"numberPlate !=null and numberPlate != ''"
>
and v.number_plate like concat('%',#{numberPlate},'%')
</if>
<if
test=
"brand !=null"
>
and v.brand = #{brand}
</if>
<if
test=
"useType !=null"
>
and v.use_type = #{useType}
</if>
-- 添加所属大区搜索条件
<if
test=
"zoneId !=null"
>
and bc.zone_id=#{zoneId}
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<if
test=
" yearMonthAndParam !=null "
>
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
>
and
( (vbi.`year_month` = #{yearMonth} or vbi.`year_month` is null) and
ifnull(vbi.`booked_date`,0)
&
#{andOperation.andOperationFactor} = #{andOperation.andOperationRs}
)
</foreach>
</if>
<if
test=
"subordinateBranch !=null "
>
and ( v.park_branch_company_id = #{subordinateBranch} or
v.expect_destination_branch_company_id=#{subordinateBranch} )
</if>
<if
test=
" addrProvince !=null or addrCity !=null or zoneId !=null "
>
<if
test=
"addrProvince !=null"
>
and bc.addr_province=#{addrProvince}
</if>
<if
test=
"addrCity !=null"
>
and bc.addr_city=#{addrCity}
</if>
<if
test=
"zoneId !=null"
>
and bc.zone_id=#{zoneId}
</if>
</if>
) r ORDER BY r.parkBranchCompanyName
</select>
<select
id=
"lockByCode"
resultType=
"com.xxfc.platform.vehicle.entity.Vehicle"
...
...
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