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 6d086172
authored
Jun 14, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段补充
1 parent
87de7441
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
19 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderRequestEntity.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/CommonService.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/CapacityQueryServiceImpl.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/PublicServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderRequestEntity.java
View file @
6d08617
...
...
@@ -47,9 +47,10 @@ public class OrderRequestEntity {
private
String
expectTimeEnd
;
private
String
expectTimeDesc
;
private
String
source
;
private
String
priority
;
private
String
areaId
;
private
String
orderPriority
;
private
String
orderTags
;
private
Integer
priority
;
private
String
tags
;
private
String
status
;
private
String
appointmentStatus
;
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/CommonService.java
View file @
6d08617
...
...
@@ -82,7 +82,7 @@ public class CommonService {
params
.
add
(
"need_district"
,
"false"
);
params
.
add
(
"need_layer"
,
"true"
);
// params.add("related_point_fields", "");
params
.
add
(
"area_fields"
,
"名称,唯一编号"
);
params
.
add
(
"area_fields"
,
"名称,唯一编号
,区块
"
);
log
.
info
(
"request params ==> {}"
,
params
);
// 构建请求实体
...
...
@@ -102,7 +102,7 @@ public class CommonService {
// 获取areaResults[0]的值
for
(
JsonNode
r
:
responseJson
.
get
(
"result"
).
get
(
0
).
get
(
"areaResults"
))
{
// 分单接口暂时无图层返回
results
.
add
(
new
LayerAndArea
().
setAreaId
(
r
.
get
(
"field
2
"
).
asText
()).
setAreaName
(
r
.
get
(
"field1"
).
asText
()));
results
.
add
(
new
LayerAndArea
().
setAreaId
(
r
.
get
(
"field
3
"
).
asText
()).
setAreaName
(
r
.
get
(
"field1"
).
asText
()));
}
return
results
;
}
catch
(
Exception
e
)
{
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/CapacityQueryServiceImpl.java
View file @
6d08617
...
...
@@ -93,12 +93,14 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
CapacityOrgStatEntity
e
=
(
CapacityOrgStatEntity
)
item
;
OrgGroupEntity
g
=
orgGroupDao
.
getByGroupId
(
e
.
getOrgId
());
content
.
setDate
(
e
.
getWorkday
()).
setLayer
(
e
.
getLayer
()).
setGroupName
(
g
.
getGroupName
())
.
setCapTotal
(
e
.
getCapTotal
()).
setCapUsed
(
e
.
getCapUsedTotal
()).
setEngineerNum
(
e
.
getEngineerCount
()).
setCreateTime
(
e
.
getCreateTime
().
toString
());
.
setCapTotal
(
e
.
getCapTotal
()).
setCapUsed
(
e
.
getCapUsedTotal
())
.
setEngineerNum
(
e
.
getEngineerCount
()).
setCreateTime
(
e
.
getCreateTime
().
toString
());
}
else
{
CapacityTeamStatEntity
e
=
(
CapacityTeamStatEntity
)
item
;
// capacity_team_stat表中的team_id,直接就是字符串
content
.
setDate
(
e
.
getWorkday
()).
setLayer
(
e
.
getLayer
()).
setTeamName
(
e
.
getTeamId
())
.
setCapTotal
(
e
.
getCapTotal
()).
setCapUsed
(
e
.
getCapUsed
()).
setCapAdjust
(
e
.
getCapAdjust
()).
setEngineerNum
(
e
.
getEngineerCount
()).
setCreateTime
(
e
.
getCreateTime
().
toString
());
.
setCapTotal
(
e
.
getCapTotal
()).
setCapUsed
(
e
.
getCapUsed
()).
setCapAdjust
(
e
.
getCapAdjust
())
.
setEngineerNum
(
e
.
getEngineerCount
()).
setCreateTime
(
e
.
getCreateTime
().
toString
());
}
contents
.
add
(
content
);
}
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/OrderCreateServiceImpl.java
View file @
6d08617
...
...
@@ -60,26 +60,19 @@ public class OrderCreateServiceImpl implements OrderCreateService {
private
CommonService
commonService
;
private
List
<
KeyValueDTO
>
getPriorities
()
{
String
[]
priorities
=
{
"紧急"
,
"正常"
};
List
<
KeyValueDTO
>
listPriorities
=
new
ArrayList
<>();
int
prioritiesLevels
=
10
;
for
(
int
i
=
0
;
i
<=
prioritiesLevels
;
i
++)
{
String
label
;
if
(
i
==
0
)
{
label
=
"最低"
;
}
else
if
(
i
==
prioritiesLevels
)
{
label
=
"最高"
;
}
else
{
label
=
String
.
format
(
"优先级%d"
,
i
);
}
listPriorities
.
add
(
new
KeyValueDTO
().
setLabel
(
label
).
setValue
(
String
.
valueOf
(
i
)));
for
(
String
s
:
priorities
)
{
listPriorities
.
add
(
new
KeyValueDTO
().
setLabel
(
s
).
setValue
(
s
));
}
return
listPriorities
;
}
private
List
<
KeyValueDTO
>
getStandardTags
()
{
String
[]
tags
=
{
"远距离"
,
"多人上门"
};
List
<
KeyValueDTO
>
tagList
=
new
ArrayList
<>();
for
(
String
tag
:
orderTagStrategyDao
.
getAllTags
()
)
{
tagList
.
add
(
new
KeyValueDTO
().
setLabel
(
tag
).
setValue
(
tag
));
for
(
String
s
:
tags
)
{
tagList
.
add
(
new
KeyValueDTO
().
setLabel
(
s
).
setValue
(
s
));
}
return
tagList
;
}
...
...
@@ -132,9 +125,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity
.
setOrgGroupId
(
teamEntity
.
getGroupId
());
entity
.
setOrgTeamId
(
teamId
);
// 根据orderTags, 解析保存到type、skill等字段
entity
.
setX
(
req
.
getLocation
().
getLng
().
toString
());
entity
.
setY
(
req
.
getLocation
().
getLat
().
toString
());
entity
.
setOrderTags
(
String
.
join
(
","
,
req
.
getOrderTags
()));
entity
.
setOrderPriority
(
req
.
getPriority
());
// todo 服务单状态、预约状态等
entity
.
setStatus
(
"OPEN"
);
entity
.
setAppointmentStatus
(
"NOT_ASSIGNED"
);
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/PublicServiceImpl.java
View file @
6d08617
...
...
@@ -56,6 +56,8 @@ public class PublicServiceImpl implements PublicService {
"RecommendAssignment,指派推荐"
,
"AssignStatus,指派状态"
,
"AssignType,指派类型"
,
"AppointmentMethod,指派方式"
,
"AppointmentStatus,预约单状态"
,
"AppointmentChannel,预约渠道"
,
"PriorityWeight,工单优先级"
};
...
...
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