Browse Source

打卡数据匹配考勤接口开发

anderx 1 year ago
parent
commit
7e6231bc9b

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectStaffRecordInput.java

@@ -21,8 +21,22 @@ public class ProjectStaffRecordInput extends BaseEntity {
     private String researchStart;
     private String adminName;
     private Integer fullJob;
+
+    /**
+     *  考勤状态 0=无,1=考勤工时正常,2=考勤工时异常
+     */
+    private Integer clockStatus;
     private Long deptId;
 
+
+    public Integer getClockStatus() {
+        return clockStatus;
+    }
+
+    public void setClockStatus(Integer clockStatus) {
+        this.clockStatus = clockStatus;
+    }
+
     public String getResearchEnd() {
         return researchEnd;
     }

+ 8 - 0
ruoyi-system/src/main/resources/mapper/project/ProjectStaffRecordMapper.xml

@@ -209,6 +209,14 @@
         <if test="projectStatus != null"> and a.project_status =#{projectStatus}</if>
         <if test="projectNumber != null"> and b.project_number like concat ('%',#{projectNumber},'%')</if>
         <if test="projectName != null"> and b.name like concat ('%',#{projectName},'%')</if>
+        <if test="clockStatus ==1">
+            and a.check_duration is not null
+            and a.duration = a.check_duration
+        </if>
+        <if test="clockStatus ==2">
+            and a.check_duration is not null
+            and a.duration != a.check_duration
+        </if>
         <if test="researchStart != null and researchEnd != null">
             and( #{researchStart} between b.start_time and b.end_time or  #{researchEnd} between b.start_time and b.end_time)
         </if>