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 aea74809
authored
Nov 23, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 提取代码 方便代码跟踪
1 parent
6dd90739
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BeanRemoteServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BeanRemoteServiceImpl.java
View file @
aea7480
...
@@ -204,8 +204,20 @@ public class BeanRemoteServiceImpl {
...
@@ -204,8 +204,20 @@ public class BeanRemoteServiceImpl {
log
.
warn
(
"分站:{}工程师{}没有工号"
,
departId
,
userDetailInfo
.
getUsername
());
log
.
warn
(
"分站:{}工程师{}没有工号"
,
departId
,
userDetailInfo
.
getUsername
());
continue
;
continue
;
}
}
final
Address
address
=
userDetailInfo
.
getAddress
();
//fixme 正式同步需移除当前逻辑
engineerCode
=
"BEAN"
+
engineerCode
;
engineerCode
=
"BEAN"
+
engineerCode
;
EngineerInfoEntity
engineerInfo
=
getEngineerInfoEntity
(
departId
,
engineerCode
,
userDetailInfo
,
address
);
engineerInfoDao
.
save
(
engineerInfo
);
engineerInfoDao
.
flush
();
//保存业务属性信息--常用出发地信息
EngineerBusinessEntity
engineerBusiness
=
getEngineerBusiness
(
engineerCode
,
address
);
if
(
engineerBusiness
==
null
){
continue
;}
engineerBusinessDao
.
save
(
engineerBusiness
);
}
}
private
EngineerInfoEntity
getEngineerInfoEntity
(
String
departId
,
String
engineerCode
,
BeanUserDetail
userDetailInfo
,
Address
address
)
{
//查询是否有当前工程师工号
//查询是否有当前工程师工号
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
engineerCode
);
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
engineerCode
);
//获取有用信息保存工程师信息
//获取有用信息保存工程师信息
...
@@ -230,7 +242,6 @@ public class BeanRemoteServiceImpl {
...
@@ -230,7 +242,6 @@ public class BeanRemoteServiceImpl {
//fixme 工作地址存贮
//fixme 工作地址存贮
Address
address
=
userDetailInfo
.
getAddress
();
if
(
Objects
.
nonNull
(
address
))
{
if
(
Objects
.
nonNull
(
address
))
{
engineerInfo
.
setWorkAddress
(
address
.
getAddress
());
engineerInfo
.
setWorkAddress
(
address
.
getAddress
());
}
else
{
}
else
{
...
@@ -239,14 +250,13 @@ public class BeanRemoteServiceImpl {
...
@@ -239,14 +250,13 @@ public class BeanRemoteServiceImpl {
engineerInfo
.
setCreateTime
(
LocalDateTime
.
now
());
engineerInfo
.
setCreateTime
(
LocalDateTime
.
now
());
engineerInfo
.
setUpdateTime
(
LocalDateTime
.
now
());
engineerInfo
.
setUpdateTime
(
LocalDateTime
.
now
());
return
engineerInfo
;
}
engineerInfoDao
.
save
(
engineerInfo
);
private
EngineerBusinessEntity
getEngineerBusiness
(
String
engineerCode
,
Address
address
)
{
engineerInfoDao
.
flush
();
//保存业务属性信息--常用出发地信息
EngineerBusinessEntity
engineerBusiness
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
EngineerBusinessEntity
engineerBusiness
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
if
(
Objects
.
nonNull
(
engineerBusiness
))
{
if
(
Objects
.
nonNull
(
engineerBusiness
))
{
continue
;
return
null
;
}
}
engineerBusiness
=
new
EngineerBusinessEntity
();
engineerBusiness
=
new
EngineerBusinessEntity
();
...
@@ -275,10 +285,7 @@ public class BeanRemoteServiceImpl {
...
@@ -275,10 +285,7 @@ public class BeanRemoteServiceImpl {
engineerBusiness
.
setDispatchStrategy
(
"CENTER"
);
engineerBusiness
.
setDispatchStrategy
(
"CENTER"
);
engineerBusiness
.
setCreateTime
(
LocalDateTime
.
now
());
engineerBusiness
.
setCreateTime
(
LocalDateTime
.
now
());
engineerBusiness
.
setUpdateTime
(
LocalDateTime
.
now
());
engineerBusiness
.
setUpdateTime
(
LocalDateTime
.
now
());
return
engineerBusiness
;
engineerBusinessDao
.
save
(
engineerBusiness
);
}
}
}
private
Date
converter
(
String
timestamp
)
{
private
Date
converter
(
String
timestamp
)
{
...
...
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