Browse Source

1、入职增加职位id

dongpo 1 year ago
parent
commit
1a60bdebe2

+ 2 - 2
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/entry/vo/OaEntryPageReqVO.java

@@ -20,8 +20,8 @@ public class OaEntryPageReqVO extends PageParam {
     @Schema(description = "部门", example = "2937")
     private String deptId;
 
-    @Schema(description = "职位")
-    private String position;
+    @Schema(description = "职位id")
+    private Long postId;
 
     @Schema(description = "员工类型", example = "1")
     private String employeeType;

+ 6 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/entry/vo/OaEntryRespVO.java

@@ -13,6 +13,8 @@ import java.util.List;
 import com.alibaba.excel.annotation.*;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import javax.validation.constraints.NotBlank;
+
 @Schema(description = "管理后台 - 入职流程信息 Response VO")
 @Data
 @ExcelIgnoreUnannotated
@@ -38,6 +40,10 @@ public class OaEntryRespVO {
     @ExcelProperty("部门名称")
     private String deptName;
 
+    @Schema(description = "职位id", example = "1")
+    @ExcelProperty("职位id")
+    private Long postId;
+
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;

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

@@ -23,8 +23,11 @@ public class OaEntrySaveReqVO {
     @NotBlank(message = "部门不能为空")
     private String deptId;
 
+    @Schema(description = "职位id", example = "1")
+    @NotBlank(message = "职位id不能为空")
+    private Long postId;
+
     @Schema(description = "职位")
-    @NotBlank(message = "职位不能为空")
     private String position;
 
     @Schema(description = "员工类型", example = "1")

+ 4 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/entry/OaEntryDO.java

@@ -42,6 +42,10 @@ public class OaEntryDO extends BaseDO {
      * 部门
      */
     private Long deptId;
+    /**
+     * 职位id
+     */
+    private Long postId;
     /**
      * 职位
      */

+ 1 - 1
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/entry/OaEntryMapper.java

@@ -19,7 +19,7 @@ public interface OaEntryMapper extends BaseMapperX<OaEntryDO> {
         return selectPage(reqVO, new LambdaQueryWrapperX<OaEntryDO>()
                 .likeIfPresent(OaEntryDO::getEntryName, reqVO.getEntryName())
                 .eqIfPresent(OaEntryDO::getDeptId, reqVO.getDeptId())
-                .eqIfPresent(OaEntryDO::getPosition, reqVO.getPosition())
+                .eqIfPresent(OaEntryDO::getPostId, reqVO.getPostId())
                 .eqIfPresent(OaEntryDO::getEmployeeType, reqVO.getEmployeeType())
                 .eqIfPresent(OaEntryDO::getGender, reqVO.getGender())
                 .eqIfPresent(OaEntryDO::getContactNumber, reqVO.getContactNumber())