LIVE_YE 1 vecka sedan
förälder
incheckning
028a82db33

+ 32 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/KaoqinRecord.java

@@ -28,6 +28,10 @@ public class KaoqinRecord extends BaseEntity
     @Excel(name = "打卡人姓名")
     private String userName;
 
+    /** 打卡人姓名 */
+    @Excel(name = "考勤人员手机号")
+    private String phone;
+
     /** 部门Id */
 
     private Long deptId;
@@ -158,6 +162,10 @@ public class KaoqinRecord extends BaseEntity
     /** $column.columnComment */
     private String remarkPmOut;
 
+    private String startTime;
+
+    private String endTime;
+
     public String getKaType() {
         return kaType;
     }
@@ -478,6 +486,30 @@ public class KaoqinRecord extends BaseEntity
         return remarkPmOut;
     }
 
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordLeave.java

@@ -69,6 +69,10 @@ public class RecordLeave extends BaseEntity
     @Excel(name = "是否通过 0:未处理,1:不通过,2:通过")
     private String isPass;
 
+    /** 驳回原因 */
+    @Excel(name = "驳回原因")
+    private String reject;
+
     /** 提交时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@@ -223,6 +227,14 @@ public class RecordLeave extends BaseEntity
         this.recordLeaveFjList = recordLeaveFjList;
     }
 
+    public String getReject() {
+        return reject;
+    }
+
+    public void setReject(String reject) {
+        this.reject = reject;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 6 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KaoqinRecordServiceImpl.java

@@ -1,7 +1,10 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.KaoqinRecord;
 import com.ruoyi.system.mapper.KaoqinRecordMapper;
 import com.ruoyi.system.service.IKaoqinRecordService;
@@ -54,11 +57,14 @@ public class KaoqinRecordServiceImpl implements IKaoqinRecordService
     @Override
     public int insertKaoqinRecord(KaoqinRecord kaoqinRecord)
     {
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
         String ancestors = kaoqinRecord.getAncestors();
         Long deptId = kaoqinRecord.getDeptId();
         ancestors = ancestors +","+ deptId;
         kaoqinRecord.setAncestors(ancestors);
         kaoqinRecord.setCreateTime(DateUtils.getNowDate());
+        kaoqinRecord.setPhone(user.getPhonenumber());
         return kaoqinRecordMapper.insertKaoqinRecord(kaoqinRecord);
     }
 

+ 14 - 2
ruoyi-system/src/main/resources/mapper/system/KaoqinRecordMapper.xml

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="recordId"    column="record_id"    />
         <result property="userId"    column="user_id"    />
         <result property="userName"    column="user_name"    />
+        <result property="phone"    column="phone"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName"    column="dept_name"    />
         <result property="ancestors"    column="ancestors"    />
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectKaoqinRecordVo">
-        select record_id, user_id, user_name, dept_id, dept_name, ancestors, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address_am_in, ka_log, ka_lat, ka_sort, ka_address_am_out, ka_address_pm_in, ka_address_pm_out, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type_am_in, ka_type_am_out, ka_type_pm_in, ka_type_pm_out,ka_am_in_photo,ka_am_out_photo,ka_pm_in_photo,ka_pm_out_photo, ka_status, create_by, create_time, update_by, update_time, remark_am_in, remark_am_out, remark_pm_in, remark_pm_out from kaoqin_record
+        select record_id, user_id, user_name,phone, dept_id, dept_name, ancestors, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address_am_in, ka_log, ka_lat, ka_sort, ka_address_am_out, ka_address_pm_in, ka_address_pm_out, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type_am_in, ka_type_am_out, ka_type_pm_in, ka_type_pm_out,ka_am_in_photo,ka_am_out_photo,ka_pm_in_photo,ka_pm_out_photo, ka_status, create_by, create_time, update_by, update_time, remark_am_in, remark_am_out, remark_pm_in, remark_pm_out from kaoqin_record
     </sql>
 
     <select id="selectKaoqinRecordList" parameterType="KaoqinRecord" resultMap="KaoqinRecordResult">
@@ -55,13 +56,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="userId != null "> and user_id = #{userId}</if>
             <if test="userName != null  and userName != ''"> and user_name like concat( #{userName}, '%')</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="deptName != null  and deptName != ''"> and dept_name like concat( #{deptName}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and find_in_set(#{deptId}, ancestors)</if>
             <if test="kaYear != null  and kaYear != ''"> and ka_year = #{kaYear}</if>
             <if test="kaMonth != null  and kaMonth != ''"> and ka_month = #{kaMonth}</if>
             <if test="kaDay != null  and kaDay != ''"> and ka_day = #{kaDay}</if>
             <if test="kaWeek != null  and kaWeek != ''"> and ka_week = #{kaWeek}</if>
-            <if test="kaTime != null  and kaTime != ''"> and ka_time = #{kaTime}</if>
+
+            <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
+                and date_format(kaTime,'%Y%m%d') &gt;= date_format(#{startTime},'%Y%m%d')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                and date_format(kaTime,'%Y%m%d') &lt;= date_format(#{endTime},'%Y%m%d')
+            </if>
+
             <if test="kaAddressAmIn != null  and kaAddressAmIn != ''"> and ka_address_am_in = #{kaAddressAmIn}</if>
             <if test="kaLog != null  and kaLog != ''"> and ka_log = #{kaLog}</if>
             <if test="kaLat != null  and kaLat != ''"> and ka_lat = #{kaLat}</if>
@@ -96,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="userId != null">user_id,</if>
             <if test="userName != null">user_name,</if>
+            <if test="phone != null "> phone,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="deptName != null">dept_name,</if>
             <if test="ancestors != null">ancestors,</if>
@@ -136,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
             <if test="userName != null">#{userName},</if>
+            <if test="phone != null "> #{phone},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null">#{deptName},</if>
             <if test="ancestors != null">#{ancestors},</if>
@@ -180,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="userId != null">user_id = #{userId},</if>
             <if test="userName != null">user_name = #{userName},</if>
+            <if test="phone != null  ">phone = #{phone},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null">dept_name = #{deptName},</if>
             <if test="ancestors != null">ancestors = #{ancestors},</if>

+ 5 - 1
ruoyi-system/src/main/resources/mapper/system/RecordLeaveMapper.xml

@@ -18,11 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="examinersName"    column="examiners_name"    />
         <result property="category"    column="category"    />
         <result property="isPass"    column="is_pass"    />
+        <result property="reject"    column="reject"    />
         <result property="submitTime"    column="submit_time"    />
     </resultMap>
 
     <sql id="selectRecordLeaveVo">
-        select id, type, start_time, end_time, reason, dept_id, dept_name, absentee_id, absentee_name, examiners_id, examiners_name, category, is_pass, submit_time from record_leave
+        select id, type, start_time, end_time, reason, dept_id, dept_name, absentee_id, absentee_name, examiners_id, examiners_name, category, is_pass,reject, submit_time from record_leave
     </sql>
 
     <select id="selectRecordLeaveList" parameterType="RecordLeave" resultMap="RecordLeaveResult">
@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examinersName != null">examiners_name,</if>
             <if test="category != null">category,</if>
             <if test="isPass != null">is_pass,</if>
+            <if test="reject != null">reject,</if>
             submit_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -80,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examinersName != null">#{examinersName},</if>
             <if test="category != null">#{category},</if>
             <if test="isPass != null">#{isPass},</if>
+            <if test="reject != null">#{reject},</if>
             #{submitTime}
          </trim>
     </insert>
@@ -99,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examinersName != null">examiners_name = #{examinersName},</if>
             <if test="category != null">category = #{category},</if>
             <if test="isPass != null">is_pass = #{isPass},</if>
+            <if test="reject != null">reject =#{reject},</if>
         </trim>
         where id = #{id}
     </update>