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 8f19fc45
authored
Jul 11, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
012f75ff
36a3fcc5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/BusinessTeamDetailDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/BusinessTeamDetailDTO.java
View file @
8f19fc4
...
...
@@ -19,6 +19,8 @@ public class BusinessTeamDetailDTO {
private
ScheduleConfig
scheduleConfig
;
private
String
teamId
;
private
String
teamName
;
private
String
groupId
;
private
String
groupName
;
private
String
warehouseId
;
private
List
<
String
>
workdays
;
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
8f19fc4
...
...
@@ -227,8 +227,14 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
Result
.
failed
(
String
.
format
(
"工作队[%s]不存在"
,
req
.
getTeamId
()));
}
BusinessTeamDetailDTO
.
Result
rs
=
new
BusinessTeamDetailDTO
.
Result
();
OrgGroupEntity
g
=
orgGroupDao
.
getByGroupId
(
teamEntity
.
getGroupId
());
if
(
g
==
null
)
{
return
Result
.
failed
(
"数据配置错误,工作队没有对应的站点"
);
}
rs
.
setTeamId
(
teamEntity
.
getTeamId
())
.
setTeamName
(
teamEntity
.
getTeamName
())
.
setGroupId
(
g
.
getGroupId
())
.
setGroupName
(
g
.
getGroupName
())
.
setWarehouseId
(
teamEntity
.
getWarehouseId
())
.
setWorkdays
(
Arrays
.
asList
(
teamEntity
.
getWorkdays
().
split
(
","
)));
List
<
String
>
engineerCodes
=
orgTeamEngineerDao
.
findAllByTeamId
(
teamEntity
.
getTeamId
()).
stream
()
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
View file @
8f19fc4
...
...
@@ -83,19 +83,13 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
for
(
LocalDate
date
:
datesInRange
)
{
String
sDate
=
LocalDateTimeUtil
.
format
(
date
,
PATTERN_DATE
);
EngineerCalendarDTO
.
Calendar
calander
=
null
;
if
(!
configs
.
containsKey
(
sDate
))
{
calander
=
getEmptyCalendar
(
teamIds
.
get
(
0
),
sDate
);
}
else
{
calander
=
new
EngineerCalendarDTO
.
Calendar
();
calander
.
setDate
(
sDate
);
int
week
=
LocalDate
.
parse
(
sDate
).
getDayOfWeek
().
getValue
();
calander
.
setWeek
(
Week
.
of
(
week
).
toChinese
(
"周"
));
calander
=
getEmptyCalendar
(
teamIds
.
get
(
0
),
sDate
);
if
(
configs
.
containsKey
(
sDate
))
{
List
<
EngineerCalendarDTO
.
Content
>
contents
=
new
ArrayList
<>();
// 有配置
for
(
CapacityEngineerCalendarEntity
e
:
configs
.
get
(
sDate
))
{
EngineerCalendarDTO
.
Content
content
=
new
EngineerCalendarDTO
.
Content
();
content
.
setType
(
"
rest
"
);
content
.
setType
(
"
leave
"
);
content
.
setTitle
(
e
.
getType
());
content
.
setValue
(
getCalendarDuration
(
e
.
getStartTime
(),
e
.
getEndTime
()));
contents
.
add
(
content
);
...
...
@@ -135,6 +129,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
EngineerCalendarDTO
.
Calendar
calendar
=
new
EngineerCalendarDTO
.
Calendar
();
calendar
.
setDate
(
date
);
int
week
=
LocalDate
.
parse
(
date
).
getDayOfWeek
().
getValue
();
calendar
.
setWeek
(
Week
.
of
(
week
).
toChinese
(
"周"
));
EngineerCalendarDTO
.
Content
content
=
new
EngineerCalendarDTO
.
Content
();
List
<
String
>
workdays
=
Arrays
.
asList
(
e
.
getWorkdays
().
split
(
","
));
if
(
workdays
.
contains
(
String
.
valueOf
(
week
)))
{
...
...
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