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 9ae60499
authored
Jun 14, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统一 LabelValue
1 parent
fe8b97be
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
26 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/KeyValueDTO.java → project-order/src/main/java/com/alibaba/cloud/integration/order/dto/LabelValueDTO.java
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/ParameterRespDTO.java
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/WorkbenchEngineersGanttRespDTO.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/WorkbenchServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/
Key
ValueDTO.java
→
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/
Label
ValueDTO.java
View file @
9ae6049
...
...
@@ -5,7 +5,7 @@ import lombok.experimental.Accessors;
@Data
@Accessors
(
chain
=
true
)
public
class
Key
ValueDTO
{
public
class
Label
ValueDTO
{
private
String
value
;
private
String
label
;
}
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/ParameterRespDTO.java
View file @
9ae6049
...
...
@@ -8,6 +8,6 @@ import java.util.List;
@Data
@Accessors
(
chain
=
true
)
public
class
ParameterRespDTO
{
private
List
<
Key
ValueDTO
>
priorities
;
private
List
<
Key
ValueDTO
>
standardTags
;
private
List
<
Label
ValueDTO
>
priorities
;
private
List
<
Label
ValueDTO
>
standardTags
;
}
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/WorkbenchEngineersGanttRespDTO.java
View file @
9ae6049
...
...
@@ -78,11 +78,4 @@ public class WorkbenchEngineersGanttRespDTO {
*/
private
List
<?>
tips
;
}
@lombok
.
Data
@Accessors
(
chain
=
true
)
public
static
class
Tip
{
private
String
desc
;
private
String
title
;
}
}
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/OrderCreateServiceImpl.java
View file @
9ae6049
...
...
@@ -21,7 +21,7 @@ import com.alibaba.cloud.integration.order.dao.OrderRequestDao;
import
com.alibaba.cloud.integration.order.dao.OrderTagStrategyDao
;
import
com.alibaba.cloud.integration.order.dao.OrgTeamDao
;
import
com.alibaba.cloud.integration.order.dao.ProductCategoryDao
;
import
com.alibaba.cloud.integration.order.dto.
Key
ValueDTO
;
import
com.alibaba.cloud.integration.order.dto.
Label
ValueDTO
;
import
com.alibaba.cloud.integration.order.dto.LocationDTO
;
import
com.alibaba.cloud.integration.order.dto.OrderCreateReqDTO
;
import
com.alibaba.cloud.integration.order.dto.ParameterRespDTO
;
...
...
@@ -59,20 +59,20 @@ public class OrderCreateServiceImpl implements OrderCreateService {
@Autowired
private
CommonService
commonService
;
private
List
<
Key
ValueDTO
>
getPriorities
()
{
private
List
<
Label
ValueDTO
>
getPriorities
()
{
String
[]
priorities
=
{
"紧急"
,
"正常"
};
List
<
Key
ValueDTO
>
listPriorities
=
new
ArrayList
<>();
List
<
Label
ValueDTO
>
listPriorities
=
new
ArrayList
<>();
for
(
String
s
:
priorities
)
{
listPriorities
.
add
(
new
Key
ValueDTO
().
setLabel
(
s
).
setValue
(
s
));
listPriorities
.
add
(
new
Label
ValueDTO
().
setLabel
(
s
).
setValue
(
s
));
}
return
listPriorities
;
}
private
List
<
Key
ValueDTO
>
getStandardTags
()
{
private
List
<
Label
ValueDTO
>
getStandardTags
()
{
String
[]
tags
=
{
"远距离"
,
"多人上门"
};
List
<
Key
ValueDTO
>
tagList
=
new
ArrayList
<>();
List
<
Label
ValueDTO
>
tagList
=
new
ArrayList
<>();
for
(
String
s
:
tags
)
{
tagList
.
add
(
new
Key
ValueDTO
().
setLabel
(
s
).
setValue
(
s
));
tagList
.
add
(
new
Label
ValueDTO
().
setLabel
(
s
).
setValue
(
s
));
}
return
tagList
;
}
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/WorkbenchServiceImpl.java
View file @
9ae6049
...
...
@@ -2,10 +2,7 @@ package com.alibaba.cloud.integration.order.service.impl;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.dao.*
;
import
com.alibaba.cloud.integration.order.dto.WorkbenchEngineersGanttReqDTO
;
import
com.alibaba.cloud.integration.order.dto.WorkbenchEngineersGanttRespDTO
;
import
com.alibaba.cloud.integration.order.dto.WorkbenchOrderChangeListReqDTO
;
import
com.alibaba.cloud.integration.order.dto.WorkbenchOrderChangeListRespDTO
;
import
com.alibaba.cloud.integration.order.dto.*
;
import
com.alibaba.cloud.integration.order.entity.*
;
import
com.alibaba.cloud.integration.order.service.WorkbenchService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -125,13 +122,13 @@ public class WorkbenchServiceImpl implements WorkbenchService {
private
List
<?>
getOrderTips
(
String
orderId
)
{
log
.
info
(
"==> getOrdertips: orderId[{}]"
,
orderId
);
OrderRequestEntity
order
=
orderRequestDao
.
getByOrderId
(
orderId
);
List
<
WorkbenchEngineersGanttRespDTO
.
Tip
>
tips
=
new
ArrayList
<>();
tips
.
add
(
new
WorkbenchEngineersGanttRespDTO
.
Tip
().
setTitle
(
"类型/品牌"
).
setDesc
(
String
.
format
(
"%s %s"
,
order
.
getBrand
(),
order
.
getType
())));
tips
.
add
(
new
WorkbenchEngineersGanttRespDTO
.
Tip
().
setTitle
(
"电话/地址"
).
setDesc
(
String
.
format
(
"%s %s\n %s"
,
order
.
getName
(),
order
.
getPhone
(),
order
.
getAddress
())));
List
<
LabelValueDTO
>
tips
=
new
ArrayList
<>();
tips
.
add
(
new
LabelValueDTO
().
setLabel
(
"类型/品牌"
).
setValue
(
String
.
format
(
"%s %s"
,
order
.
getBrand
(),
order
.
getType
())));
tips
.
add
(
new
LabelValueDTO
().
setLabel
(
"电话/地址"
).
setValue
(
String
.
format
(
"%s %s\n %s"
,
order
.
getName
(),
order
.
getPhone
(),
order
.
getAddress
())));
if
(!
order
.
getApplyNote
().
isBlank
())
{
tips
.
add
(
new
WorkbenchEngineersGanttRespDTO
.
Tip
().
setTitle
(
"备注"
).
setDesc
(
order
.
getApplyNote
()));
tips
.
add
(
new
LabelValueDTO
().
setLabel
(
"备注"
).
setValue
(
order
.
getApplyNote
()));
}
tips
.
add
(
new
WorkbenchEngineersGanttRespDTO
.
Tip
().
setTitle
(
"标签"
).
setDesc
(
order
.
getTags
()));
tips
.
add
(
new
LabelValueDTO
().
setLabel
(
"标签"
).
setValue
(
order
.
getTags
()));
return
tips
;
}
}
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