更新HR人事管理模块
parent
3f91c111e7
commit
ab73d7d7da
|
|
@ -6,7 +6,7 @@
|
|||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-ai</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
</parent><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>8</source><target>8</target></configuration></plugin></plugins></build>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-ai-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?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>yudao</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<version>${revision}</version> <!-- 1. 修改 version 为 ${revision} -->
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yudao-module-hrmrg</artifactId>
|
||||
<packaging>pom</packaging> <!-- 2. 新增 packaging 为 pom -->
|
||||
|
||||
<name>${project.artifactId}</name> <!-- 3. 新增 name 为 ${project.artifactId} -->
|
||||
<description> <!-- 4. 新增 description 为该模块的描述 -->
|
||||
hrmrg 模块,主要实现 HRM 人力资源管理相关功能。
|
||||
</description>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?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>yudao-module-hrmrg</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<version>${revision}</version> <!-- 1. 修改 version 为 ${revision} -->
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-hrmrg-api</artifactId>
|
||||
<packaging>jar</packaging> <!-- 2. 新增 packaging 为 jar -->
|
||||
|
||||
<name>${project.artifactId}</name> <!-- 3. 新增 name 为 ${project.artifactId} -->
|
||||
<description> <!-- 4. 新增 description 为该模块的描述 -->
|
||||
hrmrg-api 模块 API,暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies> <!-- 5. 新增 yudao-common 依赖 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.enums;
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
/**
|
||||
* HR 错误码枚举类
|
||||
*
|
||||
* HR 系统,使用 1-100-000-000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
// ========== 考勤打卡 TODO 补充编号 ==========
|
||||
ErrorCode ADMIN_ATMK_NOT_EXISTS = new ErrorCode(1-100-000-000, "考勤打卡不存在");
|
||||
|
||||
ErrorCode ADMIN_ATMK_FACE_NOT_EXISTS = new ErrorCode(1-200-000-000, "人脸识别库不存在");
|
||||
|
||||
// ========== 绩效考核配置 TODO 补充编号 ==========
|
||||
ErrorCode ADMIN_PERF_CFG_NOT_EXISTS = new ErrorCode(1-300-000-000, "绩效考核配置不存在");
|
||||
|
||||
// ========== 考勤组设置 TODO 补充编号 ==========
|
||||
ErrorCode ADMIN_ATMK_GROUT_CFG_NOT_EXISTS = new ErrorCode(1-400-000-000, "考勤组设置不存在");
|
||||
|
||||
// ========== 岗位人员薪资计算配置 TODO 补充编号 ==========
|
||||
ErrorCode ADMIN_POST_CFG_NOT_EXISTS = new ErrorCode(1-500-000-000, "岗位人员薪资计算配置不存在");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
<?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>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-hrmrg</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-hrmrg-biz</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
hrmrg 模块,主要实现人力资源管理相关功能。
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring Cloud 基础 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-env</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 依赖服务 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-hrmrg-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-rpc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 监控相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-monitor</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package cn.iocoder.yudao.module.hrmrg;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
*
|
||||
* @author 唐盘江
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class HrmrgServerApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(HrmrgServerApplication.class, args);
|
||||
System.out.println("HrmrgServerApplication 启动成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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 java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
|
||||
import cn.iocoder.yudao.module.hrmrg.service.adminatmk.AdminAtmkService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 考勤打卡")
|
||||
@RestController
|
||||
@RequestMapping("/hrmrg/admin-atmk")
|
||||
@Validated
|
||||
public class AdminAtmkController {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkService adminAtmkService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建考勤打卡")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:create')")
|
||||
public CommonResult<Integer> createAdminAtmk(@Valid @RequestBody AdminAtmkSaveReqVO createReqVO) {
|
||||
return success(adminAtmkService.createAdminAtmk(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新考勤打卡")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:update')")
|
||||
public CommonResult<Boolean> updateAdminAtmk(@Valid @RequestBody AdminAtmkSaveReqVO updateReqVO) {
|
||||
adminAtmkService.updateAdminAtmk(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除考勤打卡")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:delete')")
|
||||
public CommonResult<Boolean> deleteAdminAtmk(@RequestParam("id") Integer id) {
|
||||
adminAtmkService.deleteAdminAtmk(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得考勤打卡")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:query')")
|
||||
public CommonResult<AdminAtmkRespVO> getAdminAtmk(@RequestParam("id") Integer id) {
|
||||
AdminAtmkDO adminAtmk = adminAtmkService.getAdminAtmk(id);
|
||||
return success(BeanUtils.toBean(adminAtmk, AdminAtmkRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得考勤打卡分页")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:query')")
|
||||
public CommonResult<PageResult<AdminAtmkRespVO>> getAdminAtmkPage(@Valid AdminAtmkPageReqVO pageReqVO) {
|
||||
PageResult<AdminAtmkDO> pageResult = adminAtmkService.getAdminAtmkPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AdminAtmkRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出考勤打卡 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAdminAtmkExcel(@Valid AdminAtmkPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AdminAtmkDO> list = adminAtmkService.getAdminAtmkPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "考勤打卡.xls", "数据", AdminAtmkRespVO.class,
|
||||
BeanUtils.toBean(list, AdminAtmkRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤打卡分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AdminAtmkPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1用户2会员3其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "岗位或人员ID", example = "5147")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "上班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "迟到时间")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@Schema(description = "早退时间")
|
||||
private Integer earlyLeavingTimeLimit;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "张三")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "打卡位置经度")
|
||||
private String checkInLocation;
|
||||
|
||||
@Schema(description = "离岗位置维度")
|
||||
private String checkOutLocation;
|
||||
|
||||
@Schema(description = "人脸识别结果")
|
||||
private String faceRecognitionResult;
|
||||
|
||||
@Schema(description = "打卡人脸照")
|
||||
private byte[] checkInPhoto;
|
||||
|
||||
@Schema(description = "离岗人脸照")
|
||||
private byte[] checkOutPhoto;
|
||||
|
||||
@Schema(description = "人脸识别库")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤打卡 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AdminAtmkRespVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23083")
|
||||
@ExcelProperty("岗位ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1用户2会员3其他")
|
||||
@ExcelProperty(value = "类型1用户2会员3其他", converter = DictConvert.class)
|
||||
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5147")
|
||||
@ExcelProperty("岗位或人员ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("上班时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
@ExcelProperty("下班时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "迟到时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("迟到时间")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@Schema(description = "早退时间")
|
||||
@ExcelProperty("早退时间")
|
||||
private Integer earlyLeavingTimeLimit;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "张三")
|
||||
@ExcelProperty("定位打卡范围的名称")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
@ExcelProperty("经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
@ExcelProperty("维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "打卡位置经度")
|
||||
@ExcelProperty("打卡位置经度")
|
||||
private String checkInLocation;
|
||||
|
||||
@Schema(description = "离岗位置维度")
|
||||
@ExcelProperty("离岗位置维度")
|
||||
private String checkOutLocation;
|
||||
|
||||
@Schema(description = "人脸识别结果")
|
||||
@ExcelProperty("人脸识别结果")
|
||||
private String faceRecognitionResult;
|
||||
|
||||
@Schema(description = "打卡人脸照")
|
||||
@ExcelProperty("打卡人脸照")
|
||||
private byte[] checkInPhoto;
|
||||
|
||||
@Schema(description = "离岗人脸照")
|
||||
@ExcelProperty("离岗人脸照")
|
||||
private byte[] checkOutPhoto;
|
||||
|
||||
@Schema(description = "人脸识别库")
|
||||
@ExcelProperty("人脸识别库")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("状态(0正常 1停用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤打卡新增/修改 Request VO")
|
||||
@Data
|
||||
public class AdminAtmkSaveReqVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23083")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1用户2会员3其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5147")
|
||||
@NotNull(message = "岗位或人员ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上班时间不能为空")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "迟到时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "迟到时间不能为空")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@Schema(description = "早退时间")
|
||||
private Integer earlyLeavingTimeLimit;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "张三")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "打卡位置经度")
|
||||
private String checkInLocation;
|
||||
|
||||
@Schema(description = "离岗位置维度")
|
||||
private String checkOutLocation;
|
||||
|
||||
@Schema(description = "人脸识别结果")
|
||||
private String faceRecognitionResult;
|
||||
|
||||
@Schema(description = "打卡人脸照")
|
||||
private byte[] checkInPhoto;
|
||||
|
||||
@Schema(description = "离岗人脸照")
|
||||
private byte[] checkOutPhoto;
|
||||
|
||||
@Schema(description = "人脸识别库")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态(0正常 1停用)不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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 java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
|
||||
import cn.iocoder.yudao.module.hrmrg.service.adminatmkface.AdminAtmkFaceService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 人脸识别库")
|
||||
@RestController
|
||||
@RequestMapping("/hrmrg/admin-atmk-face")
|
||||
@Validated
|
||||
public class AdminAtmkFaceController {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkFaceService adminAtmkFaceService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建人脸识别库")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:create')")
|
||||
public CommonResult<Integer> createAdminAtmkFace(@Valid @RequestBody AdminAtmkFaceSaveReqVO createReqVO) {
|
||||
return success(adminAtmkFaceService.createAdminAtmkFace(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新人脸识别库")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:update')")
|
||||
public CommonResult<Boolean> updateAdminAtmkFace(@Valid @RequestBody AdminAtmkFaceSaveReqVO updateReqVO) {
|
||||
adminAtmkFaceService.updateAdminAtmkFace(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除人脸识别库")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:delete')")
|
||||
public CommonResult<Boolean> deleteAdminAtmkFace(@RequestParam("id") Integer id) {
|
||||
adminAtmkFaceService.deleteAdminAtmkFace(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得人脸识别库")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:query')")
|
||||
public CommonResult<AdminAtmkFaceRespVO> getAdminAtmkFace(@RequestParam("id") Integer id) {
|
||||
AdminAtmkFaceDO adminAtmkFace = adminAtmkFaceService.getAdminAtmkFace(id);
|
||||
return success(BeanUtils.toBean(adminAtmkFace, AdminAtmkFaceRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得人脸识别库分页")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:query')")
|
||||
public CommonResult<PageResult<AdminAtmkFaceRespVO>> getAdminAtmkFacePage(@Valid AdminAtmkFacePageReqVO pageReqVO) {
|
||||
PageResult<AdminAtmkFaceDO> pageResult = adminAtmkFaceService.getAdminAtmkFacePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AdminAtmkFaceRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出人脸识别库 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAdminAtmkFaceExcel(@Valid AdminAtmkFacePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AdminAtmkFaceDO> list = adminAtmkFaceService.getAdminAtmkFacePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "人脸识别库.xls", "数据", AdminAtmkFaceRespVO.class,
|
||||
BeanUtils.toBean(list, AdminAtmkFaceRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 人脸识别库分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AdminAtmkFacePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1员工2会员4其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门id", example = "17318")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "岗位或人员ID", example = "1025")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String userNo;
|
||||
|
||||
@Schema(description = "名字", example = "赵六")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "人脸数据")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 人脸识别库 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AdminAtmkFaceRespVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15439")
|
||||
@ExcelProperty("岗位ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1员工2会员4其他")
|
||||
@ExcelProperty(value = "类型1员工2会员4其他", converter = DictConvert.class)
|
||||
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门id", example = "17318")
|
||||
@ExcelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "岗位或人员ID", example = "1025")
|
||||
@ExcelProperty("岗位或人员ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
@ExcelProperty("身份证号")
|
||||
private String userNo;
|
||||
|
||||
@Schema(description = "名字", example = "赵六")
|
||||
@ExcelProperty("名字")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "人脸数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("人脸数据")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("状态(0正常 1停用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 人脸识别库新增/修改 Request VO")
|
||||
@Data
|
||||
public class AdminAtmkFaceSaveReqVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15439")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1员工2会员4其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门id", example = "17318")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "岗位或人员ID", example = "1025")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String userNo;
|
||||
|
||||
@Schema(description = "名字", example = "赵六")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "人脸数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "人脸数据不能为空")
|
||||
private byte[] faceData;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "状态(0正常 1停用)不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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 java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
|
||||
import cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg.AdminAtmkGroutCfgService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 考勤组设置")
|
||||
@RestController
|
||||
@RequestMapping("/hrmrg/admin-atmk-grout-cfg")
|
||||
@Validated
|
||||
public class AdminAtmkGroutCfgController {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkGroutCfgService adminAtmkGroutCfgService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建考勤组设置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:create')")
|
||||
public CommonResult<Integer> createAdminAtmkGroutCfg(@Valid @RequestBody AdminAtmkGroutCfgSaveReqVO createReqVO) {
|
||||
return success(adminAtmkGroutCfgService.createAdminAtmkGroutCfg(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新考勤组设置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:update')")
|
||||
public CommonResult<Boolean> updateAdminAtmkGroutCfg(@Valid @RequestBody AdminAtmkGroutCfgSaveReqVO updateReqVO) {
|
||||
adminAtmkGroutCfgService.updateAdminAtmkGroutCfg(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除考勤组设置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:delete')")
|
||||
public CommonResult<Boolean> deleteAdminAtmkGroutCfg(@RequestParam("id") Integer id) {
|
||||
adminAtmkGroutCfgService.deleteAdminAtmkGroutCfg(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得考勤组设置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:query')")
|
||||
public CommonResult<AdminAtmkGroutCfgRespVO> getAdminAtmkGroutCfg(@RequestParam("id") Integer id) {
|
||||
AdminAtmkGroutCfgDO adminAtmkGroutCfg = adminAtmkGroutCfgService.getAdminAtmkGroutCfg(id);
|
||||
return success(BeanUtils.toBean(adminAtmkGroutCfg, AdminAtmkGroutCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得考勤组设置分页")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:query')")
|
||||
public CommonResult<PageResult<AdminAtmkGroutCfgRespVO>> getAdminAtmkGroutCfgPage(@Valid AdminAtmkGroutCfgPageReqVO pageReqVO) {
|
||||
PageResult<AdminAtmkGroutCfgDO> pageResult = adminAtmkGroutCfgService.getAdminAtmkGroutCfgPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AdminAtmkGroutCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出考勤组设置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAdminAtmkGroutCfgExcel(@Valid AdminAtmkGroutCfgPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AdminAtmkGroutCfgDO> list = adminAtmkGroutCfgService.getAdminAtmkGroutCfgPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "考勤组设置.xls", "数据", AdminAtmkGroutCfgRespVO.class,
|
||||
BeanUtils.toBean(list, AdminAtmkGroutCfgRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组设置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AdminAtmkGroutCfgPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1员工2其他")
|
||||
private Long typeBiz;
|
||||
|
||||
@Schema(description = "部门id", example = "3928")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "考勤组编码")
|
||||
private String groupCode;
|
||||
|
||||
@Schema(description = "考勤组名称", example = "芋艿")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "上班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "李四")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组设置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AdminAtmkGroutCfgRespVO {
|
||||
|
||||
@Schema(description = "考勤组id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027")
|
||||
@ExcelProperty("考勤组id")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1员工2其他")
|
||||
@ExcelProperty("类型1员工2其他")
|
||||
private Long typeBiz;
|
||||
|
||||
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3928")
|
||||
@ExcelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "考勤组编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "考勤组编码", converter = DictConvert.class)
|
||||
@DictFormat("hr_att_punch_group") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String groupCode;
|
||||
|
||||
@Schema(description = "考勤组名称", example = "芋艿")
|
||||
@ExcelProperty("考勤组名称")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("上班时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
@ExcelProperty("下班时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "李四")
|
||||
@ExcelProperty("定位打卡范围的名称")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
@ExcelProperty("经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
@ExcelProperty("维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("状态(0正常 1停用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 考勤组设置新增/修改 Request VO")
|
||||
@Data
|
||||
public class AdminAtmkGroutCfgSaveReqVO {
|
||||
|
||||
@Schema(description = "考勤组id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1员工2其他")
|
||||
private Long typeBiz;
|
||||
|
||||
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3928")
|
||||
@NotNull(message = "部门id不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "考勤组编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "考勤组编码不能为空")
|
||||
private String groupCode;
|
||||
|
||||
@Schema(description = "考勤组名称", example = "芋艿")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上班时间不能为空")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "下班时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "定位打卡范围的名称", example = "李四")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "维度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "状态(0正常 1停用)不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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 java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
|
||||
import cn.iocoder.yudao.module.hrmrg.service.adminperfcfg.AdminPerfCfgService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 绩效考核配置")
|
||||
@RestController
|
||||
@RequestMapping("/hrmrg/admin-perf-cfg")
|
||||
@Validated
|
||||
public class AdminPerfCfgController {
|
||||
|
||||
@Resource
|
||||
private AdminPerfCfgService adminPerfCfgService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建绩效考核配置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:create')")
|
||||
public CommonResult<Integer> createAdminPerfCfg(@Valid @RequestBody AdminPerfCfgSaveReqVO createReqVO) {
|
||||
return success(adminPerfCfgService.createAdminPerfCfg(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新绩效考核配置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:update')")
|
||||
public CommonResult<Boolean> updateAdminPerfCfg(@Valid @RequestBody AdminPerfCfgSaveReqVO updateReqVO) {
|
||||
adminPerfCfgService.updateAdminPerfCfg(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除绩效考核配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:delete')")
|
||||
public CommonResult<Boolean> deleteAdminPerfCfg(@RequestParam("id") Integer id) {
|
||||
adminPerfCfgService.deleteAdminPerfCfg(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得绩效考核配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:query')")
|
||||
public CommonResult<AdminPerfCfgRespVO> getAdminPerfCfg(@RequestParam("id") Integer id) {
|
||||
AdminPerfCfgDO adminPerfCfg = adminPerfCfgService.getAdminPerfCfg(id);
|
||||
return success(BeanUtils.toBean(adminPerfCfg, AdminPerfCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得绩效考核配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:query')")
|
||||
public CommonResult<PageResult<AdminPerfCfgRespVO>> getAdminPerfCfgPage(@Valid AdminPerfCfgPageReqVO pageReqVO) {
|
||||
PageResult<AdminPerfCfgDO> pageResult = adminPerfCfgService.getAdminPerfCfgPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AdminPerfCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出绩效考核配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAdminPerfCfgExcel(@Valid AdminPerfCfgPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AdminPerfCfgDO> list = adminPerfCfgService.getAdminPerfCfgPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "绩效考核配置.xls", "数据", AdminPerfCfgRespVO.class,
|
||||
BeanUtils.toBean(list, AdminPerfCfgRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 绩效考核配置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AdminPerfCfgPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1部门2会员3其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门ID或员工id", example = "10265")
|
||||
private Long deptOrUserId;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] starTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "分数")
|
||||
private Integer sorce;
|
||||
|
||||
@Schema(description = "考核说明")
|
||||
private String evg;
|
||||
|
||||
@Schema(description = "考核项目")
|
||||
private String evgItem;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 绩效考核配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AdminPerfCfgRespVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23965")
|
||||
@ExcelProperty("岗位ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1部门2会员3其他")
|
||||
@ExcelProperty(value = "类型1部门2会员3其他", converter = DictConvert.class)
|
||||
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门ID或员工id", example = "10265")
|
||||
@ExcelProperty("部门ID或员工id")
|
||||
private Long deptOrUserId;
|
||||
|
||||
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@ExcelProperty("开始时间")
|
||||
private LocalDateTime starTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@ExcelProperty("结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "分数")
|
||||
@ExcelProperty("分数")
|
||||
private Integer sorce;
|
||||
|
||||
@Schema(description = "考核说明")
|
||||
@ExcelProperty("考核说明")
|
||||
private String evg;
|
||||
|
||||
@Schema(description = "考核项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("考核项目")
|
||||
private String evgItem;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("状态(0正常 1停用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 绩效考核配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class AdminPerfCfgSaveReqVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23965")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1部门2会员3其他")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "部门ID或员工id", example = "10265")
|
||||
private Long deptOrUserId;
|
||||
|
||||
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "标题不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
private LocalDateTime starTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "分数")
|
||||
private Integer sorce;
|
||||
|
||||
@Schema(description = "考核说明")
|
||||
private String evg;
|
||||
|
||||
@Schema(description = "考核项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "考核项目不能为空")
|
||||
private String evgItem;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态(0正常 1停用)不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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 java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
|
||||
import cn.iocoder.yudao.module.hrmrg.service.adminpostcfg.AdminPostCfgService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 岗位人员薪资计算配置")
|
||||
@RestController
|
||||
@RequestMapping("/hrmrg/admin-post-cfg")
|
||||
@Validated
|
||||
public class AdminPostCfgController {
|
||||
|
||||
@Resource
|
||||
private AdminPostCfgService adminPostCfgService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建岗位人员薪资计算配置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:create')")
|
||||
public CommonResult<Integer> createAdminPostCfg(@Valid @RequestBody AdminPostCfgSaveReqVO createReqVO) {
|
||||
return success(adminPostCfgService.createAdminPostCfg(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新岗位人员薪资计算配置")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:update')")
|
||||
public CommonResult<Boolean> updateAdminPostCfg(@Valid @RequestBody AdminPostCfgSaveReqVO updateReqVO) {
|
||||
adminPostCfgService.updateAdminPostCfg(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除岗位人员薪资计算配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:delete')")
|
||||
public CommonResult<Boolean> deleteAdminPostCfg(@RequestParam("id") Integer id) {
|
||||
adminPostCfgService.deleteAdminPostCfg(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得岗位人员薪资计算配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:query')")
|
||||
public CommonResult<AdminPostCfgRespVO> getAdminPostCfg(@RequestParam("id") Integer id) {
|
||||
AdminPostCfgDO adminPostCfg = adminPostCfgService.getAdminPostCfg(id);
|
||||
return success(BeanUtils.toBean(adminPostCfg, AdminPostCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得岗位人员薪资计算配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:query')")
|
||||
public CommonResult<PageResult<AdminPostCfgRespVO>> getAdminPostCfgPage(@Valid AdminPostCfgPageReqVO pageReqVO) {
|
||||
PageResult<AdminPostCfgDO> pageResult = adminPostCfgService.getAdminPostCfgPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AdminPostCfgRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出岗位人员薪资计算配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAdminPostCfgExcel(@Valid AdminPostCfgPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AdminPostCfgDO> list = adminPostCfgService.getAdminPostCfgPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "岗位人员薪资计算配置.xls", "数据", AdminPostCfgRespVO.class,
|
||||
BeanUtils.toBean(list, AdminPostCfgRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 岗位人员薪资计算配置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AdminPostCfgPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "项目1增减2扣减3不变", example = "1")
|
||||
private String itemType;
|
||||
|
||||
@Schema(description = "岗位或人员ID", example = "25542")
|
||||
private Long postOrUserId;
|
||||
|
||||
@Schema(description = "上下班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] checkInOutTime;
|
||||
|
||||
@Schema(description = "薪资")
|
||||
private Integer salary;
|
||||
|
||||
@Schema(description = "系数")
|
||||
private BigDecimal coef;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 岗位人员薪资计算配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AdminPostCfgRespVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30426")
|
||||
@ExcelProperty("岗位ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
|
||||
@ExcelProperty(value = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资", converter = DictConvert.class)
|
||||
@DictFormat("hr_admin_post_cfg_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "项目1增减2扣减3不变", example = "1")
|
||||
@ExcelProperty(value = "项目1增减2扣减3不变", converter = DictConvert.class)
|
||||
@DictFormat("hr_admin_post_cfg_biz_item") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String itemType;
|
||||
|
||||
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25542")
|
||||
@ExcelProperty("岗位或人员ID")
|
||||
private Long postOrUserId;
|
||||
|
||||
@Schema(description = "上下班时间")
|
||||
@ExcelProperty("上下班时间")
|
||||
private LocalDateTime checkInOutTime;
|
||||
|
||||
@Schema(description = "薪资", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("薪资")
|
||||
private Integer salary;
|
||||
|
||||
@Schema(description = "系数")
|
||||
@ExcelProperty("系数")
|
||||
private BigDecimal coef;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("状态(0正常 1停用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 岗位人员薪资计算配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class AdminPostCfgSaveReqVO {
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30426")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
|
||||
private String typeBiz;
|
||||
|
||||
@Schema(description = "项目1增减2扣减3不变", example = "1")
|
||||
private String itemType;
|
||||
|
||||
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25542")
|
||||
@NotNull(message = "岗位或人员ID不能为空")
|
||||
private Long postOrUserId;
|
||||
|
||||
@Schema(description = "上下班时间")
|
||||
private LocalDateTime checkInOutTime;
|
||||
|
||||
@Schema(description = "薪资", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "薪资不能为空")
|
||||
private Integer salary;
|
||||
|
||||
@Schema(description = "系数")
|
||||
private BigDecimal coef;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态(0正常 1停用)不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 考勤打卡 DO
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@TableName("hr_admin_atmk")
|
||||
@KeySequence("hr_admin_atmk_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AdminAtmkDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 类型1用户2会员3其他
|
||||
*
|
||||
* 枚举 {@link TODO hr_att_punch_biz_type 对应的类}
|
||||
*/
|
||||
private String typeBiz;
|
||||
/**
|
||||
* 岗位或人员ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 上班时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
/**
|
||||
* 下班时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 迟到时间
|
||||
*/
|
||||
private Integer lateTimeLimit;
|
||||
/**
|
||||
* 早退时间
|
||||
*/
|
||||
private Integer earlyLeavingTimeLimit;
|
||||
/**
|
||||
* 定位打卡范围的名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 打卡位置经度
|
||||
*/
|
||||
private String checkInLocation;
|
||||
/**
|
||||
* 离岗位置维度
|
||||
*/
|
||||
private String checkOutLocation;
|
||||
/**
|
||||
* 人脸识别结果
|
||||
*/
|
||||
private String faceRecognitionResult;
|
||||
/**
|
||||
* 打卡人脸照
|
||||
*/
|
||||
private byte[] checkInPhoto;
|
||||
/**
|
||||
* 离岗人脸照
|
||||
*/
|
||||
private byte[] checkOutPhoto;
|
||||
/**
|
||||
* 人脸识别库
|
||||
*/
|
||||
private byte[] faceData;
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 人脸识别库 DO
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@TableName("hr_admin_atmk_face")
|
||||
@KeySequence("hr_admin_atmk_face_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AdminAtmkFaceDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 类型1员工2会员4其他
|
||||
*
|
||||
* 枚举 {@link TODO hr_att_punch_biz_type 对应的类}
|
||||
*/
|
||||
private String typeBiz;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 岗位或人员ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String userNo;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 人脸数据
|
||||
*/
|
||||
private byte[] faceData;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 考勤组设置 DO
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@TableName("hr_admin_atmk_grout_cfg")
|
||||
@KeySequence("hr_admin_atmk_grout_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AdminAtmkGroutCfgDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 考勤组id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 类型1员工2其他
|
||||
*/
|
||||
private Long typeBiz;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 考勤组编码
|
||||
*
|
||||
* 枚举 {@link TODO hr_att_punch_group 对应的类}
|
||||
*/
|
||||
private String groupCode;
|
||||
/**
|
||||
* 考勤组名称
|
||||
*/
|
||||
private String groupName;
|
||||
/**
|
||||
* 上班时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
/**
|
||||
* 下班时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 定位打卡范围的名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 绩效考核配置 DO
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@TableName("hr_admin_perf_cfg")
|
||||
@KeySequence("hr_admin_perf_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AdminPerfCfgDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 类型1部门2会员3其他
|
||||
*
|
||||
* 枚举 {@link TODO hr_att_punch_biz_type 对应的类}
|
||||
*/
|
||||
private String typeBiz;
|
||||
/**
|
||||
* 部门ID或员工id
|
||||
*/
|
||||
private Long deptOrUserId;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDateTime starTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 分数
|
||||
*/
|
||||
private Integer sorce;
|
||||
/**
|
||||
* 考核说明
|
||||
*/
|
||||
private String evg;
|
||||
/**
|
||||
* 考核项目
|
||||
*/
|
||||
private String evgItem;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 岗位人员薪资计算配置 DO
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@TableName("hr_admin_post_cfg")
|
||||
@KeySequence("hr_admin_post_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AdminPostCfgDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 类型1岗位2用户3迟到4早退5旷工6加班7基本工资
|
||||
*
|
||||
* 枚举 {@link TODO hr_admin_post_cfg_biz_type 对应的类}
|
||||
*/
|
||||
private String typeBiz;
|
||||
/**
|
||||
* 项目1增减2扣减3不变
|
||||
*
|
||||
* 枚举 {@link TODO hr_admin_post_cfg_biz_item 对应的类}
|
||||
*/
|
||||
private String itemType;
|
||||
/**
|
||||
* 岗位或人员ID
|
||||
*/
|
||||
private Long postOrUserId;
|
||||
/**
|
||||
* 上下班时间
|
||||
*/
|
||||
private LocalDateTime checkInOutTime;
|
||||
/**
|
||||
* 薪资
|
||||
*/
|
||||
private Integer salary;
|
||||
/**
|
||||
* 系数
|
||||
*/
|
||||
private BigDecimal coef;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmk;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
|
||||
|
||||
/**
|
||||
* 考勤打卡 Mapper
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AdminAtmkMapper extends BaseMapperX<AdminAtmkDO> {
|
||||
|
||||
default PageResult<AdminAtmkDO> selectPage(AdminAtmkPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkDO>()
|
||||
.eqIfPresent(AdminAtmkDO::getTypeBiz, reqVO.getTypeBiz())
|
||||
.eqIfPresent(AdminAtmkDO::getUserId, reqVO.getUserId())
|
||||
.betweenIfPresent(AdminAtmkDO::getStartTime, reqVO.getStartTime())
|
||||
.betweenIfPresent(AdminAtmkDO::getEndTime, reqVO.getEndTime())
|
||||
.eqIfPresent(AdminAtmkDO::getLateTimeLimit, reqVO.getLateTimeLimit())
|
||||
.eqIfPresent(AdminAtmkDO::getEarlyLeavingTimeLimit, reqVO.getEarlyLeavingTimeLimit())
|
||||
.likeIfPresent(AdminAtmkDO::getAreaName, reqVO.getAreaName())
|
||||
.eqIfPresent(AdminAtmkDO::getLatitude, reqVO.getLatitude())
|
||||
.eqIfPresent(AdminAtmkDO::getLongitude, reqVO.getLongitude())
|
||||
.eqIfPresent(AdminAtmkDO::getCheckInLocation, reqVO.getCheckInLocation())
|
||||
.eqIfPresent(AdminAtmkDO::getCheckOutLocation, reqVO.getCheckOutLocation())
|
||||
.eqIfPresent(AdminAtmkDO::getFaceRecognitionResult, reqVO.getFaceRecognitionResult())
|
||||
.eqIfPresent(AdminAtmkDO::getCheckInPhoto, reqVO.getCheckInPhoto())
|
||||
.eqIfPresent(AdminAtmkDO::getCheckOutPhoto, reqVO.getCheckOutPhoto())
|
||||
.eqIfPresent(AdminAtmkDO::getFaceData, reqVO.getFaceData())
|
||||
.eqIfPresent(AdminAtmkDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AdminAtmkDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(AdminAtmkDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AdminAtmkDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkface;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
|
||||
|
||||
/**
|
||||
* 人脸识别库 Mapper
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AdminAtmkFaceMapper extends BaseMapperX<AdminAtmkFaceDO> {
|
||||
|
||||
default PageResult<AdminAtmkFaceDO> selectPage(AdminAtmkFacePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkFaceDO>()
|
||||
.eqIfPresent(AdminAtmkFaceDO::getTypeBiz, reqVO.getTypeBiz())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getDeptId, reqVO.getDeptId())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getUserId, reqVO.getUserId())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getUserNo, reqVO.getUserNo())
|
||||
.likeIfPresent(AdminAtmkFaceDO::getUserName, reqVO.getUserName())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getFaceData, reqVO.getFaceData())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AdminAtmkFaceDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(AdminAtmkFaceDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AdminAtmkFaceDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkgroutcfg;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
|
||||
|
||||
/**
|
||||
* 考勤组设置 Mapper
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AdminAtmkGroutCfgMapper extends BaseMapperX<AdminAtmkGroutCfgDO> {
|
||||
|
||||
default PageResult<AdminAtmkGroutCfgDO> selectPage(AdminAtmkGroutCfgPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkGroutCfgDO>()
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getTypeBiz, reqVO.getTypeBiz())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getDeptId, reqVO.getDeptId())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getGroupCode, reqVO.getGroupCode())
|
||||
.likeIfPresent(AdminAtmkGroutCfgDO::getGroupName, reqVO.getGroupName())
|
||||
.betweenIfPresent(AdminAtmkGroutCfgDO::getStartTime, reqVO.getStartTime())
|
||||
.betweenIfPresent(AdminAtmkGroutCfgDO::getEndTime, reqVO.getEndTime())
|
||||
.likeIfPresent(AdminAtmkGroutCfgDO::getAreaName, reqVO.getAreaName())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getLatitude, reqVO.getLatitude())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getLongitude, reqVO.getLongitude())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AdminAtmkGroutCfgDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(AdminAtmkGroutCfgDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AdminAtmkGroutCfgDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminperfcfg;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
|
||||
|
||||
/**
|
||||
* 绩效考核配置 Mapper
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AdminPerfCfgMapper extends BaseMapperX<AdminPerfCfgDO> {
|
||||
|
||||
default PageResult<AdminPerfCfgDO> selectPage(AdminPerfCfgPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminPerfCfgDO>()
|
||||
.eqIfPresent(AdminPerfCfgDO::getTypeBiz, reqVO.getTypeBiz())
|
||||
.eqIfPresent(AdminPerfCfgDO::getDeptOrUserId, reqVO.getDeptOrUserId())
|
||||
.eqIfPresent(AdminPerfCfgDO::getTitle, reqVO.getTitle())
|
||||
.betweenIfPresent(AdminPerfCfgDO::getStarTime, reqVO.getStarTime())
|
||||
.betweenIfPresent(AdminPerfCfgDO::getEndTime, reqVO.getEndTime())
|
||||
.eqIfPresent(AdminPerfCfgDO::getSorce, reqVO.getSorce())
|
||||
.eqIfPresent(AdminPerfCfgDO::getEvg, reqVO.getEvg())
|
||||
.eqIfPresent(AdminPerfCfgDO::getEvgItem, reqVO.getEvgItem())
|
||||
.eqIfPresent(AdminPerfCfgDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(AdminPerfCfgDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AdminPerfCfgDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(AdminPerfCfgDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AdminPerfCfgDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminpostcfg;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
|
||||
|
||||
/**
|
||||
* 岗位人员薪资计算配置 Mapper
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface AdminPostCfgMapper extends BaseMapperX<AdminPostCfgDO> {
|
||||
|
||||
default PageResult<AdminPostCfgDO> selectPage(AdminPostCfgPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminPostCfgDO>()
|
||||
.eqIfPresent(AdminPostCfgDO::getTypeBiz, reqVO.getTypeBiz())
|
||||
.eqIfPresent(AdminPostCfgDO::getItemType, reqVO.getItemType())
|
||||
.eqIfPresent(AdminPostCfgDO::getPostOrUserId, reqVO.getPostOrUserId())
|
||||
.betweenIfPresent(AdminPostCfgDO::getCheckInOutTime, reqVO.getCheckInOutTime())
|
||||
.eqIfPresent(AdminPostCfgDO::getSalary, reqVO.getSalary())
|
||||
.eqIfPresent(AdminPostCfgDO::getCoef, reqVO.getCoef())
|
||||
.eqIfPresent(AdminPostCfgDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(AdminPostCfgDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(AdminPostCfgDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(AdminPostCfgDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AdminPostCfgDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmk;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 考勤打卡 Service 接口
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
public interface AdminAtmkService {
|
||||
|
||||
/**
|
||||
* 创建考勤打卡
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createAdminAtmk(@Valid AdminAtmkSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新考勤打卡
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAdminAtmk(@Valid AdminAtmkSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除考勤打卡
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAdminAtmk(Integer id);
|
||||
|
||||
/**
|
||||
* 获得考勤打卡
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 考勤打卡
|
||||
*/
|
||||
AdminAtmkDO getAdminAtmk(Integer id);
|
||||
|
||||
/**
|
||||
* 获得考勤打卡分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 考勤打卡分页
|
||||
*/
|
||||
PageResult<AdminAtmkDO> getAdminAtmkPage(AdminAtmkPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmk;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmk.AdminAtmkMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 考勤打卡 Service 实现类
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AdminAtmkServiceImpl implements AdminAtmkService {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkMapper adminAtmkMapper;
|
||||
|
||||
@Override
|
||||
public Integer createAdminAtmk(AdminAtmkSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AdminAtmkDO adminAtmk = BeanUtils.toBean(createReqVO, AdminAtmkDO.class);
|
||||
adminAtmkMapper.insert(adminAtmk);
|
||||
// 返回
|
||||
return adminAtmk.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAdminAtmk(AdminAtmkSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAdminAtmkExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AdminAtmkDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkDO.class);
|
||||
adminAtmkMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAdminAtmk(Integer id) {
|
||||
// 校验存在
|
||||
validateAdminAtmkExists(id);
|
||||
// 删除
|
||||
adminAtmkMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAdminAtmkExists(Integer id) {
|
||||
if (adminAtmkMapper.selectById(id) == null) {
|
||||
throw exception(ADMIN_ATMK_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminAtmkDO getAdminAtmk(Integer id) {
|
||||
return adminAtmkMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminAtmkDO> getAdminAtmkPage(AdminAtmkPageReqVO pageReqVO) {
|
||||
return adminAtmkMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmkface;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 人脸识别库 Service 接口
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
public interface AdminAtmkFaceService {
|
||||
|
||||
/**
|
||||
* 创建人脸识别库
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createAdminAtmkFace(@Valid AdminAtmkFaceSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新人脸识别库
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAdminAtmkFace(@Valid AdminAtmkFaceSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除人脸识别库
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAdminAtmkFace(Integer id);
|
||||
|
||||
/**
|
||||
* 获得人脸识别库
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 人脸识别库
|
||||
*/
|
||||
AdminAtmkFaceDO getAdminAtmkFace(Integer id);
|
||||
|
||||
/**
|
||||
* 获得人脸识别库分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 人脸识别库分页
|
||||
*/
|
||||
PageResult<AdminAtmkFaceDO> getAdminAtmkFacePage(AdminAtmkFacePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmkface;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkface.AdminAtmkFaceMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 人脸识别库 Service 实现类
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AdminAtmkFaceServiceImpl implements AdminAtmkFaceService {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkFaceMapper adminAtmkFaceMapper;
|
||||
|
||||
@Override
|
||||
public Integer createAdminAtmkFace(AdminAtmkFaceSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AdminAtmkFaceDO adminAtmkFace = BeanUtils.toBean(createReqVO, AdminAtmkFaceDO.class);
|
||||
adminAtmkFaceMapper.insert(adminAtmkFace);
|
||||
// 返回
|
||||
return adminAtmkFace.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAdminAtmkFace(AdminAtmkFaceSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAdminAtmkFaceExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AdminAtmkFaceDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkFaceDO.class);
|
||||
adminAtmkFaceMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAdminAtmkFace(Integer id) {
|
||||
// 校验存在
|
||||
validateAdminAtmkFaceExists(id);
|
||||
// 删除
|
||||
adminAtmkFaceMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAdminAtmkFaceExists(Integer id) {
|
||||
if (adminAtmkFaceMapper.selectById(id) == null) {
|
||||
throw exception(ADMIN_ATMK_FACE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminAtmkFaceDO getAdminAtmkFace(Integer id) {
|
||||
return adminAtmkFaceMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminAtmkFaceDO> getAdminAtmkFacePage(AdminAtmkFacePageReqVO pageReqVO) {
|
||||
return adminAtmkFaceMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 考勤组设置 Service 接口
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
public interface AdminAtmkGroutCfgService {
|
||||
|
||||
/**
|
||||
* 创建考勤组设置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createAdminAtmkGroutCfg(@Valid AdminAtmkGroutCfgSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新考勤组设置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAdminAtmkGroutCfg(@Valid AdminAtmkGroutCfgSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除考勤组设置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAdminAtmkGroutCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得考勤组设置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 考勤组设置
|
||||
*/
|
||||
AdminAtmkGroutCfgDO getAdminAtmkGroutCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得考勤组设置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 考勤组设置分页
|
||||
*/
|
||||
PageResult<AdminAtmkGroutCfgDO> getAdminAtmkGroutCfgPage(AdminAtmkGroutCfgPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkgroutcfg.AdminAtmkGroutCfgMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 考勤组设置 Service 实现类
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AdminAtmkGroutCfgServiceImpl implements AdminAtmkGroutCfgService {
|
||||
|
||||
@Resource
|
||||
private AdminAtmkGroutCfgMapper adminAtmkGroutCfgMapper;
|
||||
|
||||
@Override
|
||||
public Integer createAdminAtmkGroutCfg(AdminAtmkGroutCfgSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AdminAtmkGroutCfgDO adminAtmkGroutCfg = BeanUtils.toBean(createReqVO, AdminAtmkGroutCfgDO.class);
|
||||
adminAtmkGroutCfgMapper.insert(adminAtmkGroutCfg);
|
||||
// 返回
|
||||
return adminAtmkGroutCfg.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAdminAtmkGroutCfg(AdminAtmkGroutCfgSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAdminAtmkGroutCfgExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AdminAtmkGroutCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkGroutCfgDO.class);
|
||||
adminAtmkGroutCfgMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAdminAtmkGroutCfg(Integer id) {
|
||||
// 校验存在
|
||||
validateAdminAtmkGroutCfgExists(id);
|
||||
// 删除
|
||||
adminAtmkGroutCfgMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAdminAtmkGroutCfgExists(Integer id) {
|
||||
if (adminAtmkGroutCfgMapper.selectById(id) == null) {
|
||||
throw exception(ADMIN_ATMK_GROUT_CFG_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminAtmkGroutCfgDO getAdminAtmkGroutCfg(Integer id) {
|
||||
return adminAtmkGroutCfgMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminAtmkGroutCfgDO> getAdminAtmkGroutCfgPage(AdminAtmkGroutCfgPageReqVO pageReqVO) {
|
||||
return adminAtmkGroutCfgMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminperfcfg;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 绩效考核配置 Service 接口
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
public interface AdminPerfCfgService {
|
||||
|
||||
/**
|
||||
* 创建绩效考核配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createAdminPerfCfg(@Valid AdminPerfCfgSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新绩效考核配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAdminPerfCfg(@Valid AdminPerfCfgSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除绩效考核配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAdminPerfCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得绩效考核配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 绩效考核配置
|
||||
*/
|
||||
AdminPerfCfgDO getAdminPerfCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得绩效考核配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 绩效考核配置分页
|
||||
*/
|
||||
PageResult<AdminPerfCfgDO> getAdminPerfCfgPage(AdminPerfCfgPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminperfcfg;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminperfcfg.AdminPerfCfgMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 绩效考核配置 Service 实现类
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AdminPerfCfgServiceImpl implements AdminPerfCfgService {
|
||||
|
||||
@Resource
|
||||
private AdminPerfCfgMapper adminPerfCfgMapper;
|
||||
|
||||
@Override
|
||||
public Integer createAdminPerfCfg(AdminPerfCfgSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AdminPerfCfgDO adminPerfCfg = BeanUtils.toBean(createReqVO, AdminPerfCfgDO.class);
|
||||
adminPerfCfgMapper.insert(adminPerfCfg);
|
||||
// 返回
|
||||
return adminPerfCfg.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAdminPerfCfg(AdminPerfCfgSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAdminPerfCfgExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AdminPerfCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminPerfCfgDO.class);
|
||||
adminPerfCfgMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAdminPerfCfg(Integer id) {
|
||||
// 校验存在
|
||||
validateAdminPerfCfgExists(id);
|
||||
// 删除
|
||||
adminPerfCfgMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAdminPerfCfgExists(Integer id) {
|
||||
if (adminPerfCfgMapper.selectById(id) == null) {
|
||||
throw exception(ADMIN_PERF_CFG_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminPerfCfgDO getAdminPerfCfg(Integer id) {
|
||||
return adminPerfCfgMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminPerfCfgDO> getAdminPerfCfgPage(AdminPerfCfgPageReqVO pageReqVO) {
|
||||
return adminPerfCfgMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminpostcfg;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 岗位人员薪资计算配置 Service 接口
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
public interface AdminPostCfgService {
|
||||
|
||||
/**
|
||||
* 创建岗位人员薪资计算配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createAdminPostCfg(@Valid AdminPostCfgSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新岗位人员薪资计算配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAdminPostCfg(@Valid AdminPostCfgSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除岗位人员薪资计算配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAdminPostCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得岗位人员薪资计算配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 岗位人员薪资计算配置
|
||||
*/
|
||||
AdminPostCfgDO getAdminPostCfg(Integer id);
|
||||
|
||||
/**
|
||||
* 获得岗位人员薪资计算配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 岗位人员薪资计算配置分页
|
||||
*/
|
||||
PageResult<AdminPostCfgDO> getAdminPostCfgPage(AdminPostCfgPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package cn.iocoder.yudao.module.hrmrg.service.adminpostcfg;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminpostcfg.AdminPostCfgMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 岗位人员薪资计算配置 Service 实现类
|
||||
*
|
||||
* @author 超级管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AdminPostCfgServiceImpl implements AdminPostCfgService {
|
||||
|
||||
@Resource
|
||||
private AdminPostCfgMapper adminPostCfgMapper;
|
||||
|
||||
@Override
|
||||
public Integer createAdminPostCfg(AdminPostCfgSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AdminPostCfgDO adminPostCfg = BeanUtils.toBean(createReqVO, AdminPostCfgDO.class);
|
||||
adminPostCfgMapper.insert(adminPostCfg);
|
||||
// 返回
|
||||
return adminPostCfg.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAdminPostCfg(AdminPostCfgSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAdminPostCfgExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AdminPostCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminPostCfgDO.class);
|
||||
adminPostCfgMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAdminPostCfg(Integer id) {
|
||||
// 校验存在
|
||||
validateAdminPostCfgExists(id);
|
||||
// 删除
|
||||
adminPostCfgMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateAdminPostCfgExists(Integer id) {
|
||||
if (adminPostCfgMapper.selectById(id) == null) {
|
||||
throw exception(ADMIN_POST_CFG_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdminPostCfgDO getAdminPostCfg(Integer id) {
|
||||
return adminPostCfgMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AdminPostCfgDO> getAdminPostCfgPage(AdminPostCfgPageReqVO pageReqVO) {
|
||||
return adminPostCfgMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
--- #################### 注册中心 + 配置中心相关配置 ####################
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
|
||||
username: nacos # Nacos 账号
|
||||
password: nacos # Nacos 密码
|
||||
discovery: # 【配置中心】配置项
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
metadata:
|
||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||
config: # 【注册中心】配置项
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
# 数据源配置项
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
datasource:
|
||||
druid: # Druid 【监控】相关的全局配置
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
allow: # 设置白名单,不填则允许所有访问
|
||||
url-pattern: /druid/*
|
||||
login-username: # 控制台管理用户名和密码
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
log-slow-sql: true # 慢 SQL 记录
|
||||
slow-sql-millis: 100
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
dynamic: # 多数据源配置
|
||||
druid: # Druid 【连接池】相关的全局配置
|
||||
initial-size: 1 # 初始连接数
|
||||
min-idle: 1 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://192.168.1.128/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://192.168.1.128/hs-mall-cloud?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
username: root
|
||||
password: hs-rootadmin
|
||||
# username: sa # SQL Server 连接的示例
|
||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
# password: SYSDBA # DM 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://192.168.1.128/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: hs-rootadmin
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 192.168.1.128 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
# password: hs-rootadmin # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
xxl:
|
||||
job:
|
||||
enabled: true # 是否开启调度中心,默认为 true 开启
|
||||
admin:
|
||||
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
|
||||
|
||||
--- #################### 服务保障相关配置 ####################
|
||||
|
||||
# Lock4j 配置项
|
||||
lock4j:
|
||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
# Actuator 监控端点的配置项
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
||||
exposure:
|
||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
||||
|
||||
# Spring Boot Admin 配置项
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
# Spring Boot Admin Client 客户端的相关配置
|
||||
client:
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
|
||||
# 日志文件配置
|
||||
logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.iocoder.yudao.module.hrmrg.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: false
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
--- #################### 注册中心 + 配置中心相关配置 ####################
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
|
||||
username: nacos # Nacos 账号
|
||||
password: nacos # Nacos 密码
|
||||
discovery: # 【配置中心】配置项
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
metadata:
|
||||
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
|
||||
config: # 【注册中心】配置项
|
||||
namespace: dev # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
|
||||
--- #################### 数据库相关配置 ####################
|
||||
spring:
|
||||
# 数据源配置项
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
||||
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
||||
datasource:
|
||||
druid: # Druid 【监控】相关的全局配置
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
allow: # 设置白名单,不填则允许所有访问
|
||||
url-pattern: /druid/*
|
||||
login-username: # 控制台管理用户名和密码
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
log-slow-sql: true # 慢 SQL 记录
|
||||
slow-sql-millis: 100
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
dynamic: # 多数据源配置
|
||||
druid: # Druid 【连接池】相关的全局配置
|
||||
initial-size: 1 # 初始连接数
|
||||
min-idle: 1 # 最小连接池数量
|
||||
max-active: 20 # 最大连接池数量
|
||||
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
|
||||
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
|
||||
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
|
||||
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
|
||||
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://192.168.1.128/hs-mall-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://192.168.1.128/hs-mall-cloud?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
|
||||
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
username: root
|
||||
password: hs-rootadmin
|
||||
# username: sa # SQL Server 连接的示例
|
||||
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
# password: SYSDBA # DM 连接的示例
|
||||
slave: # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:mysql://192.168.1.128/hs-mall-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: hs-rootadmin
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
redis:
|
||||
host: 192.168.1.128 # 地址
|
||||
port: 6379 # 端口
|
||||
database: 0 # 数据库索引
|
||||
# password: hs-rootadmin # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
xxl:
|
||||
job:
|
||||
enabled: true # 是否开启调度中心,默认为 true 开启
|
||||
admin:
|
||||
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
|
||||
|
||||
--- #################### 服务保障相关配置 ####################
|
||||
|
||||
# Lock4j 配置项
|
||||
lock4j:
|
||||
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
|
||||
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
# Actuator 监控端点的配置项
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
||||
exposure:
|
||||
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
||||
|
||||
# Spring Boot Admin 配置项
|
||||
spring:
|
||||
boot:
|
||||
admin:
|
||||
# Spring Boot Admin Client 客户端的相关配置
|
||||
client:
|
||||
instance:
|
||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||
|
||||
# 日志文件配置
|
||||
logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.iocoder.yudao.module.hrmrg.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: false
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
spring:
|
||||
application:
|
||||
name: hrmrg-server
|
||||
|
||||
profiles:
|
||||
active: local
|
||||
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
|
||||
|
||||
config:
|
||||
import:
|
||||
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
|
||||
|
||||
# Servlet 配置
|
||||
servlet:
|
||||
# 文件上传相关配置项
|
||||
multipart:
|
||||
max-file-size: 16MB # 单个文件大小
|
||||
max-request-size: 32MB # 设置总上传的文件大小
|
||||
|
||||
# Jackson 配置项
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
|
||||
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
|
||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
||||
|
||||
# Cache 配置项
|
||||
cache:
|
||||
type: REDIS
|
||||
redis:
|
||||
time-to-live: 1h # 设置过期时间为 1 小时
|
||||
|
||||
server:
|
||||
port: 48200
|
||||
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
|
||||
--- #################### 接口文档配置 ####################
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true # 1. 是否开启 Swagger 接文档的元数据
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
|
||||
path: /swagger-ui
|
||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
||||
|
||||
knife4j:
|
||||
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
|
||||
setting:
|
||||
language: zh_cn
|
||||
|
||||
# MyBatis Plus 的配置项
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
|
||||
encryptor:
|
||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||
|
||||
mybatis-plus-join:
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
|
||||
# Spring Data Redis 配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
repositories:
|
||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
||||
|
||||
# VO 转换(数据翻译)相关
|
||||
easy-trans:
|
||||
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
|
||||
|
||||
--- #################### RPC 远程调用相关配置 ####################
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
xxl:
|
||||
job:
|
||||
executor:
|
||||
appname: ${spring.application.name} # 执行器 AppName
|
||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||
accessToken: default_token # 执行器通讯TOKEN
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
yudao:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.yudao.module.hrmrg
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
xss:
|
||||
enable: false
|
||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||
swagger:
|
||||
title: 管理后台
|
||||
description: 提供管理员管理的所有功能
|
||||
version: ${yudao.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
ignore-urls:
|
||||
ignore-tables:
|
||||
|
||||
debug: false
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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.hrmrg.dal.mysql.adminatmk.AdminAtmkMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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.hrmrg.dal.mysql.adminatmkface.AdminAtmkFaceMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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.hrmrg.dal.mysql.adminatmkgroutcfg.AdminAtmkGroutCfgMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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.hrmrg.dal.mysql.adminperfcfg.AdminPerfCfgMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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.hrmrg.dal.mysql.adminpostcfg.AdminPostCfgMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1 @@
|
|||
delete from hr_admin_atmk
|
||||
|
|
@ -10,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
*/
|
||||
@SpringBootApplication
|
||||
public class HshyServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(HshyServerApplication.class, args);
|
||||
System.out.println("HsfxServerApplication 启动成功");
|
||||
|
|
|
|||
Loading…
Reference in New Issue