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 e86e80ad
authored
Nov 06, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
2 parents
e8cce6d9
530fee12
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
20 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/CalendarDetailDTO.java
project-order/src/main/java/com/dituhui/pea/order/scheduler/InitEngineerCapacityScheduler.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/DispatchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceListServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/CalendarDetailDTO.java
View file @
e86e80a
...
...
@@ -9,9 +9,9 @@ public class CalendarDetailDTO {
@lombok
.
Data
public
static
class
Request
{
@NotBlank
@NotBlank
(
message
=
"工程师编号不能为空"
)
private
String
engineerCode
;
@NotBlank
@NotBlank
(
message
=
"所属计划配置编码不能为空"
)
private
String
planId
;
}
...
...
project-order/src/main/java/com/dituhui/pea/order/scheduler/InitEngineerCapacityScheduler.java
View file @
e86e80a
...
...
@@ -113,9 +113,6 @@ public class InitEngineerCapacityScheduler {
log
.
warn
(
"工程师:{}存在日期:{}时间切片记录, 无需初始化"
,
engineerCode
,
date
);
return
;
}
//TODO 日历需要添加
// 查询工程师正常的工作时间 并按小时切片:
EngineerBusinessEntity
businessEntity
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
LocalDateTime
workStartTime
=
DateUtils
.
localDateTimeFromStr
(
String
.
format
(
"%s %s:00"
,
date
,
businessEntity
.
getWorkOn
()));
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
e86e80a
...
...
@@ -218,7 +218,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
public
void
updateTeamEngineers
(
OrgTeamEntity
targetTeam
,
List
<
String
>
engineerCodes
)
{
// 获取现有的工作队和技术员之间的所有关系
final
String
targetTeamId
=
String
.
valueOf
(
targetTeam
.
getId
());
final
String
targetTeamId
=
String
.
valueOf
(
targetTeam
.
get
Team
Id
());
List
<
String
>
targetTeamWorkDayOfWeek
=
List
.
of
(
targetTeam
.
getWorkdays
().
split
(
","
));
List
<
OrgTeamEngineerEntity
>
existingRelations
=
orgTeamEngineerDao
.
findAllByTeamId
(
targetTeamId
);
...
...
@@ -237,6 +237,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
//返回任何一个有工作日冲突的工作队
List
<
String
>
fixedWorkDayOfWeek
=
List
.
of
(
team
.
getWorkdays
().
split
(
","
));
List
<
String
>
workDays
=
targetTeamWorkDayOfWeek
.
stream
().
filter
(
dayOfWeek
->
fixedWorkDayOfWeek
.
stream
().
anyMatch
(
fixDay
->
Objects
.
equals
(
fixDay
,
dayOfWeek
)))
.
map
(
DateUtils:
:
toWeekChinese
)
.
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
workDays
))
{
warnMessage
.
add
(
MessageFormat
.
format
(
message
,
engineerCode
,
team
.
getTeamName
(),
StringUtils
.
join
(
workDays
,
","
)));
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
e86e80a
...
...
@@ -232,9 +232,9 @@ public class DispatchServiceImpl implements DispatchService {
item
.
setName
(
o
.
getName
());
item
.
setPhone
(
o
.
getPhone
());
String
time
=
TimeUtils
.
localDateTime2String
(
o
.
getPlanStartTime
(),
"HH:mm"
);
String
timeSlot
=
this
.
parseTimeSlot
(
o
.
getPlanStartTime
());
item
.
setExpectTimeDesc
(
String
.
format
(
"%s/%s"
,
time
,
timeSlot
));
//
String time = TimeUtils.localDateTime2String(o.getPlanStartTime(), "HH:mm");
//
String timeSlot = this.parseTimeSlot(o.getPlanStartTime());
item
.
setExpectTimeDesc
(
o
.
getExpectTimeDesc
(
));
item
.
setSource
(
o
.
getSource
());
item
.
setDispatcher
(
o
.
getDispatcher
());
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
View file @
e86e80a
...
...
@@ -613,20 +613,11 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
private
EngineerCalendarDTO
.
Calendar
getEmptyCalendar
(
String
teamId
,
String
date
)
{
// 初始化一天的日历
OrgTeamEntity
e
=
orgTeamDao
.
getByTeamId
(
teamId
);
EngineerCalendarDTO
.
Calendar
calendar
=
new
EngineerCalendarDTO
.
Calendar
();
calendar
.
setDate
(
date
);
int
dayOfWeek
=
LocalDate
.
parse
(
date
).
getDayOfWeek
().
getValue
();
calendar
.
setWeek
(
DateUtils
.
toWeekChinese
(
dayOfWeek
));
List
<
String
>
workdays
=
Arrays
.
asList
(
e
.
getWorkdays
().
split
(
","
));
if
(!
workdays
.
contains
(
String
.
valueOf
(
dayOfWeek
)))
{
EngineerCalendarDTO
.
Content
content
=
new
EngineerCalendarDTO
.
Content
();
content
.
setType
(
"REST"
);
content
.
setTitle
(
"休息"
);
calendar
.
setContent
(
Collections
.
singletonList
(
content
));
}
else
{
calendar
.
setContent
(
new
ArrayList
<>());
}
calendar
.
setContent
(
new
ArrayList
<>());
return
calendar
;
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceListServiceImpl.java
View file @
e86e80a
...
...
@@ -129,7 +129,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
record
.
setX
(
o
.
getX
());
record
.
setY
(
o
.
getY
());
record
.
setSource
(
o
.
getSource
());
record
.
setDescription
(
o
.
get
Description
());
record
.
setDescription
(
o
.
get
ApplyNote
());
record
.
setPriority
(
o
.
getPriority
());
record
.
setOrgBranchName
(
branchNames
.
getOrDefault
(
o
.
getOrgBranchId
(),
""
));
...
...
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