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

修改请假计算考勤

parent 316d69dd
...@@ -359,48 +359,6 @@ ...@@ -359,48 +359,6 @@
</executions> </executions>
</plugin> </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> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version> <version>3.3.0</version>
...@@ -420,22 +378,7 @@ ...@@ -420,22 +378,7 @@
<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory> <outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
</configuration> </configuration>
</execution> </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> </executions>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -431,7 +431,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -431,7 +431,6 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
// 1.判断异常时间与请假开始时间那个大。 // 1.判断异常时间与请假开始时间那个大。
int compare = DateUtil.compare(entity.getErrorDateTime(), leaveRecord.getStartTime()); int compare = DateUtil.compare(entity.getErrorDateTime(), leaveRecord.getStartTime());
int compare1 = DateUtil.compare(entity.getErrorDateTime(), leaveRecord.getEndTime()); 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()); boolean in = DateUtil.isIn(goOffDateTime, leaveRecord.getStartTime(), leaveRecord.getEndTime());
...@@ -442,7 +441,18 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -442,7 +441,18 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
lateMinList.add(tempLate); lateMinList.add(tempLate);
} }
} else { } else {
//不包含,则要多个判断 //异常时间不在请假时间范围内
//1.异常时间在请假开始时间之前
if (compare < 0) {
//异常时间小于请假k开始时间,则迟到计算异常时间与班次时间时间差值
long tempLate = DateUtil.between(goOffDateTime, entity.getErrorDateTime(), DateUnit.MINUTE, false);
if (tempLate > 0L) {
lateMinList.add(tempLate);
}
}
//1.异常时间在请假结束时间之后
if (compare1 > 0) {
// 则迟到计算异常时间与班次时间时间差值
//1.请假开始时间 大于上班时间时候 //1.请假开始时间 大于上班时间时候
int rightBig = DateUtil.compare(goOffDateTime, leaveRecord.getStartTime()); int rightBig = DateUtil.compare(goOffDateTime, leaveRecord.getStartTime());
long leftRange = 0L; long leftRange = 0L;
...@@ -461,6 +471,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -461,6 +471,7 @@ public class AttendanceRecordErrorServiceImpl extends AbstractCRUDServiceImpl<At
lateMinList.add(leftRange); lateMinList.add(leftRange);
} }
} }
}
/* /*
if (compare < 0) { if (compare < 0) {
......
...@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord ...@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json Content-Type: application/json
{ {
"attendanceDateStart": "2024-07-01", "attendanceDateStart": "2024-08-01",
"attendanceDateEnd": "2024-07-31" "attendanceDateEnd": "2024-08-25"
} }
###海康考勤打卡记录计算1 ###海康考勤打卡记录计算1
...@@ -46,9 +46,9 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord ...@@ -46,9 +46,9 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json Content-Type: application/json
{ {
"attendanceDateStart": "2024-07-03", "attendanceDateStart": "2024-08-19",
"attendanceDateEnd": "2024-07-03", "attendanceDateEnd": "2024-08-19",
"staffId": 485 "staffId": 207
} }
...@@ -78,8 +78,8 @@ POST {{baseUrl}}/attendance/stat/summary ...@@ -78,8 +78,8 @@ POST {{baseUrl}}/attendance/stat/summary
Content-Type: application/json Content-Type: application/json
{ {
"summaryTimeStart": "2024-07-01", "summaryTimeStart": "2024-08-01",
"summaryTimeEnd": "2024-07-31" "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