Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
work_service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
work_service
Commits
de3825b5
Commit
de3825b5
authored
Mar 13, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
6dc66121
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
WorkHolidayMapper.java
.../src/main/java/cn/wisenergy/mapper/WorkHolidayMapper.java
+1
-1
WorkHolidayMapper.xml
...gy-mapper/src/main/resources/mapper/WorkHolidayMapper.xml
+1
-1
WorkHolidayServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkHolidayServiceImpl.java
+3
-3
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/WorkHolidayMapper.java
View file @
de3825b5
...
...
@@ -19,5 +19,5 @@ public interface WorkHolidayMapper extends BaseMapper<WorkHoliday> {
List
<
WorkHoliday
>
getByDate
(
@Param
(
"startDay"
)
Date
startDay
,
@Param
(
"endDay"
)
Date
endDay
);
List
<
WorkHoliday
>
getByTypeAndStartDate
(
Date
date
);
List
<
WorkHoliday
>
getByTypeAndStartDate
();
}
wisenergy-mapper/src/main/resources/mapper/WorkHolidayMapper.xml
View file @
de3825b5
...
...
@@ -30,7 +30,7 @@
<select
id=
"getByTypeAndStartDate"
resultType=
"cn.wisenergy.model.app.WorkHoliday"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
<include
refid=
"table"
/>
WHERE year(day_start) = year(#{date}) OR year(day_end) = year(#{date})
ORDER BY day_type desc,day_start asc
</select>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkHolidayServiceImpl.java
View file @
de3825b5
...
...
@@ -77,7 +77,7 @@ public class WorkHolidayServiceImpl implements WorkHolidayService {
private
Boolean
addHoliday
(
WorkHoliday
workHoliday
)
{
log
.
info
(
"WorkHolidayServiceImpl[]addHoliday[]input.param.workHoliday:{}"
+
workHoliday
);
verificationDate
(
workHoliday
);
List
<
WorkHoliday
>
holidays
=
workHolidayMapper
.
getByTypeAndStartDate
(
new
Date
()
);
List
<
WorkHoliday
>
holidays
=
workHolidayMapper
.
getByTypeAndStartDate
();
if
(!
CollectionUtils
.
isEmpty
(
holidays
))
{
for
(
WorkHoliday
holiday
:
holidays
)
{
if
(
workHoliday
.
getDes
().
equals
(
holiday
.
getDes
()))
{
...
...
@@ -106,7 +106,7 @@ public class WorkHolidayServiceImpl implements WorkHolidayService {
if
(
null
==
workHoliday
.
getId
())
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
List
<
WorkHoliday
>
holidays
=
workHolidayMapper
.
getByTypeAndStartDate
(
new
Date
()
);
List
<
WorkHoliday
>
holidays
=
workHolidayMapper
.
getByTypeAndStartDate
(
);
if
(!
CollectionUtils
.
isEmpty
(
holidays
))
{
for
(
WorkHoliday
holiday
:
holidays
)
{
if
(
holiday
.
getId
().
equals
(
workHoliday
.
getId
()))
{
...
...
@@ -151,7 +151,7 @@ public class WorkHolidayServiceImpl implements WorkHolidayService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
THE_USER_NOT_MANAGER_PLASE_MANAGER_LOGIN
);
}
HolidayAndAutoDto
holidayAndAutoDto
=
new
HolidayAndAutoDto
();
List
<
WorkHoliday
>
workHolidays
=
workHolidayMapper
.
getByTypeAndStartDate
(
new
Date
()
);
List
<
WorkHoliday
>
workHolidays
=
workHolidayMapper
.
getByTypeAndStartDate
();
WorkSubmitAdopt
submitAdopt
=
workSubmitAdoptService
.
getById
(
1
);
holidayAndAutoDto
.
setWorkHolidays
(
workHolidays
).
setWorkSubmitAdopt
(
submitAdopt
);
List
<
WorkType
>
workTypes
=
workTypeService
.
getAll
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment