钉钉考勤

This commit is contained in:
张松
2025-12-01 11:25:40 +08:00
parent 824f35e636
commit 001607b649
10 changed files with 472 additions and 0 deletions

View File

@@ -15,4 +15,6 @@ import java.util.List;
public interface ShopConfigService extends IService<ShopConfig> {
void editStatusByShopIdList(Long mainShopId, Integer isEnable, boolean onyUpValid, String name, String useShopType, List<Long> shopIdList);
boolean editConfig(Long shopId, ShopConfig shopConfig);
}

View File

@@ -0,0 +1,12 @@
package com.czg.market.dto;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
@Data
public class AttendanceConfigDTO {
@NotBlank
private String dingAppKey;
@NotBlank
private String dingAppSecret;
}

View File

@@ -0,0 +1,9 @@
package com.czg.market.service;
import com.czg.market.vo.DingAttendanceStatsVO;
import java.util.ArrayList;
public interface AttendanceService {
ArrayList<DingAttendanceStatsVO> list(Long shopId, Integer page, Integer size, String name, String startTime, String endTime);
}

View File

@@ -0,0 +1,60 @@
package com.czg.market.vo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class DingAttendanceStatsVO {
/** 出勤天数 */
private String attendDays;
/** 休息天数 */
private String restDays;
/** 工作时长(小时/分钟,可自行约定) */
private String workDuration;
/** 迟到次数 */
private String lateCount;
/** 迟到时长(分钟) */
private String lateDuration;
/** 应出勤天数 */
private String shouldAttendDays;
/**
* 用户名
*/
private String name;
private String userId;
/**
* 用户是否有有效考勤数据
*/
private boolean isActive;
public void setValByName(String name, String val) {
switch (name) {
case "出勤天数":
this.attendDays = val;
break;
case "休息天数":
this.restDays = val;
break;
case "工作时长":
this.workDuration = val;
break;
case "迟到次数":
this.lateCount = val;
break;
case "迟到时长":
this.lateDuration = val;
break;
case "应出勤天数":
this.shouldAttendDays = val;
break;
}
}
}

View File

@@ -0,0 +1,73 @@
package com.czg.market.vo;
import lombok.Data;
import java.util.List;
@Data
public class DingUserVO{
/**
* 部门排序号JSON 字段dept_order
*/
private Long deptOrder;
/**
* 是否为部门负责人JSON 字段leader
*/
private Boolean leader;
/**
* 是否为老板JSON 字段boss
*/
private Boolean boss;
/**
* 钉钉统一标识JSON 字段unionid
*/
private String unionid;
/**
* 是否为专属账号JSON 字段exclusive_account
*/
private Boolean exclusiveAccount;
/**
* 账号是否激活JSON 字段active
*/
private Boolean active;
/**
* 是否为管理员JSON 字段admin
*/
private Boolean admin;
/**
* 头像 URLJSON 字段avatar
*/
private String avatar;
/**
* 是否隐藏手机号JSON 字段hide_mobile
*/
private Boolean hideMobile;
/**
* 职位JSON 字段title
*/
private String title;
/**
* 钉钉用户 IDJSON 字段userid
*/
private String userid;
/**
* 用户名JSON 字段name
*/
private String name;
/**
* 所属部门 ID 列表JSON 字段dept_id_list
*/
private List<Long> deptIdList;
}