瀏覽代碼

人资管理

zhuwei 2 年之前
父節點
當前提交
077d046ff8
共有 15 個文件被更改,包括 780 次插入12 次删除
  1. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/UserContractInfoDTO.java
  2. 0 2
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/PlanInform.java
  3. 79 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserContractInfo.java
  4. 8 3
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserpayInfo.java
  5. 1 6
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/DepartmentMonthPlanVO.java
  6. 34 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserContractInfoVO.java
  7. 194 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/CorporationInfoController.java
  8. 117 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/UserContractInfoController.java
  9. 43 0
      blade-service/blade-control/src/main/java/org/springblade/control/controller/UserpayInfoController.java
  10. 120 0
      blade-service/blade-control/src/main/java/org/springblade/control/excel/UserpayExcel.java
  11. 43 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserContractInfoMapper.java
  12. 24 0
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserContractInfoMapper.xml
  13. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.xml
  14. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IUserContractInfoService.java
  15. 41 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserContractInfoServiceImpl.java

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/UserContractInfoDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.dto;
+
+import org.springblade.control.entity.UserContractInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 员工合同信息表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UserContractInfoDTO extends UserContractInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 0 - 2
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/PlanInform.java

@@ -36,6 +36,4 @@ public class PlanInform extends BaseEntity {
     @ApiModelProperty(value = "通知时间")
     private LocalDate informDate;
 
-
-
 }

+ 79 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserContractInfo.java

@@ -0,0 +1,79 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 员工合同信息表实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@TableName("c_user_contract_info")
+@EqualsAndHashCode(callSuper = true)
+public class UserContractInfo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户主建Id
+     */
+    @ApiModelProperty(value = "用户主建Id")
+    private Long userId;
+    /**
+     * 合同类型
+     */
+    @ApiModelProperty(value = "合同类型")
+    private Integer conType;
+    /**
+     * 开始日期
+     */
+    @ApiModelProperty(value = "开始日期")
+    private LocalDateTime startDate;
+    /**
+     * 结束日期
+     */
+    @ApiModelProperty(value = "结束日期")
+    private LocalDateTime endDate;
+    /**
+     * 文件路径
+     */
+    @ApiModelProperty(value = "文件路径")
+    private String fileUrl;
+    /**
+     * 1:合同 2入职 3 离职
+     */
+    @ApiModelProperty(value = "1:合同 2入职 3 离职")
+    private Integer type;
+
+    /**
+     * 离职原因
+     */
+    @ApiModelProperty(value = "离职原因")
+    private String desc;
+
+}

+ 8 - 3
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/UserpayInfo.java

@@ -20,7 +20,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.time.LocalDate;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import org.springblade.core.mp.base.BaseEntity;
 import lombok.Data;
@@ -33,7 +35,7 @@ import lombok.EqualsAndHashCode;
  * @since 2023-07-06
  */
 @Data
-@TableName("c_userpay_info")
+@TableName("c_user_pay_info")
 @EqualsAndHashCode(callSuper = true)
 public class UserpayInfo extends BaseEntity {
 
@@ -44,11 +46,15 @@ public class UserpayInfo extends BaseEntity {
      */
     @ApiModelProperty(value = "用户id主键")
     private Long userId;
+
     /**
      * yyyy-mm 格式
      */
+    @JsonFormat(
+            pattern = "yyyy-MM"
+    )
     @ApiModelProperty(value = "时间yyyy-mm")
-    private String costTime;
+    private LocalDate costTime;
     /**
      * 应出勤天数
      */
@@ -145,5 +151,4 @@ public class UserpayInfo extends BaseEntity {
     @ApiModelProperty(value = "描述")
     private String desc;
 
-
 }

+ 1 - 6
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/DepartmentMonthPlanVO.java

@@ -1,16 +1,11 @@
 package org.springblade.control.vo;
 
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
+
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.control.entity.DepartmentMonthPlan;
-import org.springblade.core.mp.base.BaseEntity;
-import org.springframework.format.annotation.DateTimeFormat;
 
-import java.time.LocalDate;
 
 /**
  * @Param

+ 34 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/vo/UserContractInfoVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.vo;
+
+import org.springblade.control.entity.UserContractInfo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 员工合同信息表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UserContractInfoVO extends UserContractInfo {
+    private static final long serialVersionUID = 1L;
+
+}

+ 194 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/CorporationInfoController.java

@@ -0,0 +1,194 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.controller;
+
+import io.swagger.annotations.*;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.validation.Valid;
+
+import lombok.SneakyThrows;
+import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.hibernate.validator.constraints.Length;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.FileUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.resource.entity.Attach;
+import org.springblade.resource.entity.LargeFile;
+import org.springblade.resource.feign.CommonFileClient;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springblade.resource.vo.NewBladeFile;
+import org.springframework.beans.BeanUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.control.entity.CorporationInfo;
+import org.springblade.control.vo.CorporationInfoVO;
+import org.springblade.control.service.ICorporationInfoService;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Objects;
+
+/**
+ * 公司制度信息表 控制器
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/corporationinfo")
+@Api(value = "公司制度信息表", tags = "公司制度信息表接口")
+public class CorporationInfoController extends BladeController {
+
+    private final ICorporationInfoService corporationInfoService;
+
+    // pdf转换
+    private final CommonFileClient commonFileClient;
+
+    private final NewIOSSClient newIOSSClient;
+
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入corporationInfo")
+    public R<CorporationInfo> detail(CorporationInfo corporationInfo) {
+        CorporationInfo detail = corporationInfoService.getOne(Condition.getQueryWrapper(corporationInfo));
+        return R.data(detail);
+    }
+
+    /**
+     * 分页 公司制度信息表
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页公司制度信息表", notes = "传入corporationInfo")
+    public R<IPage<CorporationInfoVO>> page(CorporationInfoVO corporationInfo, Query query) {
+        IPage<CorporationInfoVO> pages = corporationInfoService.selectCorporationInfoPage(Condition.getPage(query), corporationInfo);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 公司制度信息表
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入corporationInfo")
+    public R save(@Valid @RequestBody CorporationInfo corporationInfo) {
+        return R.status(corporationInfoService.save(corporationInfo));
+    }
+
+    /**
+     * 修改 公司制度信息表
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入corporationInfo")
+    public R update(@Valid @RequestBody CorporationInfo corporationInfo) {
+        return R.status(corporationInfoService.updateById(corporationInfo));
+    }
+
+    /**
+     * 新增或修改 公司制度信息表
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入corporationInfo")
+    public R submit(@Valid @RequestBody CorporationInfo corporationInfo) {
+        return R.status(corporationInfoService.saveOrUpdate(corporationInfo));
+    }
+
+
+    /**
+     * 删除 公司制度信息表
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return R.status(corporationInfoService.deleteLogic(Func.toLongList(ids)));
+    }
+
+
+    /**
+     * 上传和重新上传
+     */
+    @SneakyThrows
+    @PostMapping("/put-corporationinfo")
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "公司制度上传和重新上传", notes = "公司制度上传和重新上传")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "file", value = "文件源", required = true),
+            @ApiImplicitParam(name = "id", value = "制度主键Id(重新上传必须传)", required = false)
+    })
+    public R putFileAttach(@RequestParam("file") MultipartFile file, String id) {
+        //
+        CorporationInfo corporationInfo = new CorporationInfo();
+        NewBladeFile newBladeFile = new NewBladeFile();
+        if (Objects.requireNonNull(file.getOriginalFilename()).contains("xlsx")) {
+            newBladeFile = this.commonFileClient.excelToPdf(file);
+
+        } else if (file.getOriginalFilename().contains("xls")) {
+            newBladeFile = this.commonFileClient.excelToPdf(file);
+
+        } else if (file.getOriginalFilename().contains("docx")) {
+            newBladeFile = this.commonFileClient.wordToPdf(file);
+
+        } else if (file.getOriginalFilename().contains("png") || file.getOriginalFilename().contains("jpg")) {
+            newBladeFile = this.commonFileClient.pngOrJpgToPdf(file);
+
+        } else if (file.getOriginalFilename().contains("pdf")) {
+            //获取PDF文件
+            BladeFile bladeFile = this.newIOSSClient.updateFile(file.getBytes(), file.getOriginalFilename());
+            BeanUtils.copyProperties(bladeFile, newBladeFile);
+        }
+        String fileExtension = FileUtil.getFileExtension(newBladeFile.getOriginalName());
+        if (StringUtils.isNotEmpty(id)) {
+            corporationInfo = corporationInfoService.getById(id);
+            corporationInfo.setName(file.getName());
+            corporationInfo.setOriginalName(file.getOriginalFilename());
+            corporationInfo.setDomainUrl(newBladeFile.getDomain());
+            corporationInfo.setLink(newBladeFile.getPdfUrl());
+            corporationInfo.setName(newBladeFile.getName());
+
+            corporationInfo.setAttachSize(newBladeFile.getFileSize());
+            corporationInfo.setExtension(fileExtension);
+
+        } else {
+            corporationInfo.setName(file.getName());
+            corporationInfo.setOriginalName(file.getOriginalFilename());
+            corporationInfo.setDomainUrl(newBladeFile.getDomain());
+            corporationInfo.setLink(newBladeFile.getPdfUrl());
+            corporationInfo.setName(newBladeFile.getName());
+            corporationInfo.setAttachSize(newBladeFile.getFileSize());
+            corporationInfo.setExtension(fileExtension);
+        }
+
+        boolean b = corporationInfoService.saveOrUpdate(corporationInfo);
+        return R.status(b);
+    }
+
+}

+ 117 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/UserContractInfoController.java

@@ -0,0 +1,117 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.control.entity.UserContractInfo;
+import org.springblade.control.vo.UserContractInfoVO;
+import org.springblade.control.service.IUserContractInfoService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 员工合同信息表 控制器
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/usercontractinfo")
+@Api(value = "员工合同入职离职信息表", tags = "员工合同入职离职信息表接口")
+public class UserContractInfoController extends BladeController {
+
+    private final IUserContractInfoService userContractInfoService;
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入userContractInfo")
+    public R<UserContractInfo> detail(UserContractInfo userContractInfo) {
+        UserContractInfo detail = userContractInfoService.getOne(Condition.getQueryWrapper(userContractInfo));
+        return R.data(detail);
+    }
+
+    /**
+     * 自定义分页 员工合同信息表
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入userContractInfo")
+    public R<IPage<UserContractInfoVO>> page(UserContractInfoVO userContractInfo, Query query) {
+        IPage<UserContractInfoVO> pages = userContractInfoService.selectUserContractInfoPage(Condition.getPage(query), userContractInfo);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 员工合同信息表
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入userContractInfo")
+    public R save(@Valid @RequestBody UserContractInfo userContractInfo) {
+        return R.status(userContractInfoService.save(userContractInfo));
+    }
+
+    /**
+     * 修改 员工合同信息表
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入userContractInfo")
+    public R update(@Valid @RequestBody UserContractInfo userContractInfo) {
+        return R.status(userContractInfoService.updateById(userContractInfo));
+    }
+
+    /**
+     * 新增或修改 员工合同信息表
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入userContractInfo")
+    public R submit(@Valid @RequestBody UserContractInfo userContractInfo) {
+        return R.status(userContractInfoService.saveOrUpdate(userContractInfo));
+    }
+
+
+    /**
+     * 删除 员工合同信息表
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return R.status(userContractInfoService.deleteLogic(Func.toLongList(ids)));
+    }
+
+
+}

+ 43 - 0
blade-service/blade-control/src/main/java/org/springblade/control/controller/UserpayInfoController.java

@@ -22,11 +22,15 @@ import io.swagger.annotations.ApiParam;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
+import org.springblade.control.excel.UserpayExcel;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -35,6 +39,10 @@ import org.springblade.control.entity.UserpayInfo;
 import org.springblade.control.vo.UserpayInfoVO;
 import org.springblade.control.service.IUserpayInfoService;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 薪酬管理 控制器
@@ -115,4 +123,39 @@ public class UserpayInfoController extends BladeController {
     }
 
 
+    /**
+     * 导入薪酬管理
+     */
+    @PostMapping("import-userpay")
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "导入薪酬管理", notes = "传入excel")
+    public R importUserpayInfo(MultipartFile file) {
+        List<UserpayExcel> list = ExcelUtil.read(file, UserpayExcel.class);
+
+        //userpayInfoService.saveBatch();
+        return R.success("操作成功");
+    }
+
+    /**
+     * 导出全部用户
+     */
+/*    @GetMapping("export-userpay")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "导出薪酬管理", notes = "传入token")
+    public void exportUser(@ApiIgnore @RequestParam Map<String, Object> user, BladeUser bladeUser, HttpServletResponse response) {
+        List<UserVO> list = userService.selectUserListByCondition();
+        List<UserExcel2> list1 = Objects.requireNonNull(BeanUtil.copy(list, UserExcel2.class));
+        ExcelUtil.export(response, "用户数据" + DateUtil.time(), "用户数据表", list1, UserExcel2.class);
+    }*/
+
+    /**
+     * 导出模板
+     */
+    @GetMapping("export-template")
+    @ApiOperationSupport(order = 10)
+    @ApiOperation(value = "导出模板")
+    public void exportUser(HttpServletResponse response) {
+        List<UserpayExcel> list = new ArrayList<>();
+        ExcelUtil.export(response, "薪酬管理模板" + DateUtil.time(), "薪酬管理表", list, UserpayExcel.class);
+    }
 }

+ 120 - 0
blade-service/blade-control/src/main/java/org/springblade/control/excel/UserpayExcel.java

@@ -0,0 +1,120 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * UserExcel
+ *
+ * @author Chill
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class UserpayExcel implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ColumnWidth(15)
+    @ExcelProperty("姓名")
+    private String userName;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "应出勤天数")
+    private Integer yAllDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "实际出勤天数")
+    private Integer sAllDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "年假")
+    private Integer yearDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "调休假")
+    private Integer cLeaveDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "病假")
+    private Integer sickLeaveDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "事假")
+    private Integer absenceDays;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "基础工资")
+    private BigDecimal basicSalary;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "岗位工资")
+    private BigDecimal postSalary;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "绩效工资")
+    private BigDecimal meritSalary;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "奖金")
+    private BigDecimal bonusSalary;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "伙食补贴")
+    private BigDecimal mealWance;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "其他补贴")
+    private BigDecimal otherWance;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "考勤扣款")
+    private BigDecimal attendDuction;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "其他扣款")
+    private BigDecimal otherDuction;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "应发工资")
+    private BigDecimal grossPay;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "代缴个税")
+    private BigDecimal personalTax;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "代缴社保")
+    private BigDecimal socialSec;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "实发工资")
+    private BigDecimal netSalary;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "描述")
+    private String desc;
+
+}

+ 43 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserContractInfoMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.mapper;
+
+import org.springblade.control.entity.UserContractInfo;
+import org.springblade.control.vo.UserContractInfoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 员工合同信息表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface UserContractInfoMapper extends BaseMapper<UserContractInfo> {
+
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param userContractInfo
+     * @return
+     */
+    List<UserContractInfoVO> selectUserContractInfoPage(IPage page, UserContractInfoVO userContractInfo);
+
+}

+ 24 - 0
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserContractInfoMapper.xml

@@ -0,0 +1,24 @@
+<?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="org.springblade.control.mapper.UserContractInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="userContractInfoResultMap" type="org.springblade.control.entity.UserContractInfo">
+        <result column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="user_id" property="userId"/>
+        <result column="con_type" property="conType"/>
+        <result column="start_date" property="startDate"/>
+        <result column="end_date" property="endDate"/>
+        <result column="file_url" property="fileUrl"/>
+        <result column="type" property="type"/>
+    </resultMap>
+
+
+    <select id="selectUserContractInfoPage" resultMap="userContractInfoResultMap">
+        select *
+        from c_user_contract_info
+        where is_deleted = 0
+    </select>
+
+</mapper>

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/mapper/UserpayInfoMapper.xml

@@ -31,7 +31,7 @@
 
     <select id="selectUserpayInfoPage" resultMap="userpayInfoResultMap">
         select *
-        from c_userpay_info
+        from c_user_pay_info
         where is_deleted = 0
     </select>
 

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/IUserContractInfoService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service;
+
+import org.springblade.control.entity.UserContractInfo;
+import org.springblade.control.vo.UserContractInfoVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 员工合同信息表 服务类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+public interface IUserContractInfoService extends BaseService<UserContractInfo> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param userContractInfo
+	 * @return
+	 */
+	IPage<UserContractInfoVO> selectUserContractInfoPage(IPage<UserContractInfoVO> page, UserContractInfoVO userContractInfo);
+
+}

+ 41 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/UserContractInfoServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.control.service.impl;
+
+import org.springblade.control.entity.UserContractInfo;
+import org.springblade.control.vo.UserContractInfoVO;
+import org.springblade.control.mapper.UserContractInfoMapper;
+import org.springblade.control.service.IUserContractInfoService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 员工合同信息表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-07-06
+ */
+@Service
+public class UserContractInfoServiceImpl extends BaseServiceImpl<UserContractInfoMapper, UserContractInfo> implements IUserContractInfoService {
+
+    @Override
+    public IPage<UserContractInfoVO> selectUserContractInfoPage(IPage<UserContractInfoVO> page, UserContractInfoVO userContractInfo) {
+        return page.setRecords(baseMapper.selectUserContractInfoPage(page, userContractInfo));
+    }
+
+}