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 8c47b6ec
authored
Nov 03, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:指派工程师返回名称
1 parent
a64f3bc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/OrderServiceDetailResp.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderServiceDetailResp.java
View file @
8c47b6e
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
OrderServiceDetailResp
{
public
class
OrderServiceDetailResp
{
...
@@ -33,7 +34,13 @@ public class OrderServiceDetailResp {
...
@@ -33,7 +34,13 @@ public class OrderServiceDetailResp {
/**
/**
* 指定某个工程师/排除某个工程师 codes 多个,分割
* 指定某个工程师/排除某个工程师 codes 多个,分割
*/
*/
private
String
appointEngineerCodes
;
// private String appointEngineerCodes;
/**
* 指定某个工程师/排除某个工程师 codes 多个,分割 key code,value 名称
*/
private
Map
<
String
,
String
>
appointEngineerCodes
;
/**
/**
...
@@ -76,7 +83,7 @@ public class OrderServiceDetailResp {
...
@@ -76,7 +83,7 @@ public class OrderServiceDetailResp {
/**
/**
* 是否是cutoff,0否 1是 默认0
* 是否是cutoff,0否 1是 默认0
*/
*/
private
Integer
isCutoff
;
private
Integer
isCutoff
;
/**
/**
...
@@ -86,7 +93,7 @@ public class OrderServiceDetailResp {
...
@@ -86,7 +93,7 @@ public class OrderServiceDetailResp {
@Data
@Data
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
static
class
OrderDetail
{
public
static
class
OrderDetail
{
private
String
location
;
private
String
location
;
private
String
address
;
private
String
address
;
private
String
brand
;
private
String
brand
;
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceDetailImpl.java
View file @
8c47b6e
...
@@ -8,6 +8,8 @@ import com.dituhui.pea.order.dto.*;
...
@@ -8,6 +8,8 @@ import com.dituhui.pea.order.dto.*;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.service.OrderServiceDetail
;
import
com.dituhui.pea.order.service.OrderServiceDetail
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -70,7 +72,11 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
...
@@ -70,7 +72,11 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
res
.
setIsMultiple
(
order
.
getIsMultiple
());
res
.
setIsMultiple
(
order
.
getIsMultiple
());
res
.
setIsAppointEngineer
(
order
.
getIsAppointEngineer
());
res
.
setIsAppointEngineer
(
order
.
getIsAppointEngineer
());
res
.
setAppointEngineerCodes
(
order
.
getAppointEngineerCodes
());
if
(
StringUtils
.
isNotBlank
(
order
.
getAppointEngineerCodes
()))
{
String
[]
strings
=
order
.
getAppointEngineerCodes
().
split
(
","
);
List
<
EngineerInfoEntity
>
engineerCodeIn
=
engineerInfoDao
.
findByEngineerCodeIn
(
Arrays
.
asList
(
strings
));
res
.
setAppointEngineerCodes
(
CollectionUtils
.
isEmpty
(
engineerCodeIn
)
?
null
:
engineerCodeIn
.
stream
().
collect
(
Collectors
.
toMap
(
EngineerInfoEntity:
:
getEngineerCode
,
EngineerInfoEntity:
:
getName
)));
}
res
.
setBeanPriority
(
order
.
getBeanPriority
());
res
.
setBeanPriority
(
order
.
getBeanPriority
());
res
.
setName
(
order
.
getName
());
res
.
setName
(
order
.
getName
());
res
.
setPhone
(
order
.
getPhone
());
res
.
setPhone
(
order
.
getPhone
());
...
...
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