Browse Source

1、转正审批接口调整

dongpo 1 năm trước cách đây
mục cha
commit
fff888a52c

+ 3 - 2
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/conversion/OaConversionController.java

@@ -15,6 +15,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.api.annotations.ParameterObject;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -40,7 +41,7 @@ public class OaConversionController {
     @Operation(summary = "暂存转正审批流程信息")
     @ApiOperationSupport(order = 1)
     // @PreAuthorize("@ss.hasPermission('bpm:oa-conversion:staging')")
-    public CommonResult<Long> startOaConversion(@RequestBody OaConversionSaveReqVO stagingReqVO) {
+    public CommonResult<Long> stagingOaConversion(@RequestBody OaConversionSaveReqVO stagingReqVO) {
         Long oaConversionId = oaConversionService.stagingOaConversion(stagingReqVO);
         return success(oaConversionId, "暂存成功");
     }
@@ -134,7 +135,7 @@ public class OaConversionController {
     @Operation(summary = "获得转正审批流程信息分页")
     @ApiOperationSupport(order = 11)
     // @PreAuthorize("@ss.hasPermission('bpm:oa-conversion:query-page')")
-    public CommonResult<PageResult<OaConversionRespVO>> getOaConversionPage(@Valid OaConversionPageReqVO pageReqVO) {
+    public CommonResult<PageResult<OaConversionRespVO>> getOaConversionPage(@Valid @ParameterObject OaConversionPageReqVO pageReqVO) {
         return success(oaConversionService.getOaConversionPage(pageReqVO), "查询列表成功");
     }
 

+ 6 - 56
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/conversion/vo/OaConversionPageReqVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.conversion.vo;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import lombok.*;
 import java.util.*;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -15,80 +16,29 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
 @ToString(callSuper = true)
 public class OaConversionPageReqVO extends PageParam {
 
-    @Schema(description = "uuid", example = "8575")
-    private String conversionId;
-
-    @Schema(description = "转正人id", example = "8274")
-    private Long employeeId;
-
-    @Schema(description = "转正人uuid", example = "12691")
-    private String employeeUuid;
-
     @Schema(description = "转正员工姓名", example = "李四")
     private String employeeName;
 
-    @Schema(description = "用户账号id", example = "23689")
-    private Long userId;
-
-    @Schema(description = "用户账号uuid", example = "14280")
-    private String userUuid;
+    @Schema(description = "转正员工手机号", example = "1394920000")
+    private String employeePhone;
 
     @Schema(description = "部门id", example = "14341")
     private Long deptId;
 
-    @Schema(description = "部门uuid", example = "3755")
-    private String deptUuid;
-
     @Schema(description = "职位")
     private String position;
 
-    @Schema(description = "入职日期")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    private String[] entryDate;
-
-    @Schema(description = "试用期结束日期")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    private String[] probationEndDate;
-
     @Schema(description = "转正日期")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private String[] conversionDate;
 
-    @Schema(description = "转正申请理由", example = "不香")
-    private String conversionReason;
-
-    @Schema(description = "工作总结")
-    private String workSummary;
-
-    @Schema(description = "备注")
-    private String remarks;
-
-    @Schema(description = "流程实例id", example = "10952")
-    private String procInstId;
-
     @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
     private String auditStatus;
 
-    @Schema(description = "当前审核人用户id", example = "13372")
-    private Long currentAuditUserId;
-
-    @Schema(description = "当前审核人用户uuid", example = "15583")
-    private String currentAuditUserUuid;
-
-    @Schema(description = "当前审核人员工id", example = "20635")
-    private Long currentAuditEmployeeId;
-
-    @Schema(description = "当前审核人员工uuid", example = "32658")
-    private String currentAuditEmployeeUuid;
-
-    @Schema(description = "最后审核时间")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    private LocalDateTime[] finalAuditDate;
-
-    @Schema(description = "数据来源,0流程添加、1手动添加")
-    private String infoSource;
+    @Schema(description = "申请人")
+    private String applyEmployeeName;
 
-    @Schema(description = "创建时间")
+    @Schema(description = "申请时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 

+ 4 - 12
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/conversion/vo/OaConversionRespVO.java

@@ -32,6 +32,10 @@ public class OaConversionRespVO {
     @ExcelProperty("转正员工姓名")
     private String employeeName;
 
+    @Schema(description = "转正员工手机号", example = "1394920000")
+    @ExcelProperty("转正员工手机号")
+    private String employeePhone;
+
     @Schema(description = "用户账号id", example = "23689")
     @ExcelProperty("用户账号id")
     private Long userId;
@@ -84,18 +88,10 @@ public class OaConversionRespVO {
     @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
-    @Schema(description = "当前审核人用户uuid", example = "15583")
-    @ExcelProperty("当前审核人用户uuid")
-    private String currentAuditUserUuid;
-
     @Schema(description = "当前审核人员工id", example = "20635")
     @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工uuid", example = "32658")
-    @ExcelProperty("当前审核人员工uuid")
-    private String currentAuditEmployeeUuid;
-
     @Schema(description = "当前审核人员工姓名")
     @ExcelProperty("当前审核人员工姓名")
     private String currentAuditEmployeeName;
@@ -104,10 +100,6 @@ public class OaConversionRespVO {
     @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "数据来源,0流程添加、1手动添加")
-    @ExcelProperty("数据来源,0流程添加、1手动添加")
-    private String infoSource;
-
     @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("创建时间")
     private LocalDateTime createTime;

+ 9 - 66
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/conversion/vo/OaConversionSaveReqVO.java

@@ -12,46 +12,19 @@ import java.time.LocalDateTime;
 @Data
 public class OaConversionSaveReqVO {
 
-    @Schema(description = "转正表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27266")
+    @Schema(description = "转正表单主键", example = "1")
     private Long id;
 
-    @Schema(description = "uuid", example = "8575")
-    private String conversionId;
-
-    @Schema(description = "转正人id", example = "8274")
+    @Schema(description = "转正人id", example = "1")
+    @NotNull(message = "转正人id不能为空")
     private Long employeeId;
 
-    @Schema(description = "转正人uuid", example = "12691")
-    private String employeeUuid;
-
-    @Schema(description = "转正员工姓名", example = "李四")
-    private String employeeName;
-
-    @Schema(description = "用户账号id", example = "23689")
-    private Long userId;
-
-    @Schema(description = "用户账号uuid", example = "14280")
-    private String userUuid;
-
-    @Schema(description = "部门id", example = "14341")
-    private Long deptId;
-
-    @Schema(description = "部门uuid", example = "3755")
-    private String deptUuid;
-
-    @Schema(description = "职位")
-    private String position;
-
-    @Schema(description = "入职日期")
-    private String entryDate;
-
-    @Schema(description = "试用期结束日期")
-    private String probationEndDate;
-
-    @Schema(description = "转正日期")
+    @Schema(description = "转正日期", example = "2024-07-24")
+    @NotBlank(message = "转正日期不能为空")
     private String conversionDate;
 
-    @Schema(description = "转正申请理由", example = "不香")
+    @Schema(description = "转正申请理由", example = "转正申请理由")
+    @NotBlank(message = "转正申请理由不能为空")
     private String conversionReason;
 
     @Schema(description = "工作总结")
@@ -60,41 +33,11 @@ public class OaConversionSaveReqVO {
     @Schema(description = "备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "10952")
-    private String procInstId;
-
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    private String auditStatus;
-
-    @Schema(description = "当前审核人用户id", example = "13372")
-    private Long currentAuditUserId;
-
-    @Schema(description = "当前审核人用户uuid", example = "15583")
-    private String currentAuditUserUuid;
-
-    @Schema(description = "当前审核人员工id", example = "20635")
-    private Long currentAuditEmployeeId;
-
-    @Schema(description = "当前审核人员工uuid", example = "32658")
-    private String currentAuditEmployeeUuid;
-
-    @Schema(description = "最后审核时间")
-    private LocalDateTime finalAuditDate;
-
-    @Schema(description = "数据来源,0流程添加、1手动添加")
-    private String infoSource;
-
-    @Schema(description = "审批,true 通过,false 驳回", example = "true")
-    private Boolean auditPass;
-
-    @Schema(description = "发起人自选审批人 Map", example = " [1, 1]")
+    @Schema(description = "发起人自选审批人", example = " [100, 1]")
+    @NotEmpty(message = "发起人自选审批人集合不能为空")
     private List<Long> startUserSelectAssignees;
 
     @Schema(description = "附件主键id", example = "[1, 2]")
     private List<Long> fileIdList;
 
-    @Schema(description = "审批信息")
-    private BpmTaskApproveReqVO bpmTaskApproveReqVO;
-
-
 }

+ 1 - 1
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/entry/OaEntryController.java

@@ -41,7 +41,7 @@ public class OaEntryController {
     @Operation(summary = "暂存入职审批流程信息")
     @ApiOperationSupport(order = 1)
     // @PreAuthorize("@ss.hasPermission('bpm:oa-entry:staging')")
-    public CommonResult<Long> startOaEntry(@RequestBody OaEntrySaveReqVO stagingReqVO) {
+    public CommonResult<Long> stagingOaEntry(@RequestBody OaEntrySaveReqVO stagingReqVO) {
         Long oaEntryId = oaEntryService.stagingOaEntry(stagingReqVO);
         return success(oaEntryId, "暂存成功");
     }

+ 1 - 1
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/universal/OaUniversalController.java

@@ -40,7 +40,7 @@ public class OaUniversalController {
     @Operation(summary = "暂存通用事项审批流程信息")
     @ApiOperationSupport(order = 1)
     // @PreAuthorize("@ss.hasPermission('bpm:oa-universal:staging')")
-    public CommonResult<Long> startOaUniversal(@RequestBody OaUniversalSaveReqVO stagingReqVO) {
+    public CommonResult<Long> stagingOaUniversal(@RequestBody OaUniversalSaveReqVO stagingReqVO) {
         Long oaUniversalId = oaUniversalService.stagingOaUniversal(stagingReqVO);
         return success(oaUniversalId, "暂存成功");
     }

+ 1 - 1
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/conversion/OaConversionDO.java

@@ -45,7 +45,7 @@ public class OaConversionDO extends BaseDO {
      */
     private String employeeName;
     /**
-     * 申请员工手机号
+     * 转正员工手机号
      */
     private String employeePhone;
     /**

+ 4 - 19
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/conversion/OaConversionMapper.java

@@ -17,29 +17,14 @@ public interface OaConversionMapper extends BaseMapperX<OaConversionDO> {
 
     default PageResult<OaConversionDO> selectPage(OaConversionPageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapperX<OaConversionDO>()
-                .eqIfPresent(OaConversionDO::getConversionId, reqVO.getConversionId())
-                .eqIfPresent(OaConversionDO::getEmployeeId, reqVO.getEmployeeId())
-                .eqIfPresent(OaConversionDO::getEmployeeUuid, reqVO.getEmployeeUuid())
-                .eqIfPresent(OaConversionDO::getUserId, reqVO.getUserId())
-                .eqIfPresent(OaConversionDO::getUserUuid, reqVO.getUserUuid())
+                .eqIfPresent(OaConversionDO::getEmployeeName, reqVO.getEmployeeName())
                 .eqIfPresent(OaConversionDO::getDeptId, reqVO.getDeptId())
-                .eqIfPresent(OaConversionDO::getDeptUuid, reqVO.getDeptUuid())
                 .eqIfPresent(OaConversionDO::getPosition, reqVO.getPosition())
-                .betweenIfPresent(OaConversionDO::getEntryDate, reqVO.getEntryDate())
-                .betweenIfPresent(OaConversionDO::getProbationEndDate, reqVO.getProbationEndDate())
+                .likeIfPresent(OaConversionDO::getEmployeePhone, reqVO.getEmployeePhone())
                 .betweenIfPresent(OaConversionDO::getConversionDate, reqVO.getConversionDate())
-                .eqIfPresent(OaConversionDO::getConversionReason, reqVO.getConversionReason())
-                .eqIfPresent(OaConversionDO::getWorkSummary, reqVO.getWorkSummary())
-                .eqIfPresent(OaConversionDO::getRemarks, reqVO.getRemarks())
-                .eqIfPresent(OaConversionDO::getProcInstId, reqVO.getProcInstId())
-                .eqIfPresent(OaConversionDO::getAuditStatus, reqVO.getAuditStatus())
-                .eqIfPresent(OaConversionDO::getCurrentAuditUserId, reqVO.getCurrentAuditUserId())
-                .eqIfPresent(OaConversionDO::getCurrentAuditUserUuid, reqVO.getCurrentAuditUserUuid())
-                .eqIfPresent(OaConversionDO::getCurrentAuditEmployeeId, reqVO.getCurrentAuditEmployeeId())
-                .eqIfPresent(OaConversionDO::getCurrentAuditEmployeeUuid, reqVO.getCurrentAuditEmployeeUuid())
-                .betweenIfPresent(OaConversionDO::getFinalAuditDate, reqVO.getFinalAuditDate())
-                .eqIfPresent(OaConversionDO::getInfoSource, reqVO.getInfoSource())
+                .eqIfPresent(OaConversionDO::getApplyEmployeeName, reqVO.getApplyEmployeeName())
                 .betweenIfPresent(OaConversionDO::getCreateTime, reqVO.getCreateTime())
+                .eqIfPresent(OaConversionDO::getAuditStatus, reqVO.getAuditStatus())
                 .orderByDesc(OaConversionDO::getId));
     }