Commit 79a8dbbe authored by 赵啸非's avatar 赵啸非

修改请假计算考勤

parent 316d69dd
......@@ -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>
......
......@@ -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);
}
}
}
......
......@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-07-01",
"attendanceDateEnd": "2024-07-31"
"attendanceDateStart": "2024-08-01",
"attendanceDateEnd": "2024-08-25"
}
###海康考勤打卡记录计算1
......@@ -46,9 +46,9 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-07-03",
"attendanceDateEnd": "2024-07-03",
"staffId": 485
"attendanceDateStart": "2024-08-19",
"attendanceDateEnd": "2024-08-19",
"staffId": 207
}
......@@ -78,8 +78,8 @@ POST {{baseUrl}}/attendance/stat/summary
Content-Type: application/json
{
"summaryTimeStart": "2024-07-01",
"summaryTimeEnd": "2024-07-31"
"summaryTimeStart": "2024-08-01",
"summaryTimeEnd": "2024-08-25"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment