Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90c60a4910 |
@@ -1,15 +1,3 @@
|
||||
### 校园旧版
|
||||
|
||||
攀枝花东区-缴费分支
|
||||
对接新app-MAGAPP
|
||||
|
||||
目前暂时去除rabbitmq和es
|
||||
|
||||
目前需要部署:
|
||||
auth,端口:8101 中间件: ok
|
||||
gateway,端口:8300 ok
|
||||
mall,端口:9508 ok
|
||||
school,端口:9503 中间件:rabbitmq
|
||||
user,端口:9501 中间件: ok
|
||||
job,端口:8204
|
||||
system,端口:8201 中间件:es、rabbitmq
|
||||
攀枝花东区-缴费分支
|
||||
+1
-9
@@ -178,17 +178,9 @@ public class SocialLoginController {
|
||||
return new FebsResponse().data(socialLoginService.appLogin(areaId, schoolId, mobile, userId, type));
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("app/getMagUserInfo")
|
||||
//@OperationLog(module = ModuleName.AUTH, methods = "获取第三方app(mag)用户信息,主要是获取手机号")
|
||||
public FebsResponse getMagUserInfo(
|
||||
@ApiParam("第三方app(mag)用户token") String appUserToken) {
|
||||
return new FebsResponse().data(socialLoginService.getMagUserInfo(appUserToken));
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("wxpublic/login")
|
||||
//@OperationLog(module = ModuleName.AUTH, methods = "微信登录")
|
||||
//@OperationLog(module = ModuleName.AUTH, methods = "app登录")
|
||||
public FebsResponse wxpublicLogin(String code, String appId,
|
||||
@ApiParam("0-教师,1-家长") Integer type,
|
||||
Long schoolId, String mobile) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.yida.data.auth.service;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.yida.data.auth.entity.BindUser;
|
||||
import com.yida.data.common.core.entity.FebsResponse;
|
||||
import com.yida.data.common.core.entity.system.UserConnection;
|
||||
@@ -106,6 +105,4 @@ public interface SocialLoginService {
|
||||
Map<String, Object> wxpublicLogin(String code, String appId, Integer type, Long schoolId, String mobile);
|
||||
|
||||
Map<String, Object> h5Login(Long schoolId, String mobile, Integer type);
|
||||
|
||||
JSONObject getMagUserInfo(String appUserToken);
|
||||
}
|
||||
|
||||
+15
-26
@@ -17,7 +17,10 @@ import com.yida.data.common.core.entity.system.*;
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.common.core.enums.RoleName;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.utils.*;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.common.core.utils.WxPublicUtil;
|
||||
import com.yida.data.common.core.utils.WxUtil;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.school.feign.transaction.RemoteStudentApplyService;
|
||||
import com.yida.data.system.feign.RemoteDeptService;
|
||||
@@ -35,7 +38,6 @@ import me.zhyd.oauth.model.AuthResponse;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import me.zhyd.oauth.request.AuthRequest;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
||||
import org.springframework.security.oauth2.provider.ClientDetails;
|
||||
@@ -44,7 +46,10 @@ import org.springframework.security.oauth2.provider.password.ResourceOwnerPasswo
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author MrBird
|
||||
@@ -80,17 +85,6 @@ public class SocialLoginServiceImpl implements SocialLoginService {
|
||||
private final RemoteStudentApplyService remoteStudentApplyService;
|
||||
private final RedisService redisService;
|
||||
|
||||
/**
|
||||
* 第三方app(mag)域名
|
||||
*/
|
||||
@Value("${febs.magAppUrl}")
|
||||
private String magAppUrl;
|
||||
/**
|
||||
* 第三方app(mag)secret密钥
|
||||
*/
|
||||
@Value("${febs.magAppSecret}")
|
||||
private String magAppSecret;
|
||||
|
||||
@Override
|
||||
public AuthRequest renderAuth(String oauthType) throws FebsException {
|
||||
return factory.get(getAuthSource(oauthType));
|
||||
@@ -318,7 +312,7 @@ public class SocialLoginServiceImpl implements SocialLoginService {
|
||||
systemUser.setDeptId(type == 0 ? teacher.getSchoolId() : schoolId);
|
||||
systemUser.setRoleName(type == 0 ? RoleName.STAFF.getName() : RoleName.PARENT.getName());
|
||||
systemUser.setUserType(type == 0 ? 1 : 0);
|
||||
// systemUser.setYidaAppUserId(userId);
|
||||
systemUser.setYidaAppUserId(userId);
|
||||
userManager.registUser(systemUser);
|
||||
} else if (!systemUser.getRoleName().contains(type == 0 ? RoleName.STAFF.getName() : RoleName.PARENT.getName())) {
|
||||
Role role = roleMapper.selectOne(Wrappers.<Role>lambdaQuery()
|
||||
@@ -327,12 +321,12 @@ public class SocialLoginServiceImpl implements SocialLoginService {
|
||||
systemUser.setRoleId(systemUser.getRoleId() + "," + role.getRoleId());
|
||||
systemUser.setRoleName(systemUser.getRoleName() + "," + role.getRoleName());
|
||||
}
|
||||
// // 用户未绑定appid
|
||||
// if (type == 0 && teacher.getYidaAppUserId() == null) {
|
||||
// remoteTeacherService.saveYidaAppUserId(teacher.getId(), userId);
|
||||
// } else if (type == 1 && parent.getParentYidaAppId() == null) {
|
||||
// remoteStudentService.saveYidaAppUserId(parent.getParentId(), userId);
|
||||
// }
|
||||
// 用户未绑定appid
|
||||
if (type == 0 && teacher.getYidaAppUserId() == null) {
|
||||
remoteTeacherService.saveYidaAppUserId(teacher.getId(), userId);
|
||||
} else if (type == 1 && parent.getParentYidaAppId() == null) {
|
||||
remoteStudentService.saveYidaAppUserId(parent.getParentId(), userId);
|
||||
}
|
||||
// 登录返回token和用户信息
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
res.put("token", getOauth2AccessToken(systemUser));
|
||||
@@ -585,9 +579,4 @@ public class SocialLoginServiceImpl implements SocialLoginService {
|
||||
res.put("identity", type == 0 ? teacher : parent);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getMagUserInfo(String appUserToken) {
|
||||
return MagAppUtil.getUserInfo(magAppUrl, magAppSecret, appUserToken);
|
||||
}
|
||||
}
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package com.yida.data.common.core.constant;
|
||||
|
||||
/**
|
||||
* mag-app常量
|
||||
* 类
|
||||
* 多云教研室
|
||||
*
|
||||
* @author ZYJ
|
||||
*/
|
||||
public interface MagAppConstant {
|
||||
|
||||
/**
|
||||
* 获取用户信息 get请求
|
||||
* token=用户token, secret=appSecret
|
||||
* 若需要返回用户手机号(app后台需要勾选“用户授权(包含手机号)”权限)
|
||||
*/
|
||||
String GET_USER_INFO = "/mag/cloud/cloud/getUserInfo";
|
||||
}
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
package com.yida.data.common.core.entity.apply;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EduStudentApply {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("del_flag")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_date", fill = FieldFill.INSERT)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@TableField(value = "update_date", fill = FieldFill.UPDATE)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
private Long studentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String studentName;
|
||||
|
||||
private String applyCode;
|
||||
|
||||
@ApiModelProperty("有效期开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("有效期结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
package com.yida.data.common.core.entity.constant;
|
||||
|
||||
public interface HaiqingConstant {
|
||||
/**
|
||||
* 增改人员消息回调返回类型
|
||||
*/
|
||||
String EDIT_PERSON_CALL = "EditPerson-Ack";
|
||||
|
||||
/**
|
||||
* 批量增加人员返回
|
||||
*/
|
||||
String ADD_PERSON_BATCH_CALL = "AddPersons-Ack";
|
||||
|
||||
/**
|
||||
* 批量修改人员返回
|
||||
*/
|
||||
String UPDATE_PERSON_BATCH_CALL = "EditPersons-Ack";
|
||||
|
||||
/**
|
||||
* 删除人员回调信息
|
||||
*/
|
||||
String DELETE_PERSON_CALL = "DelPerson";
|
||||
|
||||
/**
|
||||
* 批量删除人员信息回调
|
||||
*/
|
||||
String DELETE_PERSON_BATCH_CALL = "DeletePersons-Ack";
|
||||
|
||||
/**
|
||||
* 接收认证人员信息
|
||||
*/
|
||||
String REC_PERSON = "RecPush";
|
||||
|
||||
/**
|
||||
* 心跳消息
|
||||
*/
|
||||
String HEARTBEAT = "HeartBeat";
|
||||
/**
|
||||
* 远程开门返回信息
|
||||
*/
|
||||
String UNLOCK_ACK = "Unlock-Ack";
|
||||
/**
|
||||
* 设置系统时间
|
||||
*/
|
||||
String SET_SYS_TIME_ACK = "SetSysTime-Ack";
|
||||
|
||||
/**
|
||||
* 设备上线通知
|
||||
*/
|
||||
String ONLINE = "Online";
|
||||
|
||||
}
|
||||
-3
@@ -33,9 +33,6 @@ public class EduParent {
|
||||
@ApiModelProperty("易达app用户id")
|
||||
private String yidaAppUserId;
|
||||
|
||||
@ApiModelProperty("mag-app用户id")
|
||||
private String magAppUserId;
|
||||
|
||||
@ApiModelProperty("微信公众号openId")
|
||||
private String wxPublicOpenId;
|
||||
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
package com.yida.data.common.core.utils;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.yida.data.common.core.constant.MagAppConstant;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* mag-app工具类
|
||||
* 多云教研室
|
||||
*
|
||||
* @author ZYJ
|
||||
*/
|
||||
@Slf4j
|
||||
public class MagAppUtil {
|
||||
|
||||
/**
|
||||
* 返回的status状态码json字段名称
|
||||
*/
|
||||
public static final String STATUS_NAME = "code";
|
||||
|
||||
/**
|
||||
* 返回的data数据json字段名称
|
||||
*/
|
||||
private static final String DATA_NAME = "data";
|
||||
|
||||
/**
|
||||
* 返回的msg数据json字段名称
|
||||
*/
|
||||
private static final String MSG_NAME = "msg";
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @param magAppUrl mag-app地址
|
||||
* @param magAppSecret mag-app密钥
|
||||
* @param appUserToken app用户token
|
||||
*/
|
||||
public static JSONObject getUserInfo(String magAppUrl, String magAppSecret, String appUserToken) {
|
||||
String url = magAppUrl + MagAppConstant.GET_USER_INFO;
|
||||
JSONObject body = JSONUtil.createObj().set("token", appUserToken).set("secret", magAppSecret);
|
||||
String res = HttpUtil.get(url, body);
|
||||
JSONObject resJson = JSONUtil.parseObj(res);
|
||||
log.info("mag-app获取用户信息,res:[{}],params:[{}]", res, body);
|
||||
if (!resJson.getBool("success")) {
|
||||
throw new FebsException(resJson.getStr(MSG_NAME));
|
||||
}
|
||||
return JSONUtil.parseObj(resJson.getStr(DATA_NAME));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>edu-attendance</artifactId>
|
||||
<groupId>com.yida.data.attendance</groupId>
|
||||
<version>2.2-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>edu-attendance-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
public class AttendanceResultPageDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("宿舍楼id")
|
||||
private Long dormId;
|
||||
|
||||
@ApiModelProperty("寝室id")
|
||||
private Long dormRoomId;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("规则id")
|
||||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty("校区id")
|
||||
private Long campusId;
|
||||
|
||||
@ApiModelProperty("学段id")
|
||||
private Long sectionId;
|
||||
|
||||
@ApiModelProperty("年级id")
|
||||
private Long gradeId;
|
||||
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("姓名/学号")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("类型,0-校门,1-宿舍(导出数据时传)")
|
||||
private Integer type;
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DealRecordDTO {
|
||||
/**
|
||||
* 设备sn号
|
||||
*/
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 考勤时间
|
||||
*/
|
||||
private String date;
|
||||
|
||||
/**
|
||||
* 考勤用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户类型,0-学生,1-教职工
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 设备方用户唯一标识
|
||||
*/
|
||||
private String userFlag;
|
||||
|
||||
/**
|
||||
* 考勤图片
|
||||
*/
|
||||
private String picUrl;
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DevicePage<T> extends Page<T> {
|
||||
|
||||
public DevicePage(Integer pageNum, Integer pageSize) {
|
||||
super(pageNum, pageSize);
|
||||
}
|
||||
|
||||
private Integer onlineNumber;
|
||||
|
||||
private Integer offlineNumber;
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ApiModel("分页查询进出记录条件")
|
||||
@Data
|
||||
public class InOutPageDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("宿舍楼id")
|
||||
private Long dormId;
|
||||
|
||||
@ApiModelProperty("校区id")
|
||||
private Long campusId;
|
||||
|
||||
@ApiModelProperty("学段id")
|
||||
private Long sectionId;
|
||||
|
||||
@ApiModelProperty("年级id")
|
||||
private Long gradeId;
|
||||
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("姓名/学号")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("类型,0-校门,1-宿舍(导出数据时传)")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.yida.data.common.core.entity.user.EduUserFace;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class IssuedFaceDTO {
|
||||
|
||||
/**
|
||||
* 人脸列表
|
||||
*/
|
||||
private List<EduUserFace> userFaceList;
|
||||
|
||||
/**
|
||||
* 设备id列表
|
||||
*/
|
||||
private List<Long> deviceList;
|
||||
|
||||
@ApiModelProperty("下发类型,0-添加,1-修改")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 人脸组id
|
||||
*/
|
||||
private Long groupId;
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ListRecordDTO {
|
||||
|
||||
@ApiModelProperty("发生日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate createDate;
|
||||
|
||||
@ApiModelProperty("时段id")
|
||||
private Long ruleTimeId;
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("考勤类型,0-校门,1-宿舍")
|
||||
private Integer zone;
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ApiModel("查询考勤记录条件")
|
||||
@Data
|
||||
public class ListResultStatisticsDTO {
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
LocalDate date;
|
||||
Long schoolId;
|
||||
Long campusId;
|
||||
Long gradeId;
|
||||
Long classId;
|
||||
Long dormId;
|
||||
@ApiModelProperty("考勤类型,0-上学,1-归寝")
|
||||
Integer type;
|
||||
@ApiModelProperty("时段(校门考勤用)")
|
||||
Long timeId;
|
||||
@ApiModelProperty("时段(宿舍考勤用),1-中午,2-晚上")
|
||||
Integer duration;
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ListStaffResultDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("管理员的教职工id")
|
||||
private Long adminStaffId;
|
||||
|
||||
@ApiModelProperty("考勤结果 (迟到、早退可筛选到迟到早退记录)")
|
||||
private Integer status;
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ApiModel("查询学生考勤记录")
|
||||
@Data
|
||||
public class ListStudentResultDTO {
|
||||
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("0-正常,1-迟到,2-早退,3-旷课,4-晚归,6-旷宿,8-请假")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("规则时段id")
|
||||
private Long timeId;
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RemoveFaceDTO {
|
||||
private List<String> deviceFactoryUserId;
|
||||
|
||||
private List<Long> deviceList;
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.yida.data.attendance.vo.ConflictRuleVO;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRule;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("保存或修改规则")
|
||||
public class SaveRuleDTO {
|
||||
|
||||
@ApiModelProperty("规则")
|
||||
private EduAttendanceRule rule;
|
||||
|
||||
|
||||
@ApiModelProperty("冲突的规则")
|
||||
private List<ConflictRuleVO> conflictRule;
|
||||
}
|
||||
-141
@@ -1,141 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.entity.attendance.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ccl
|
||||
*/
|
||||
@Data
|
||||
public class StaffRuleDTO {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private Long createId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 考勤规则名称
|
||||
*/
|
||||
@ApiModelProperty(value = "考勤规则名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 0-固定上下班时间
|
||||
*/
|
||||
@ApiModelProperty(value = "0-固定上下班时间")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 打卡日期,1-周一,2-周二....多个用','连接
|
||||
*/
|
||||
@ApiModelProperty(value = "打卡日期,1-周一,2-周二....多个用','连接")
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 节假日是否打卡,0-是,1-否
|
||||
*/
|
||||
@ApiModelProperty(value = "节假日是否打卡,0-是,1-否")
|
||||
private Integer holidayAttendance;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
@ApiModelProperty(value = "学校id")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 管理员打卡规则内容权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡规则内容权限,0-无,1-有")
|
||||
private Integer roleRule;
|
||||
|
||||
/**
|
||||
* 管理员打卡人员与白名单权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡人员与白名单权限,0-无,1-有")
|
||||
private Integer roleUser;
|
||||
|
||||
/**
|
||||
* 管理员节假日与特殊日期权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员节假日与特殊日期权限,0-无,1-有")
|
||||
private Integer roleDate;
|
||||
|
||||
/**
|
||||
* 管理员打卡提醒权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡提醒权限,0-无,1-有")
|
||||
private Integer roleRemind;
|
||||
|
||||
@ApiModelProperty("使用人员,可以是部门")
|
||||
private List<EduAttendanceStaffRuleObj> objStaffs;
|
||||
|
||||
@ApiModelProperty("管理人员")
|
||||
private List<EduAttendanceStaffRuleAdmin> adminStaffs;
|
||||
|
||||
@ApiModelProperty("使用职工")
|
||||
private List<EduAttendanceStaffRuleStaff> ruleStaffs;
|
||||
|
||||
@ApiModelProperty("白名单")
|
||||
private List<EduAttendanceStaffRuleWhiteList> whiteList;
|
||||
|
||||
@ApiModelProperty("打卡时段")
|
||||
private List<EduAttendanceStaffRuleTime> ruleTimes;
|
||||
|
||||
@ApiModelProperty("特殊时段")
|
||||
private List<EduAttendanceStaffRuleSpecialDate> specialDate;
|
||||
|
||||
@ApiModelProperty("管理范围")
|
||||
private List<EduAttendanceStaffRuleAdminRange> adminRanges;
|
||||
|
||||
@ApiModelProperty("打卡提醒")
|
||||
private List<EduAttendanceStaffRuleRemind> ruleReminds;
|
||||
|
||||
@ApiModelProperty("规则关联设备id")
|
||||
private List<Long> ruleDevices;
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StasticStaffExcepByDayDTO {
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("教职工id")
|
||||
private Long staffId;
|
||||
|
||||
private List<Long> schoolIds;
|
||||
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.yida.data.attendance.dto;
|
||||
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StasticStaffResultDTO extends BaseDTO {
|
||||
@ApiModelProperty("日期,yyyy-MM-dd")
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty("年月,yyyy-MM")
|
||||
private String yearMonth;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty("职工姓名/手机号")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("规则id")
|
||||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty("考勤结果")
|
||||
private Integer status;
|
||||
}
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
package com.yida.data.attendance.fallback;
|
||||
|
||||
import com.yida.data.attendance.dto.IssuedFaceDTO;
|
||||
import com.yida.data.attendance.dto.RemoveFaceDTO;
|
||||
import com.yida.data.attendance.feign.RemoteAttendanceDeviceService;
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDeviceGroup;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* RemoteAttendanceDeviceService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteAttendanceDeviceServiceFallback implements FallbackFactory<RemoteAttendanceDeviceService> {
|
||||
|
||||
@Override
|
||||
public RemoteAttendanceDeviceService create(Throwable throwable) {
|
||||
log.error("RemoteAttendanceDeviceService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteAttendanceDeviceService() {
|
||||
@Override
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceBySchool(Long schoolId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceByType(String type) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发人脸到设备
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public ResultBean issuedFace(IssuedFaceDTO dto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备中的人脸
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public ResultBean removeFace(RemoveFaceDTO dto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备组中的设备
|
||||
*
|
||||
* @param groupIds
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceByGroup(Long[] groupIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询设备
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceById(Long[] ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询设备组
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<List<EduAttendanceDeviceGroup>> listDeviceGroupById(Long[] ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新设备在线状态
|
||||
*/
|
||||
@Override
|
||||
public ResultBean updateDeviceStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校时所有设备
|
||||
*/
|
||||
@Override
|
||||
public ResultBean timingAllDevice() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.attendance.fallback;
|
||||
|
||||
import com.yida.data.attendance.feign.RemoteAttendanceNoticeService;
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceNotice;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteAttendanceNoticeService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteAttendanceNoticeServiceFallback implements FallbackFactory<RemoteAttendanceNoticeService> {
|
||||
|
||||
@Override
|
||||
public RemoteAttendanceNoticeService create(Throwable throwable) {
|
||||
log.error("RemoteAttendanceNoticeService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteAttendanceNoticeService() {
|
||||
@Override
|
||||
public ResultBean saveNotice(EduAttendanceNotice notice) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
package com.yida.data.attendance.fallback;
|
||||
|
||||
import com.yida.data.attendance.feign.RemoteAttendanceResultService;
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteAttendanceResultService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteAttendanceResultServiceFallback implements FallbackFactory<RemoteAttendanceResultService> {
|
||||
|
||||
@Override
|
||||
public RemoteAttendanceResultService create(Throwable throwable) {
|
||||
log.error("RemoteAttendanceResultService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteAttendanceResultService() {
|
||||
/**
|
||||
* 推送未到记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean pushNotArriveMsg() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存未到记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean dealAttendanceResult() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
package com.yida.data.attendance.fallback;
|
||||
|
||||
import com.yida.data.attendance.feign.RemoteAttendanceRuleService;
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteAttendanceRuleService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteAttendanceRuleServiceFallback implements FallbackFactory<RemoteAttendanceRuleService> {
|
||||
|
||||
@Override
|
||||
public RemoteAttendanceRuleService create(Throwable throwable) {
|
||||
log.error("RemoteAttendanceRuleService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteAttendanceRuleService() {
|
||||
/**
|
||||
* 更新规则状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean updateRuleStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒打卡
|
||||
*/
|
||||
@Override
|
||||
public ResultBean remindStaff() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理记录到结果表
|
||||
*/
|
||||
@Override
|
||||
public ResultBean staffRecord() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
package com.yida.data.attendance.feign;
|
||||
|
||||
import com.yida.data.attendance.dto.IssuedFaceDTO;
|
||||
import com.yida.data.attendance.dto.RemoveFaceDTO;
|
||||
import com.yida.data.attendance.fallback.RemoteAttendanceDeviceServiceFallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDeviceGroup;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_ATTENDANCE, contextId = "attendanceDeviceServiceClient",
|
||||
fallbackFactory = RemoteAttendanceDeviceServiceFallback.class)
|
||||
public interface RemoteAttendanceDeviceService {
|
||||
|
||||
@GetMapping("/device/listDeviceBySchool")
|
||||
ResultBean<List<EduAttendanceDevice>> listDeviceBySchool(@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
@GetMapping("/in/device/listDeviceByType")
|
||||
ResultBean<List<EduAttendanceDevice>> listDeviceByType(@RequestParam("type") String type);
|
||||
|
||||
/**
|
||||
* 下发人脸到设备
|
||||
*/
|
||||
@PostMapping("/device/issuedFace")
|
||||
ResultBean issuedFace(@RequestBody IssuedFaceDTO dto);
|
||||
|
||||
/**
|
||||
* 删除设备中的人脸
|
||||
*/
|
||||
@PostMapping("/device/removeFace")
|
||||
ResultBean removeFace(@RequestBody RemoveFaceDTO dto);
|
||||
|
||||
/**
|
||||
* 查询设备组中的设备
|
||||
*/
|
||||
@GetMapping("/deviceGroup/listDeviceByGroup")
|
||||
ResultBean<List<EduAttendanceDevice>> listDeviceByGroup(@RequestParam("groupIds") Long[] groupIds);
|
||||
|
||||
/**
|
||||
* 根据id查询设备
|
||||
*/
|
||||
@GetMapping("/device/listDeviceById")
|
||||
ResultBean<List<EduAttendanceDevice>> listDeviceById(@RequestParam("ids") Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据id查询设备组
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/deviceGroup/listDeviceGroupById")
|
||||
ResultBean<List<EduAttendanceDeviceGroup>> listDeviceGroupById(@RequestParam("ids") Long[] ids);
|
||||
|
||||
/**
|
||||
* 更新设备在线状态
|
||||
*/
|
||||
@GetMapping("/in/device/updateDeviceStatus")
|
||||
ResultBean updateDeviceStatus();
|
||||
|
||||
/**
|
||||
* 校时所有设备
|
||||
*/
|
||||
@GetMapping("/in/device/timingAllDevice")
|
||||
ResultBean timingAllDevice();
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.yida.data.attendance.feign;
|
||||
|
||||
import com.yida.data.attendance.fallback.RemoteAttendanceNoticeServiceFallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceNotice;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_ATTENDANCE, contextId = "attendanceNoticeServiceClient",
|
||||
fallbackFactory = RemoteAttendanceNoticeServiceFallback.class)
|
||||
public interface RemoteAttendanceNoticeService {
|
||||
|
||||
@GetMapping("/in/notice/saveNotice")
|
||||
ResultBean saveNotice(@RequestBody EduAttendanceNotice notice);
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.yida.data.attendance.feign;
|
||||
|
||||
import com.yida.data.attendance.fallback.RemoteAttendanceResultServiceFallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_ATTENDANCE, contextId = "attendanceNotArriveServiceClient",
|
||||
fallbackFactory = RemoteAttendanceResultServiceFallback.class)
|
||||
public interface RemoteAttendanceResultService {
|
||||
|
||||
/**
|
||||
* 推送未到记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/in/result/pushNotArriveMsg")
|
||||
ResultBean pushNotArriveMsg();
|
||||
|
||||
|
||||
/**
|
||||
* 保存未到记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/in/result/dealAttendanceResult")
|
||||
ResultBean dealAttendanceResult();
|
||||
}
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.yida.data.attendance.feign;
|
||||
|
||||
import com.yida.data.attendance.fallback.RemoteAttendanceRuleServiceFallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_ATTENDANCE, contextId = "attendanceRuleServiceClient",
|
||||
fallbackFactory = RemoteAttendanceRuleServiceFallback.class)
|
||||
public interface RemoteAttendanceRuleService {
|
||||
|
||||
/**
|
||||
* 更新规则状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/in/rule/updateRuleStatus")
|
||||
ResultBean updateRuleStatus();
|
||||
|
||||
/**
|
||||
* 提醒打卡
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
@GetMapping("/in/staffRecord/remindStaff")
|
||||
ResultBean remindStaff();
|
||||
|
||||
/**
|
||||
* 处理记录到结果表
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
@GetMapping("/in/staffRecord/staffRecord")
|
||||
ResultBean staffRecord();
|
||||
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRecord;
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("进出记录处理结果")
|
||||
@Data
|
||||
public class AttendanceResVO {
|
||||
|
||||
@ApiModelProperty("产生的进出记录")
|
||||
private EduAttendanceRecord record;
|
||||
|
||||
@ApiModelProperty("进出的学生")
|
||||
private EduStudent student;
|
||||
|
||||
@ApiModelProperty("进出的职工")
|
||||
private EduStaff staff;
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.converter.LocalDateTimeConverter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ApiModel("宿舍考勤记录")
|
||||
@Data
|
||||
public class AttendanceResultDormVO extends AttendanceResultVO {
|
||||
|
||||
@ApiModelProperty("宿舍寝室名称")
|
||||
@ExcelProperty(order = 4, value = "宿舍寝室名称")
|
||||
private String dormRoomName;
|
||||
|
||||
@ApiModelProperty("核查状态")
|
||||
@ExcelProperty(order = 9, value = "核查状态")
|
||||
private String verify;
|
||||
|
||||
@ApiModelProperty("核查时间")
|
||||
@ExcelProperty(order = 10, value = "核查时间", converter = LocalDateTimeConverter.class)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime verifyTime;
|
||||
|
||||
@ApiModelProperty("核查人")
|
||||
@ExcelIgnore
|
||||
private Long verifyId;
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤推送封装类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/7/15
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceResultPushVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3074698159807729093L;
|
||||
|
||||
/**
|
||||
* 职工信息
|
||||
*/
|
||||
private EduStaff eduStaff;
|
||||
|
||||
/**
|
||||
* 推送消息记录
|
||||
*/
|
||||
private List<Long> resultIds;
|
||||
}
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.yida.data.common.core.converter.LocalDateConverter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("考勤记录分页记录")
|
||||
@Data
|
||||
public class AttendanceResultVO {
|
||||
|
||||
@ApiModelProperty("校区名称")
|
||||
@ExcelProperty(order = 0, value = "校区")
|
||||
private String campusName;
|
||||
|
||||
@ApiModelProperty("年级班级")
|
||||
@ExcelProperty(order = 1, value = "年级班级")
|
||||
private String gradeClass;
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
@ExcelIgnore
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
@ExcelProperty(order = 2, value = "姓名")
|
||||
private String stuName;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
@ExcelProperty(order = 3, value = "学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
@ExcelProperty(order = 5, value = "考勤日期", converter = LocalDateConverter.class)
|
||||
private LocalDate attendanceDate;
|
||||
|
||||
@ApiModelProperty("考勤规则id")
|
||||
@ExcelIgnore
|
||||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty("考勤规则名称")
|
||||
@ExcelProperty(order = 6, value = "考勤规则")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("考勤时段")
|
||||
@ExcelProperty(order = 7, value = "考勤时段")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty("考勤结果")
|
||||
@ExcelProperty(order = 8, value = "考勤结果")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
@ExcelIgnore
|
||||
private String picUrl;
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("冲突规则")
|
||||
public class ConflictRuleVO {
|
||||
@ApiModelProperty("规则Id")
|
||||
private Long ruleId;
|
||||
@ApiModelProperty("规则名称")
|
||||
private String ruleName;
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
}
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountVO {
|
||||
|
||||
@ApiModelProperty("迟到数")
|
||||
private Integer late;
|
||||
|
||||
@ApiModelProperty("早退数")
|
||||
private Integer leave;
|
||||
|
||||
@ApiModelProperty("未到数")
|
||||
private Integer notArrive;
|
||||
|
||||
@ApiModelProperty("晚归数")
|
||||
private Integer dormLate;
|
||||
|
||||
@ApiModelProperty("旷宿数")
|
||||
private Integer dormNotArrive;
|
||||
|
||||
@ApiModelProperty("请假数量")
|
||||
private Integer request;
|
||||
|
||||
@ApiModelProperty("正常数")
|
||||
private Integer normal;
|
||||
|
||||
@ApiModelProperty("异常数")
|
||||
private Integer excep;
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 设备数量统计返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2021/10/8
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "DeviceNumberVO", description = "设备数量统计返回类")
|
||||
public class DeviceNumberVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7261215589760191372L;
|
||||
|
||||
@ApiModelProperty(value = "设备总数量")
|
||||
private Long totalNumber;
|
||||
|
||||
@ApiModelProperty(value = "在线设备数量")
|
||||
private Long onlineNumber;
|
||||
|
||||
@ApiModelProperty(value = "离线设备数量")
|
||||
private Long offlineNumber;
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceOrDeviceGroupVO {
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("0-设备,1-设备组")
|
||||
private Integer type;
|
||||
|
||||
private String name;
|
||||
}
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("设备信息")
|
||||
@Data
|
||||
public class DeviceVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("设备编号")
|
||||
private String sn;
|
||||
|
||||
@ApiModelProperty("设备mac地址")
|
||||
private String macAddress;
|
||||
|
||||
@ApiModelProperty("设备厂商")
|
||||
private String deviceType;
|
||||
|
||||
@ApiModelProperty("ip")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("学校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty("区域类型,0-进门,1-出门")
|
||||
private Integer zoneScope;
|
||||
|
||||
@ApiModelProperty("0-校门,1-宿舍")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("设备在线状态,0-在线,1-未在线")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty("分组名称")
|
||||
private String groupName;
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExportDormRateVO {
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@ExcelProperty(value = "日期", order = 0)
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty("校区")
|
||||
// @ExcelProperty(value = "校区", order = 2)
|
||||
@ExcelIgnore
|
||||
private String campus;
|
||||
|
||||
@ApiModelProperty("年级班级")
|
||||
@ExcelProperty(value = "年级班级/宿舍楼", order = 3)
|
||||
private String gradeClass;
|
||||
|
||||
@ApiModelProperty("总人数")
|
||||
@ExcelProperty(value = "总人数", order = 4)
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty("归寝率")
|
||||
@ExcelProperty(value = "归寝率", order = 5)
|
||||
private Double rate;
|
||||
|
||||
@ApiModelProperty("晚归")
|
||||
@ExcelProperty(value = {"考勤结果", "晚归"}, order = 6)
|
||||
private Integer late;
|
||||
|
||||
@ApiModelProperty("旷宿")
|
||||
@ExcelProperty(value = {"考勤结果", "旷宿"}, order = 7)
|
||||
private Integer notArrive;
|
||||
|
||||
@ApiModelProperty("正常")
|
||||
@ExcelProperty(value = {"考勤结果", "正常"}, order = 8)
|
||||
private Integer normal;
|
||||
}
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("导出校门考勤率排名")
|
||||
@Data
|
||||
public class ExportSchoolRateVO {
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@ExcelProperty(value = "日期", order = 0)
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty("时段")
|
||||
@ExcelIgnore
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty("校区")
|
||||
@ExcelProperty(value = "校区", order = 2)
|
||||
private String campus;
|
||||
|
||||
@ApiModelProperty("年级班级")
|
||||
@ExcelProperty(value = "年级班级", order = 3)
|
||||
private String gradeClass;
|
||||
|
||||
@ApiModelProperty("总人数")
|
||||
@ExcelProperty(value = "总人数", order = 4)
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty("出勤率")
|
||||
@ExcelProperty(value = "出勤率", order = 5)
|
||||
private Double rate;
|
||||
|
||||
@ApiModelProperty("迟到")
|
||||
@ExcelProperty(value = {"考勤结果", "迟到"}, order = 6)
|
||||
private Integer late;
|
||||
|
||||
@ApiModelProperty("早退")
|
||||
@ExcelProperty(value = {"考勤结果", "早退"}, order = 7)
|
||||
private Integer leave;
|
||||
|
||||
@ApiModelProperty("迟到早退")
|
||||
@ExcelProperty(value = {"考勤结果", "迟到早退"}, order = 8)
|
||||
private Integer lateAndLeave;
|
||||
|
||||
@ApiModelProperty("旷学")
|
||||
@ExcelProperty(value = {"考勤结果", "旷学"}, order = 9)
|
||||
private Integer notArrive;
|
||||
|
||||
@ApiModelProperty("正常")
|
||||
@ExcelProperty(value = {"考勤结果", "正常"}, order = 10)
|
||||
private Integer normal;
|
||||
}
|
||||
-138
@@ -1,138 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.entity.attendance.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ccl
|
||||
*/
|
||||
@Data
|
||||
public class FindStaffRuleVO {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private Long createId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 考勤规则名称
|
||||
*/
|
||||
@ApiModelProperty(value = "考勤规则名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 0-固定上下班时间
|
||||
*/
|
||||
@ApiModelProperty(value = "0-固定上下班时间")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 打卡日期,1-周一,2-周二....多个用','连接
|
||||
*/
|
||||
@ApiModelProperty(value = "打卡日期,1-周一,2-周二....多个用','连接")
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 节假日是否打卡,0-是,1-否
|
||||
*/
|
||||
@ApiModelProperty(value = "节假日是否打卡,0-是,1-否")
|
||||
private Integer holidayAttendance;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
@ApiModelProperty(value = "学校id")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 管理员打卡规则内容权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡规则内容权限,0-无,1-有")
|
||||
private Integer roleRule;
|
||||
|
||||
/**
|
||||
* 管理员打卡人员与白名单权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡人员与白名单权限,0-无,1-有")
|
||||
private Integer roleUser;
|
||||
|
||||
/**
|
||||
* 管理员节假日与特殊日期权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员节假日与特殊日期权限,0-无,1-有")
|
||||
private Integer roleDate;
|
||||
|
||||
/**
|
||||
* 管理员打卡提醒权限,0-无,1-有
|
||||
*/
|
||||
@ApiModelProperty(value = "管理员打卡提醒权限,0-无,1-有")
|
||||
private Integer roleRemind;
|
||||
|
||||
@ApiModelProperty("使用人员,可以是部门")
|
||||
private List<EduAttendanceStaffRuleObj> objStaffs;
|
||||
|
||||
@ApiModelProperty("管理人员")
|
||||
private List<EduAttendanceStaffRuleAdmin> adminStaffs;
|
||||
|
||||
@ApiModelProperty("白名单")
|
||||
private List<EduAttendanceStaffRuleWhiteList> whiteList;
|
||||
|
||||
@ApiModelProperty("管理范围")
|
||||
private List<EduAttendanceStaffRuleAdminRange> adminRanges;
|
||||
|
||||
@ApiModelProperty("打卡时段")
|
||||
private List<EduAttendanceStaffRuleTime> ruleTimes;
|
||||
|
||||
@ApiModelProperty("特殊时段")
|
||||
private List<EduAttendanceStaffRuleSpecialDate> specialDate;
|
||||
|
||||
@ApiModelProperty("打卡提醒")
|
||||
private List<EduAttendanceStaffRuleRemind> ruleReminds;
|
||||
|
||||
@ApiModelProperty("打卡设备")
|
||||
private List<Long> ruleDevices;
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InOutDormPageVO extends InOutPageVO {
|
||||
|
||||
@ApiModelProperty("宿舍")
|
||||
@ExcelProperty(value = "宿舍", order = 4)
|
||||
private String dormRoomName;
|
||||
}
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.converter.LocalDateTimeConverter;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InOutPageVO {
|
||||
|
||||
@ApiModelProperty("校区名称")
|
||||
@ExcelProperty(order = 0, value = "校区")
|
||||
private String campusName;
|
||||
|
||||
@ApiModelProperty("年级班级")
|
||||
@ExcelProperty(order = 1, value = "年级班级")
|
||||
private String gradeClass;
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
@ExcelIgnore
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
@ExcelProperty(order = 2, value = "姓名")
|
||||
private String stuName;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
@ExcelProperty(order = 3, value = "学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ApiModelProperty("进出位置")
|
||||
@ExcelProperty(order = 5, value = "进出位置")
|
||||
private String zoneName;
|
||||
|
||||
@ApiModelProperty("进出状态")
|
||||
@ExcelProperty(order = 6, value = "进出状态")
|
||||
private String scope;
|
||||
|
||||
@ApiModelProperty("进出时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(order = 7, value = "进出时间", converter = LocalDateTimeConverter.class)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
@ExcelIgnore
|
||||
private String picUrl;
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ListStaffResultPageVO {
|
||||
@ApiModelProperty("教职工id")
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty("教职工名称")
|
||||
private String staffName;
|
||||
|
||||
@ApiModelProperty("考勤结果")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("考勤规则")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
private LocalDate date;
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OnlineCountVO {
|
||||
|
||||
private Integer onlineNum;
|
||||
|
||||
private Integer offlineNum;
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RateRankVO {
|
||||
|
||||
@ApiModelProperty("最高排行")
|
||||
private List<RateVO> topFive;
|
||||
|
||||
@ApiModelProperty("最低排行")
|
||||
private List<RateVO> bottomFive;
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RateVO {
|
||||
|
||||
@ApiModelProperty("班级")
|
||||
private String gradeClass;
|
||||
|
||||
@ApiModelProperty("宿舍楼名称")
|
||||
private String dormName;
|
||||
|
||||
@ApiModelProperty("出勤率")
|
||||
private Double rate;
|
||||
|
||||
@ApiModelProperty("总人数")
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty("校区")
|
||||
private String campus;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("时段")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("迟到/晚归/异常晚归")
|
||||
private Integer late;
|
||||
|
||||
@ApiModelProperty("早退")
|
||||
private Integer leave;
|
||||
|
||||
@ApiModelProperty("迟到早退")
|
||||
private Integer lateAndLeave;
|
||||
|
||||
@ApiModelProperty("旷学/旷宿")
|
||||
private Integer notArrive;
|
||||
|
||||
@ApiModelProperty("正常")
|
||||
private Integer normal;
|
||||
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
@ApiModel("考勤记录")
|
||||
public class RecordDetailVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long userId;
|
||||
@ApiModelProperty("学生名称")
|
||||
private String name;
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
// 体温
|
||||
@ApiModelProperty("体温")
|
||||
private Double temp;
|
||||
@ApiModelProperty("考勤图片地址")
|
||||
private String picUrl;
|
||||
// 进出类型,0-进,1-出
|
||||
@ApiModelProperty("考勤区域类型,0-进门,1-出门")
|
||||
private Integer scope;
|
||||
@ApiModelProperty("考勤区域类型,0-校门,1-宿舍")
|
||||
private Integer zone;
|
||||
@ApiModelProperty("考勤时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
@ApiModelProperty("考勤结果,//状态,0-正常,1-迟到,2-早退,3-未到")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("考勤时间,0-上午,1-下午,2-晚上")
|
||||
private Integer time;
|
||||
|
||||
@ApiModelProperty("规定时间")
|
||||
private String stiTime;
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@ApiModel("考勤记录信息")
|
||||
@Data
|
||||
public class ResultDetailVO {
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("学生名称")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
private String studentNum;
|
||||
|
||||
@ApiModelProperty("学生类型")
|
||||
private Integer studentType;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate attendanceDate;
|
||||
|
||||
@ApiModelProperty("生成该结果的第一条进出记录的时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime recordTime;
|
||||
|
||||
@ApiModelProperty("匹配的考勤规则的标准时间")
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
|
||||
private LocalTime stiTime;
|
||||
|
||||
@ApiModelProperty("生成该结果的第一条进出记录的设备名称")
|
||||
private String zoneName;
|
||||
|
||||
@ApiModelProperty("旷课/请假:时段区间,旷宿:中午/晚上")
|
||||
private String ruleTime;
|
||||
|
||||
@ApiModelProperty("考勤结果")
|
||||
private Integer status;
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRuleDate;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRuleDept;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRuleDevice;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRuleTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("规则列表数据实体")
|
||||
public class RuleListVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
private String name;
|
||||
@ApiModelProperty("规则状态")
|
||||
private Integer status;
|
||||
@ApiModelProperty("规则类型,0-上学,1-归寝")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createId;
|
||||
|
||||
@ApiModelProperty("创建者")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty("住宿生是否参与上学考勤")
|
||||
private Integer dormitoryFlag;
|
||||
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("适用对象")
|
||||
private List<EduAttendanceRuleDept> deptList;
|
||||
|
||||
@ApiModelProperty("运行时间")
|
||||
private List<EduAttendanceRuleDate> dateList;
|
||||
|
||||
@ApiModelProperty("考勤时间")
|
||||
private List<EduAttendanceRuleTime> timeList;
|
||||
|
||||
@ApiModelProperty("考勤设备")
|
||||
private List<EduAttendanceRuleDevice> deviceList;
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RuleTimeVO {
|
||||
|
||||
@ApiModelProperty("时间id")
|
||||
private Long timeId;
|
||||
|
||||
@ApiModelProperty("时间名称")
|
||||
private String timeName;
|
||||
|
||||
@ApiModelProperty("规则类型:0=上学,1=宿舍")
|
||||
private String ruleType;
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("各类型考勤状态数量")
|
||||
@Data
|
||||
public class StaRecordCountVO {
|
||||
|
||||
private Integer studentNormal;
|
||||
|
||||
private Integer studentLate;
|
||||
|
||||
private Integer studentNotArrive;
|
||||
|
||||
private Integer studentRequest;
|
||||
|
||||
private Integer staffNormal;
|
||||
|
||||
private Integer staffLate;
|
||||
|
||||
private Integer staffNotArrive;
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StaffDateTimeResultInfo {
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("星期")
|
||||
private String week;
|
||||
|
||||
@ApiModelProperty("考勤结果列表 0-正常,1-迟到,2-早退,3-旷工,4-迟到早退")
|
||||
private List<Integer> statusList;
|
||||
}
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author ccl
|
||||
*/
|
||||
@Data
|
||||
public class StaffRecordVO {
|
||||
|
||||
@ApiModelProperty("记录id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("员工id")
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty("员工名称")
|
||||
private String staffName;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("进出时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
@ApiModelProperty("星期")
|
||||
private String week;
|
||||
|
||||
@ApiModelProperty("进出状态:0进1出")
|
||||
private Integer scope;
|
||||
|
||||
@ApiModelProperty("进出位置")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty("图片链接")
|
||||
private String picUrl;
|
||||
}
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ccl
|
||||
*/
|
||||
@Data
|
||||
public class StaffRuleVO {
|
||||
|
||||
@ApiModelProperty("规则id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("规则名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("创建日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty("创建人名称")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty("管理人员列表")
|
||||
private List<Long> staffList;
|
||||
|
||||
@ApiModelProperty("管理人员列表")
|
||||
private List<String> staffNameList;
|
||||
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StaffTimeResultInfo {
|
||||
|
||||
@ApiModelProperty("应打卡时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime startStiTime;
|
||||
|
||||
@ApiModelProperty("实际打卡时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime startRealTime;
|
||||
|
||||
|
||||
@ApiModelProperty("下班应打卡时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime endStiTime;
|
||||
|
||||
@ApiModelProperty("实际打卡时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime endRealTime;
|
||||
|
||||
@ApiModelProperty("考勤结果 0-正常,1-迟到,2-早退,3-旷工,4-迟到早退")
|
||||
private Integer status;
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StasticDormResultVO {
|
||||
@ApiModelProperty("宿舍楼id")
|
||||
private Long dormId;
|
||||
|
||||
@ApiModelProperty("宿舍楼名称")
|
||||
private String dromName;
|
||||
|
||||
@ApiModelProperty("寝室id")
|
||||
private Long dormRoomId;
|
||||
|
||||
@ApiModelProperty("寝室名称")
|
||||
private String dormRoomName;
|
||||
|
||||
@ApiModelProperty("应归人数")
|
||||
private Integer total;
|
||||
|
||||
@ApiModelProperty("晚归人数")
|
||||
private Integer late;
|
||||
|
||||
@ApiModelProperty("旷宿人数")
|
||||
private Integer notArrive;
|
||||
|
||||
@ApiModelProperty("在寝人数")
|
||||
private Integer stay;
|
||||
|
||||
@ApiModelProperty("未归人数")
|
||||
private Integer notStay;
|
||||
|
||||
@ApiModelProperty("是否已查寝,0-未查寝,1-已查寝")
|
||||
private Integer verify;
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceStaffResult;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StasticStaffExcepByDayVO {
|
||||
|
||||
@ApiModelProperty("出勤天列表")
|
||||
private List<LocalDate> dayList;
|
||||
|
||||
@ApiModelProperty("迟到次数")
|
||||
private List<EduAttendanceStaffResult> lateList;
|
||||
|
||||
@ApiModelProperty("早退列表")
|
||||
private List<EduAttendanceStaffResult> leaveList;
|
||||
|
||||
@ApiModelProperty("旷工列表")
|
||||
private List<EduAttendanceStaffResult> notArriveList;
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.converter.LocalDateConverter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@ApiModel("按日统计教职工考勤数据")
|
||||
@Data
|
||||
public class StasticStaffResultByDayVO {
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
@ExcelProperty("部门")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("教职工id")
|
||||
@ExcelIgnore
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
@ExcelProperty("姓名")
|
||||
private String staffName;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("规则")
|
||||
@ExcelProperty("当前所属打卡规则")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@ExcelProperty(value = "日期", converter = LocalDateConverter.class)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("星期")
|
||||
@ExcelProperty("星期")
|
||||
private String week;
|
||||
|
||||
@ApiModelProperty("正常次数")
|
||||
@ExcelProperty("正常次数")
|
||||
private Integer normalNum;
|
||||
|
||||
@ApiModelProperty("迟到次数")
|
||||
@ExcelProperty({"考勤统计,迟到次数"})
|
||||
private Integer lateNum;
|
||||
|
||||
@ApiModelProperty("早退次数")
|
||||
@ExcelProperty({"考勤统计,早退次数"})
|
||||
private Integer leaveNum;
|
||||
|
||||
@ApiModelProperty("旷工次数")
|
||||
@ExcelProperty({"考勤统计,旷工次数"})
|
||||
private Integer notArriveNum;
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("按月统计教职工考勤数据")
|
||||
@Data
|
||||
public class StasticStaffResultByMonthVO {
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
@ExcelProperty("部门")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("教职工id")
|
||||
@ExcelIgnore
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
@ExcelProperty("姓名")
|
||||
private String staffName;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("规则")
|
||||
@ExcelProperty("当前所属打卡规则")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("正常天数")
|
||||
@ExcelProperty("正常天数")
|
||||
private Integer normalNum;
|
||||
|
||||
@ApiModelProperty("迟到次数")
|
||||
@ExcelProperty({"考勤统计,迟到天数"})
|
||||
private Integer lateNum;
|
||||
|
||||
@ApiModelProperty("早退次数")
|
||||
@ExcelProperty({"考勤统计,早退天数"})
|
||||
private Integer leaveNum;
|
||||
|
||||
@ApiModelProperty("旷工次数")
|
||||
@ExcelProperty({"考勤统计,旷工天数"})
|
||||
private Integer notArriveNum;
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("住宿学生考勤记录")
|
||||
@Data
|
||||
public class StayStudentResultVO {
|
||||
|
||||
@ApiModelProperty("学生头像")
|
||||
private String avatar;
|
||||
@ApiModelProperty("学号")
|
||||
private String studentNumber;
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
@ApiModelProperty("寝室名称")
|
||||
private String dormRoomName;
|
||||
@ApiModelProperty("考勤结果")
|
||||
private String result;
|
||||
@ApiModelProperty("归寝状态,0-在寝,1-未归")
|
||||
private Integer status;
|
||||
@ApiModelProperty("归寝时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime time;
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生考勤信息")
|
||||
public class StudentInfoVO {
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String name;
|
||||
@ApiModelProperty("学生头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty("考勤时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime time;
|
||||
|
||||
@ApiModelProperty("学生类型,0-走读,1-住宿")
|
||||
private Integer type;
|
||||
@ApiModelProperty("考勤结果,状态,0-正常,1-迟到,2-早退,3-迟到早退,4-未到,")
|
||||
private Integer result;
|
||||
}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
package com.yida.data.attendance.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("教师端考勤记录")
|
||||
public class TeacherStasticVO {
|
||||
|
||||
@ApiModelProperty("考勤天数")
|
||||
private Integer attendanceDateNum;
|
||||
|
||||
@ApiModelProperty("实到人数")
|
||||
private Integer realNum;
|
||||
|
||||
@ApiModelProperty("应到人数/总人数")
|
||||
private Integer shouldNum;
|
||||
|
||||
@ApiModelProperty("迟到人数")
|
||||
private Integer lateStudentNum;
|
||||
|
||||
@ApiModelProperty("晚归人数")
|
||||
private Integer dormLateStudentNum;
|
||||
|
||||
@ApiModelProperty("异常晚归人数")
|
||||
private Integer dormLateExpStudentNum;
|
||||
|
||||
@ApiModelProperty("旷宿人数")
|
||||
private Integer dormNotArriveStudentNum;
|
||||
|
||||
@ApiModelProperty("旷课人数")
|
||||
private Integer notArriveStudentNum;
|
||||
|
||||
@ApiModelProperty("早退人数")
|
||||
private Integer leaveStudentNum;
|
||||
|
||||
@ApiModelProperty("请假人数")
|
||||
private Integer requestStudentNum;
|
||||
|
||||
@ApiModelProperty("迟到次数")
|
||||
private Integer lateNum;
|
||||
|
||||
@ApiModelProperty("旷课次数")
|
||||
private Integer notArriveNum;
|
||||
|
||||
@ApiModelProperty("早退次数")
|
||||
private Integer leaveNum;
|
||||
|
||||
@ApiModelProperty("请假次数")
|
||||
private Integer requestNum;
|
||||
|
||||
@ApiModelProperty("类型:0上学考勤统计,1宿舍考勤统计")
|
||||
private Integer type;
|
||||
|
||||
List<StudentInfoVO> normalStudentList;
|
||||
List<StudentInfoVO> lateStudentList;
|
||||
List<StudentInfoVO> leaveStudentList;
|
||||
List<StudentInfoVO> notArriveStudentList;
|
||||
List<StudentInfoVO> requestStudentList;
|
||||
List<StudentInfoVO> dormLateStudentList;
|
||||
List<StudentInfoVO> dormLateExpStudentList;
|
||||
List<StudentInfoVO> dormNotArriveStudentList;
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
# Auto Configure
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.yida.data.attendance.fallback.RemoteAttendanceDeviceServiceFallback,\
|
||||
com.yida.data.attendance.fallback.RemoteAttendanceNoticeServiceFallback,\
|
||||
com.yida.data.attendance.fallback.RemoteAttendanceResultServiceFallback,\
|
||||
com.yida.data.attendance.fallback.RemoteAttendanceRuleServiceFallback
|
||||
@@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>edu-attendance</artifactId>
|
||||
<groupId>com.yida.data.attendance</groupId>
|
||||
<version>2.2-RELEASE</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>edu-attendance-biz</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--mqtt-->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>${paho.mqttv3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.system</groupId>
|
||||
<artifactId>febs-server-system-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.user</groupId>
|
||||
<artifactId>edu-user-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.school</groupId>
|
||||
<artifactId>edu-school-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.yida.data.common</groupId>
|
||||
<artifactId>edu-common</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.job</groupId>
|
||||
<artifactId>febs-server-job-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.attendance</groupId>
|
||||
<artifactId>edu-attendance-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--activemq-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-activemq</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.server</groupId>
|
||||
<artifactId>edu-card-server-api</artifactId>
|
||||
<version>2.2-RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../../febs-jar</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.yida.data.attendance;
|
||||
|
||||
|
||||
import cc.mrbird.febs.common.security.starter.annotation.EnableFebsCloudResourceServer;
|
||||
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.jms.annotation.EnableJms;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@EnableAsync
|
||||
@EnableScheduling
|
||||
@EnableFebsCloudResourceServer
|
||||
@EnableFeignClients(basePackages = "com.yida.data")
|
||||
@MapperScan("com.yida.data.attendance.mapper")
|
||||
@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
|
||||
@EnableJms
|
||||
public class EduAttendanceApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(EduAttendanceApplication.class)
|
||||
.web(WebApplicationType.SERVLET)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
package com.yida.data.attendance.configure;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.yida.data.attendance.dto.DealRecordDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceRecordService;
|
||||
import com.yida.data.common.core.entity.ReceiveMsg;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.enums.MsgChannel;
|
||||
import com.yida.data.user.feign.RemoteStaffService;
|
||||
import com.yida.data.user.feign.RemoteStudentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jms.annotation.JmsListener;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class ActiveMqConfigure {
|
||||
|
||||
private final EduAttendanceRecordService eduAttendanceRecordService;
|
||||
private final RemoteStaffService remoteStaffService;
|
||||
private final RemoteStudentService remoteStudentService;
|
||||
private final RedisService redisService;
|
||||
|
||||
private static Snowflake snowflake;
|
||||
|
||||
static {
|
||||
snowflake = new Snowflake(1L, 1L);
|
||||
}
|
||||
|
||||
@JmsListener(destination = "mq.bfms.client.msg.topic")
|
||||
public void consumeAttendance(String text) {
|
||||
try {
|
||||
// 保存接收消息到es
|
||||
ReceiveMsg receiveMsg = new ReceiveMsg();
|
||||
receiveMsg.setTopic("mq.bfms.client.msg.topic");
|
||||
receiveMsg.setMsg(text);
|
||||
receiveMsg.setId(snowflake.nextId());
|
||||
receiveMsg.setChannel(MsgChannel.ACTIVE.getValue());
|
||||
receiveMsg.setCreateDate(LocalDateTime.now());
|
||||
redisService.lSet(CachePrefixConstant.RECEIVE_MSG, receiveMsg);
|
||||
// 处理业务
|
||||
JSONObject json = JSONUtil.parseObj(text);
|
||||
String method = json.getStr("method");
|
||||
if ("bfms.notifyFaceInfo".equals(method)) {
|
||||
JSONObject data = json.getJSONObject("info");
|
||||
JSONArray jsonArray = data.getJSONArray("similarFaces");
|
||||
if (Objects.isNull(jsonArray)) {
|
||||
return;
|
||||
}
|
||||
JSONObject personData = (JSONObject) jsonArray.get(0);
|
||||
String personId = personData.getStr("personId");
|
||||
Integer personType = personData.getInt("personTypeId");
|
||||
DealRecordDTO dto = new DealRecordDTO();
|
||||
String pictureUrl = data.getStr("pictureUrl");
|
||||
String[] pictureUrls = pictureUrl.split("\\|");
|
||||
if (pictureUrls.length < 2) {
|
||||
// 图片未上传 不处理该数据
|
||||
return;
|
||||
}
|
||||
dto.setPicUrl(pictureUrls[1]);
|
||||
dto.setDate(LocalDateTimeUtil.of(data.getLong("beginTime") * 1000)
|
||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
dto.setSn(data.getStr("channelId"));
|
||||
dto.setUserFlag(personId);
|
||||
Object userId = redisService.hget(CachePrefixConstant.USER_DAHUA_USER, personId);
|
||||
// 查询用户
|
||||
if (personType == 2) {
|
||||
if (userId == null) {
|
||||
EduStaff staff = remoteStaffService.getStaffByDahuaNoPermission(personId).getData();
|
||||
if (staff != null) {
|
||||
dto.setUserId(staff.getId());
|
||||
redisService.hset(CachePrefixConstant.USER_DAHUA_USER, personId, dto.getUserId());
|
||||
}
|
||||
} else {
|
||||
dto.setUserId(Long.valueOf(userId.toString()));
|
||||
}
|
||||
dto.setUserType(1);
|
||||
} else if (personType == 1) {
|
||||
if (userId == null) {
|
||||
EduStudent student = remoteStudentService.getStudentByDahuaNoPermission(personId).getData();
|
||||
if (student != null) {
|
||||
dto.setUserId(student.getId());
|
||||
redisService.hset(CachePrefixConstant.USER_DAHUA_USER, personId, dto.getUserId());
|
||||
}
|
||||
} else {
|
||||
dto.setUserId(Long.valueOf(userId.toString()));
|
||||
}
|
||||
dto.setUserType(0);
|
||||
}
|
||||
if (dto.getUserId() != null) {
|
||||
eduAttendanceRecordService.receiveRecord(dto);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("处理大华人脸推送错误,接收消息:[{}]", text, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.yida.data.attendance.configure;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
@Configuration
|
||||
public class ThreadPollConfigure {
|
||||
|
||||
public static final String POLL_NAME = "attendance_thread_pool";
|
||||
|
||||
@Bean(POLL_NAME)
|
||||
public ThreadPoolTaskExecutor asyncThreadPoolTaskExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(5);
|
||||
executor.setMaxPoolSize(20);
|
||||
executor.setKeepAliveSeconds(30);
|
||||
executor.setThreadNamePrefix("attendance-thread");
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
executor.setAwaitTerminationSeconds(60);
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.yida.data.attendance.constant;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "febs.mqtt")
|
||||
public class MqttConstant {
|
||||
|
||||
private String url;
|
||||
private String username;
|
||||
private String password;
|
||||
}
|
||||
-170
@@ -1,170 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.attendance.dto.DevicePage;
|
||||
import com.yida.data.attendance.dto.IssuedFaceDTO;
|
||||
import com.yida.data.attendance.dto.RemoveFaceDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceDeviceService;
|
||||
import com.yida.data.attendance.vo.DeviceNumberVO;
|
||||
import com.yida.data.attendance.vo.DeviceVO;
|
||||
import com.yida.data.attendance.vo.OnlineCountVO;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.system.feign.RemoteDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Api(tags = "考勤-设备", value = "考勤")
|
||||
@RestController
|
||||
@RequestMapping("/device")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceDeviceController {
|
||||
|
||||
private final EduAttendanceDeviceService eduAttendanceDeviceService;
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
|
||||
|
||||
@ApiOperation("考勤设备列表分页查询")
|
||||
@GetMapping("/listDevicePage")
|
||||
@ControllerLog(operation = "分页查询考勤设备")
|
||||
@PreAuthorize("hasAuthority('attendance:device:view')")
|
||||
public ResultBean<DevicePage<DeviceVO>> listDevicePage(@ApiParam("学校名称") String schoolName,
|
||||
@ApiParam("设备编号或名称") String number,
|
||||
@ApiParam("进出类型,0-进门,1-出门") Integer scope,
|
||||
@ApiParam("区域类型,0-校门,1-宿舍") Integer type,
|
||||
@ApiParam("设备状态,0-在线,1-离线") Integer state,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize
|
||||
) {
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.listDevicePage(new DevicePage(pageNum,
|
||||
pageSize), schoolName, number, scope, type, state, FebsUtil.getCurrentUser()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤设备数量统计
|
||||
*
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.attendance.vo.DeviceNumberVO>
|
||||
* @author ZYJ
|
||||
* @date 2021/10/8 16:57
|
||||
*/
|
||||
@ApiOperation("考勤设备数量统计")
|
||||
@GetMapping("/findDeviceNumber")
|
||||
@ControllerLog(operation = "考勤设备数量统计")
|
||||
public ResultBean<DeviceNumberVO> findDeviceNumber() throws NoSuchMethodException {
|
||||
return eduAttendanceDeviceService.findDeviceNumber();
|
||||
}
|
||||
|
||||
@ApiOperation("新增、修改设备")
|
||||
@PostMapping("/saveDevice")
|
||||
@ControllerLog(operation = "新增、修改考勤设备")
|
||||
@PreAuthorize("hasAuthority('attendance:device:edit')")
|
||||
public ResultBean saveDevice(@RequestBody EduAttendanceDevice device) {
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.saveDevice(device));
|
||||
}
|
||||
|
||||
@ApiOperation("删除设备")
|
||||
@PostMapping("/delDevice")
|
||||
@ControllerLog(operation = "删除考勤设备")
|
||||
@PreAuthorize("hasAuthority('attendance:device:delete')")
|
||||
public ResultBean delDevice(@RequestBody List<Long> ids) {
|
||||
eduAttendanceDeviceService.removeByIds(ids);
|
||||
// 更新缓存
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("根据学校和区域查询设备列表")
|
||||
@GetMapping("/listDeviceBySchool")
|
||||
@ControllerLog(operation = "根据学校和区域查询考勤设备")
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceBySchool(
|
||||
@ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("区域类型,0-进门,1-出门") @RequestParam(required = false) Integer scope,
|
||||
@ApiParam("类型,0-校门,1-宿舍") @RequestParam(required = false) Integer type) {
|
||||
LambdaQueryWrapper<EduAttendanceDevice> condition = Wrappers.lambdaQuery(new EduAttendanceDevice())
|
||||
.eq(EduAttendanceDevice::getSchoolId, schoolId);
|
||||
if (scope != null) {
|
||||
condition.eq(EduAttendanceDevice::getZoneScope, scope);
|
||||
}
|
||||
if (type != null) {
|
||||
condition.eq(EduAttendanceDevice::getType, type);
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.list(condition));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询设备列表")
|
||||
@GetMapping("/listDeviceById")
|
||||
ResultBean<List<EduAttendanceDevice>> listDeviceById(@RequestParam("ids") Long[] ids) {
|
||||
return ResultBean.buildSuccess(
|
||||
ArrayUtil.isNotEmpty(ids) ? eduAttendanceDeviceService.listByIds(Arrays.asList(ids))
|
||||
: Collections.EMPTY_LIST);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id开门")
|
||||
@GetMapping("/openDoor")
|
||||
@ControllerLog(operation = "根据id开门")
|
||||
public ResultBean openDoor(@ApiParam("设备id") @RequestParam String eduAttendanceDevice) {
|
||||
eduAttendanceDeviceService.openDoor(eduAttendanceDevice);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("根据id设置时间")
|
||||
@GetMapping("/setSysTime")
|
||||
@ControllerLog(operation = "根据id设置时间")
|
||||
public ResultBean setSysTime(@ApiParam("设备id") @RequestParam String id) {
|
||||
eduAttendanceDeviceService.setSysTime(id);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("批量设置时间")
|
||||
@PostMapping("/setAllTime")
|
||||
@ControllerLog(operation = "批量分组")
|
||||
public ResultBean setAllTime(@RequestBody List<String> list) {
|
||||
|
||||
eduAttendanceDeviceService.setAllTime(list);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("批量开门")
|
||||
@PostMapping("/openAllDoor")
|
||||
@ControllerLog(operation = "批量分组")
|
||||
public ResultBean openAllDoor(@RequestBody List<String> list) {
|
||||
|
||||
eduAttendanceDeviceService.openAllDoor(list);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("下发人脸(下发设备需为同一厂商设备)")
|
||||
@PostMapping("/issuedFace")
|
||||
public ResultBean issuedFace(@RequestBody IssuedFaceDTO dto) {
|
||||
eduAttendanceDeviceService.issuedFace(dto);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除设备中的人脸")
|
||||
@PostMapping("/removeFace")
|
||||
public ResultBean removeFace(@RequestBody RemoveFaceDTO dto) {
|
||||
eduAttendanceDeviceService.removeFace(dto);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("获取面板机状态分布")
|
||||
@GetMapping("/getOnlineDistrib")
|
||||
public ResultBean<OnlineCountVO> getOnlineDistrib() {
|
||||
List<Long> schoolIds = remoteDeptService.getSchoolByArea(null, null).getData().stream().map(Dept::getDeptId)
|
||||
.collect(Collectors.toList());
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.getOnlineDistrib(schoolIds));
|
||||
}
|
||||
}
|
||||
-122
@@ -1,122 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.attendance.service.EduAttendanceDeviceGroupService;
|
||||
import com.yida.data.attendance.service.EduDeviceGroupService;
|
||||
import com.yida.data.attendance.vo.DeviceOrDeviceGroupVO;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDeviceGroup;
|
||||
import com.yida.data.common.core.entity.attendance.EduDeviceGroup;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 设备分组表 Controller
|
||||
*
|
||||
* @author zhanghaijun
|
||||
* @date 2021-06-16 15:27:11
|
||||
*/
|
||||
|
||||
@Api(tags = "考勤-设备分组")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/deviceGroup")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceDeviceGroupController {
|
||||
|
||||
private final EduAttendanceDeviceGroupService eduAttendanceDeviceGroupService;
|
||||
private final EduDeviceGroupService eduDeviceGroupService;
|
||||
|
||||
|
||||
@ApiOperation("根据name分页查询分组")
|
||||
@GetMapping("/listDevicePage")
|
||||
@ControllerLog(operation = "根据name查询分组")
|
||||
public ResultBean<IPage<EduAttendanceDeviceGroup>> listDeviceGroupPage(@ApiParam("分组名称") @RequestParam String name,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Long current,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Long size,
|
||||
@ApiParam("学校id") @RequestParam(required = false) Long schoolId) throws NoSuchMethodException {
|
||||
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceGroupService.selectGroup(name, current, size, schoolId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("全部查询")
|
||||
@GetMapping("/listDevice")
|
||||
@ControllerLog(operation = "查询分组")
|
||||
public ResultBean<List<EduAttendanceDeviceGroup>> listDeviceGroup() {
|
||||
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceGroupService.selectGroupAll());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("新增或修改分组")
|
||||
@PostMapping("/insertGroup")
|
||||
@ControllerLog(operation = "新增分组")
|
||||
public ResultBean insertGroup(@ApiParam("分组详细") @RequestBody EduAttendanceDeviceGroup eduAttendanceDeviceGroup) {
|
||||
|
||||
eduAttendanceDeviceGroupService.saveOrUpdate(eduAttendanceDeviceGroup);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("删除分组")
|
||||
@GetMapping("/delGroup")
|
||||
@ControllerLog(operation = "删除分组")
|
||||
public ResultBean delGroup(@RequestParam Long id) {
|
||||
eduAttendanceDeviceGroupService.delGroup(id);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询设备与设备组列表")
|
||||
@GetMapping("/listDeviceAndDeviceGroup")
|
||||
public ResultBean<List<DeviceOrDeviceGroupVO>> listDeviceAndDevice(String keyword) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
Long schoolId = null;
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
schoolId = currentUser.getDeptId();
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceGroupService.listDeviceAndDevice(keyword, schoolId));
|
||||
}
|
||||
|
||||
@ApiOperation("根据设备组查询设备")
|
||||
@GetMapping("/listDeviceByGroup")
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceByGroup(Long[] groupIds) {
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceGroupService.listDeviceByGroup(Arrays.asList(groupIds)));
|
||||
}
|
||||
|
||||
@ApiOperation("查询设备组列表")
|
||||
@GetMapping("/listDeviceGroupById")
|
||||
public ResultBean<List<EduAttendanceDeviceGroup>> listDeviceGroupById(Long[] ids) {
|
||||
return ResultBean.buildSuccess(ArrayUtil.isNotEmpty(ids) ? eduAttendanceDeviceGroupService.listByIds(Arrays.asList(ids)) :
|
||||
Collections.EMPTY_LIST);
|
||||
}
|
||||
|
||||
@ApiOperation("批量分组")
|
||||
@PostMapping("/batchGroup")
|
||||
@ControllerLog(operation = "批量分组")
|
||||
public ResultBean batchGroup(@ApiParam("批量分组") @RequestBody List<EduDeviceGroup> list) {
|
||||
eduDeviceGroupService.insertGroup(list);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.attendance.dto.InOutPageDTO;
|
||||
import com.yida.data.attendance.dto.ListRecordDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceRecordService;
|
||||
import com.yida.data.attendance.vo.InOutDormPageVO;
|
||||
import com.yida.data.attendance.vo.RecordDetailVO;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-学生-进出记录")
|
||||
@RestController
|
||||
@RequestMapping("/record")
|
||||
public class EduAttendanceRecordController {
|
||||
|
||||
@Resource
|
||||
private EduAttendanceRecordService eduAttendanceRecordService;
|
||||
|
||||
@ApiOperation("分页查询进出记录")
|
||||
@GetMapping("/listInOutPage")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "分页查询进出记录")
|
||||
public ResultBean<IPage<InOutDormPageVO>> listInOutPage(InOutPageDTO dto) {
|
||||
if (dto.getSchoolId() == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
dto.setSchoolId(currentUser.getDeptId());
|
||||
}
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceRecordService.listInOutPage(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("导出进出记录")
|
||||
@PostMapping("/exportInOut")
|
||||
public void exportInOut(@RequestBody InOutPageDTO dto, HttpServletResponse response) {
|
||||
eduAttendanceRecordService.exportInOut(dto, response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询进出记录详情")
|
||||
@GetMapping("/getRecordById")
|
||||
public ResultBean<RecordDetailVO> getRecordById(Long id) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRecordService.getRecordDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("查询进出记录")
|
||||
@GetMapping("/listRecord")
|
||||
public ResultBean<List<RecordDetailVO>> listRecord(ListRecordDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRecordService.listRecord(dto));
|
||||
}
|
||||
}
|
||||
-116
@@ -1,116 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.attendance.dto.AttendanceResultPageDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceResultService;
|
||||
import com.yida.data.attendance.vo.AttendanceResultDormVO;
|
||||
import com.yida.data.attendance.vo.RuleTimeVO;
|
||||
import com.yida.data.attendance.vo.StayStudentResultVO;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceVerifyDorm;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 考勤结果 Controller
|
||||
*
|
||||
* @author wjm
|
||||
* @date 2021-09-15 09:56:24
|
||||
*/
|
||||
@Api("考勤-学生-考勤记录")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/result")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceResultController {
|
||||
|
||||
private final EduAttendanceResultService eduAttendanceResultService;
|
||||
|
||||
|
||||
@ApiOperation("查询一栋宿舍楼的考勤数据")
|
||||
@GetMapping("/listResultByDorm")
|
||||
public ResultBean<List<StayStudentResultVO>> listResultByDorm(@ApiParam("宿舍楼id") Long dormId,
|
||||
@ApiParam("日期(yyyy-MM-dd)") String date,
|
||||
@ApiParam("1-午间,2-晚上") Integer time,
|
||||
@ApiParam("搜索关键词,寝室号/学生姓名") String keyword,
|
||||
@ApiParam("考勤结果,0-正常,4-晚归,5-异常晚归,6-旷宿") Integer status) {
|
||||
return ResultBean.buildSuccess(eduAttendanceResultService.listResultByDorm(dormId, date, time, keyword, status));
|
||||
}
|
||||
|
||||
@ApiOperation("查询某个宿舍学生的考勤状况")
|
||||
@GetMapping("/listStudentResByDormRoom")
|
||||
public ResultBean<List<StayStudentResultVO>> listStudentResByDormRoom(@ApiParam("寝室id") Long roomId,
|
||||
@ApiParam("日期(yyyy-MM-dd)") String date,
|
||||
@ApiParam("1-午间,2-晚上") Integer time) {
|
||||
return ResultBean.buildSuccess(eduAttendanceResultService.listStudentResByDormRoom(roomId, date, time));
|
||||
}
|
||||
|
||||
@ApiOperation("更改某个学生的在寝状态")
|
||||
@GetMapping("/changeStayStudentStatus")
|
||||
public ResultBean changeStayStudentStatus(@ApiParam("学生id") Long studentId,
|
||||
@ApiParam("日期(yyyy-MM-dd)") String date,
|
||||
@ApiParam("1-午间,2-晚上") Integer time,
|
||||
@ApiParam("将要修改成的状态,0-归寝,1-未归") Integer status) {
|
||||
eduAttendanceResultService.changeStayStudentStatus(studentId, date, time, status);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("完成某个寝室的查寝")
|
||||
@PostMapping("/verifyDormRoom")
|
||||
public ResultBean verifyDormRoom(@RequestBody EduAttendanceVerifyDorm verifyDorm) {
|
||||
eduAttendanceResultService.verifyDormRoom(verifyDorm);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询考勤记录")
|
||||
@GetMapping("/listResultPage")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "分页查询进出记录")
|
||||
public ResultBean<IPage<AttendanceResultDormVO>> listResultPage(AttendanceResultPageDTO dto) {
|
||||
if (dto.getSchoolId() == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
dto.setSchoolId(currentUser.getDeptId());
|
||||
}
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceResultService.listAttendanceResultPage(dto));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导出考勤记录")
|
||||
@PostMapping("/exportAttendanceResult")
|
||||
public void exportAttendanceResult(@RequestBody AttendanceResultPageDTO dto, HttpServletResponse response) {
|
||||
if (dto.getSchoolId() == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
dto.setSchoolId(currentUser.getDeptId());
|
||||
}
|
||||
}
|
||||
eduAttendanceResultService.exportAttendanceResult(dto, response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询某年级某天校门考勤记录的规则时间列表")
|
||||
@GetMapping("/listGradeResultTime")
|
||||
public ResultBean<List<RuleTimeVO>> listGradeResultTime(@ApiParam("年级id") Long gradeId,
|
||||
@ApiParam("天,yyyy-MM-dd") String date) {
|
||||
return ResultBean.buildSuccess(eduAttendanceResultService.listGradeResultTime(gradeId, date));
|
||||
}
|
||||
}
|
||||
-123
@@ -1,123 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.attendance.service.EduAttendanceConfigService;
|
||||
import com.yida.data.attendance.service.EduAttendanceRuleService;
|
||||
import com.yida.data.attendance.vo.ConflictRuleVO;
|
||||
import com.yida.data.attendance.vo.RuleListVO;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceConfig;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRule;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "考勤-学生-规则")
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
public class EduAttendanceRuleController {
|
||||
|
||||
@Resource
|
||||
private EduAttendanceRuleService eduAttendanceRuleService;
|
||||
@Resource
|
||||
private EduAttendanceConfigService eduAttendanceConfigService;
|
||||
|
||||
@ApiOperation("查询规则列表")
|
||||
@GetMapping("/listRule")
|
||||
@ControllerLog(operation = "查询规则列表")
|
||||
public ResultBean<IPage<RuleListVO>> listRule(
|
||||
@ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("校区id") Long campusId,
|
||||
@ApiParam("规则名称") String ruleName,
|
||||
@ApiParam("规则类型,0-上学,1-归寝") Integer type,
|
||||
@ApiParam("运行状态,0-运行中,1-停止,2-失效,3-待运行") Integer status,
|
||||
@ApiParam("运行日期段开始") String startDate,
|
||||
@ApiParam("运行日期段结束") String endDate,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRuleService.listRulePage(new Page(pageNum, pageSize),
|
||||
FebsUtil.getCurrentUser(),
|
||||
schoolId, campusId, ruleName, type, status, startDate, endDate));
|
||||
}
|
||||
|
||||
@ApiOperation("新增、修改规则")
|
||||
@PostMapping("/saveRule")
|
||||
@ControllerLog(operation = "新增、修改考勤规则")
|
||||
public ResultBean saveRule(@RequestBody EduAttendanceRule rule) {
|
||||
List<ConflictRuleVO> conflict = eduAttendanceRuleService.checkConflict(rule);
|
||||
if (CollUtil.isNotEmpty(conflict)) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (ConflictRuleVO vo : conflict) {
|
||||
builder.append(vo.getDeptName())
|
||||
.append("已存在")
|
||||
.append(vo.getRuleName())
|
||||
.append("规则")
|
||||
.append(",");
|
||||
}
|
||||
builder.append("上述规则的运行时间与本规则运行时间有重叠,请调整设置。");
|
||||
throw new FebsException(builder.toString());
|
||||
}
|
||||
eduAttendanceRuleService.saveRule(rule);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("校验规则是否冲突")
|
||||
@PostMapping("/checkConflict")
|
||||
@ControllerLog(operation = "校验考勤规则是否冲突")
|
||||
public ResultBean checkConflict(@RequestBody EduAttendanceRule rule) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRuleService.checkConflict(rule));
|
||||
}
|
||||
|
||||
@ApiOperation("删除规则")
|
||||
@PostMapping("/delRule")
|
||||
@ControllerLog(operation = "删除考勤规则")
|
||||
public ResultBean delRule(@RequestBody List<Long> ruleIds) {
|
||||
eduAttendanceRuleService.deleteRule(ruleIds);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("改变规则运行状态")
|
||||
@GetMapping("/changeRuleRun")
|
||||
@ControllerLog(operation = "改变考勤规则状态")
|
||||
public ResultBean changeRuleRun(@ApiParam("规则id") @RequestParam Long id) {
|
||||
eduAttendanceRuleService.changeRuleRun(id);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("查询考勤设置")
|
||||
@GetMapping("/getConfig")
|
||||
public ResultBean<EduAttendanceConfig> getConfig() {
|
||||
Long schoolId = null;
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
schoolId = currentUser.getDeptId();
|
||||
}
|
||||
EduAttendanceConfig config = eduAttendanceConfigService.getConfig(schoolId);
|
||||
return ResultBean.buildSuccess(config);
|
||||
}
|
||||
|
||||
@ApiOperation("更改考勤设置")
|
||||
@PostMapping("/saveConfig")
|
||||
public ResultBean saveConfig(@RequestBody EduAttendanceConfig config) {
|
||||
config.setSchoolId(FebsUtil.getCurrentUser().getDeptId());
|
||||
eduAttendanceConfigService.saveConfig(config);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("查询当前时间能否查寝")
|
||||
@GetMapping("/getDormAttendanceStatus")
|
||||
public ResultBean<Boolean> getDormAttendanceStatus(@ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("1-中午,2-晚上") Integer time) {
|
||||
return ResultBean.buildSuccess(eduAttendanceConfigService.getDormAttendanceStatus(schoolId, time));
|
||||
}
|
||||
}
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffRecordService;
|
||||
import com.yida.data.attendance.vo.StaffRecordVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* 教职工考勤-进出记录 Controller
|
||||
*
|
||||
* @author ccl
|
||||
* @date 2021-09-27 18:56:19
|
||||
*/
|
||||
@Api(tags = "考勤-教职工-进出记录")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/staffRecord")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceStaffRecordController {
|
||||
|
||||
private final EduAttendanceStaffRecordService eduAttendanceStaffRecordService;
|
||||
|
||||
@ApiOperation("查询进出记录")
|
||||
@GetMapping("/findPageStaffRecord")
|
||||
public ResultBean<IPage<StaffRecordVO>> findPageStaffRecord(@ApiParam("部门id") @RequestParam(required = false) Long deptId,
|
||||
@ApiParam("职工姓名或手机号") @RequestParam(required = false) String nameOrPhone,
|
||||
@ApiParam("开始时间") @RequestParam(required = false) String start,
|
||||
@ApiParam("结束时间") @RequestParam(required = false) String end,
|
||||
@RequestParam(defaultValue = "10") Long pageSize,
|
||||
@RequestParam(defaultValue = "1") Long pageNum) {
|
||||
Page page = new Page();
|
||||
page.setSize(pageSize);
|
||||
page.setCurrent(pageNum);
|
||||
Long schoolId = null;
|
||||
if (FebsUtil.getCurrentUser().getDeptType() != 5) {
|
||||
schoolId = FebsUtil.getCurrentUser().getDeptId();
|
||||
}
|
||||
return ResultBean
|
||||
.buildSuccess(eduAttendanceStaffRecordService.findPageStaffRecord(page, deptId, nameOrPhone, start, end, schoolId));
|
||||
}
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.attendance.dto.ListStaffResultDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffResultService;
|
||||
import com.yida.data.attendance.vo.ListStaffResultPageVO;
|
||||
import com.yida.data.attendance.vo.StaffDateTimeResultInfo;
|
||||
import com.yida.data.attendance.vo.StaffTimeResultInfo;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 教职工考勤-考勤结果 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2021-09-27 18:56:23
|
||||
*/
|
||||
@Api(tags = "考勤-教职工-考勤结果")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/staffResult")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceStaffResultController {
|
||||
|
||||
private final EduAttendanceStaffResultService eduAttendanceStaffResultService;
|
||||
|
||||
|
||||
@ApiOperation("查询各时段考勤结果")
|
||||
@GetMapping("/listTimeResult")
|
||||
public ResultBean<List<StaffTimeResultInfo>> listTimeResult(@ApiParam("教职工id") Long staffId,
|
||||
@ApiParam("日期,yyyy-MM-dd") String date) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStaffResultService.listTimeResult(staffId, date));
|
||||
}
|
||||
|
||||
@ApiOperation("查询各天各时段考勤结果")
|
||||
@GetMapping("/listDateTimeResult")
|
||||
public ResultBean<List<StaffDateTimeResultInfo>> listDateTimeResult(@ApiParam("教职工id") Long staffId,
|
||||
@ApiParam("年月,yyyy-MM") String yearMonth) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStaffResultService.listDateTimeResult(staffId, yearMonth));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询考勤结果列表 ")
|
||||
@GetMapping("/listResultPage")
|
||||
public ResultBean<IPage<ListStaffResultPageVO>> listResultPage(ListStaffResultDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStaffResultService.listResultPage(dto));
|
||||
}
|
||||
}
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.attendance.dto.StaffRuleDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffRuleAdminService;
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffRuleService;
|
||||
import com.yida.data.attendance.vo.FindStaffRuleVO;
|
||||
import com.yida.data.attendance.vo.StaffRuleVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceStaffRuleAdmin;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* 教职工考勤规则 Controller
|
||||
*
|
||||
* @author ccl
|
||||
* @date 2021-09-27 18:56:21
|
||||
*/
|
||||
@Api(tags = "考勤-教职工-规则")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/staffRule")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceStaffRuleController {
|
||||
|
||||
private final EduAttendanceStaffRuleService eduAttendanceStaffRuleService;
|
||||
private final EduAttendanceStaffRuleAdminService eduAttendanceStaffRuleAdminService;
|
||||
|
||||
@ApiOperation("查询规则列表")
|
||||
@GetMapping("findStaffRuleList")
|
||||
public ResultBean<IPage<StaffRuleVO>> findStaffRuleList(@ApiParam("规则名称") @RequestParam(required = false) String ruleName,
|
||||
@ApiParam("管理员名称") @RequestParam(required = false) String staffName,
|
||||
@RequestParam(defaultValue = "10") Long pageSize,
|
||||
@RequestParam(defaultValue = "1") Long pageNum) {
|
||||
|
||||
IPage iPage = new Page();
|
||||
iPage.setSize(pageSize);
|
||||
iPage.setCurrent(pageNum);
|
||||
Long schoolId = null;
|
||||
if (FebsUtil.getCurrentUser().getDeptType() != 5) {
|
||||
schoolId = FebsUtil.getCurrentUser().getDeptId();
|
||||
}
|
||||
|
||||
return ResultBean.buildSuccess(eduAttendanceStaffRuleService.findStaffRuleList(iPage, ruleName, staffName, schoolId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询规则详情")
|
||||
@GetMapping("findStaffRule")
|
||||
public ResultBean<FindStaffRuleVO> findStaffRule(@ApiParam("规则id") @RequestParam Long ruleId) {
|
||||
|
||||
return ResultBean.buildSuccess(eduAttendanceStaffRuleService.findStaffRule(ruleId));
|
||||
}
|
||||
|
||||
@ApiOperation("新增或修改规则详情")
|
||||
@PostMapping("saveOrUpStaffRule")
|
||||
public ResultBean saveOrUpStaffRule(@RequestBody StaffRuleDTO staffRuleDTO) {
|
||||
|
||||
eduAttendanceStaffRuleService.saveOrUpStaffRule(staffRuleDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除规则")
|
||||
@PostMapping("removeStaffRule")
|
||||
public ResultBean removeStaffRule(@ApiParam("规则id") @RequestParam Long ruleId) {
|
||||
eduAttendanceStaffRuleService.removeStaffRule(ruleId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("查询当前用户是否是规则管理员")
|
||||
@GetMapping("/checkStaffAdmin")
|
||||
public ResultBean<Boolean> checkStaffAdmin(@ApiParam("职工id") Long staffId) {
|
||||
return ResultBean
|
||||
.buildSuccess(eduAttendanceStaffRuleAdminService.count(Wrappers.<EduAttendanceStaffRuleAdmin>lambdaQuery()
|
||||
.eq(EduAttendanceStaffRuleAdmin::getStaffId, staffId)) > 0);
|
||||
}
|
||||
}
|
||||
-181
@@ -1,181 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.attendance.dto.ListResultStatisticsDTO;
|
||||
import com.yida.data.attendance.dto.StasticStaffExcepByDayDTO;
|
||||
import com.yida.data.attendance.dto.StasticStaffResultDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceStasticService;
|
||||
import com.yida.data.attendance.vo.CountVO;
|
||||
import com.yida.data.attendance.vo.RateRankVO;
|
||||
import com.yida.data.attendance.vo.RateVO;
|
||||
import com.yida.data.attendance.vo.StaRecordCountVO;
|
||||
import com.yida.data.attendance.vo.StasticDormResultVO;
|
||||
import com.yida.data.attendance.vo.StasticStaffExcepByDayVO;
|
||||
import com.yida.data.attendance.vo.StasticStaffResultByDayVO;
|
||||
import com.yida.data.attendance.vo.StasticStaffResultByMonthVO;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.system.feign.RemoteDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-考勤统计")
|
||||
@RestController
|
||||
@RequestMapping("/stastic")
|
||||
@RequiredArgsConstructor
|
||||
public class EduAttendanceStasticController {
|
||||
|
||||
private final EduAttendanceStasticService eduAttendanceStasticService;
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
|
||||
@ApiOperation("查询出勤率最高前五,最低前三")
|
||||
@GetMapping("/stasticRateRank")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "查询出勤率最高前五,最低前三")
|
||||
public ResultBean<RateRankVO> stasticRateRank(@ApiParam("日期 yyyy-MM-dd") String date,
|
||||
@RequestParam(required = false) Long schoolId,
|
||||
@ApiParam("年级id") Long gradeId,
|
||||
@ApiParam("时段(校门考勤用)") Long timeId) {
|
||||
if (schoolId == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
schoolId = currentUser.getDeptId();
|
||||
}
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.stasticRateRank(date, schoolId, gradeId, timeId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询各宿舍楼归寝率排名")
|
||||
@GetMapping("/stasticDormRateRank")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "查询各宿舍楼归寝率排名")
|
||||
public ResultBean stasticDormRateRank(@ApiParam("日期 yyyy-MM-dd") String date,
|
||||
@RequestParam Long schoolId,
|
||||
@ApiParam("时段(宿舍考勤用),1-中午,2-晚上") Integer duration) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.stasticDormRateRank(date, schoolId, duration));
|
||||
}
|
||||
|
||||
@ApiOperation("出勤率统计表")
|
||||
@GetMapping("/listRate")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "出勤率统计表")
|
||||
public ResultBean<List<RateVO>> listRate(ListResultStatisticsDTO dto) {
|
||||
if (dto.getSchoolId() == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
dto.setSchoolId(currentUser.getDeptId());
|
||||
}
|
||||
}
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.listRate(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("导出出勤率统计表")
|
||||
@PostMapping("/exportRateList")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "导出出勤率统计表")
|
||||
public void exportRateList(@RequestBody ListResultStatisticsDTO dto, HttpServletResponse response) {
|
||||
if (dto.getSchoolId() == null) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
dto.setSchoolId(currentUser.getDeptId());
|
||||
}
|
||||
}
|
||||
eduAttendanceStasticService.exportRateList(dto, response);
|
||||
}
|
||||
|
||||
@ApiOperation("分宿舍楼统计当日考勤数据")
|
||||
@GetMapping("/stasticResultGroupByDorm")
|
||||
public ResultBean<List<StasticDormResultVO>> stasticResultGroupByDorm(@ApiParam("管理人员id(职工id)") Long staffId,
|
||||
@ApiParam("时间段,(1-中午,2-晚上)") Integer time,
|
||||
@ApiParam("日期(yyyy-MM-dd)") String date) {
|
||||
return ResultBean
|
||||
.buildSuccess(eduAttendanceStasticService.stasticResultGroupByDorm(FebsUtil.getTopDeptId(), staffId, time, date));
|
||||
}
|
||||
// @ApiOperation("按班级统计当日宿舍考勤数据")
|
||||
// @GetMapping("/stasticResultGroupByDorm")
|
||||
// public ResultBean<List<StasticDormResultVO>> stasticResultGroupByDorm(@ApiParam("管理人员id(职工id)") Long staffId,
|
||||
// @ApiParam("时间段,(1-中午,2-晚上)") Integer time,
|
||||
// @ApiParam("日期(yyyy-MM-dd)") String date) {
|
||||
// return ResultBean
|
||||
// .buildSuccess(eduAttendanceStasticService.stasticResultGroupByDorm(FebsUtil.getTopDeptId(), staffId, time, date));
|
||||
// }
|
||||
|
||||
|
||||
@ApiOperation("分寝室查询当日考勤数据")
|
||||
@GetMapping("/stasticResultByDormRoom")
|
||||
public ResultBean<List<StasticDormResultVO>> stasticResultByDormRoom(
|
||||
@ApiParam("宿舍楼id,不选择时传全部宿舍楼id") @RequestParam(required = false) Long dormId,
|
||||
@ApiParam("查寝状态,0-未确认,1-已确认") @RequestParam(required = false) Integer verify,
|
||||
@ApiParam("归寝状态,0-未归寝,1-已归寝") @RequestParam(required = false) Integer status,
|
||||
@ApiParam("时间段,(1-中午,2-晚上)") Integer time,
|
||||
@ApiParam("日期(yyyy-MM-dd)") String date,
|
||||
@ApiParam("寝室号排序,0-顺序,1-倒序,默认顺序") @RequestParam(defaultValue =
|
||||
"0") Integer sort,
|
||||
@ApiParam("搜索关键词,寝室名/学生名") String keyword) {
|
||||
return ResultBean
|
||||
.buildSuccess(eduAttendanceStasticService.stasticResultByDormRoom(dormId, verify, status, time, date, sort,
|
||||
keyword));
|
||||
}
|
||||
|
||||
@ApiOperation("按日统计教师考勤数据")
|
||||
@GetMapping("/stasticStaffResultByDay")
|
||||
public ResultBean<IPage<StasticStaffResultByDayVO>> stasticStaffResultByDay(StasticStaffResultDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.stasticStaffResultByDay(FebsUtil.getCurrentUser(), dto));
|
||||
}
|
||||
|
||||
@ApiOperation("导出按日统计教师考勤数据")
|
||||
@PostMapping("/exportStasticStaffResultByDay")
|
||||
public void exportStasticStaffResultByDay(@RequestBody StasticStaffResultDTO dto,
|
||||
HttpServletResponse response) {
|
||||
eduAttendanceStasticService.exportStasticStaffResultByDay(FebsUtil.getCurrentUser(), dto, response);
|
||||
}
|
||||
|
||||
@ApiOperation("按月统计教师考勤数据")
|
||||
@GetMapping("/stasticStaffResultByMonth")
|
||||
public ResultBean<IPage<StasticStaffResultByMonthVO>> stasticStaffResultByMonth(StasticStaffResultDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.stasticStaffResultByMonth(FebsUtil.getCurrentUser(), dto));
|
||||
}
|
||||
|
||||
@ApiOperation("导出按日统计教师考勤数据")
|
||||
@PostMapping("/exportStasticStaffResultByMonth")
|
||||
public void exportStasticStaffResultByMonth(@RequestBody StasticStaffResultDTO dto,
|
||||
HttpServletResponse response) {
|
||||
eduAttendanceStasticService.exportStasticStaffResultByMonth(FebsUtil.getCurrentUser(), dto, response);
|
||||
}
|
||||
|
||||
@ApiOperation("按日期段查询具体教职工异常信息")
|
||||
@GetMapping("/stasticStaffExcepByDay")
|
||||
public ResultBean<StasticStaffExcepByDayVO> stasticStaffExcepByDay(StasticStaffExcepByDayDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.stasticStaffExcepByDay(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询管理范围内各异常类型人数")
|
||||
@GetMapping("/countRangeExcepStaff")
|
||||
public ResultBean<CountVO> countRangeExcepStaff(StasticStaffExcepByDayDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.countRangeExcepStaff(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("dashboard-考勤概况")
|
||||
@GetMapping("/staRecordCount")
|
||||
public ResultBean<StaRecordCountVO> staRecordCount(@ApiParam("yyyy-MM-dd") String startDate,
|
||||
@ApiParam("yyyy-MM-dd") String endDate) {
|
||||
List<Long> schoolIds = remoteDeptService.getSchoolByArea(null, null).getData().stream().map(Dept::getDeptId)
|
||||
.collect(Collectors.toList());
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.staRecordCount(LocalDate.parse(startDate), LocalDate.parse(endDate), schoolIds));
|
||||
}
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.attendance.service.EduAttendanceDeviceService;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-设备(不鉴权)")
|
||||
@RestController
|
||||
@RequestMapping("/in/device")
|
||||
public class InEduAttendanceDeviceController {
|
||||
|
||||
@Resource
|
||||
private EduAttendanceDeviceService eduAttendanceDeviceService;
|
||||
|
||||
@GetMapping("/listDeviceByType")
|
||||
public ResultBean<List<EduAttendanceDevice>> listDeviceByType(String type) {
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.list(
|
||||
Wrappers.lambdaQuery(new EduAttendanceDevice()).eq(EduAttendanceDevice::getDeviceType, type)));
|
||||
}
|
||||
|
||||
@ApiOperation("更新设备在线状态")
|
||||
@GetMapping("/updateDeviceStatus")
|
||||
public ResultBean updateDeviceStatus() {
|
||||
eduAttendanceDeviceService.updateDeviceStatus();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("校时所有设备")
|
||||
@GetMapping("/timingAllDevice")
|
||||
public ResultBean timingAllDevice() {
|
||||
eduAttendanceDeviceService.timingAllDevice();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceNoticeService;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceNotice;
|
||||
import io.swagger.annotations.Api;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-学生-通知(不鉴权)")
|
||||
@RestController
|
||||
@RequestMapping("/in/notice")
|
||||
public class InEduAttendanceNoticeController {
|
||||
|
||||
@Resource
|
||||
private EduAttendanceNoticeService eduAttendanceNoticeService;
|
||||
|
||||
@PostMapping("/saveNotice")
|
||||
public ResultBean saveNotice(@RequestBody EduAttendanceNotice notice) {
|
||||
eduAttendanceNoticeService.save(notice);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@GetMapping("/sendNotice")
|
||||
public ResultBean sendNotice(@RequestParam Long id) {
|
||||
eduAttendanceNoticeService.sendNotice(id);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.attendance.service.EduAttendanceResultService;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-学生-考勤记录(不鉴权)")
|
||||
@RestController
|
||||
@RequestMapping("/in/result")
|
||||
@RequiredArgsConstructor
|
||||
public class InEduAttendanceResultController {
|
||||
|
||||
private final EduAttendanceResultService eduAttendanceResultService;
|
||||
|
||||
@ApiOperation("检测并发送未到消息")
|
||||
@GetMapping("/pushNotArriveMsg")
|
||||
public ResultBean pushNotArriveMsg() {
|
||||
eduAttendanceResultService.pushNotArriveMsg();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("处理考勤记录")
|
||||
@GetMapping("/dealAttendanceResult")
|
||||
public ResultBean dealAttendanceResult() {
|
||||
eduAttendanceResultService.dealAttendanceResult();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiModelProperty("确认未到记录")
|
||||
@GetMapping("/confirmNotArrive")
|
||||
public ResultBean confirmNotArrive(@ApiParam("id") Long id) {
|
||||
eduAttendanceResultService.update(Wrappers.<EduAttendanceResult>lambdaUpdate().eq(EduAttendanceResult::getId, id)
|
||||
.set(EduAttendanceResult::getNotArriveConfirm, 1));
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("查询未到记录是否已经确认")
|
||||
@GetMapping("/checkResult")
|
||||
public ResultBean<Boolean> checkResult(Long id) {
|
||||
EduAttendanceResult result = eduAttendanceResultService.getById(id);
|
||||
return ResultBean.buildSuccess(result.getNotArriveConfirm() == 1);
|
||||
}
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceRuleService;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-学生-考勤规则(不鉴权)")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/in/rule")
|
||||
public class InEduAttendanceRuleController {
|
||||
|
||||
private final EduAttendanceRuleService eduAttendanceRuleService;
|
||||
|
||||
@ApiOperation("更新规则状态")
|
||||
@GetMapping("/updateRuleStatus")
|
||||
public ResultBean updateRuleStatus() {
|
||||
eduAttendanceRuleService.updateRuleStatus();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.attendance.controller;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffRecordService;
|
||||
import com.yida.data.attendance.service.EduAttendanceStaffRuleRemindService;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author ccl
|
||||
*/
|
||||
@Api(tags = "考勤-教职工-考勤记录(不鉴权)")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/in/staffRecord")
|
||||
public class InEduAttendanceStaffRecordController {
|
||||
|
||||
private final EduAttendanceStaffRecordService eduAttendanceStaffRecordService;
|
||||
private final EduAttendanceStaffRuleRemindService eduAttendanceStaffRuleRemindService;
|
||||
|
||||
@ApiOperation("处理记录到结果表")
|
||||
@GetMapping("/staffRecord")
|
||||
public ResultBean staffRecord() {
|
||||
eduAttendanceStaffRecordService.staffRecord();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("提醒打卡")
|
||||
@GetMapping("/remindStaff")
|
||||
public ResultBean remindStaff() {
|
||||
eduAttendanceStaffRuleRemindService.remindStaff();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.yida.data.attendance.controller.h5;
|
||||
|
||||
import com.yida.data.attendance.dto.ListRecordDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceRecordService;
|
||||
import com.yida.data.attendance.vo.RecordDetailVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-前台-进出记录")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/h5/record")
|
||||
public class H5EduAttendanceRecordController {
|
||||
|
||||
private final EduAttendanceRecordService eduAttendanceRecordService;
|
||||
|
||||
@ApiOperation("查询进出记录")
|
||||
@GetMapping("/listRecord")
|
||||
public ResultBean<List<RecordDetailVO>> listRecord(ListRecordDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRecordService.listRecord(dto));
|
||||
}
|
||||
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.yida.data.attendance.controller.h5;
|
||||
|
||||
import com.yida.data.attendance.dto.ListStudentResultDTO;
|
||||
import com.yida.data.attendance.service.EduAttendanceResultService;
|
||||
import com.yida.data.attendance.vo.ResultDetailVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-前台-考勤记录")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/h5/result")
|
||||
public class H5EduAttendanceResultController {
|
||||
|
||||
private final EduAttendanceResultService eduAttendanceResultService;
|
||||
|
||||
@ApiOperation("查询考勤记录")
|
||||
@GetMapping("/listStudentResult")
|
||||
public ResultBean<List<ResultDetailVO>> listStudentResult(ListStudentResultDTO dto) {
|
||||
return ResultBean.buildSuccess(eduAttendanceResultService.listStudentResultDetail(dto));
|
||||
}
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.yida.data.attendance.controller.h5;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceRuleTimeService;
|
||||
import com.yida.data.attendance.vo.RuleTimeVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-前台-考勤记录")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/h5/ruleTime")
|
||||
public class H5EduAttendanceRuleController {
|
||||
|
||||
private final EduAttendanceRuleTimeService eduAttendanceRuleTimeService;
|
||||
|
||||
@ApiOperation("查询班级某天匹配的规则时间")
|
||||
@GetMapping("/listDeptRuleTime")
|
||||
public ResultBean<List<RuleTimeVO>> listDeptRuleTime(Long deptId, @ApiParam("日期,yyyy-MM-dd") String date,
|
||||
@ApiParam("规则类型,0-校门,1-宿舍") Integer type) {
|
||||
return ResultBean.buildSuccess(eduAttendanceRuleTimeService.listDeptRuleTime(deptId, LocalDate.parse(date), type));
|
||||
}
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
package com.yida.data.attendance.controller.h5;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceStasticService;
|
||||
import com.yida.data.attendance.vo.CountVO;
|
||||
import com.yida.data.attendance.vo.TeacherStasticVO;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-前台-家长考勤统计")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/h5/statistics")
|
||||
public class H5EduAttendanceStatisticsController {
|
||||
|
||||
private final EduAttendanceStasticService eduAttendanceStasticService;
|
||||
|
||||
@ApiOperation("统计学生出勤次数")
|
||||
@GetMapping("/countStudentAttendance")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "统计学生出勤次数")
|
||||
public ResultBean<CountVO> countStudentAttendance(Long studentId, String startDate, String endDate) {
|
||||
return ResultBean.buildSuccess(
|
||||
eduAttendanceStasticService.countStudentAttendance(studentId, LocalDate.parse(startDate), LocalDate.parse(endDate)));
|
||||
}
|
||||
|
||||
@ApiOperation("统计某班出勤数据")
|
||||
@GetMapping("/statisticsClass")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "统计某班出勤数据")
|
||||
public ResultBean<TeacherStasticVO> statisticsClass(Long classId,
|
||||
@ApiParam("日期,yyyy-MM-dd (和月必传一个)") @RequestParam(required = false) String date,
|
||||
@ApiParam("月,yyyy-MM(和日期必传一个)") @RequestParam(required = false) String month,
|
||||
@RequestParam(required = false) @ApiParam("时段id,按月统计不传") Long timeId) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.statisticsClass(classId, date, month, timeId));
|
||||
}
|
||||
|
||||
@ApiOperation("统计班级宿舍考勤")
|
||||
@GetMapping("/statisticsClassDormAtt")
|
||||
@OperationLog(module = ModuleName.ATTENDANCE, methods = "统计班级宿舍考勤")
|
||||
public ResultBean<List<EduStudent>> statisticsClassDormAtt(@ApiParam("学校ID") @RequestParam(required = true) Long schoolId,
|
||||
@ApiParam("班级ID") @RequestParam(required = true) Long classId,
|
||||
@ApiParam("日期") @RequestParam(required = true) String date,
|
||||
@ApiParam("考勤时段,1=午间考勤,2=晚间考勤") @RequestParam(required = false) Integer time) {
|
||||
return ResultBean.buildSuccess(eduAttendanceStasticService.getStudentDormInfo(schoolId, classId, date, time));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.yida.data.attendance.controller.out;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceDeviceService;
|
||||
import com.yida.data.attendance.vo.OnlineCountVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "考勤-设备", value = "考勤")
|
||||
@RestController
|
||||
@RequestMapping("/out/device")
|
||||
@RequiredArgsConstructor
|
||||
public class OutEduAttendanceDeviceController {
|
||||
|
||||
private final EduAttendanceDeviceService eduAttendanceDeviceService;
|
||||
|
||||
@ApiOperation("获取面板机状态分布")
|
||||
@GetMapping("/getOnlineDistrib")
|
||||
public ResultBean<OnlineCountVO> getOnlineDistrib(Long[] schoolIds) {
|
||||
return ResultBean.buildSuccess(eduAttendanceDeviceService.getOnlineDistrib(Arrays.asList(schoolIds)));
|
||||
}
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
package com.yida.data.attendance.controller.out;
|
||||
|
||||
import com.yida.data.attendance.service.EduAttendanceManagePushResultService;
|
||||
import com.yida.data.attendance.service.EduAttendanceStasticService;
|
||||
import com.yida.data.attendance.vo.StaRecordCountVO;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "考勤-考勤统计")
|
||||
@RestController
|
||||
@RequestMapping("/out/stastic")
|
||||
@RequiredArgsConstructor
|
||||
public class OutEduAttendanceStasticController {
|
||||
|
||||
private final EduAttendanceStasticService eduAttendanceStasticService;
|
||||
private final EduAttendanceManagePushResultService eduAttendanceManagePushResultService;
|
||||
|
||||
@ApiOperation("dashboard-考勤概况")
|
||||
@GetMapping("/staRecordCount")
|
||||
public ResultBean<StaRecordCountVO> staRecordCount(@ApiParam("yyyy-MM-dd") String startDate,
|
||||
@ApiParam("yyyy-MM-dd") String endDate, Long[] schoolIds) {
|
||||
return ResultBean
|
||||
.buildSuccess(eduAttendanceStasticService.staRecordCount(LocalDate.parse(startDate), LocalDate.parse(endDate),
|
||||
Arrays.asList(schoolIds)));
|
||||
}
|
||||
|
||||
@ApiOperation("查询归寝报告")
|
||||
@GetMapping("/selectPushList")
|
||||
public ResultBean<List<EduAttendanceResult>> selectPushList(@RequestParam Long pushId) {
|
||||
return ResultBean.buildSuccess(eduAttendanceManagePushResultService.selectPushList(pushId));
|
||||
}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceConfig;
|
||||
|
||||
public interface EduAttendanceConfigMapper extends BaseMapper<EduAttendanceConfig> {
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDeviceGroup;
|
||||
import com.yida.data.attendance.vo.DeviceOrDeviceGroupVO;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备分组表 Mapper
|
||||
*
|
||||
* @author zhanghaijun
|
||||
* @date 2021-06-16 15:27:11
|
||||
*/
|
||||
public interface EduAttendanceDeviceGroupMapper extends BaseMapper<EduAttendanceDeviceGroup> {
|
||||
|
||||
List<DeviceOrDeviceGroupVO> listDeviceAndGroup(@Param("keyword") String keyword,
|
||||
@Param("schoolId") Long schoolId);
|
||||
|
||||
List<EduAttendanceDevice> listDeviceByGroup(@Param("groupIds") List<Long> groupIds);
|
||||
|
||||
IPage<EduAttendanceDeviceGroup> selectGroup(Page<EduAttendanceDeviceGroup> page,
|
||||
@Param("name") String name,
|
||||
@Param("schoolIds") List<Long> schoolId);
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.attendance.vo.DeviceVO;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDevice;
|
||||
import com.yida.data.attendance.dto.DevicePage;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EduAttendanceDeviceMapper extends BaseMapper<EduAttendanceDevice> {
|
||||
|
||||
DevicePage<DeviceVO> listDevicePage(@Param("page") Page page,
|
||||
@Param("schoolIds") List<Long> schoolIds,
|
||||
@Param("number") String number,
|
||||
@Param("scope") Integer scope,
|
||||
@Param("type") Integer type,
|
||||
@Param("state") Integer state);
|
||||
|
||||
void updateDevice(@Param("operation") Integer operation,
|
||||
@Param("type") String type,
|
||||
@Param("aliveDeviceSn") Set<String> aliveDeviceSn);
|
||||
|
||||
/**
|
||||
* 根据学校id和状态查询考勤设备数量统计
|
||||
*
|
||||
* @param schoolIds 学校id集合
|
||||
* @param state 考勤设备状态
|
||||
* @return java.lang.Long
|
||||
* @author ZYJ
|
||||
* @date 2021/10/9 13:36
|
||||
*/
|
||||
Long findDeviceNumber(@Param("schoolIds") List<Long> schoolIds, @Param("state") Integer state);
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceDeviceRule;
|
||||
|
||||
public interface EduAttendanceDeviceRuleMapper extends BaseMapper<EduAttendanceDeviceRule> {
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceManagePushResult;
|
||||
|
||||
/**
|
||||
* 管理考勤结果推送记录 mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/7/15
|
||||
*/
|
||||
public interface EduAttendanceManagePushResultMapper extends BaseMapper<EduAttendanceManagePushResult> {
|
||||
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceNotArrive;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EduAttendanceNotArriveMapper extends BaseMapper<EduAttendanceNotArrive> {
|
||||
/**
|
||||
* 查询是否存在
|
||||
*/
|
||||
Integer existNotArrive(@Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 查询上一次最新的未到记录
|
||||
*/
|
||||
EduAttendanceNotArrive getLast(@Param("studentId") Long studentId);
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceNotice;
|
||||
|
||||
public interface EduAttendanceNoticeMapper extends BaseMapper<EduAttendanceNotice> {
|
||||
}
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
package com.yida.data.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.attendance.dto.ListRecordDTO;
|
||||
import com.yida.data.attendance.vo.AttendanceResultVO;
|
||||
import com.yida.data.attendance.vo.CountVO;
|
||||
import com.yida.data.attendance.vo.InOutDormPageVO;
|
||||
import com.yida.data.attendance.vo.RecordDetailVO;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRecord;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRule;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EduAttendanceRecordMapper extends BaseMapper<EduAttendanceRecord> {
|
||||
|
||||
List<InOutDormPageVO> listInOut(Page page,
|
||||
@Param("studentIds") List<Long> studentIds,
|
||||
@Param("zone") Integer zone,
|
||||
@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
IPage<AttendanceResultVO> listAttendanceResultPage(Page page,
|
||||
@Param("studentIds") List<Long> studentIds,
|
||||
@Param("ruleId") Long ruleId,
|
||||
@Param("date") LocalDate date);
|
||||
|
||||
|
||||
List<AttendanceResultVO> listAttendanceResult(@Param("studentIds") List<Long> studentIds,
|
||||
@Param("ruleId") Long ruleId,
|
||||
@Param("date") LocalDate date);
|
||||
|
||||
List<RecordDetailVO> listRecordDetail(@Param("userId") Long userId,
|
||||
@Param("date") String date);
|
||||
|
||||
|
||||
RecordDetailVO getRecordDetail(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询时间段内最后一条记录
|
||||
*
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @param type 0-进入,1-离开
|
||||
* @return
|
||||
*/
|
||||
EduAttendanceRecord getLastRecordByTime(@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("type") Integer type,
|
||||
@Param("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 统计时段内迟到早退记录条数
|
||||
*
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
CountVO countLateAndLeave(
|
||||
@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("userId") Long userId);
|
||||
|
||||
List<RecordDetailVO> listRecord(@Param("dto") ListRecordDTO dto);
|
||||
|
||||
|
||||
/**
|
||||
* @param startTime 规则开始时间
|
||||
* @param endTime 规则结束时间
|
||||
* @param nowDate 当前时间
|
||||
* @param studentId 学生ID
|
||||
* @param type 统计类型:0=正常打卡人数,1=迟到人数/晚归人数,2:旷课人数/旷宿人数,3:早退人数,4:请假人数
|
||||
* @return
|
||||
*/
|
||||
Integer stasticTeacherData(@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("nowDate") LocalDateTime nowDate,
|
||||
@Param("studentId") Long studentId,
|
||||
@Param("type") Integer type);
|
||||
|
||||
|
||||
EduAttendanceRecord getFirstByStudentIdAndRuleTimeId(@Param("studentId") Long studentId,
|
||||
@Param("ruleTimeId") Long ruleTimeId,
|
||||
@Param("date") String date,
|
||||
@Param("deviceIdList") List<Long> deviceIdList);
|
||||
|
||||
EduAttendanceRecord getLastByStudentIdAndRuleTimeId(@Param("studentId") Long studentId,
|
||||
@Param("ruleTimeId") Long ruleTimeId,
|
||||
@Param("date") String date,
|
||||
@Param("deviceIdList") List<Long> deviceIdList);
|
||||
|
||||
|
||||
List<EduAttendanceRecord> getRecordByStudentIdAndMonth(@Param("studentId") Long studentId,
|
||||
@Param("month") String month,
|
||||
@Param("status") Integer status);
|
||||
|
||||
|
||||
EduAttendanceRecord getDormLastByStudentIdAndRuleTimeId(@Param("studentId") Long studentId,
|
||||
@Param("date") String date);
|
||||
|
||||
EduAttendanceRecord getDormFirstByStudentIdAndRuleTimeId(@Param("studentId") Long studentId,
|
||||
@Param("date") String date);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user