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 353554db
authored
Nov 29, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:工程师变更接口保存工作地址坐标
1 parent
8f48db9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/entity/EngineerInfoEntity.java
project-order/src/main/java/com/dituhui/pea/order/kafka/BeanKafkaConsumer.java
project-order/src/main/java/com/dituhui/pea/order/entity/EngineerInfoEntity.java
View file @
353554d
...
...
@@ -66,6 +66,18 @@ public class EngineerInfoEntity {
private
String
workAddress
;
/**
* 工作地址经度
*/
@Column
(
name
=
"work_x"
)
private
String
workX
;
/**
* 工作地址纬度
*/
@Column
(
name
=
"work_y"
)
private
String
workY
;
/**
* 类型(1全职 2兼职)
*/
private
Integer
kind
;
...
...
project-order/src/main/java/com/dituhui/pea/order/kafka/BeanKafkaConsumer.java
View file @
353554d
...
...
@@ -11,6 +11,7 @@ import com.dituhui.pea.order.entity.BeanMqMessageEntity;
import
com.dituhui.pea.order.entity.EngineerBusinessEntity
;
import
com.dituhui.pea.order.entity.EngineerInfoEntity
;
import
com.dituhui.pea.order.service.impl.BeanRemoteServiceImpl
;
import
com.dituhui.pea.order.utils.AssertUtil
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -57,7 +58,6 @@ public class BeanKafkaConsumer {
OrganizationTreeDTO
.
Request
request
=
branchInfo
.
get
();
}
finally
{
//手动提交
ack
.
acknowledge
();
...
...
@@ -108,6 +108,8 @@ public class BeanKafkaConsumer {
}
try
{
EngineerParamDTO
.
Request
request
=
nodeEngineerInfo
.
get
();
AssertUtil
.
isNotEmpty
(
request
.
getGroupId
(),
"网点/分站编码不能为空"
);
AssertUtil
.
isNotEmpty
(
request
.
getEgineers
(),
"工程师列表不能为空"
);
//网点ID
final
String
targetGroupId
=
request
.
getGroupId
();
//fixme 是否需要校验网点id是否存在存疑
...
...
@@ -199,9 +201,13 @@ public class BeanKafkaConsumer {
if
(
Objects
.
nonNull
(
location
))
{
engineerInfo
.
setAddress
(
location
.
getAddress
());
engineerInfo
.
setWorkAddress
(
location
.
getAddress
());
engineerInfo
.
setWorkX
(
Objects
.
isNull
(
location
.
getLongitude
())
?
""
:
String
.
valueOf
(
location
.
getLongitude
()));
engineerInfo
.
setWorkY
(
Objects
.
isNull
(
location
.
getLatitude
())
?
""
:
String
.
valueOf
(
location
.
getLatitude
()));
}
else
{
engineerInfo
.
setWorkAddress
(
""
);
engineerInfo
.
setAddress
(
""
);
engineerInfo
.
setWorkAddress
(
""
);
engineerInfo
.
setWorkX
(
""
);
engineerInfo
.
setWorkY
(
""
);
}
engineerInfo
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
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