Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit eb4efba8
authored
Mar 02, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化邮件发送内容 车型展示
1 parent
fc20f497
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
View file @
eb4efba
...
@@ -458,7 +458,10 @@ public class WorkOrderService {
...
@@ -458,7 +458,10 @@ public class WorkOrderService {
content
.
append
(
"客户姓名-"
).
append
(
woVehicle
.
getLesseeName
()).
append
(
";\n"
);
content
.
append
(
"客户姓名-"
).
append
(
woVehicle
.
getLesseeName
()).
append
(
";\n"
);
content
.
append
(
"车架号-"
).
append
(
woVehicle
.
getVin
()).
append
(
";\n"
);
content
.
append
(
"车架号-"
).
append
(
woVehicle
.
getVin
()).
append
(
";\n"
);
content
.
append
(
"颜色-无"
).
append
(
";\n"
);
content
.
append
(
"颜色-无"
).
append
(
";\n"
);
content
.
append
(
"车型-"
).
append
(
woVehicle
.
getVehicleType
()).
append
(
";\n"
);
String
modelType
=
(
woVehicle
.
getSubBrandName
()
==
null
?
"--"
:
woVehicle
.
getSubBrandName
())
.
concat
(
"/"
).
concat
(
woVehicle
.
getSeriesName
()
==
null
?
"--"
:
woVehicle
.
getSeriesName
())
.
concat
(
"/"
).
concat
(
woVehicle
.
getTypeName
()
==
null
?
"--"
:
woVehicle
.
getTypeName
());
content
.
append
(
"车型-"
).
append
(
modelType
).
append
(
";\n"
);
content
.
append
(
"贷款期限-无"
).
append
(
";\n"
);
content
.
append
(
"贷款期限-无"
).
append
(
";\n"
);
content
.
append
(
"租凭方式-无"
).
append
(
";\n"
);
content
.
append
(
"租凭方式-无"
).
append
(
";\n"
);
content
.
append
(
"安装地址-"
).
append
(
order
.
getServiceAddress
()).
append
(
";\n"
);
content
.
append
(
"安装地址-"
).
append
(
order
.
getServiceAddress
()).
append
(
";\n"
);
...
@@ -890,21 +893,19 @@ public class WorkOrderService {
...
@@ -890,21 +893,19 @@ public class WorkOrderService {
* @param devices
* @param devices
*/
*/
private
void
checkDevicesExist
(
WorkOrder
workOrder
,
List
<
SimpleDeviceItem
>
devices
)
{
private
void
checkDevicesExist
(
WorkOrder
workOrder
,
List
<
SimpleDeviceItem
>
devices
)
{
//安装单激活必须有设备
//激活必须有设备
if
(
"Y"
.
equals
(
workOrder
.
getNeedInstall
()))
{
if
(
CollectionUtils
.
isEmpty
(
devices
))
{
if
(
CollectionUtils
.
isEmpty
(
devices
))
{
throw
new
StdInterfaceException
(
"656565"
,
"验证设备不能为空"
);
throw
new
StdInterfaceException
(
"656565"
,
"验证设备不能为空"
);
}
devices
.
forEach
(
deviceItem
->
{
log
.
info
(
"同步设备:{}"
,
deviceItem
.
getSn
());
R
<
DeviceDTO
>
deviceDTOR
=
deviceFeignService
.
getOrStoreDeviceBySn
(
deviceItem
.
getSn
(),
true
);
DeviceDTO
deviceDTO
=
deviceDTOR
.
getData
(
DeviceDTO
.
class
);
if
(
deviceDTO
!=
null
)
{
deviceItem
.
setWireType
(
deviceDTO
.
getSource
());
}
});
}
}
devices
.
forEach
(
deviceItem
->
{
log
.
info
(
"同步设备:{}"
,
deviceItem
.
getSn
());
R
<
DeviceDTO
>
deviceDTOR
=
deviceFeignService
.
getOrStoreDeviceBySn
(
deviceItem
.
getSn
(),
true
);
DeviceDTO
deviceDTO
=
deviceDTOR
.
getData
(
DeviceDTO
.
class
);
if
(
deviceDTO
!=
null
)
{
deviceItem
.
setWireType
(
deviceDTO
.
getSource
());
}
});
}
}
/**
/**
...
@@ -940,7 +941,7 @@ public class WorkOrderService {
...
@@ -940,7 +941,7 @@ public class WorkOrderService {
*/
*/
private
void
checkDevicesCompose
(
Long
workOrderId
,
List
<
SimpleDeviceItem
>
devices
)
{
private
void
checkDevicesCompose
(
Long
workOrderId
,
List
<
SimpleDeviceItem
>
devices
)
{
if
(
CollectionUtils
.
isNotEmpty
(
devices
))
{
if
(
CollectionUtils
.
isNotEmpty
(
devices
))
{
Map
<
Integer
,
List
<
SimpleDeviceItem
>>
deviceGroup
=
devices
.
stream
().
collect
(
Collectors
.
groupingBy
(
SimpleDeviceItem:
:
getWireType
));
Map
<
Integer
,
List
<
SimpleDeviceItem
>>
deviceGroup
=
devices
.
stream
().
filter
(
simpleDeviceItem
->
simpleDeviceItem
.
getWireType
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
SimpleDeviceItem:
:
getWireType
));
List
<
SimpleDeviceItem
>
wireDevices
=
deviceGroup
.
get
(
1
);
List
<
SimpleDeviceItem
>
wireDevices
=
deviceGroup
.
get
(
1
);
List
<
SimpleDeviceItem
>
wirelessDevices
=
deviceGroup
.
get
(
0
);
List
<
SimpleDeviceItem
>
wirelessDevices
=
deviceGroup
.
get
(
0
);
...
...
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