Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6388fa99
authored
May 27, 2021
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]试驾服务
1 parent
c2aef12f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
18 deletions
src/main/java/cn/com/glsx/admin/modules/model/ApprovalDto.java
src/main/java/cn/com/glsx/admin/modules/model/FenceApproDto.java
src/main/java/cn/com/glsx/admin/modules/model/VehicleApproDto.java
src/main/java/cn/com/glsx/admin/modules/service/ApprovalService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleDocService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/resources/mapper/ApprovalMapper.xml
src/main/resources/mapper/VehicleDocMapper.xml
src/main/java/cn/com/glsx/admin/modules/model/ApprovalDto.java
View file @
6388fa9
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -24,6 +25,7 @@ public class ApprovalDto {
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createdDate
;
/**
...
...
src/main/java/cn/com/glsx/admin/modules/model/FenceApproDto.java
View file @
6388fa9
...
...
@@ -22,4 +22,5 @@ public class FenceApproDto {
private
String
submitStatus
;
private
String
fenceName
;
private
String
fenceType
;
private
Long
createdBy
;
}
src/main/java/cn/com/glsx/admin/modules/model/VehicleApproDto.java
View file @
6388fa9
...
...
@@ -61,6 +61,8 @@ public class VehicleApproDto {
private
String
saleManagerPhone
;
@ExcelIgnore
private
String
velRemark
;
@ExcelIgnore
private
Long
createdBy
;
@ExcelProperty
(
value
=
"提交时间"
,
index
=
13
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
submitTime
;
...
...
src/main/java/cn/com/glsx/admin/modules/service/ApprovalService.java
View file @
6388fa9
...
...
@@ -149,7 +149,7 @@ public class ApprovalService {
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
vehicleDtoPageInfo
.
forEach
(
efd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
ShieldContextHolder
.
getUserId
());
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
efd
.
getCreatedBy
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
efd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
...
...
@@ -172,7 +172,7 @@ public class ApprovalService {
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
fenceApproDtoList
.
forEach
(
efd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
ShieldContextHolder
.
getUserId
());
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
efd
.
getCreatedBy
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
efd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleDocService.java
View file @
6388fa9
...
...
@@ -109,7 +109,7 @@ public class VehicleDocService {
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
vehicleDtoPageInfo
.
forEach
(
efd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
ShieldContextHolder
.
getDepartmentId
());
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
efd
.
getCreatedBy
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
orgList
))
{
efd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
6388fa9
...
...
@@ -163,6 +163,20 @@ public class VehicleService {
}
/**
* 查询车辆绑定了哪些设备
* @param vehicleId
* @return
*/
public
List
<
VehicleDevice
>
listVehicleDeviceByVehicleIdStatus
(
Long
vehicleId
)
{
VehicleDevice
param
=
new
VehicleDevice
();
param
.
setBindStatus
(
ConstantsDevice
.
BIND_VEHICLE_STATUS
);
param
.
setVehicleId
(
vehicleId
);
//匹配设备
List
<
VehicleDevice
>
bindVehicleDevice
=
vehicleDeviceMapper
.
getVehicleDeviceByVehicleIdStatus
(
param
);
return
bindVehicleDevice
;
}
/**
* 编辑回显车辆数据
*
* @param tempId
...
...
@@ -193,20 +207,6 @@ public class VehicleService {
}
/**
* 查询车辆绑定了哪些设备
* @param vehicleId
* @return
*/
public
List
<
VehicleDevice
>
listVehicleDeviceByVehicleIdStatus
(
Long
vehicleId
)
{
VehicleDevice
param
=
new
VehicleDevice
();
param
.
setBindStatus
(
ConstantsDevice
.
BIND_VEHICLE_STATUS
);
param
.
setVehicleId
(
vehicleId
);
//匹配设备
List
<
VehicleDevice
>
bindVehicleDevice
=
vehicleDeviceMapper
.
getVehicleDeviceByVehicleIdStatus
(
param
);
return
bindVehicleDevice
;
}
/**
* 解绑车辆设备
*
* @param tempId
...
...
src/main/resources/mapper/ApprovalMapper.xml
View file @
6388fa9
...
...
@@ -69,6 +69,7 @@
t4.province AS province,
t4.city AS city,
t1.vin,
t4.created_by as createdBy,
t1.inner_color AS innerColor,
t1.color AS color,
t1.model_name AS modelName,
...
...
@@ -117,6 +118,7 @@
shop.area AS area,
shop.province AS province,
shop.city AS city,
shop.created_by as createdBy,
app.remark as remark,
tvd.fence_name as fenceName,
tvd.biz_fence_type as fenceType,
...
...
src/main/resources/mapper/VehicleDocMapper.xml
View file @
6388fa9
...
...
@@ -45,6 +45,7 @@
t4.area AS area,
t4.province AS province,
t4.city AS city,
t4.created_by as createdBy,
t1.vin,
t1.inner_color AS innerColor,
t1.color AS color,
...
...
@@ -52,7 +53,7 @@
t1.vehicle_type AS vehicleType,
t1.config_desc AS configDesc,
t6.dict_label AS approvalStatus,
if(dict_label=null,"
未提交","已提交
") as submitStatus
if(dict_label=null,"
0","1
") as submitStatus
FROM
t_vehicle t1
LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment