Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
e7d15e14
Commit
e7d15e14
authored
Aug 19, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3747a211
b4bc1e8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
22 deletions
+30
-22
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/web/CheckAllRecordController.java
...ortals/xhx/module/check/web/CheckAllRecordController.java
+30
-22
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/web/CheckAllRecordController.java
View file @
e7d15e14
...
...
@@ -66,11 +66,18 @@ public class CheckAllRecordController extends BaseJsonBodyController {
int
code
=
1
;
try
{
PageInfo
pageInfo
=
new
PageInfo
(-
1
);
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,-
1
);
query
.
setCheckTimeEnd
(
DateUtils
.
getStrDate
(
calendar
.
getTime
()));
query
.
setCheckTimeStart
(
DateUtil
.
beginOfMonth
(
calendar
.
getTime
()).
toDateStr
());
}
else
{
String
currMonth
=
DateUtils
.
getCurrMonth
();
String
checkTimeMonth
=
DateUtils
.
convertDateStrToStr
(
query
.
getCheckTimeStart
(),
"yyyy-MM-dd"
,
"yyyy-MM"
);
if
(
currMonth
.
equals
(
checkTimeMonth
)){
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,-
1
);
query
.
setCheckTimeEnd
(
DateUtils
.
getStrDate
(
calendar
.
getTime
()));
}
}
Result
<
CheckAllRecordVo
>
result
=
checkAllRecordService
.
getAllCheckRecord
(
query
,
pageInfo
);
...
...
@@ -206,25 +213,26 @@ public class CheckAllRecordController extends BaseJsonBodyController {
return
ret
;
}
public
static
void
main
(
String
[]
args
)
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setCheckTimeStart
(
"2023-02-01"
);
query
.
setCheckTimeEnd
(
"2023-02-29"
);
StaffCheckSummaryQuery
lastQuery
=
new
StaffCheckSummaryQuery
();
String
yyyy
=
query
.
getCheckTimeStart
().
substring
(
0
,
4
);
String
mmdd
=
query
.
getCheckTimeStart
().
substring
(
4
);
int
lastyear
=
DataUtil
.
converStr2Int
(
yyyy
,
0
);
lastyear
--;
if
(
query
.
getCheckTimeStart
().
substring
(
4
).
equals
(
"-02-29"
))
{
lastQuery
.
setCheckTimeStart
(
lastyear
+
"-02-28"
);
}
else
{
lastQuery
.
setCheckTimeStart
(
lastyear
+
query
.
getCheckTimeStart
().
substring
(
4
));
}
if
(
query
.
getCheckTimeEnd
().
substring
(
4
).
equals
(
"-02-29"
))
{
lastQuery
.
setCheckTimeEnd
(
lastyear
+
"-02-28"
);
}
else
{
lastQuery
.
setCheckTimeEnd
(
lastyear
+
query
.
getCheckTimeEnd
().
substring
(
4
));
}
System
.
out
.
println
(
JSONObject
.
toJSON
(
lastQuery
).
toString
());
}
// public static void main(String[] args) {
// StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
// query.setCheckTimeStart("2023-02-01");
// query.setCheckTimeEnd("2023-02-29");
// StaffCheckSummaryQuery lastQuery = new StaffCheckSummaryQuery();
// String yyyy = query.getCheckTimeStart().substring(0, 4);
// String mmdd = query.getCheckTimeStart().substring(4);
// int lastyear = DataUtil.converStr2Int(yyyy, 0);
// lastyear--;
// if (query.getCheckTimeStart().substring(4).equals("-02-29")) {
// lastQuery.setCheckTimeStart(lastyear + "-02-28");
// } else {
// lastQuery.setCheckTimeStart(lastyear + query.getCheckTimeStart().substring(4));
// }
// if (query.getCheckTimeEnd().substring(4).equals("-02-29")) {
// lastQuery.setCheckTimeEnd(lastyear + "-02-28");
// } else {
// lastQuery.setCheckTimeEnd(lastyear + query.getCheckTimeEnd().substring(4));
// }
// System.out.println(JSONObject.toJSON(lastQuery).toString());
// }
}
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