Merge branch 'dev' into frx
This commit is contained in:
commit
77ab65be14
@ -40,13 +40,13 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
@ -40,13 +40,13 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
@ -10,13 +10,13 @@ import java.time.LocalDateTime;
|
|||||||
* @author 艾楷
|
* @author 艾楷
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class AttendancePunchRecordVO {
|
public class AttendancePunchRecordVO {
|
||||||
/**
|
/**
|
||||||
* 编号
|
* 编号
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 考勤组管理员id
|
* 考勤用户id
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
@ -135,4 +135,4 @@ public class AttendancePunchRecordVO {
|
|||||||
* 请假json对象
|
* 请假json对象
|
||||||
*/
|
*/
|
||||||
private String leaveJson;
|
private String leaveJson;
|
||||||
}
|
}
|
||||||
|
@ -180,6 +180,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode LOG_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_010_002, "日志实例的拓展不存在");
|
ErrorCode LOG_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_010_002, "日志实例的拓展不存在");
|
||||||
|
|
||||||
ErrorCode LOG_RULE_NOT_EXISTS = new ErrorCode(1_009_010_003, "日志规则不存在");
|
ErrorCode LOG_RULE_NOT_EXISTS = new ErrorCode(1_009_010_003, "日志规则不存在");
|
||||||
|
ErrorCode PLEASE_SELECT_A_TIME_RANGE = new ErrorCode(1_009_010_004, "请选择时间区间");
|
||||||
// ========== 站内信发送 1-003-001-000 ==========
|
// ========== 站内信发送 1-003-001-000 ==========
|
||||||
ErrorCode SCHEDULING_NOT_EXISTS = new ErrorCode(1_003_001_000, "排班制考勤设置不存在");
|
ErrorCode SCHEDULING_NOT_EXISTS = new ErrorCode(1_003_001_000, "排班制考勤设置不存在");
|
||||||
ErrorCode PUNCH_RECORD_NOT_EXISTS = new ErrorCode(1_003_002_000, "用户打卡记录不存在");
|
ErrorCode PUNCH_RECORD_NOT_EXISTS = new ErrorCode(1_003_002_000, "用户打卡记录不存在");
|
||||||
|
@ -46,6 +46,12 @@ public class AttendanceController {
|
|||||||
return success(vo);
|
return success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getRulesByUserId")
|
||||||
|
@Operation(summary = "获取考勤规则根据用户id")
|
||||||
|
public CommonResult<AttendanceRulesVO> getRulesByUserId() {
|
||||||
|
AttendanceRulesVO vo = attendanceService.getRulesByUserId();
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/statisticsByDay")
|
@GetMapping("/statisticsByDay")
|
||||||
@Operation(summary = "统计按天")
|
@Operation(summary = "统计按天")
|
||||||
|
@ -44,6 +44,9 @@ public class AuthPermissionInfoRespVO {
|
|||||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.jpg")
|
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.jpg")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO")
|
@Schema(description = "管理后台 - 登录用户的菜单信息 Response VO")
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.group;
|
package cn.iocoder.yudao.module.system.controller.admin.group;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
|
|
||||||
import javax.annotation.security.PermitAll;
|
|
||||||
import javax.validation.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupRespVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupSaveReqVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.group.AttendanceGroupService;
|
import cn.iocoder.yudao.module.system.service.attendance.group.AttendanceGroupService;
|
||||||
|
import cn.iocoder.yudao.module.system.service.attendance.groupsystem.AttendanceGroupSystemService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 考勤组")
|
@Tag(name = "管理后台 - 考勤组")
|
||||||
@RestController
|
@RestController
|
||||||
@ -37,6 +37,8 @@ public class AttendanceGroupController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AttendanceGroupService groupService;
|
private AttendanceGroupService groupService;
|
||||||
|
@Resource
|
||||||
|
private AttendanceGroupSystemService groupSystemService;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建考勤组")
|
@Operation(summary = "创建考勤组")
|
||||||
@ -68,7 +70,10 @@ public class AttendanceGroupController {
|
|||||||
@PreAuthorize("@ss.hasPermission('attendance:group:query')")
|
@PreAuthorize("@ss.hasPermission('attendance:group:query')")
|
||||||
public CommonResult<AttendanceGroupRespVO> getGroup(@RequestParam("id") Long id) {
|
public CommonResult<AttendanceGroupRespVO> getGroup(@RequestParam("id") Long id) {
|
||||||
AttendanceGroupDO group = groupService.getGroup(id);
|
AttendanceGroupDO group = groupService.getGroup(id);
|
||||||
return success(BeanUtils.toBean(group, AttendanceGroupRespVO.class));
|
List<AttendanceGroupSystemRespVO> groupSystems = groupSystemService.getGroupSystemVoByGroupId(id);
|
||||||
|
AttendanceGroupRespVO vo = BeanUtils.toBean(group, AttendanceGroupRespVO.class);
|
||||||
|
vo.setGroupSystems(groupSystems);
|
||||||
|
return success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,12 +98,12 @@ public class AttendanceGroupController {
|
|||||||
@PreAuthorize("@ss.hasPermission('attendance:group:export')")
|
@PreAuthorize("@ss.hasPermission('attendance:group:export')")
|
||||||
@OperateLog(type = EXPORT)
|
@OperateLog(type = EXPORT)
|
||||||
public void exportGroupExcel(@Valid AttendanceGroupPageReqVO pageReqVO,
|
public void exportGroupExcel(@Valid AttendanceGroupPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<AttendanceGroupDO> list = groupService.getGroupPage(pageReqVO).getList();
|
List<AttendanceGroupDO> list = groupService.getGroupPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "考勤组.xls", "数据", AttendanceGroupRespVO.class,
|
ExcelUtils.write(response, "考勤组.xls", "数据", AttendanceGroupRespVO.class,
|
||||||
BeanUtils.toBean(list, AttendanceGroupRespVO.class));
|
BeanUtils.toBean(list, AttendanceGroupRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@ -16,8 +18,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class AttendanceGroupPageReqVO extends PageParam {
|
public class AttendanceGroupPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "15633")
|
@Schema(description = "考勤组管理员ids", example = "15633")
|
||||||
private Long userId;
|
private List<Long> userIds;
|
||||||
|
|
||||||
@Schema(description = "群组名称", example = "李四")
|
@Schema(description = "群组名称", example = "李四")
|
||||||
private String groupName;
|
private String groupName;
|
||||||
@ -50,4 +52,4 @@ public class AttendanceGroupPageReqVO extends PageParam {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.Data;
|
||||||
import java.util.*;
|
|
||||||
import java.util.*;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.alibaba.excel.annotation.*;
|
import java.util.List;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 考勤组 Response VO")
|
@Schema(description = "管理后台 - 考勤组 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ -17,9 +18,13 @@ public class AttendanceGroupRespVO {
|
|||||||
@ExcelProperty("编号")
|
@ExcelProperty("编号")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "15633")
|
@Schema(description = "考勤组管理员列表", example = "15633")
|
||||||
@ExcelProperty("考勤组管理员id")
|
@ExcelProperty("考勤组管理员列表")
|
||||||
private Long userId;
|
private List<AttendanceGroupSystemRespVO> groupSystems;
|
||||||
|
|
||||||
|
@Schema(description = "管理员名称列表逗号隔开", example = "李四")
|
||||||
|
@ExcelProperty("管理员名称列表逗号隔开")
|
||||||
|
private String systemNames;
|
||||||
|
|
||||||
@Schema(description = "群组名称", example = "李四")
|
@Schema(description = "群组名称", example = "李四")
|
||||||
@ExcelProperty("群组名称")
|
@ExcelProperty("群组名称")
|
||||||
@ -62,4 +67,4 @@ public class AttendanceGroupRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.group.vo;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.Data;
|
||||||
import java.util.*;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 考勤组新增/修改 Request VO")
|
@Schema(description = "管理后台 - 考勤组新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@ -14,8 +10,8 @@ public class AttendanceGroupSaveReqVO {
|
|||||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22881")
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22881")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "15633")
|
@Schema(description = "考勤组管理员ids", example = "15633")
|
||||||
private Long userId;
|
private String userIds;
|
||||||
|
|
||||||
@Schema(description = "群组名称", example = "李四")
|
@Schema(description = "群组名称", example = "李四")
|
||||||
private String groupName;
|
private String groupName;
|
||||||
@ -44,4 +40,4 @@ public class AttendanceGroupSaveReqVO {
|
|||||||
@Schema(description = "节假日自动排休 0否 1是")
|
@Schema(description = "节假日自动排休 0否 1是")
|
||||||
private Integer autoHolidaysFlag;
|
private Integer autoHolidaysFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AttendanceGroupSystemRespVO {
|
||||||
|
@Schema(description = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "考勤组管理员id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "考勤组管理员名称")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
@Schema(description = "考勤组id")
|
||||||
|
private Long attendanceGroupId;
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -17,7 +18,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class AttendancePunchRecordPageReqVO extends PageParam {
|
public class AttendancePunchRecordPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "11409")
|
@Schema(description = "考勤用户id", example = "11409")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "考勤组id", example = "22293")
|
@Schema(description = "考勤组id", example = "22293")
|
||||||
@ -77,4 +78,4 @@ public class AttendancePunchRecordPageReqVO extends PageParam {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ public class AttendancePunchRecordRespVO {
|
|||||||
@ExcelProperty("编号")
|
@ExcelProperty("编号")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "11409")
|
@Schema(description = "考勤用户id", example = "11409")
|
||||||
@ExcelProperty("考勤组管理员id")
|
@ExcelProperty("考勤用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "考勤组id", example = "22293")
|
@Schema(description = "考勤组id", example = "22293")
|
||||||
@ -103,4 +103,4 @@ public class AttendancePunchRecordRespVO {
|
|||||||
@Schema(description = "班次名称")
|
@Schema(description = "班次名称")
|
||||||
@ExcelProperty("班次名称")
|
@ExcelProperty("班次名称")
|
||||||
private String attendanceGroupShiftName;
|
private String attendanceGroupShiftName;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
package cn.iocoder.yudao.module.system.controller.admin.punchrecord.vo;
|
||||||
|
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 用户打卡记录新增/修改 Request VO")
|
@Schema(description = "管理后台 - 用户打卡记录新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@ -14,7 +11,7 @@ public class AttendancePunchRecordSaveReqVO {
|
|||||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "65")
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "65")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "考勤组管理员id", example = "11409")
|
@Schema(description = "考勤用户id", example = "11409")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "部门id", example = "11409")
|
@Schema(description = "部门id", example = "11409")
|
||||||
@ -102,4 +99,4 @@ public class AttendancePunchRecordSaveReqVO {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,14 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListGroupByUserDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsListVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsListVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsExcelVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsExcelVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsModelVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsModelVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsDetailsListGroupByUserVO;
|
||||||
import cn.iocoder.yudao.module.system.service.worklog.LogStatisticsService;
|
import cn.iocoder.yudao.module.system.service.worklog.LogStatisticsService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -57,6 +59,23 @@ public class LogStatisticsController {
|
|||||||
return success(logStatisticsService.getStatistics(dto));
|
return success(logStatisticsService.getStatistics(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getStatisticsGroupByUser")
|
||||||
|
@Operation(summary = "获取日志统计(通过用户)")
|
||||||
|
public CommonResult<List<LogStatisticsDetailsListGroupByUserVO>> getStatisticsGroupByUser(@ModelAttribute LogStatisticsDetailsListGroupByUserDTO dto) {
|
||||||
|
return success(logStatisticsService.getStatisticsGroupByUser(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel-group-by-user")
|
||||||
|
@Operation(summary = "导出日志统计 Excel")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportLogGroupByUserExcel(@ModelAttribute LogStatisticsDetailsListGroupByUserDTO dto,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
List<LogStatisticsDetailsListGroupByUserVO> list = logStatisticsService.getStatisticsGroupByUser(dto);
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "日志统计.xls", "日志统计", LogStatisticsDetailsListGroupByUserVO.class,
|
||||||
|
BeanUtils.toBean(list, LogStatisticsDetailsListGroupByUserVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/getNeedWrite")
|
@GetMapping("/getNeedWrite")
|
||||||
@Operation(summary = "获取需要填写的")
|
@Operation(summary = "获取需要填写的")
|
||||||
public CommonResult<List<LogStatisticsModelVO>> getNeedWrite() {
|
public CommonResult<List<LogStatisticsModelVO>> getNeedWrite() {
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LogStatisticsDetailsListGroupByUserDTO {
|
||||||
|
|
||||||
|
@Schema(description = "开始时间 格式yyyy-MM-dd 如果是日报的话 开始时间结束时间都传同一天即可")
|
||||||
|
private String beginTime;
|
||||||
|
|
||||||
|
@Schema(description = "结束时间 格式yyyy-MM-dd 如果是日报的话 开始时间结束时间都传同一天即可")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@Schema(description = "日志类型")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "部门id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间列表
|
||||||
|
*/
|
||||||
|
private List<String> dateList;
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -30,6 +31,10 @@ public class LogStatisticsDetailsVO {
|
|||||||
@Schema(description = "日志id", example = "30875")
|
@Schema(description = "日志id", example = "30875")
|
||||||
private Long logInstanceExtId;
|
private Long logInstanceExtId;
|
||||||
|
|
||||||
|
@Schema(description = "日志类型 1日报 2周报", example = "1")
|
||||||
|
@ExcelProperty("日志类型 1日报 2周报")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
@Schema(description = "提交状态 1按时提交 2迟交 3未提交", example = "2")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class LogStatisticsDetailsListGroupByUserVO {
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
@ExcelProperty("姓名")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
@Schema(description = "部门名称")
|
||||||
|
@ExcelProperty("部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
@Schema(description = "日志类型")
|
||||||
|
@ExcelProperty(value = "日志类型", converter = DictConvert.class)
|
||||||
|
@DictFormat("work_log_type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "应提交")
|
||||||
|
@ExcelProperty("应提交")
|
||||||
|
private Integer should;
|
||||||
|
|
||||||
|
@Schema(description = "按时交")
|
||||||
|
@ExcelProperty("按时交")
|
||||||
|
private Integer onTime;
|
||||||
|
|
||||||
|
@Schema(description = "迟交")
|
||||||
|
@ExcelProperty("迟交")
|
||||||
|
private Integer late;
|
||||||
|
|
||||||
|
@Schema(description = "未提交")
|
||||||
|
@ExcelProperty("未提交")
|
||||||
|
private Integer notYet;
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LogStatisticsGroupByUserVO extends LogStatisticsDetailsVO {
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
@Schema(description = "部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
}
|
@ -29,7 +29,7 @@ public interface AuthConvert {
|
|||||||
|
|
||||||
default AuthPermissionInfoRespVO convert(AdminUserDO user, List<RoleDO> roleList, List<MenuDO> menuList) {
|
default AuthPermissionInfoRespVO convert(AdminUserDO user, List<RoleDO> roleList, List<MenuDO> menuList) {
|
||||||
return AuthPermissionInfoRespVO.builder()
|
return AuthPermissionInfoRespVO.builder()
|
||||||
.user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname()).avatar(user.getAvatar()).build())
|
.user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).mobile(user.getMobile()).nickname(user.getNickname()).avatar(user.getAvatar()).build())
|
||||||
.roles(convertSet(roleList, RoleDO::getCode))
|
.roles(convertSet(roleList, RoleDO::getCode))
|
||||||
// 权限标识信息
|
// 权限标识信息
|
||||||
.permissions(convertSet(menuList, MenuDO::getPermission))
|
.permissions(convertSet(menuList, MenuDO::getPermission))
|
||||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.dal.dataobject.attendance.group;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
@ -31,10 +32,6 @@ public class AttendanceGroupDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
|
||||||
* 考勤组管理员id
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
/**
|
/**
|
||||||
* 群组名称
|
* 群组名称
|
||||||
*/
|
*/
|
||||||
@ -72,6 +69,11 @@ public class AttendanceGroupDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private Integer autoHolidaysFlag;
|
private Integer autoHolidaysFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理员名称列表逗号隔开
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String systemNames;
|
||||||
|
|
||||||
public static String getCodeByType(Integer type) {
|
public static String getCodeByType(Integer type) {
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
@ -81,4 +83,4 @@ public class AttendanceGroupDO extends BaseDO {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupsystem;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组 DO
|
||||||
|
*
|
||||||
|
* @author 艾楷
|
||||||
|
*/
|
||||||
|
@TableName("kq_attendance_group_system")
|
||||||
|
@KeySequence("kq_attendance_group_system_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AttendanceGroupSystemDO extends BaseDO {
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 考勤组管理员id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 考勤组id
|
||||||
|
*/
|
||||||
|
private Long attendanceGroupId;
|
||||||
|
}
|
@ -30,7 +30,7 @@ public class AttendancePunchRecordDO extends BaseDO {
|
|||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 考勤组管理员id
|
* 考勤用户id
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
|
@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@ -20,7 +22,6 @@ public interface AttendanceGroupMapper extends BaseMapperX<AttendanceGroupDO> {
|
|||||||
|
|
||||||
default PageResult<AttendanceGroupDO> selectPage(AttendanceGroupPageReqVO reqVO) {
|
default PageResult<AttendanceGroupDO> selectPage(AttendanceGroupPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceGroupDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<AttendanceGroupDO>()
|
||||||
.eqIfPresent(AttendanceGroupDO::getUserId, reqVO.getUserId())
|
|
||||||
.likeIfPresent(AttendanceGroupDO::getGroupName, reqVO.getGroupName())
|
.likeIfPresent(AttendanceGroupDO::getGroupName, reqVO.getGroupName())
|
||||||
.eqIfPresent(AttendanceGroupDO::getType, reqVO.getType())
|
.eqIfPresent(AttendanceGroupDO::getType, reqVO.getType())
|
||||||
.eqIfPresent(AttendanceGroupDO::getPunchType, reqVO.getPunchType())
|
.eqIfPresent(AttendanceGroupDO::getPunchType, reqVO.getPunchType())
|
||||||
@ -39,4 +40,13 @@ public interface AttendanceGroupMapper extends BaseMapperX<AttendanceGroupDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<AttendanceGroupDO> getByUserId(@Param("userId") Long userId);
|
List<AttendanceGroupDO> getByUserId(@Param("userId") Long userId);
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 分页列表
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IPage<AttendanceGroupDO> selectPageList(@Param("vo") AttendanceGroupPageReqVO vo, @Param("page") Page page);
|
||||||
|
}
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.dal.mysql.attendance.groupsystem;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupsystem.AttendanceGroupSystemDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组 Mapper
|
||||||
|
*
|
||||||
|
* @author 艾楷
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AttendanceGroupSystemMapper extends BaseMapperX<AttendanceGroupSystemDO> {
|
||||||
|
/**
|
||||||
|
* 根据考勤组id查询考勤组管理员
|
||||||
|
*
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AttendanceGroupSystemRespVO> getGroupSystemVoByGroupId(@Param("groupId") Long groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户管理的考勤组
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AttendanceGroupDO> getGroupSystemByUserId(@Param("userId") Long userId);
|
||||||
|
}
|
@ -3,10 +3,12 @@ package cn.iocoder.yudao.module.system.dal.mysql.worklog;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListGroupByUserDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsDetailsVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsModelVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsModelVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.LogStatisticsPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsGroupByUserVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogStatisticsDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogStatisticsDO;
|
||||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogUseVO;
|
import cn.iocoder.yudao.module.system.service.worklog.dto.LogUseVO;
|
||||||
@ -82,4 +84,12 @@ public interface LogStatisticsMapper extends BaseMapperX<LogStatisticsDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LogStatisticsModelVO> getNeedWriteHistory(@Param("dto") NeedWriteHistoryDTO dto, @Param("dateList") List<String> dateList);
|
List<LogStatisticsModelVO> getNeedWriteHistory(@Param("dto") NeedWriteHistoryDTO dto, @Param("dateList") List<String> dateList);
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 根据用户分组日志统计
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LogStatisticsGroupByUserVO> getStatisticsGroupByUser(@Param("dto") LogStatisticsDetailsListGroupByUserDTO dto);
|
||||||
|
}
|
||||||
|
@ -106,4 +106,11 @@ public interface AttendanceService {
|
|||||||
* @param dto
|
* @param dto
|
||||||
*/
|
*/
|
||||||
void exportAttendanceExcel(HttpServletResponse response, ExportAttendanceExcelDTO dto);
|
void exportAttendanceExcel(HttpServletResponse response, ExportAttendanceExcelDTO dto);
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 根据用户获取考勤组规则
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AttendanceRulesVO getRulesByUserId();
|
||||||
|
}
|
||||||
|
@ -30,6 +30,7 @@ import cn.iocoder.yudao.module.system.handler.PunchHandler;
|
|||||||
import cn.iocoder.yudao.module.system.service.attendance.group.AttendanceGroupService;
|
import cn.iocoder.yudao.module.system.service.attendance.group.AttendanceGroupService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.groupshift.AttendanceGroupShiftService;
|
import cn.iocoder.yudao.module.system.service.attendance.groupshift.AttendanceGroupShiftService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.groupshiftitem.AttendanceGroupShiftItemService;
|
import cn.iocoder.yudao.module.system.service.attendance.groupshiftitem.AttendanceGroupShiftItemService;
|
||||||
|
import cn.iocoder.yudao.module.system.service.attendance.groupsystem.AttendanceGroupSystemService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.groupuser.AttendanceGroupUserService;
|
import cn.iocoder.yudao.module.system.service.attendance.groupuser.AttendanceGroupUserService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.punch.PunchService;
|
import cn.iocoder.yudao.module.system.service.attendance.punch.PunchService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.punch.dto.AttendanceOnTheDayDTO;
|
import cn.iocoder.yudao.module.system.service.attendance.punch.dto.AttendanceOnTheDayDTO;
|
||||||
@ -90,6 +91,8 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
@Resource
|
@Resource
|
||||||
private AttendanceGroupMapper attendanceGroupMapper;
|
private AttendanceGroupMapper attendanceGroupMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private AttendanceGroupSystemService attendanceGroupSystemService;
|
||||||
|
@Resource
|
||||||
private AttendanceGroupUserService attendanceGroupUserService;
|
private AttendanceGroupUserService attendanceGroupUserService;
|
||||||
@Resource
|
@Resource
|
||||||
private PostMapper postMapper;
|
private PostMapper postMapper;
|
||||||
@ -865,8 +868,7 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
public List<AttendanceGroupSystemVO> getTheAttendanceGroupToWhichTheCurrentlyLoggedInUserBelongsAndWhetherTheyHaveAdministratorRights(Boolean allFlag) {
|
public List<AttendanceGroupSystemVO> getTheAttendanceGroupToWhichTheCurrentlyLoggedInUserBelongsAndWhetherTheyHaveAdministratorRights(Boolean allFlag) {
|
||||||
Long userId = getLoginUserId();
|
Long userId = getLoginUserId();
|
||||||
List<AttendanceGroupSystemVO> attendanceGroupSystemVOS = new ArrayList<>();
|
List<AttendanceGroupSystemVO> attendanceGroupSystemVOS = new ArrayList<>();
|
||||||
List<AttendanceGroupDO> attendanceGroupDOS = attendanceGroupMapper.selectList(new LambdaQueryWrapper<AttendanceGroupDO>()
|
List<AttendanceGroupDO> attendanceGroupDOS = attendanceGroupSystemService.getGroupSystemByUserId(userId);
|
||||||
.eq(!allFlag, AttendanceGroupDO::getUserId, userId));
|
|
||||||
if (CollectionUtil.isEmpty(attendanceGroupDOS)) {
|
if (CollectionUtil.isEmpty(attendanceGroupDOS)) {
|
||||||
return attendanceGroupSystemVOS;
|
return attendanceGroupSystemVOS;
|
||||||
}
|
}
|
||||||
@ -932,6 +934,15 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AttendanceRulesVO getRulesByUserId() {
|
||||||
|
AttendanceGroupDO activationGroup = attendanceGroupService.getByUserId(getLoginUserId());
|
||||||
|
if (activationGroup == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.getRules(activationGroup.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按日导出
|
* 按日导出
|
||||||
|
@ -1,42 +1,26 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.attendance.group;
|
package cn.iocoder.yudao.module.system.service.attendance.group;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.iocoder.yudao.framework.common.Constants;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupPageReqVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupSaveReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.group.vo.AttendanceGroupSaveReqVO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.assets.AssetsDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupshiftitem.AttendanceGroupShiftItemDO;
|
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupuser.AttendanceGroupUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupuser.AttendanceGroupUserDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.punchrecord.AttendancePunchRecordDO;
|
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.attendance.group.AttendanceGroupMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.attendance.group.AttendanceGroupMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.attendance.groupuser.AttendanceGroupUserMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.attendance.groupuser.AttendanceGroupUserMapper;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.AttendanceService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.fixed.AttendanceFixedService;
|
import cn.iocoder.yudao.module.system.service.attendance.fixed.AttendanceFixedService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.groupshiftitem.AttendanceGroupShiftItemService;
|
import cn.iocoder.yudao.module.system.service.attendance.groupsystem.AttendanceGroupSystemService;
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.punch.dto.AttendanceOnTheDayDTO;
|
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.punchrecord.AttendancePunchRecordService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.attendance.scheduling.AttendanceSchedulingService;
|
import cn.iocoder.yudao.module.system.service.attendance.scheduling.AttendanceSchedulingService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.GROUP_NOT_EXISTS;
|
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.GROUP_NOT_EXISTS;
|
||||||
@ -54,27 +38,24 @@ public class AttendanceGroupServiceImpl implements AttendanceGroupService {
|
|||||||
@Resource
|
@Resource
|
||||||
private AttendanceGroupMapper groupMapper;
|
private AttendanceGroupMapper groupMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AttendancePunchRecordService attendancePunchRecordService;
|
|
||||||
@Resource
|
|
||||||
private AttendanceGroupMapper attendanceGroupMapper;
|
private AttendanceGroupMapper attendanceGroupMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AttendanceGroupUserMapper attendanceGroupUserMapper;
|
private AttendanceGroupUserMapper attendanceGroupUserMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AttendanceGroupShiftItemService attendanceGroupShiftItemService;
|
|
||||||
@Resource
|
|
||||||
@Lazy // 避免依赖循环
|
|
||||||
private AttendanceService attendanceService;
|
|
||||||
@Resource
|
|
||||||
private AttendanceFixedService attendanceFixedService;
|
private AttendanceFixedService attendanceFixedService;
|
||||||
@Resource
|
@Resource
|
||||||
private AttendanceSchedulingService attendanceSchedulingService;
|
private AttendanceSchedulingService attendanceSchedulingService;
|
||||||
|
@Resource
|
||||||
|
private AttendanceGroupSystemService attendanceGroupSystemService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createGroup(AttendanceGroupSaveReqVO createReqVO) {
|
public Long createGroup(AttendanceGroupSaveReqVO createReqVO) {
|
||||||
// 插入
|
|
||||||
AttendanceGroupDO group = BeanUtils.toBean(createReqVO, AttendanceGroupDO.class);
|
AttendanceGroupDO group = BeanUtils.toBean(createReqVO, AttendanceGroupDO.class);
|
||||||
groupMapper.insert(group);
|
groupMapper.insert(group);
|
||||||
|
//把考勤组用户ids拿出来
|
||||||
|
// 插入
|
||||||
|
attendanceGroupSystemService.batchCreateOrUpdate(createReqVO.getUserIds(), group.getId());
|
||||||
// 返回
|
// 返回
|
||||||
return group.getId();
|
return group.getId();
|
||||||
}
|
}
|
||||||
@ -86,6 +67,8 @@ public class AttendanceGroupServiceImpl implements AttendanceGroupService {
|
|||||||
// 更新
|
// 更新
|
||||||
AttendanceGroupDO updateObj = BeanUtils.toBean(updateReqVO, AttendanceGroupDO.class);
|
AttendanceGroupDO updateObj = BeanUtils.toBean(updateReqVO, AttendanceGroupDO.class);
|
||||||
groupMapper.updateById(updateObj);
|
groupMapper.updateById(updateObj);
|
||||||
|
// 插入
|
||||||
|
attendanceGroupSystemService.batchCreateOrUpdate(updateReqVO.getUserIds(), updateReqVO.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -99,6 +82,7 @@ public class AttendanceGroupServiceImpl implements AttendanceGroupService {
|
|||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
groupMapper.deleteById(id);
|
groupMapper.deleteById(id);
|
||||||
|
attendanceGroupSystemService.delByGroupId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateGroupExists(Long id) {
|
private void validateGroupExists(Long id) {
|
||||||
@ -114,7 +98,8 @@ public class AttendanceGroupServiceImpl implements AttendanceGroupService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<AttendanceGroupDO> getGroupPage(AttendanceGroupPageReqVO pageReqVO) {
|
public PageResult<AttendanceGroupDO> getGroupPage(AttendanceGroupPageReqVO pageReqVO) {
|
||||||
return groupMapper.selectPage(pageReqVO);
|
IPage<AttendanceGroupDO> page = groupMapper.selectPageList(pageReqVO, MyBatisUtils.buildPage(pageReqVO));
|
||||||
|
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -141,4 +126,4 @@ public class AttendanceGroupServiceImpl implements AttendanceGroupService {
|
|||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.service.attendance.groupsystem;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupsystem.AttendanceGroupSystemDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组管理员表 Service 接口
|
||||||
|
*
|
||||||
|
* @author 艾楷
|
||||||
|
*/
|
||||||
|
public interface AttendanceGroupSystemService {
|
||||||
|
/**
|
||||||
|
* 批量新增/修改考勤组管理员
|
||||||
|
*
|
||||||
|
* @param userIds
|
||||||
|
* @param groupId
|
||||||
|
*/
|
||||||
|
void batchCreateOrUpdate(String userIds, Long groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据考勤组id获取考勤组管理员
|
||||||
|
*
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AttendanceGroupSystemDO> getGroupSystemByGroupId(Long groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据考勤组id删除
|
||||||
|
*
|
||||||
|
* @param groupId
|
||||||
|
*/
|
||||||
|
void delByGroupId(Long groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据考勤组id获取考勤管理员
|
||||||
|
*
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AttendanceGroupSystemRespVO> getGroupSystemVoByGroupId(Long groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户管理的考勤组
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AttendanceGroupDO> getGroupSystemByUserId(Long userId);
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package cn.iocoder.yudao.module.system.service.attendance.groupsystem;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupsystem.AttendanceGroupSystemDO;
|
||||||
|
import cn.iocoder.yudao.module.system.dal.mysql.attendance.groupsystem.AttendanceGroupSystemMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组管理员 实现类
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class AttendanceGroupSystemServiceImpl implements AttendanceGroupSystemService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AttendanceGroupSystemMapper attendanceGroupSystemMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batchCreateOrUpdate(String userIds, Long groupId) {
|
||||||
|
if (StrUtil.isEmpty(userIds)) {
|
||||||
|
attendanceGroupSystemMapper.delete(new LambdaQueryWrapper<AttendanceGroupSystemDO>()
|
||||||
|
.eq(AttendanceGroupSystemDO::getAttendanceGroupId, groupId));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> ids = Arrays.stream(userIds.split(",")).map(Long::valueOf).collect(Collectors.toList());
|
||||||
|
List<AttendanceGroupSystemDO> list = this.getGroupSystemByGroupId(groupId);
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
this.saveList(ids, groupId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<Long> oldIds = list.stream().map(AttendanceGroupSystemDO::getUserId).collect(Collectors.toList());
|
||||||
|
List<Long> newIds = new ArrayList<>(CollectionUtil.subtract(ids, oldIds));
|
||||||
|
List<Long> delIds = new ArrayList<>(CollectionUtil.subtract(oldIds, ids));
|
||||||
|
|
||||||
|
if (!newIds.isEmpty()) {
|
||||||
|
this.saveList(newIds, groupId);
|
||||||
|
}
|
||||||
|
if (!delIds.isEmpty()) {
|
||||||
|
attendanceGroupSystemMapper.delete(new LambdaQueryWrapper<AttendanceGroupSystemDO>()
|
||||||
|
.eq(AttendanceGroupSystemDO::getAttendanceGroupId, groupId)
|
||||||
|
.in(AttendanceGroupSystemDO::getUserId, delIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveList(List<Long> userIds, Long groupId) {
|
||||||
|
List<AttendanceGroupSystemDO> saveList = new ArrayList<>();
|
||||||
|
for (Long id : userIds) {
|
||||||
|
AttendanceGroupSystemDO attendanceGroupSystemDO = new AttendanceGroupSystemDO();
|
||||||
|
attendanceGroupSystemDO.setAttendanceGroupId(groupId);
|
||||||
|
attendanceGroupSystemDO.setUserId(id);
|
||||||
|
saveList.add(attendanceGroupSystemDO);
|
||||||
|
}
|
||||||
|
attendanceGroupSystemMapper.insertBatch(saveList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AttendanceGroupSystemDO> getGroupSystemByGroupId(Long groupId) {
|
||||||
|
return attendanceGroupSystemMapper.selectList(new LambdaQueryWrapper<AttendanceGroupSystemDO>()
|
||||||
|
.eq(AttendanceGroupSystemDO::getAttendanceGroupId, groupId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delByGroupId(Long groupId) {
|
||||||
|
attendanceGroupSystemMapper.delete(new LambdaQueryWrapper<AttendanceGroupSystemDO>()
|
||||||
|
.eq(AttendanceGroupSystemDO::getAttendanceGroupId, groupId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AttendanceGroupSystemRespVO> getGroupSystemVoByGroupId(Long groupId) {
|
||||||
|
return attendanceGroupSystemMapper.getGroupSystemVoByGroupId(groupId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AttendanceGroupDO> getGroupSystemByUserId(Long userId) {
|
||||||
|
return attendanceGroupSystemMapper.getGroupSystemByUserId(userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2,9 +2,11 @@ package cn.iocoder.yudao.module.system.service.worklog;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListGroupByUserDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.*;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.*;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsDetailsListGroupByUserVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogStatisticsDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogStatisticsDO;
|
||||||
@ -114,4 +116,12 @@ public interface LogStatisticsService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LogStatisticsModelVO> getMyManageModelStatistics(MyManageModelDTO dto);
|
List<LogStatisticsModelVO> getMyManageModelStatistics(MyManageModelDTO dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户分组日志统计
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LogStatisticsDetailsListGroupByUserVO> getStatisticsGroupByUser(LogStatisticsDetailsListGroupByUserDTO dto);
|
||||||
}
|
}
|
||||||
|
@ -12,14 +12,18 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
|
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListDTO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.LogStatisticsDetailsListGroupByUserDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.MyManageModelDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.dto.statistics.NeedWriteHistoryDTO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.*;
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statistics.*;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsDetailsListGroupByUserVO;
|
||||||
|
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsGroupByUserVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.*;
|
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogFormMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogFormMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogStatisticsMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogStatisticsMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogUseMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogUseMapper;
|
||||||
|
import cn.iocoder.yudao.module.system.enums.ErrorCodeConstants;
|
||||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogUseVO;
|
import cn.iocoder.yudao.module.system.service.worklog.dto.LogUseVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@ -30,6 +34,8 @@ import javax.annotation.Resource;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工作日志统计 Service 实现类
|
* 工作日志统计 Service 实现类
|
||||||
*
|
*
|
||||||
@ -388,4 +394,33 @@ public class LogStatisticsServiceImpl implements LogStatisticsService {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public List<LogStatisticsDetailsListGroupByUserVO> getStatisticsGroupByUser(LogStatisticsDetailsListGroupByUserDTO dto) {
|
||||||
|
List<LogStatisticsDetailsListGroupByUserVO> list = new ArrayList<>();
|
||||||
|
List<String> dateList = new ArrayList<>();
|
||||||
|
if (dto.getBeginTime() != null && dto.getEndTime() != null) {
|
||||||
|
dateList = DateUtils.betweenDayStrList(dto.getBeginTime(), dto.getEndTime());
|
||||||
|
}
|
||||||
|
if (dateList.isEmpty()) {
|
||||||
|
throw exception(ErrorCodeConstants.PLEASE_SELECT_A_TIME_RANGE);
|
||||||
|
}
|
||||||
|
dto.setDateList(dateList);
|
||||||
|
// 获取到所有数据 然后在java代码中分组
|
||||||
|
List<LogStatisticsGroupByUserVO> vos = logStatisticsMapper.getStatisticsGroupByUser(dto);
|
||||||
|
// 根据用户id/部门id分组
|
||||||
|
Map<String, List<LogStatisticsGroupByUserVO>> map = vos.stream().collect(Collectors.groupingBy(a -> a.getUserId() + "_" + a.getDeptId() + "_" + a.getType()));
|
||||||
|
for (Map.Entry<String, List<LogStatisticsGroupByUserVO>> entry : map.entrySet()) {
|
||||||
|
LogStatisticsDetailsListGroupByUserVO vo = new LogStatisticsDetailsListGroupByUserVO();
|
||||||
|
vo.setNickName(entry.getValue().get(0).getNickName());
|
||||||
|
vo.setDeptName(entry.getValue().get(0).getDeptName());
|
||||||
|
vo.setType(entry.getValue().get(0).getType());
|
||||||
|
vo.setShould(entry.getValue().size());
|
||||||
|
vo.setOnTime((int) entry.getValue().stream().filter(a -> a.getStatus() == 1).count());
|
||||||
|
vo.setLate((int) entry.getValue().stream().filter(a -> a.getStatus() == 2).count());
|
||||||
|
vo.setNotYet((int) entry.getValue().stream().filter(a -> a.getStatus() == 3).count());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -40,13 +40,13 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
@ -80,7 +80,7 @@ xxl:
|
|||||||
job:
|
job:
|
||||||
enabled: true # 是否开启调度中心,默认为 true 开启
|
enabled: true # 是否开启调度中心,默认为 true 开启
|
||||||
admin:
|
admin:
|
||||||
addresses: http://192.168.1.101:9090/xxl-job-admin # 调度中心部署跟地址
|
addresses: http://192.168.1.107:9090/xxl-job-admin # 调度中心部署跟地址
|
||||||
executor:
|
executor:
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
appname: ${spring.application.name} # 执行器 AppName
|
||||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
||||||
|
@ -18,4 +18,48 @@
|
|||||||
b.deleted = 0
|
b.deleted = 0
|
||||||
and b.user_id = #{userId}
|
and b.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
<select id="selectPageList"
|
||||||
|
resultType="cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO">
|
||||||
|
select
|
||||||
|
a.*,
|
||||||
|
GROUP_CONCAT( b.nickname ) AS systemNames
|
||||||
|
from kq_attendance_group as a
|
||||||
|
left join (
|
||||||
|
SELECT
|
||||||
|
a.*,
|
||||||
|
b.nickname AS nickname
|
||||||
|
FROM
|
||||||
|
kq_attendance_group_system AS a
|
||||||
|
LEFT JOIN system_users AS b ON a.user_id = b.id
|
||||||
|
WHERE
|
||||||
|
a.deleted = 0
|
||||||
|
) as b on a.id = b.attendance_group_id
|
||||||
|
<where>
|
||||||
|
a.deleted = 0
|
||||||
|
<if test="vo.groupName != null and vo.groupName != ''">
|
||||||
|
and a.group_name like CONCAT( '%', #{vo.groupName}, '%' )
|
||||||
|
</if>
|
||||||
|
<if test="vo.type != null">
|
||||||
|
and a.type = #{vo.type}
|
||||||
|
</if>
|
||||||
|
<if test="vo.punchType != null">
|
||||||
|
and a.punch_type = #{vo.punchType}
|
||||||
|
</if>
|
||||||
|
<if test="vo.createTime != null and vo.createTime.length > 0">
|
||||||
|
<if test="vo.createTime[0] != null">
|
||||||
|
and a.create_time >= #{vo.createTime[0]}
|
||||||
|
</if>
|
||||||
|
<if test="vo.createTime[1] != null">
|
||||||
|
and a.create_time <= #{vo.createTime[1]}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test="vo.userIds != null and vo.userIds.size() > 0">
|
||||||
|
and b.user_id in
|
||||||
|
<foreach collection="vo.userIds" item="userId" separator="," open="(" close=")">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY a.id
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.attendance.groupsystem.AttendanceGroupSystemMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
<select id="getGroupSystemVoByGroupId"
|
||||||
|
resultType="cn.iocoder.yudao.module.system.controller.admin.groupsystem.vo.AttendanceGroupSystemRespVO">
|
||||||
|
select
|
||||||
|
a.*,
|
||||||
|
b.nickname as nickname
|
||||||
|
from kq_attendance_group_system as a
|
||||||
|
left join system_users as b on a.user_id = b.id
|
||||||
|
<where>
|
||||||
|
a.deleted = 0
|
||||||
|
<if test="groupId != null">
|
||||||
|
and a.attendance_group_id = #{groupId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getGroupSystemByUserId"
|
||||||
|
resultType="cn.iocoder.yudao.module.system.dal.dataobject.attendance.group.AttendanceGroupDO">
|
||||||
|
select
|
||||||
|
a.*
|
||||||
|
from kq_attendance_group as a
|
||||||
|
left join kq_attendance_group_system as b on a.id = b.attendance_group_id
|
||||||
|
<where>
|
||||||
|
a.deleted = 0
|
||||||
|
and b.deleted = 0
|
||||||
|
and b.user_id = #{userId}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -151,4 +151,31 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
<select id="getStatisticsGroupByUser"
|
||||||
|
resultType="cn.iocoder.yudao.module.system.controller.admin.worklog.vo.statisticsrecord.LogStatisticsGroupByUserVO">
|
||||||
|
SELECT
|
||||||
|
a.nickname as nickName,
|
||||||
|
c.`name` as deptName,
|
||||||
|
b.*
|
||||||
|
FROM
|
||||||
|
system_users AS a
|
||||||
|
LEFT JOIN work_log_statistics AS b ON a.id = b.user_id
|
||||||
|
LEFT JOIN system_dept AS c ON b.dept_id = c.id
|
||||||
|
<where>
|
||||||
|
b.deleted = 0
|
||||||
|
<if test="dto.dateList != null and dto.dateList.size() > 0">
|
||||||
|
and b.time IN
|
||||||
|
<foreach collection="dto.dateList" item="date" separator="," open="(" close=")">
|
||||||
|
#{date}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="dto.type != null">
|
||||||
|
and b.type = #{dto.type}
|
||||||
|
</if>
|
||||||
|
<if test="dto.deptId != null">
|
||||||
|
and b.dept_id = #{deptId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
@ -40,13 +40,13 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
@ -40,13 +40,13 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
name: ruoyi-vue-pro
|
name: ruoyi-vue-pro
|
||||||
url: jdbc:mysql://192.168.1.101:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://192.168.1.107:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
Loading…
Reference in New Issue
Block a user