Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1dfaf6b1
authored
Jul 13, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
935790b3
03360c7c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
1dfaf6b
...
...
@@ -180,8 +180,16 @@ public class OrderCreateServiceImpl implements OrderCreateService {
break
;
}
}
// 虚拟指派
登记
// 虚拟指派
if
(
StringUtils
.
isNotBlank
(
assignEngineerCode
)){
tryVirtualAppointment
(
req
,
entity
,
orderId
,
assignEngineerCode
);
}
return
Result
.
success
(
null
);
}
private
void
tryVirtualAppointment
(
OrderCreateReqDTO
req
,
OrderRequestEntity
entity
,
String
orderId
,
String
assignEngineerCode
)
{
try
{
OrderAppointmentEntity
oa
=
new
OrderAppointmentEntity
();
oa
.
setDt
(
entity
.
getDt
());
oa
.
setOrderId
(
entity
.
getOrderId
());
...
...
@@ -190,7 +198,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
oa
.
setEngineerCode
(
assignEngineerCode
);
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
assignEngineerCode
);
oa
.
setEngineerName
(
engineerInfo
.
getName
());
if
(
StringUtils
.
isNotBlank
(
engineerInfo
.
getBirth
()))
{
if
(
StringUtils
.
isNotBlank
(
engineerInfo
.
getBirth
()))
{
int
age
=
(
int
)
DateUtils
.
getAge
(
engineerInfo
.
getBirth
());
oa
.
setEngineerAge
(
age
);
}
else
{
...
...
@@ -206,9 +214,13 @@ public class OrderCreateServiceImpl implements OrderCreateService {
oa
.
setUpdateTime
(
LocalDateTime
.
now
());
orderAppointmentDao
.
save
(
oa
);
// 登记
commonService
.
addOrderEvent
(
orderId
,
""
,
req
.
getSource
(),
"API"
,
"虚拟指派"
,
"虚拟指派"
,
""
);
}
commonService
.
addOrderEvent
(
orderId
,
""
,
req
.
getSource
(),
"API"
,
"虚拟指派"
,
"虚拟指派"
,
""
);
return
Result
.
success
(
null
);
log
.
info
(
"==== 已经完成虚拟指派 ===="
);
}
catch
(
Exception
e
){
log
.
error
(
"虚拟指派错误: {}"
,
e
.
getMessage
());
}
}
}
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