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 938e9ace
authored
Aug 05, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端传递的是英文值;后端予以修改
1 parent
1c065301
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerCalendarServiceImpl.java
View file @
938e9ac
...
...
@@ -151,7 +151,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
if
(
endDate
.
isBefore
(
beginDate
))
{
return
Result
.
failed
(
"结束时间不能早于开始时间"
);
}
if
(!
reqDTO
.
getRepeatType
().
isEmpty
()
&&
!
"
不重复
"
.
equals
(
reqDTO
.
getRepeatType
()))
{
if
(!
reqDTO
.
getRepeatType
().
isEmpty
()
&&
!
"
none
"
.
equals
(
reqDTO
.
getRepeatType
()))
{
if
(
reqDTO
.
getRepeatEndDate
().
isEmpty
())
{
return
Result
.
failed
(
"重复的日历配置,请设定结束日期"
);
}
...
...
@@ -172,7 +172,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
beginTime
=
String
.
format
(
"%s %s:00"
,
beginTime
,
config
.
getWorkOn
());
endTime
=
String
.
format
(
"%s %s:00"
,
endTime
,
config
.
getWorkOff
());
}
if
(
"
不重复
"
.
equals
(
repeatType
))
{
if
(
"
none
"
.
equals
(
repeatType
))
{
addOneEngineerPlan
(
engineerCode
,
type
,
beginTime
,
endTime
,
remark
);
}
else
{
LocalDate
beginDate
=
DateUtils
.
localDateFromStr
(
beginTime
);
...
...
@@ -190,23 +190,24 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
}
private
LocalDate
getNextDate
(
LocalDate
current
,
String
repeatType
)
{
// none;day;week;month;3 month;6 month;year
switch
(
repeatType
)
{
case
"
每天
"
:
case
"
day
"
:
current
=
current
.
plusDays
(
1
);
break
;
case
"
每周
"
:
case
"
week
"
:
current
=
current
.
plusWeeks
(
1
);
break
;
case
"
每月
"
:
case
"
month
"
:
current
=
current
.
plusMonths
(
1
);
break
;
case
"
每3个月
"
:
case
"
3 month
"
:
current
=
current
.
plusMonths
(
3
);
break
;
case
"
每6个月
"
:
case
"
6 month
"
:
current
=
current
.
plusMonths
(
6
);
break
;
case
"
每年
"
:
case
"
year
"
:
current
=
current
.
plusYears
(
1
);
break
;
default
:
...
...
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