浏览代码

修复打卡接口

Administrator 2 年之前
父节点
当前提交
68713c9c7d

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/index/IndexController.java

@@ -37,7 +37,7 @@ public class IndexController extends BaseController {
     /**
      * 新增用户
      */
-    @PostMapping()
+    @PostMapping
     public AjaxResult add(@Validated @RequestBody SysUser user)
     {
         if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user)))

+ 163 - 78
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/KaoQinController.java

@@ -10,24 +10,15 @@ import com.ruoyi.system.domain.PlatPunch;
 import com.ruoyi.system.service.IKaoqinConfigService;
 import com.ruoyi.system.service.IKaoqinRecordService;
 import com.ruoyi.system.service.ISysDictDataService;
-import org.gavaghan.geodesy.Ellipsoid;
-import org.gavaghan.geodesy.GlobalCoordinates;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
-import static com.ruoyi.common.PunchUtils.getDistanceMeter;
-
 /**
  * 实现考勤打卡
  *
@@ -52,15 +43,26 @@ public class KaoQinController extends BaseController {
     /**
      * 定位打卡提供计算参数
      *
-     * @param platPunch
+     * @param kaoqinConfig
      * @return
      */
     @GetMapping(value = "/daKa")
-    public AjaxResult daKa(PlatPunch platPunch) {
-        //根据部门id,查询该部门考勤范围 ,经纬度
-        KaoqinConfig kaoqinConfig = new KaoqinConfig();
-        kaoqinConfig.setDeptId(platPunch.getDeptId());
+    public AjaxResult daKa(KaoqinConfig kaoqinConfig) {
+        //根据部门祖籍列表,查询该部门考勤范围 ,经纬度
         List<KaoqinConfig> kaoqinConfigs = kaoqinConfigService.selectKaoqinConfigList(kaoqinConfig);
+        if (kaoqinConfigs != null && kaoqinConfigs.size() > 1) {
+            //如果有多条考勤规则,先选离自己最近的规则
+            String ancestors = kaoqinConfig.getAncestors();
+            String[] split = ancestors.split(",");
+            Map<Long, List<KaoqinConfig>> collect = kaoqinConfigs.stream().collect(Collectors.groupingBy(KaoqinConfig::getDeptId));
+            for (int i = split.length - 1; i >= 0; i--) {
+                String s = split[i];
+                List<KaoqinConfig> kaoqinConfigsDept = collect.get(Long.parseLong(s));
+                if (kaoqinConfigsDept != null) {
+                    return AjaxResult.success(kaoqinConfigsDept);
+                }
+            }
+        }
         return AjaxResult.success(kaoqinConfigs);
     }
 
@@ -81,99 +83,182 @@ public class KaoQinController extends BaseController {
      */
     @GetMapping("/abnormal")
     public AjaxResult abnormal(KaoqinRecord kaoqinRecord) {
-        //设置查询异常的考勤
+        //传入userId/年 和 月份 设置查询异常的考勤
         kaoqinRecord.setKaStatus("2");
-        List<KaoqinRecord> kaoqinRecords = kaoqinRecordService.selectKaoqinRecordList(kaoqinRecord);
-        //对异常进行分组统计数量
-        Map<String, Long> collect = kaoqinRecords.stream().collect(Collectors.groupingBy(KaoqinRecord::getKaType, Collectors.counting()));
+        List<KaoqinRecord> kaoQinRecords = kaoqinRecordService.selectKaoqinRecordList(kaoqinRecord);
+        //记录该月有多少次异常总数
+        Long count = 0L;
         SysDictData dictData = new SysDictData();
         dictData.setDictType("kaoqin_abnormal");
         List<SysDictData> sysDictData = dictDataService.selectDictDataList(dictData);
-        Map map = new HashMap();
+        Map<String, Long> map = new HashMap();
         for (SysDictData sysDictDatum : sysDictData) {
             //获取异常名称
-             String dictLabel = sysDictDatum.getDictLabel();
-             //获取异常的值
+            String dictLabel = sysDictDatum.getDictLabel();
+            //获取异常的值
             String dictValue = sysDictDatum.getDictValue();
-            if (!"1".equals(dictValue)){
+            if (!"1".equals(dictValue)) {
                 Long aLong = 0L;
-                aLong =  collect.get(dictValue);
-                map.put(dictLabel,aLong);
+                map.put(dictLabel, aLong);
             }
         }
-        map.put("count",kaoqinRecords.size());
+        for (KaoqinRecord kaoQinRecord : kaoQinRecords) {
+            String kaTypeAmIn = kaoQinRecord.getKaTypeAmIn();
+            String kaTypeAmOut = kaoQinRecord.getKaTypeAmOut();
+            String kaTypePmIn = kaoQinRecord.getKaTypePmIn();
+            String kaTypePmOut = kaoQinRecord.getKaTypePmOut();
+            if (!"1".equals(kaTypeAmIn)) {
+                Long aLong = map.get(kaTypeAmIn);
+                map.put(kaTypeAmIn, aLong + 1);
+                count = count + 1;
+            }  if (!"1".equals(kaTypeAmOut)) {
+                Long aLong = map.get(kaTypeAmOut);
+                map.put(kaTypeAmOut, aLong + 1);
+                count = count + 1;
+            }  if (!"1".equals(kaTypePmIn)) {
+                Long aLong = map.get(kaTypePmIn);
+                map.put(kaTypePmIn, aLong + 1);
+                count = count + 1;
+            }  if (!"1".equals(kaTypePmOut)) {
+                Long aLong = map.get(kaTypePmOut);
+                map.put(kaTypePmOut, aLong + 1);
+                count = count + 1;
+            }
+        }
+        map.put("count", count);
         return AjaxResult.success(map);
     }
 
 
     /**
-     *考勤日历
+     * 考勤日历
      */
     @GetMapping("/calendar")
     public AjaxResult calendar(KaoqinRecord kaoqinRecord) {
         //根据打卡人id和月份去找对应的打卡记录
         List<KaoqinRecord> kaoqinRecords = kaoqinRecordService.selectKaoqinRecordList(kaoqinRecord);
-        Map<String, List<KaoqinRecord>> collect = kaoqinRecords.stream().collect(Collectors.groupingBy(KaoqinRecord::getKaTime));
         List list = new ArrayList();
-        Map<String,Object> map = new HashMap();
-        for (String date : collect.keySet()) {
-            List<KaoqinRecord> kaoqinRecords1 = collect.get(date);
-            //定义标签显示状态
-            String abnormal = "";
-            int num = 0;
-            for (KaoqinRecord record : kaoqinRecords1) {
-                String kaType = record.getKaType();
-                if (!"1".equals(kaType)){
-                    abnormal = kaType + ",";
-                    num = num+1;
+        if (kaoqinRecords != null && kaoqinRecords.size() > 0) {
+            Map<String, List<KaoqinRecord>> collect = kaoqinRecords.stream().collect(Collectors.groupingBy(KaoqinRecord::getKaTime));
+            Map<String, Object> map = new HashMap();
+            for (String date : collect.keySet()) {
+                List<KaoqinRecord> kaoqinRecords1 = collect.get(date);
+                //定义标签显示状态
+                String abnormal = "";
+                Boolean flag = true;
+                for (KaoqinRecord record : kaoqinRecords1) {
+                    String kaTypeAmIn = record.getKaTypeAmIn();
+                    String kaTypeAmOut = record.getKaTypeAmOut();
+                    String kaTypePmIn = record.getKaTypePmIn();
+                    String kaTypePmOut = record.getKaTypePmOut();
+                    if (!"1".equals(kaTypeAmIn)) {
+                        abnormal = kaTypeAmIn + ",";
+                        flag = false;
+                    }
+                    if (!"1".equals(kaTypeAmOut)) {
+                        abnormal = kaTypeAmOut + ",";
+                        flag = false;
+                    }
+                    if (!"1".equals(kaTypePmIn)) {
+                        abnormal = kaTypePmIn + ",";
+                        flag = false;
+                    }
+                    if (!"1".equals(kaTypePmOut)) {
+                        abnormal = kaTypePmOut + ",";
+                        flag = false;
+                    }
                 }
+                if (flag) {
+                    abnormal = "1";
+                } else {
+                    abnormal = abnormal.substring(0, abnormal.length() - 1);
+                }
+                //日期
+                map.put("data", date);
+                //标签显示状态
+                map.put("info", abnormal);
+                //打卡记录列表
+                map.put("list", kaoqinRecords1);
+                list.add(map);
             }
-            if (num==0){
-                abnormal = "1";
-            }else {
-                abnormal = abnormal.substring(0,abnormal.length() -1);
-            }
-            //日期
-            map.put("data",date);
-            //标签显示状态
-            map.put("info",abnormal);
-            //打卡记录列表
-            map.put("list",kaoqinRecords1);
-            list.add(map);
         }
         return AjaxResult.success(list);
     }
 
-
     /**
-     * 计算是否在范围内
+     * 个人中心,打卡记录统计
+     * 只有管理员能看到
      *
-     * @param platPunch
+     * @param
      * @return
      */
-    public Boolean getPunch(PlatPunch platPunch) {
-        //1、设置目的地经度
-        String longitudeS = "117.21";
-        //设置目的纬度
-        String latitudeS = "31.84";
-        // 2、由前端传过来的用户所在位置 经纬度
-        String longitudeT = platPunch.getLongitude();
-        String latitudeT = platPunch.getLatitude();
-        // 3、对比
-        GlobalCoordinates source = new GlobalCoordinates(Double.parseDouble(latitudeS), Double.parseDouble(longitudeS));
-        GlobalCoordinates target = new GlobalCoordinates(Double.parseDouble(latitudeT), Double.parseDouble(longitudeT));
-        //这是两种坐标系计算方法,这是第一种坐标系计算方法(我们用的这种)
-        double geoCurve = getDistanceMeter(source, target, Ellipsoid.Sphere);
-        //这是两种坐标系计算方法,这是第二种坐标系计算方法
-        double geoCurve2 = getDistanceMeter(source, target, Ellipsoid.WGS84);
-        System.out.println(geoCurve + "----------" + geoCurve2);
-        //如果用户和目的地位置想吃2千米,在不能打卡;
-        if (geoCurve > 2000) {
-            System.out.println("不能打卡!!!");
-            //反之,可以打卡
-        } else {
-            System.out.println("能打卡");
+    @PostMapping("/clockRecord")
+    public AjaxResult clockRecord(KaoqinRecord kaoqinRecord) {
+        //定义返回值
+        List list = new ArrayList();
+        //根据部门祖籍列表查询考勤数据
+        List<KaoqinRecord> kaoqinRecords = kaoqinRecordService.selectKaoqinRecordList(kaoqinRecord);
+        if (kaoqinRecords != null) {
+            //根据userId进行分组
+            Map<Long, List<KaoqinRecord>> kaoQinRecords = kaoqinRecords.stream().collect(Collectors.groupingBy(KaoqinRecord::getUserId));
+            SysDictData dictData = new SysDictData();
+            dictData.setDictType("kaoqin_abnormal");
+            //找到所有的异常
+            List<SysDictData> sysDictData = dictDataService.selectDictDataList(dictData);
+            Map<String, String> map = new HashMap<>();
+            if (sysDictData != null) {
+                for (SysDictData sysDictDatum : sysDictData) {
+                    //获取异常名称
+                    String dictLabel = sysDictDatum.getDictLabel();
+                    //获取异常的值
+                    String dictValue = sysDictDatum.getDictValue();
+                    if (!"1".equals(dictValue)) {
+                        map.put(dictValue, dictLabel);
+                    }
+                }
+            }
+
+            for (List<KaoqinRecord> value : kaoQinRecords.values()) {
+                if (value != null) {
+                    //定义返回的人
+                    Map<String, Object> userMap = new HashMap();
+                    userMap.put("userName", value.get(0).getUserName());
+                    userMap.put("deptName", value.get(0).getDeptName());
+                    for (String dictValue : map.keySet()) {
+                        String dictLabel = map.get(dictValue);
+                        userMap.put(dictLabel, 0);
+                    }
+                    for (KaoqinRecord kaoQinRecord : value) {
+                        String kaTypeAmIn = kaoQinRecord.getKaTypeAmIn();
+                        String kaTypeAmOut = kaoQinRecord.getKaTypeAmOut();
+                        String kaTypePmIn = kaoQinRecord.getKaTypePmIn();
+                        String kaTypePmOut = kaoQinRecord.getKaTypePmOut();
+                        if (!"1".equals(kaTypeAmIn)) {
+                            //获取异常的名称
+                            String dictLabel = map.get(kaTypeAmIn);
+                            Integer num = (Integer) userMap.get(dictLabel);
+                            userMap.put(dictLabel, num + 1);
+                        }  if (!"1".equals(kaTypeAmOut)) {
+                            String dictLabel = map.get(kaTypeAmOut);
+                            //获取异常的名称
+                            Integer num = (Integer) userMap.get(dictLabel);
+                            userMap.put(dictLabel, num + 1);
+                        }  if (!"1".equals(kaTypePmIn)) {
+                            String dictLabel = map.get(kaTypePmIn);
+                            //获取异常的名称
+                            Integer num = (Integer) userMap.get(dictLabel);
+                            userMap.put(dictLabel, num + 1);
+                        }  if (!"1".equals(kaTypePmOut)) {
+                            String dictLabel = map.get(kaTypePmOut);
+                            //获取异常的名称
+                            Integer num = (Integer) userMap.get(dictLabel);
+                            userMap.put(dictLabel, num + 1);
+                        }
+                    }
+                    list.add(userMap);
+                }
+            }
         }
-        return true;
+        return AjaxResult.success(list);
     }
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/KaoqinRecordController.java

@@ -61,7 +61,7 @@ public class KaoqinRecordController extends BaseController
     /**
      * 获取考勤记录详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:record:query')")
+
     @GetMapping(value = "/{recordId}")
     public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
     {

+ 3 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/sms/SendSmsController.java

@@ -136,10 +136,10 @@ public class SendSmsController extends BaseController
             com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
                     //手机号码
                     .setPhoneNumbers(phone)
-                    //短信签名名称。
-                    .setSignName("your_value")
+                    //短信签名名称。潜山市数据资源局
+                    .setSignName("安徽博曼网络科技有限公司")
                     //短信模板CODE
-                    .setTemplateCode("your_value")
+                    .setTemplateCode("SMS_232893584")
                     //短信模板变量对应的实际值{"name": code}
                     .setTemplateParam(smsCode);
             try {

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 过滤请求
                 .authorizeRequests()
                 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
-                .antMatchers("/login", "/register", "/captchaImage","/index").permitAll()
+                .antMatchers("/login", "/register", "/captchaImage","/index/**","/sms/sendSmsOnly").permitAll()
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

+ 1 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java

@@ -118,7 +118,7 @@ public class GenController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('tool:gen:edit')")
     @Log(title = "代码生成", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/put")
     public AjaxResult editSave(@Validated @RequestBody GenTable genTable)
     {
         genTableService.validateEdit(genTable);

+ 22 - 9
ruoyi-system/src/main/java/com/ruoyi/system/domain/KaoqinConfig.java

@@ -22,7 +22,12 @@ public class KaoqinConfig extends BaseEntity
 
     /** 部门id */
     @Excel(name = "部门id")
-    private String deptId;
+    private Long deptId;
+
+    /**
+     * 部门祖籍列表
+     */
+    private String ancestors;
 
     /** 打卡地点名称 */
     @Excel(name = "打卡地点名称")
@@ -68,7 +73,15 @@ public class KaoqinConfig extends BaseEntity
     @Excel(name = "打卡时间 -下午下班", width = 30, dateFormat = "yyyy-MM-dd")
     private Date kaTimePmOut;
 
-    public void setKaoqinId(Long kaoqinId) 
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
+    public void setKaoqinId(Long kaoqinId)
     {
         this.kaoqinId = kaoqinId;
     }
@@ -77,16 +90,16 @@ public class KaoqinConfig extends BaseEntity
     {
         return kaoqinId;
     }
-    public void setDeptId(String deptId)
-    {
-        this.deptId = deptId;
-    }
 
-    public String getDeptId()
-    {
+    public Long getDeptId() {
         return deptId;
     }
-    public void setKaAddress(String kaAddress) 
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setKaAddress(String kaAddress)
     {
         this.kaAddress = kaAddress;
     }

+ 223 - 39
ruoyi-system/src/main/java/com/ruoyi/system/domain/KaoqinRecord.java

@@ -10,8 +10,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
 /**
  * 考勤记录对象 kaoqin_record
  * 
- * @author ruoyi
- * @date 2023-02-02
+ * @author boman
+ * @date 2023-02-09
  */
 public class KaoqinRecord extends BaseEntity
 {
@@ -24,10 +24,22 @@ public class KaoqinRecord extends BaseEntity
     @Excel(name = "打卡人id")
     private Long userId;
 
-    /** 部门id */
-    @Excel(name = "部门id")
+    /** 打卡人姓名 */
+    @Excel(name = "打卡人姓名")
+    private String userName;
+
+    /** 部门Id */
+    @Excel(name = "部门Id")
     private Long deptId;
 
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 部门祖籍列表 */
+    @Excel(name = "部门祖籍列表")
+    private String ancestors;
+
     /** 打卡时间 年 */
     @Excel(name = "打卡时间 年")
     private String kaYear;
@@ -48,58 +60,91 @@ public class KaoqinRecord extends BaseEntity
     @Excel(name = "打卡时间年-月-日")
     private String kaTime;
 
-    /** 打卡地点名称 */
-    @Excel(name = "打卡地点名称")
-    private String kaAddress;
+    /** 打卡地点名称-上午上班 */
+    @Excel(name = "打卡地点名称-上午上班")
+    private String kaAddressAmIn;
 
-    /** 打卡地点经度 */
-    @Excel(name = "打卡地点经度")
+    /** 打卡地点经度-暂时无用 */
+    @Excel(name = "打卡地点经度-暂时无用")
     private String kaLog;
 
-    /** 打卡地点维度 */
-    @Excel(name = "打卡地点维度")
+    /** 打卡地点维度--暂时无用 */
+    @Excel(name = "打卡地点维度--暂时无用")
     private String kaLat;
 
-    /** 打卡分类 1:上午上班 2:上午下班 3:下午上班 4:下午下班 */
-    @Excel(name = "打卡分类 1:上午上班 2:上午下班 3:下午上班 4:下午下班")
+    /** 打卡分类 1:上午上班 2:上午下班 3:下午上班 4:下午下班-暂时无用 */
+    @Excel(name = "打卡分类 1:上午上班 2:上午下班 3:下午上班 4:下午下班-暂时无用")
     private String kaSort;
 
+    /** 打卡地点名称-上午下班 */
+    @Excel(name = "打卡地点名称-上午下班")
+    private String kaAddressAmOut;
+
+    /** 打卡地点名称 -下午上班 */
+    @Excel(name = "打卡地点名称 -下午上班")
+    private String kaAddressPmIn;
+
+    /** 打卡地点名称 -下午下班 */
+    @Excel(name = "打卡地点名称 -下午下班")
+    private String kaAddressPmOut;
+
     /** 打卡时间 -上午上班 */
-    @JsonFormat(pattern = "HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "打卡时间 -上午上班", width = 30, dateFormat = "yyyy-MM-dd")
     private Date kaTimeAmIn;
 
     /** 打卡时间 -上午下班 */
-    @JsonFormat(pattern = "HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "打卡时间 -上午下班", width = 30, dateFormat = "yyyy-MM-dd")
     private Date kaTimeAmOut;
 
     /** 打卡时间 -下午上班 */
-    @JsonFormat(pattern = "HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "打卡时间 -下午上班", width = 30, dateFormat = "yyyy-MM-dd")
     private Date kaTimePmIn;
 
     /** 打卡时间 -下午下班 */
-    @JsonFormat(pattern = "HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "打卡时间 -下午下班", width = 30, dateFormat = "yyyy-MM-dd")
     private Date kaTimePmOut;
 
-    /** 打卡状态 1正常 2:迟到 3:外勤 4:早退 */
-    @Excel(name = "打卡类别 1正常 2:迟到 3:外勤 4:早退")
-    private String kaType;
+    /** 打卡类别-上午上班 1正常 2:迟到 3:外勤 4:早退  */
+    @Excel(name = "打卡类别-上午上班 1正常 2:迟到 3:外勤 4:早退 ")
+    private String kaTypeAmIn;
 
-    @Excel(name = "打卡状态 1正常 2:异常")
+    /** 打卡类别-上午下班 1正常 2:迟到 3:外勤 4:早退 */
+    @Excel(name = "打卡类别-上午下班 1正常 2:迟到 3:外勤 4:早退")
+    private String kaTypeAmOut;
+
+    /** 打卡类别-下午上班 1正常 2:迟到 3:外勤 4:早退 */
+    @Excel(name = "打卡类别-下午上班 1正常 2:迟到 3:外勤 4:早退")
+    private String kaTypePmIn;
+
+    /** 打卡类别-下午下班 1正常 2:迟到 3:外勤 4:早退 */
+    @Excel(name = "打卡类别-下午下班 1正常 2:迟到 3:外勤 4:早退")
+    private String kaTypePmOut;
+
+    /** 打卡状态 1正常 2异常 */
+    @Excel(name = "打卡状态 1正常 2异常")
     private String kaStatus;
 
-    public String getKaStatus() {
-        return kaStatus;
-    }
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String remarkAmIn;
 
-    public void setKaStatus(String kaStatus) {
-        this.kaStatus = kaStatus;
-    }
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarkAmOut;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String remarkPmIn;
 
-    public void setRecordId(Long recordId)
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String remarkPmOut;
+
+    public void setRecordId(Long recordId) 
     {
         this.recordId = recordId;
     }
@@ -117,6 +162,15 @@ public class KaoqinRecord extends BaseEntity
     {
         return userId;
     }
+    public void setUserName(String userName) 
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName() 
+    {
+        return userName;
+    }
     public void setDeptId(Long deptId) 
     {
         this.deptId = deptId;
@@ -126,6 +180,24 @@ public class KaoqinRecord extends BaseEntity
     {
         return deptId;
     }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setAncestors(String ancestors) 
+    {
+        this.ancestors = ancestors;
+    }
+
+    public String getAncestors() 
+    {
+        return ancestors;
+    }
     public void setKaYear(String kaYear) 
     {
         this.kaYear = kaYear;
@@ -171,14 +243,14 @@ public class KaoqinRecord extends BaseEntity
     {
         return kaTime;
     }
-    public void setKaAddress(String kaAddress) 
+    public void setKaAddressAmIn(String kaAddressAmIn) 
     {
-        this.kaAddress = kaAddress;
+        this.kaAddressAmIn = kaAddressAmIn;
     }
 
-    public String getKaAddress() 
+    public String getKaAddressAmIn() 
     {
-        return kaAddress;
+        return kaAddressAmIn;
     }
     public void setKaLog(String kaLog) 
     {
@@ -207,6 +279,33 @@ public class KaoqinRecord extends BaseEntity
     {
         return kaSort;
     }
+    public void setKaAddressAmOut(String kaAddressAmOut) 
+    {
+        this.kaAddressAmOut = kaAddressAmOut;
+    }
+
+    public String getKaAddressAmOut() 
+    {
+        return kaAddressAmOut;
+    }
+    public void setKaAddressPmIn(String kaAddressPmIn) 
+    {
+        this.kaAddressPmIn = kaAddressPmIn;
+    }
+
+    public String getKaAddressPmIn() 
+    {
+        return kaAddressPmIn;
+    }
+    public void setKaAddressPmOut(String kaAddressPmOut) 
+    {
+        this.kaAddressPmOut = kaAddressPmOut;
+    }
+
+    public String getKaAddressPmOut() 
+    {
+        return kaAddressPmOut;
+    }
     public void setKaTimeAmIn(Date kaTimeAmIn) 
     {
         this.kaTimeAmIn = kaTimeAmIn;
@@ -243,14 +342,86 @@ public class KaoqinRecord extends BaseEntity
     {
         return kaTimePmOut;
     }
-    public void setKaType(String kaType) 
+    public void setKaTypeAmIn(String kaTypeAmIn) 
+    {
+        this.kaTypeAmIn = kaTypeAmIn;
+    }
+
+    public String getKaTypeAmIn() 
+    {
+        return kaTypeAmIn;
+    }
+    public void setKaTypeAmOut(String kaTypeAmOut) 
+    {
+        this.kaTypeAmOut = kaTypeAmOut;
+    }
+
+    public String getKaTypeAmOut() 
+    {
+        return kaTypeAmOut;
+    }
+    public void setKaTypePmIn(String kaTypePmIn) 
+    {
+        this.kaTypePmIn = kaTypePmIn;
+    }
+
+    public String getKaTypePmIn() 
+    {
+        return kaTypePmIn;
+    }
+    public void setKaTypePmOut(String kaTypePmOut) 
+    {
+        this.kaTypePmOut = kaTypePmOut;
+    }
+
+    public String getKaTypePmOut() 
+    {
+        return kaTypePmOut;
+    }
+    public void setKaStatus(String kaStatus) 
+    {
+        this.kaStatus = kaStatus;
+    }
+
+    public String getKaStatus() 
+    {
+        return kaStatus;
+    }
+    public void setRemarkAmIn(String remarkAmIn) 
+    {
+        this.remarkAmIn = remarkAmIn;
+    }
+
+    public String getRemarkAmIn() 
+    {
+        return remarkAmIn;
+    }
+    public void setRemarkAmOut(String remarkAmOut) 
+    {
+        this.remarkAmOut = remarkAmOut;
+    }
+
+    public String getRemarkAmOut() 
+    {
+        return remarkAmOut;
+    }
+    public void setRemarkPmIn(String remarkPmIn) 
+    {
+        this.remarkPmIn = remarkPmIn;
+    }
+
+    public String getRemarkPmIn() 
+    {
+        return remarkPmIn;
+    }
+    public void setRemarkPmOut(String remarkPmOut) 
     {
-        this.kaType = kaType;
+        this.remarkPmOut = remarkPmOut;
     }
 
-    public String getKaType() 
+    public String getRemarkPmOut() 
     {
-        return kaType;
+        return remarkPmOut;
     }
 
     @Override
@@ -258,26 +429,39 @@ public class KaoqinRecord extends BaseEntity
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("recordId", getRecordId())
             .append("userId", getUserId())
+            .append("userName", getUserName())
             .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("ancestors", getAncestors())
             .append("kaYear", getKaYear())
             .append("kaMonth", getKaMonth())
             .append("kaDay", getKaDay())
             .append("kaWeek", getKaWeek())
             .append("kaTime", getKaTime())
-            .append("kaAddress", getKaAddress())
+            .append("kaAddressAmIn", getKaAddressAmIn())
             .append("kaLog", getKaLog())
             .append("kaLat", getKaLat())
             .append("kaSort", getKaSort())
+            .append("kaAddressAmOut", getKaAddressAmOut())
+            .append("kaAddressPmIn", getKaAddressPmIn())
+            .append("kaAddressPmOut", getKaAddressPmOut())
             .append("kaTimeAmIn", getKaTimeAmIn())
             .append("kaTimeAmOut", getKaTimeAmOut())
             .append("kaTimePmIn", getKaTimePmIn())
             .append("kaTimePmOut", getKaTimePmOut())
-            .append("kaType", getKaType())
+            .append("kaTypeAmIn", getKaTypeAmIn())
+            .append("kaTypeAmOut", getKaTypeAmOut())
+            .append("kaTypePmIn", getKaTypePmIn())
+            .append("kaTypePmOut", getKaTypePmOut())
+            .append("kaStatus", getKaStatus())
             .append("createBy", getCreateBy())
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
+            .append("remarkAmIn", getRemarkAmIn())
+            .append("remarkAmOut", getRemarkAmOut())
+            .append("remarkPmIn", getRemarkPmIn())
+            .append("remarkPmOut", getRemarkPmOut())
             .toString();
     }
 }

+ 17 - 3
ruoyi-system/src/main/java/com/ruoyi/system/domain/PlatPunch.java

@@ -13,16 +13,30 @@ public class PlatPunch {
     /**
      * 部门id
      */
-    private String deptId;
+    private Long deptId;
 
-    public String getDeptId() {
+    /**
+     * 部门祖籍列表
+     */
+    private String ancestors;
+
+
+    public Long getDeptId() {
         return deptId;
     }
 
-    public void setDeptId(String deptId) {
+    public void setDeptId(Long deptId) {
         this.deptId = deptId;
     }
 
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
     public String getLongitude() {
         return longitude;
     }

+ 4 - 3
ruoyi-system/src/main/java/com/ruoyi/system/mapper/KaoqinRecordMapper.java

@@ -1,13 +1,14 @@
 package com.ruoyi.system.mapper;
 
-import java.util.List;
 import com.ruoyi.system.domain.KaoqinRecord;
 
+import java.util.List;
+
 /**
  * 考勤记录Mapper接口
  * 
- * @author ruoyi
- * @date 2023-02-02
+ * @author boman
+ * @date 2023-02-09
  */
 public interface KaoqinRecordMapper 
 {

+ 4 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/IKaoqinRecordService.java

@@ -1,13 +1,14 @@
 package com.ruoyi.system.service;
 
-import java.util.List;
 import com.ruoyi.system.domain.KaoqinRecord;
 
+import java.util.List;
+
 /**
  * 考勤记录Service接口
  * 
- * @author ruoyi
- * @date 2023-02-02
+ * @author boman
+ * @date 2023-02-09
  */
 public interface IKaoqinRecordService 
 {

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KaoqinConfigServiceImpl.java

@@ -56,7 +56,7 @@ public class KaoqinConfigServiceImpl implements IKaoqinConfigService
     @Override
     public int insertKaoqinConfig(KaoqinConfig kaoqinConfig)
     {
-        String deptId = kaoqinConfig.getDeptId();
+        Long deptId = kaoqinConfig.getDeptId();
         KaoqinConfig kc = new KaoqinConfig();
         kc.setDeptId(deptId);
         List<KaoqinConfig> kaoqinConfigs = kaoqinConfigMapper.selectKaoqinConfigList(kc);

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

@@ -2,20 +2,21 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.KaoqinRecordMapper;
 import com.ruoyi.system.domain.KaoqinRecord;
+import com.ruoyi.system.mapper.KaoqinRecordMapper;
 import com.ruoyi.system.service.IKaoqinRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
 
 /**
  * 考勤记录Service业务层处理
  * 
- * @author ruoyi
- * @date 2023-02-02
+ * @author boman
+ * @date 2023-02-09
  */
 @Service
-public class KaoqinRecordServiceImpl implements IKaoqinRecordService 
+public class KaoqinRecordServiceImpl implements IKaoqinRecordService
 {
     @Autowired
     private KaoqinRecordMapper kaoqinRecordMapper;

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

@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectKaoqinConfigList" parameterType="KaoqinConfig" resultMap="KaoqinConfigResult">
         <include refid="selectKaoqinConfigVo"/>
         <where>  
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="ancestors != null and ancestors != ''"> and FIND_IN_SET(dept_id,#{ancestors})</if>
             <if test="kaAddress != null  and kaAddress != ''"> and ka_address = #{kaAddress}</if>
             <if test="kaLog != null  and kaLog != ''"> and ka_log = #{kaLog}</if>
             <if test="kaLat != null  and kaLat != ''"> and ka_lat = #{kaLat}</if>

+ 76 - 15
ruoyi-system/src/main/resources/mapper/system/KaoqinRecordMapper.xml

@@ -7,53 +7,78 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="KaoqinRecord" id="KaoqinRecordResult">
         <result property="recordId"    column="record_id"    />
         <result property="userId"    column="user_id"    />
+        <result property="userName"    column="user_name"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="ancestors"    column="ancestors"    />
         <result property="kaYear"    column="ka_year"    />
         <result property="kaMonth"    column="ka_month"    />
         <result property="kaDay"    column="ka_day"    />
         <result property="kaWeek"    column="ka_week"    />
         <result property="kaTime"    column="ka_time"    />
-        <result property="kaAddress"    column="ka_address"    />
+        <result property="kaAddressAmIn"    column="ka_address_am_in"    />
         <result property="kaLog"    column="ka_log"    />
         <result property="kaLat"    column="ka_lat"    />
         <result property="kaSort"    column="ka_sort"    />
+        <result property="kaAddressAmOut"    column="ka_address_am_out"    />
+        <result property="kaAddressPmIn"    column="ka_address_pm_in"    />
+        <result property="kaAddressPmOut"    column="ka_address_pm_out"    />
         <result property="kaTimeAmIn"    column="ka_time_am_in"    />
         <result property="kaTimeAmOut"    column="ka_time_am_out"    />
         <result property="kaTimePmIn"    column="ka_time_pm_in"    />
         <result property="kaTimePmOut"    column="ka_time_pm_out"    />
-        <result property="kaType"    column="ka_type"    />
+        <result property="kaTypeAmIn"    column="ka_type_am_in"    />
+        <result property="kaTypeAmOut"    column="ka_type_am_out"    />
+        <result property="kaTypePmIn"    column="ka_type_pm_in"    />
+        <result property="kaTypePmOut"    column="ka_type_pm_out"    />
         <result property="kaStatus"    column="ka_status"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="remarkAmIn"    column="remark_am_in"    />
+        <result property="remarkAmOut"    column="remark_am_out"    />
+        <result property="remarkPmIn"    column="remark_pm_in"    />
+        <result property="remarkPmOut"    column="remark_pm_out"    />
     </resultMap>
 
     <sql id="selectKaoqinRecordVo">
-        select record_id, user_id, dept_id, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address, ka_log, ka_lat, ka_sort, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type,ka_status, create_by, create_time, update_by, update_time, remark from kaoqin_record
+        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_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">
         <include refid="selectKaoqinRecordVo"/>
         <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="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="ancestors != null  and ancestors != ''"> 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="kaAddress != null  and kaAddress != ''"> and ka_address = #{kaAddress}</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>
             <if test="kaSort != null  and kaSort != ''"> and ka_sort = #{kaSort}</if>
+            <if test="kaAddressAmOut != null  and kaAddressAmOut != ''"> and ka_address_am_out = #{kaAddressAmOut}</if>
+            <if test="kaAddressPmIn != null  and kaAddressPmIn != ''"> and ka_address_pm_in = #{kaAddressPmIn}</if>
+            <if test="kaAddressPmOut != null  and kaAddressPmOut != ''"> and ka_address_pm_out = #{kaAddressPmOut}</if>
             <if test="kaTimeAmIn != null "> and ka_time_am_in = #{kaTimeAmIn}</if>
             <if test="kaTimeAmOut != null "> and ka_time_am_out = #{kaTimeAmOut}</if>
             <if test="kaTimePmIn != null "> and ka_time_pm_in = #{kaTimePmIn}</if>
             <if test="kaTimePmOut != null "> and ka_time_pm_out = #{kaTimePmOut}</if>
-            <if test="kaType != null  and kaType != ''"> and ka_type = #{kaType}</if>
+            <if test="kaTypeAmIn != null  and kaTypeAmIn != ''"> and ka_type_am_in = #{kaTypeAmIn}</if>
+            <if test="kaTypeAmOut != null  and kaTypeAmOut != ''"> and ka_type_am_out = #{kaTypeAmOut}</if>
+            <if test="kaTypePmIn != null  and kaTypePmIn != ''"> and ka_type_pm_in = #{kaTypePmIn}</if>
+            <if test="kaTypePmOut != null  and kaTypePmOut != ''"> and ka_type_pm_out = #{kaTypePmOut}</if>
             <if test="kaStatus != null  and kaStatus != ''"> and ka_status = #{kaStatus}</if>
+            <if test="remarkAmIn != null  and remarkAmIn != ''"> and remark_am_in = #{remarkAmIn}</if>
+            <if test="remarkAmOut != null  and remarkAmOut != ''"> and remark_am_out = #{remarkAmOut}</if>
+            <if test="remarkPmIn != null  and remarkPmIn != ''"> and remark_pm_in = #{remarkPmIn}</if>
+            <if test="remarkPmOut != null  and remarkPmOut != ''"> and remark_pm_out = #{remarkPmOut}</if>
         </where>
     </select>
     
@@ -66,51 +91,75 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into kaoqin_record
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="ancestors != null">ancestors,</if>
             <if test="kaYear != null and kaYear != ''">ka_year,</if>
             <if test="kaMonth != null and kaMonth != ''">ka_month,</if>
             <if test="kaDay != null and kaDay != ''">ka_day,</if>
             <if test="kaWeek != null and kaWeek != ''">ka_week,</if>
             <if test="kaTime != null and kaTime != ''">ka_time,</if>
-            <if test="kaAddress != null and kaAddress != ''">ka_address,</if>
+            <if test="kaAddressAmIn != null and kaAddressAmIn != ''">ka_address_am_in,</if>
             <if test="kaLog != null and kaLog != ''">ka_log,</if>
             <if test="kaLat != null and kaLat != ''">ka_lat,</if>
             <if test="kaSort != null and kaSort != ''">ka_sort,</if>
+            <if test="kaAddressAmOut != null">ka_address_am_out,</if>
+            <if test="kaAddressPmIn != null">ka_address_pm_in,</if>
+            <if test="kaAddressPmOut != null">ka_address_pm_out,</if>
             <if test="kaTimeAmIn != null">ka_time_am_in,</if>
             <if test="kaTimeAmOut != null">ka_time_am_out,</if>
             <if test="kaTimePmIn != null">ka_time_pm_in,</if>
             <if test="kaTimePmOut != null">ka_time_pm_out,</if>
-            <if test="kaType != null">ka_type,</if>
+            <if test="kaTypeAmIn != null">ka_type_am_in,</if>
+            <if test="kaTypeAmOut != null">ka_type_am_out,</if>
+            <if test="kaTypePmIn != null">ka_type_pm_in,</if>
+            <if test="kaTypePmOut != null">ka_type_pm_out,</if>
             <if test="kaStatus != null">ka_status,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
-            <if test="remark != null">remark,</if>
+            <if test="remarkAmIn != null">remark_am_in,</if>
+            <if test="remarkAmOut != null">remark_am_out,</if>
+            <if test="remarkPmIn != null">remark_pm_in,</if>
+            <if test="remarkPmOut != null">remark_pm_out,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="ancestors != null">#{ancestors},</if>
             <if test="kaYear != null and kaYear != ''">#{kaYear},</if>
             <if test="kaMonth != null and kaMonth != ''">#{kaMonth},</if>
             <if test="kaDay != null and kaDay != ''">#{kaDay},</if>
             <if test="kaWeek != null and kaWeek != ''">#{kaWeek},</if>
             <if test="kaTime != null and kaTime != ''">#{kaTime},</if>
-            <if test="kaAddress != null and kaAddress != ''">#{kaAddress},</if>
+            <if test="kaAddressAmIn != null and kaAddressAmIn != ''">#{kaAddressAmIn},</if>
             <if test="kaLog != null and kaLog != ''">#{kaLog},</if>
             <if test="kaLat != null and kaLat != ''">#{kaLat},</if>
             <if test="kaSort != null and kaSort != ''">#{kaSort},</if>
+            <if test="kaAddressAmOut != null">#{kaAddressAmOut},</if>
+            <if test="kaAddressPmIn != null">#{kaAddressPmIn},</if>
+            <if test="kaAddressPmOut != null">#{kaAddressPmOut},</if>
             <if test="kaTimeAmIn != null">#{kaTimeAmIn},</if>
             <if test="kaTimeAmOut != null">#{kaTimeAmOut},</if>
             <if test="kaTimePmIn != null">#{kaTimePmIn},</if>
             <if test="kaTimePmOut != null">#{kaTimePmOut},</if>
-            <if test="kaType != null">#{kaType},</if>
+            <if test="kaTypeAmIn != null">#{kaTypeAmIn},</if>
+            <if test="kaTypeAmOut != null">#{kaTypeAmOut},</if>
+            <if test="kaTypePmIn != null">#{kaTypePmIn},</if>
+            <if test="kaTypePmOut != null">#{kaTypePmOut},</if>
             <if test="kaStatus != null">#{kaStatus},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
-            <if test="remark != null">#{remark},</if>
+            <if test="remarkAmIn != null">#{remarkAmIn},</if>
+            <if test="remarkAmOut != null">#{remarkAmOut},</if>
+            <if test="remarkPmIn != null">#{remarkPmIn},</if>
+            <if test="remarkPmOut != null">#{remarkPmOut},</if>
          </trim>
     </insert>
 
@@ -118,27 +167,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update kaoqin_record
         <trim prefix="SET" suffixOverrides=",">
             <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="ancestors != null">ancestors = #{ancestors},</if>
             <if test="kaYear != null and kaYear != ''">ka_year = #{kaYear},</if>
             <if test="kaMonth != null and kaMonth != ''">ka_month = #{kaMonth},</if>
             <if test="kaDay != null and kaDay != ''">ka_day = #{kaDay},</if>
             <if test="kaWeek != null and kaWeek != ''">ka_week = #{kaWeek},</if>
             <if test="kaTime != null and kaTime != ''">ka_time = #{kaTime},</if>
-            <if test="kaAddress != null and kaAddress != ''">ka_address = #{kaAddress},</if>
+            <if test="kaAddressAmIn != null and kaAddressAmIn != ''">ka_address_am_in = #{kaAddressAmIn},</if>
             <if test="kaLog != null and kaLog != ''">ka_log = #{kaLog},</if>
             <if test="kaLat != null and kaLat != ''">ka_lat = #{kaLat},</if>
             <if test="kaSort != null and kaSort != ''">ka_sort = #{kaSort},</if>
+            <if test="kaAddressAmOut != null">ka_address_am_out = #{kaAddressAmOut},</if>
+            <if test="kaAddressPmIn != null">ka_address_pm_in = #{kaAddressPmIn},</if>
+            <if test="kaAddressPmOut != null">ka_address_pm_out = #{kaAddressPmOut},</if>
             <if test="kaTimeAmIn != null">ka_time_am_in = #{kaTimeAmIn},</if>
             <if test="kaTimeAmOut != null">ka_time_am_out = #{kaTimeAmOut},</if>
             <if test="kaTimePmIn != null">ka_time_pm_in = #{kaTimePmIn},</if>
             <if test="kaTimePmOut != null">ka_time_pm_out = #{kaTimePmOut},</if>
-            <if test="kaType != null">ka_type = #{kaType},</if>
+            <if test="kaTypeAmIn != null">ka_type_am_in = #{kaTypeAmIn},</if>
+            <if test="kaTypeAmOut != null">ka_type_am_out = #{kaTypeAmOut},</if>
+            <if test="kaTypePmIn != null">ka_type_pm_in = #{kaTypePmIn},</if>
+            <if test="kaTypePmOut != null">ka_type_pm_out = #{kaTypePmOut},</if>
             <if test="kaStatus != null">ka_status = #{kaStatus},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
+            <if test="remarkAmIn != null">remark_am_in = #{remarkAmIn},</if>
+            <if test="remarkAmOut != null">remark_am_out = #{remarkAmOut},</if>
+            <if test="remarkPmIn != null">remark_pm_in = #{remarkPmIn},</if>
+            <if test="remarkPmOut != null">remark_pm_out = #{remarkPmOut},</if>
         </trim>
         where record_id = #{recordId}
     </update>