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 042f76f6
authored
Oct 21, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新E盾 1.30 版本开发 修改试驾车辆统计方法
1 parent
2bb49cca
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
17 deletions
src/main/java/cn/com/glsx/admin/common/constants/ConstantsDevice.java
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/resources/mapper/ElectricInStoreDriveMapper.xml
src/main/resources/mapper/ElectricOilMileageMapper.xml
src/main/resources/mapper/TrialDriveReportMapper.xml
src/main/resources/mapper/VehicleDeviceMapper.xml
src/main/java/cn/com/glsx/admin/common/constants/ConstantsDevice.java
View file @
042f76f
...
...
@@ -59,6 +59,16 @@ public final class ConstantsDevice {
public
static
final
int
TRIAL_DEVICE_TYPE
=
1
;
/**
* 历史试驾类型 0:曾经不是试驾设备
*/
public
static
final
int
HIS_NOT_TRIAL_DEVICE_TYPE
=
0
;
/**
* 历史试驾类型 1:曾经是试驾设备
*/
public
static
final
int
HIS_TRIAL_DEVICE_TYPE
=
1
;
/**
* 删除标记 0=正常 -1=删除
*/
public
static
final
int
NOT_DEL_FLAG
=
0
;
...
...
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
View file @
042f76f
...
...
@@ -34,4 +34,10 @@ public class VehicleDevice extends BaseEntity {
*/
@Column
(
name
=
"trial_type"
)
private
Integer
trialType
;
/**
* 历史试驾类型 0:曾经不是试驾设备; 1:曾经是试驾设备
*/
@Column
(
name
=
"his_type"
)
private
Integer
hisType
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
042f76f
...
...
@@ -1445,6 +1445,8 @@ public class VehicleService {
if
(
vehicleDevice
!=
null
)
{
log
.
info
(
"修改设备为试驾设备==="
+
testVehicleBo
.
getSn
());
vehicleDevice
.
setTrialType
(
ConstantsDevice
.
TRIAL_DEVICE_TYPE
);
// 存入历史试驾设备类型 20201121
vehicleDevice
.
setHisType
(
ConstantsDevice
.
HIS_TRIAL_DEVICE_TYPE
);
vehicleDevice
.
setUpdatedDate
(
new
Date
());
vehicleDevice
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
vehicleDeviceService
.
updateByPrimaryKey
(
vehicleDevice
);
...
...
@@ -1615,10 +1617,9 @@ public class VehicleService {
trialDriveVehicleMapper
.
logicDeleteByVehicleId
(
vehicleDevice
.
getVehicleId
());
}
// 保留设备删除之前的设备试驾和绑定关系
vehicleDevice
.
setUpdatedDate
(
new
Date
());
vehicleDevice
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
vehicleDevice
.
setBindStatus
(
ConstantsDevice
.
UN_BIND_VEHICLE_STATUS
);
vehicleDevice
.
setTrialType
(
ConstantsDevice
.
NOT_TRIAL_DEVICE_TYPE
);
vehicleDevice
.
setDelFlag
(
Constants
.
DELETE_FLAG
);
vehicleDeviceService
.
updateByPrimaryKey
(
vehicleDevice
);
...
...
src/main/resources/mapper/ElectricInStoreDriveMapper.xml
View file @
042f76f
...
...
@@ -43,16 +43,12 @@
GROUP_CONCAT(td.sn) as sn,
tv.created_by as createdBy
FROM t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
LEFT JOIN t_vehicle_device tvd on tvd.vehicle_id = tv.id
LEFT JOIN t_device td on td.sn = tvd.sn
LEFT JOIN t_user tu ON tu.id = tv.created_by
WHERE tu.del_flag = 0
AND tv.del_flag = 0
AND ttdv.del_flag = 0
AND tvd.bind_status = 1
AND tvd.trial_type = 1
AND tvd.del_flag = 0
AND tvd.his_type = 1
AND td.del_flag = 0
<if
test=
"keywords != null and keywords!='' "
>
and (
...
...
src/main/resources/mapper/ElectricOilMileageMapper.xml
View file @
042f76f
...
...
@@ -42,16 +42,12 @@
GROUP_CONCAT(td.sn) as sn,
tv.created_by as createdBy
FROM t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
LEFT JOIN t_vehicle_device tvd on tvd.vehicle_id = tv.id
LEFT JOIN t_device td on td.sn = tvd.sn
LEFT JOIN t_user tu ON tu.id = tv.created_by
WHERE tu.del_flag = 0
AND tv.del_flag = 0
AND ttdv.del_flag = 0
AND tvd.bind_status = 1
AND tvd.trial_type = 1
AND tvd.del_flag = 0
AND tvd.his_type = 1
AND td.del_flag = 0
<if
test=
"keywords != null and keywords!='' "
>
and (
...
...
src/main/resources/mapper/TrialDriveReportMapper.xml
View file @
042f76f
...
...
@@ -35,16 +35,12 @@
GROUP_CONCAT(td.sn) as sn,
tv.created_by as createdBy
FROM t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
LEFT JOIN t_vehicle_device tvd on tvd.vehicle_id = tv.id
LEFT JOIN t_device td on td.sn = tvd.sn
LEFT JOIN t_user tu ON tu.id = tv.created_by
WHERE tu.del_flag = 0
AND tv.del_flag = 0
AND ttdv.del_flag = 0
AND tvd.bind_status = 1
AND tvd.trial_type = 1
AND tvd.del_flag = 0
AND tvd.his_type = 1
AND td.del_flag = 0
<if
test=
"keywords != null and keywords!='' "
>
and (
...
...
src/main/resources/mapper/VehicleDeviceMapper.xml
View file @
042f76f
...
...
@@ -11,6 +11,7 @@
<result
column=
"bind_status"
jdbcType=
"TINYINT"
property=
"bindStatus"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"trial_type"
jdbcType=
"TINYINT"
property=
"trialType"
/>
<result
column=
"his_type"
jdbcType=
"TINYINT"
property=
"hisType"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
...
...
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