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
79a8dbbe
Commit
79a8dbbe
authored
Aug 30, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改请假计算考勤
parent
316d69dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
82 deletions
+36
-82
attendance-performance-manager/pom.xml
attendance-performance-manager/pom.xml
+1
-58
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
...ndance/service/impl/AttendanceRecordErrorServiceImpl.java
+28
-17
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+7
-7
No files found.
attendance-performance-manager/pom.xml
View file @
79a8dbbe
...
...
@@ -359,48 +359,6 @@
</executions>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<skip>${skipUi}</skip>
</configuration>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument></argument>
</arguments>
<workingDirectory>${project.parent.basedir}/attendance-performance-manager-ui/admin</workingDirectory>
</configuration>
</execution>
<execution>
<id>exec-npm-run-build</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument>run</argument>
<arguments>${package.environment}</arguments>
</arguments>
<workingDirectory>${project.parent.basedir}/attendance-performance-manager-ui/admin</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>-->
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<version>
3.3.0
</version>
...
...
@@ -420,22 +378,7 @@
<outputDirectory>
${project.parent.basedir}/dist/${project.artifactId}
</outputDirectory>
</configuration>
</execution>
<!--<execution>
<id>make-assembly-ui</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<skipAssembly>${skipUi}</skipAssembly>
<finalName>${project.artifactId}-ui</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>../assembly/assembly-manager-ui.xml</descriptor>
</descriptors>
<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
</configuration>
</execution>-->
</executions>
</plugin>
</plugins>
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordErrorServiceImpl.java
View file @
79a8dbbe
...
...
@@ -431,7 +431,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
// 1.判断异常时间与请假开始时间那个大。
int
compare
=
DateUtil
.
compare
(
entity
.
getErrorDateTime
(),
leaveRecord
.
getStartTime
());
int
compare1
=
DateUtil
.
compare
(
entity
.
getErrorDateTime
(),
leaveRecord
.
getEndTime
());
int
compare2
=
DateUtil
.
compare
(
entity
.
getErrorDateTime
(),
leaveRecord
.
getEndTime
());
boolean
in
=
DateUtil
.
isIn
(
goOffDateTime
,
leaveRecord
.
getStartTime
(),
leaveRecord
.
getEndTime
());
...
...
@@ -442,23 +441,35 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
lateMinList
.
add
(
tempLate
);
}
}
else
{
//不包含,则要多个判断
//1.请假开始时间 大于上班时间时候
int
rightBig
=
DateUtil
.
compare
(
goOffDateTime
,
leaveRecord
.
getStartTime
());
long
leftRange
=
0L
;
if
(
rightBig
<=
0
)
{
//多段值 左段值
leftRange
=
DateUtil
.
between
(
goOffDateTime
,
leaveRecord
.
getStartTime
(),
DateUnit
.
MINUTE
,
false
);
//异常时间不在请假时间范围内
//1.异常时间在请假开始时间之前
if
(
compare
<
0
)
{
//异常时间小于请假k开始时间,则迟到计算异常时间与班次时间时间差值
long
tempLate
=
DateUtil
.
between
(
goOffDateTime
,
entity
.
getErrorDateTime
(),
DateUnit
.
MINUTE
,
false
);
if
(
tempLate
>
0L
)
{
lateMinList
.
add
(
tempLate
);
}
}
//右段值
long
leftRange1
=
0
;
int
rightBig1
=
DateUtil
.
compare
(
leaveRecord
.
getEndTime
(),
entity
.
getErrorDateTime
());
if
(
rightBig1
<
0
)
{
leftRange1
=
DateUtil
.
between
(
leaveRecord
.
getEndTime
(),
entity
.
getErrorDateTime
(),
DateUnit
.
MINUTE
,
false
);
}
leftRange
=
leftRange
+
leftRange1
;
if
(
leftRange
>
0
){
lateMinList
.
add
(
leftRange
);
//1.异常时间在请假结束时间之后
if
(
compare1
>
0
)
{
// 则迟到计算异常时间与班次时间时间差值
//1.请假开始时间 大于上班时间时候
int
rightBig
=
DateUtil
.
compare
(
goOffDateTime
,
leaveRecord
.
getStartTime
());
long
leftRange
=
0L
;
if
(
rightBig
<=
0
)
{
//多段值 左段值
leftRange
=
DateUtil
.
between
(
goOffDateTime
,
leaveRecord
.
getStartTime
(),
DateUnit
.
MINUTE
,
false
);
}
//右段值
long
leftRange1
=
0
;
int
rightBig1
=
DateUtil
.
compare
(
leaveRecord
.
getEndTime
(),
entity
.
getErrorDateTime
());
if
(
rightBig1
<
0
)
{
leftRange1
=
DateUtil
.
between
(
leaveRecord
.
getEndTime
(),
entity
.
getErrorDateTime
(),
DateUnit
.
MINUTE
,
false
);
}
leftRange
=
leftRange
+
leftRange1
;
if
(
leftRange
>
0
){
lateMinList
.
add
(
leftRange
);
}
}
}
...
...
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
View file @
79a8dbbe
...
...
@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-0
7
-01",
"attendanceDateEnd": "2024-0
7-31
"
"attendanceDateStart": "2024-0
8
-01",
"attendanceDateEnd": "2024-0
8-25
"
}
###海康考勤打卡记录计算1
...
...
@@ -46,9 +46,9 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-0
7-03
",
"attendanceDateEnd": "2024-0
7-03
",
"staffId":
485
"attendanceDateStart": "2024-0
8-19
",
"attendanceDateEnd": "2024-0
8-19
",
"staffId":
207
}
...
...
@@ -78,8 +78,8 @@ POST {{baseUrl}}/attendance/stat/summary
Content-Type: application/json
{
"summaryTimeStart": "2024-0
7
-01",
"summaryTimeEnd": "2024-0
7-31
"
"summaryTimeStart": "2024-0
8
-01",
"summaryTimeEnd": "2024-0
8-25
"
}
...
...
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