Prechádzať zdrojové kódy

1、oa出差完成-创建人显示问题
2、请假撤回-提示无法撤回问题
3、oa审批导出字段确定

dongpo 6 mesiacov pred
rodič
commit
c6a03b105b
25 zmenil súbory, kde vykonal 1222 pridanie a 636 odobranie
  1. 38 0
      yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/OaAuditStatusEnum.java
  2. 45 33
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/business/vo/OaBusinessRespVO.java
  3. 53 45
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/conversion/vo/OaConversionRespVO.java
  4. 47 42
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/entry/vo/OaEntryRespVO.java
  5. 42 35
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/expense/vo/OaExpenseRespVO.java
  6. 58 49
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/leave/vo/OaLeaveRespVO.java
  7. 57 49
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/out/vo/OaOutRespVO.java
  8. 51 43
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/purchase/vo/OaPurchaseRespVO.java
  9. 49 41
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/receive/vo/OaReceiveRespVO.java
  10. 54 48
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/renew/vo/OaRenewRespVO.java
  11. 55 47
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/stamp/vo/OaStampRespVO.java
  12. 58 49
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/turnover/vo/OaTurnoverRespVO.java
  13. 33 26
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/universal/vo/OaUniversalRespVO.java
  14. 44 11
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/business/OaBusinessServiceImpl.java
  15. 51 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/conversion/OaConversionServiceImpl.java
  16. 51 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/entry/OaEntryServiceImpl.java
  17. 54 17
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/expense/OaExpenseServiceImpl.java
  18. 51 11
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/leave/OaLeaveServiceImpl.java
  19. 51 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/out/OaOutServiceImpl.java
  20. 48 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/purchase/OaPurchaseServiceImpl.java
  21. 49 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/receive/OaReceiveServiceImpl.java
  22. 49 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/renew/OaRenewServiceImpl.java
  23. 47 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/stamp/OaStampServiceImpl.java
  24. 48 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/turnover/OaTurnoverServiceImpl.java
  25. 39 10
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/universal/OaUniversalServiceImpl.java

+ 38 - 0
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/enums/OaAuditStatusEnum.java

@@ -0,0 +1,38 @@
+package cn.iocoder.yudao.module.bpm.enums;
+
+public enum OaAuditStatusEnum {
+
+    OA_AUDIT_STATUS_STAGING("0", "暂存"),
+    OA_AUDIT_STATUS_COMMITTED("1", "已提交"),
+    OA_AUDIT_STATUS_AUDITING("2", "审核中"),
+    OA_AUDIT_STATUS_AUDITED("3", "已审核"),
+    OA_AUDIT_STATUS_CLOSED("4", "已关闭"),
+    OA_AUDIT_STATUS_RETURNED("5", "已驳回"),
+    OA_AUDIT_STATUS_RECALLED("6", "已撤回"),
+    ;
+
+    private final String status;
+    private final String statusDesc;
+
+    OaAuditStatusEnum(String status, String statusDesc) {
+        this.status = status;
+        this.statusDesc = statusDesc;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public String getStatusDesc() {
+        return statusDesc;
+    }
+
+    public static String getByStatus(String status) {
+        for (OaAuditStatusEnum value : OaAuditStatusEnum.values()) {
+            if (value.getStatus().equals(status)) {
+                return value.getStatusDesc();
+            }
+        }
+        return null;
+    }
+}

+ 45 - 33
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/business/vo/OaBusinessRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.business.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -7,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -18,43 +20,43 @@ import java.util.List;
 public class OaBusinessRespVO {
 
     @Schema(description = "出差表单主键")
-    @ExcelProperty("出差表单主键")
+    // @ExcelProperty("出差表单主键")
     private Long id;
 
     @Schema(description = "出差人id")
-    @ExcelProperty("出差人id")
+    // @ExcelProperty("出差人id")
     private Long employeeId;
 
-    @Schema(description = "出差员工姓名", example = "赵六")
-    @ExcelProperty("出差员工姓名")
+    @Schema(description = "出差员工姓名")
+    @ExcelProperty("出差")
     private String employeeName;
 
-    @Schema(description = "出差员工手机号")
-    @ExcelProperty("出差员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "13581")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "708")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "出差员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "出差事由")
-    @ExcelProperty("出差事由")
+    // @ExcelProperty("出差事由")
     private String reason;
 
     @Schema(description = "出差目的地")
@@ -62,11 +64,11 @@ public class OaBusinessRespVO {
     private String destination;
 
     @Schema(description = "出差开始日期")
-    @ExcelProperty("出差开始日期")
+    @ExcelProperty("开始日期")
     private String startDate;
 
     @Schema(description = "出差结束日期")
-    @ExcelProperty("出差结束日期")
+    @ExcelProperty("结束日期")
     private String endDate;
 
     @Schema(description = "出差天数(d)")
@@ -77,35 +79,45 @@ public class OaBusinessRespVO {
     @ExcelProperty("出差预算费用,单位(元)")
     private BigDecimal estimatedCost;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)", example = "1")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人员工id", example = "31626")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工姓名", example = "芋艿")
-    @ExcelProperty("当前审核人员工姓名")
+    @Schema(description = "当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工姓名", example = "芋艿")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

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

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.conversion.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -17,111 +18,118 @@ import com.alibaba.excel.annotation.*;
 @ExcelIgnoreUnannotated
 public class OaConversionRespVO {
 
-    @Schema(description = "转正表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27266")
-    @ExcelProperty("转正表单主键")
+    @Schema(description = "转正表单主键")
+    // @ExcelProperty("转正表单主键")
     private Long id;
 
-    @Schema(description = "uuid", example = "8575")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String conversionId;
 
-    @Schema(description = "转正人id", example = "8274")
-    @ExcelProperty("转正人id")
+    @Schema(description = "转正人id")
+    // @ExcelProperty("转正人id")
     private Long employeeId;
 
-    @Schema(description = "转正员工姓名", example = "李四")
-    @ExcelProperty("转正员工姓名")
+    @Schema(description = "转正员工姓名")
+    @ExcelProperty("转正")
     private String employeeName;
 
-    @Schema(description = "转正员工手机号", example = "1394920000")
-    @ExcelProperty("转正员工手机号")
-    private String employeePhone;
 
-    @Schema(description = "用户账号id", example = "23689")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "14341")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "转正员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "入职日期")
     @ExcelProperty("入职日期")
     private String entryDate;
 
     @Schema(description = "试用期结束日期")
-    @ExcelProperty("试用期结束日期")
+    // @ExcelProperty("试用期结束日期")
     private String probationEndDate;
 
     @Schema(description = "转正日期")
     @ExcelProperty("转正日期")
     private String conversionDate;
 
-    @Schema(description = "转正申请理由", example = "不香")
-    @ExcelProperty("转正申请理由")
+    @Schema(description = "转正申请理由")
+    // @ExcelProperty("转正申请理由")
     private String conversionReason;
 
     @Schema(description = "工作总结")
-    @ExcelProperty("工作总结")
+    // @ExcelProperty("工作总结")
     private String workSummary;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "10952")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人姓名")
+    @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "申请时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人用户id", example = "13372")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
-    @Schema(description = "当前审核人员工id", example = "20635")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    // @ExcelProperty("当前审核人员工姓名")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请时间")
-    @ExcelProperty("申请时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人姓名")
-    @ExcelProperty("申请人姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

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

@@ -21,35 +21,35 @@ import javax.validation.constraints.NotBlank;
 @ExcelIgnoreUnannotated
 public class OaEntryRespVO {
 
-    @Schema(description = "入职表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27428")
-    @ExcelProperty("入职表单主键")
+    @Schema(description = "入职表单主键")
+    // @ExcelProperty("入职表单主键")
     private Integer id;
 
-    @Schema(description = "uuid", example = "13471")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String entryId;
 
-    @Schema(description = "入职人", example = "李四")
+    @Schema(description = "入职人")
     @ExcelProperty("入职人")
     private String entryName;
 
-    @Schema(description = "部门", example = "2937")
-    @ExcelProperty("部门")
+    @Schema(description = "部门")
+    // @ExcelProperty("部门")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
-    @Schema(description = "员工类型", example = "1")
+    @Schema(description = "员工类型")
     @ExcelProperty("员工类型")
     private String employeeType;
 
@@ -58,7 +58,7 @@ public class OaEntryRespVO {
     private String gender;
 
     @Schema(description = "出生日期")
-    @ExcelProperty("出生日期")
+    // @ExcelProperty("出生日期")
     private String birthday;
 
     @Schema(description = "联系电话")
@@ -66,75 +66,80 @@ public class OaEntryRespVO {
     private String contactNumber;
 
     @Schema(description = "电子邮箱")
-    @ExcelProperty("电子邮箱")
+    // @ExcelProperty("电子邮箱")
     private String email;
 
     @Schema(description = "教育背景")
-    @ExcelProperty("教育背景")
+    // @ExcelProperty("教育背景")
     private String education;
 
     @Schema(description = "工作经验")
-    @ExcelProperty("工作经验")
+    // @ExcelProperty("工作经验")
     private String workExperience;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "最后审核时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("最后审核时间")
+    @Schema(description = "最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private String finalAuditDate;
 
     @Schema(description = "入职日期")
     @ExcelProperty("入职日期")
     private String entryDate;
 
-    @Schema(description = "流程实例id", example = "9407")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5驳回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人姓名")
+    @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    @ExcelProperty("申请时间")
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5驳回)")
     private String auditStatus;
 
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
     @Schema(description = "当前审核人用户id")
-    @ExcelProperty("当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "当前审核人员工id")
-    @ExcelProperty("当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工uuid")
-    @ExcelProperty("当前审核人员工uuid")
+    @Schema(description = "当前处理人")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
-    @Schema(description = "数据来源,0流程添加、1手动添加", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("数据来源,0流程添加、1手动添加")
+    @Schema(description = "数据来源,0流程添加、1手动添加")
+    // @ExcelProperty("数据来源,0流程添加、1手动添加")
     private String infoSource;
 
-    @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人姓名")
-    @ExcelProperty("申请人姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "创建者")
-    @ExcelProperty("创建者")
+    // @ExcelProperty("创建者")
     private String creator;
 
-    @Schema(description = "创建时间")
-    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 42 - 35
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/expense/vo/OaExpenseRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.expense.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.expense.OaExpenseObjDO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
@@ -8,6 +9,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -19,97 +21,102 @@ import java.util.List;
 public class OaExpenseRespVO {
 
     @Schema(description = "表单主键")
-    @ExcelProperty("表单主键")
+    // @ExcelProperty("表单主键")
     private Long id;
 
     @Schema(description = "报销申请人id")
-    @ExcelProperty("报销申请人id")
+    // @ExcelProperty("报销申请人id")
     private Long employeeId;
 
     @Schema(description = "报销申请员工姓名")
-    @ExcelProperty("报销申请员工姓名")
+    @ExcelProperty("报销")
     private String employeeName;
 
-    @Schema(description = "报销申请员工手机号")
-    @ExcelProperty("报销申请员工手机号")
-    private String employeePhone;
-
     @Schema(description = "用户账号id")
-    @ExcelProperty("用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
     @Schema(description = "部门id")
-    @ExcelProperty("部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
     @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "报销申请员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "报销类型主键id")
-    @ExcelProperty("报销类型主键id")
+    // @ExcelProperty("报销类型主键id")
     private Long expenseTypeId;
 
     @Schema(description = "报销类型名称")
-    @ExcelProperty("报销类型名称")
+    @ExcelProperty("报销类型")
     private String expenseTypeName;
 
     @Schema(description = "费用所属区间")
     @ExcelProperty("费用所属区间")
     private String expenseMonth;
 
-    @Schema(description = "总预算金额,单位(元)")
-    @ExcelProperty("总预算金额,单位(元)")
+    @Schema(description = "报销总金额,单位(元)")
+    @ExcelProperty("报销总金额,单位(元)")
     private BigDecimal totalMoney;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
     @Schema(description = "流程实例id")
-    @ExcelProperty("流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
+    @Schema(description = "申请人员工id")
+    // @ExcelProperty("申请人员工id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
     @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
     @Schema(description = "当前审核人员工id")
-    @ExcelProperty("当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "当前审核人用户id")
-    @ExcelProperty("当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工id")
-    @ExcelProperty("申请人员工id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人员工姓名")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
-    @Schema(description = "创建时间")
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "采购流程信息子表列表")
     private List<OaExpenseObjDO> oaExpenseObjs;
 

+ 58 - 49
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/leave/vo/OaLeaveRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.leave.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -7,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -16,55 +18,56 @@ import java.util.List;
 @ExcelIgnoreUnannotated
 public class OaLeaveRespVO {
 
-    @Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26233")
-    @ExcelProperty("请假表单主键")
+    @Schema(description = "请假表单主键")
+    // @ExcelProperty("请假表单主键")
     private Long id;
 
-    @Schema(description = "uuid", example = "20728")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String leaveId;
 
-    @Schema(description = "转正人id", example = "12388")
-    @ExcelProperty("转正人id")
+    @Schema(description = "请假人id")
+    // @ExcelProperty("请假人id")
     private Long employeeId;
 
-    @Schema(description = "转正员工姓名", example = "王五")
-    @ExcelProperty("转正员工姓名")
+    @Schema(description = "请假员工姓名")
+    @ExcelProperty("请假人")
     private String employeeName;
 
-    @Schema(description = "请假员工手机号", example = "1394920000")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "25603")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "26110")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
-    @Schema(description = "请假类型", example = "1")
+    @Schema(description = "请假员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
+    @Schema(description = "请假类型")
     @ExcelProperty("请假类型")
     private String leaveType;
 
     @Schema(description = "开始日期")
-    @ExcelProperty("开始日期")
+    @ExcelProperty("请假开始日期")
     private String startDate;
 
     @Schema(description = "结束日期")
-    @ExcelProperty("结束日期")
+    @ExcelProperty("请假结束日期")
     private String endDate;
 
     @Schema(description = "请假天数")
@@ -72,62 +75,68 @@ public class OaLeaveRespVO {
     private String day;
 
     @Schema(description = "具体到上下午,am上午 pm下午")
-    @ExcelProperty("具体到上下午,am上午 pm下午")
+    // @ExcelProperty("具体到上下午,am上午 pm下午")
     private String startTime;
 
     @Schema(description = "具体到上下午,am上午 pm下午")
-    @ExcelProperty("具体到上下午,am上午 pm下午")
+    // @ExcelProperty("具体到上下午,am上午 pm下午")
     private String endTime;
 
-    @Schema(description = "请假原因", example = "不好")
-    @ExcelProperty("请假原因")
+    @Schema(description = "请假原因")
+    // @ExcelProperty("请假原因")
     private String reason;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "26074")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人用户id", example = "19230")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
-    @Schema(description = "当前审核人员工id", example = "7920")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人姓名")
-    @ExcelProperty("申请人姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+    
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 57 - 49
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/out/vo/OaOutRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.out.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -7,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -16,107 +18,113 @@ import java.util.List;
 @ExcelIgnoreUnannotated
 public class OaOutRespVO {
 
-    @Schema(description = "出差表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    @ExcelProperty("出差表单主键")
+    @Schema(description = "出差表单主键")
+    // @ExcelProperty("出差表单主键")
     private Integer id;
 
-    @Schema(description = "uuid", example = "9006")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String outId;
 
-    @Schema(description = "外出人id", example = "1")
-    @ExcelProperty("外出人id")
+    @Schema(description = "外出人id")
+    // @ExcelProperty("外出人id")
     private Long employeeId;
 
-    @Schema(description = "外出员工姓名", example = "李四")
-    @ExcelProperty("外出员工姓名")
+    @Schema(description = "外出员工姓名")
+    @ExcelProperty("外出")
     private String employeeName;
 
-    @Schema(description = "外出员工手机号")
-    @ExcelProperty("外出员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "32289")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "31013")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
-    @Schema(description = "外出事由", requiredMode = Schema.RequiredMode.REQUIRED, example = "不香")
-    @ExcelProperty("外出事由")
+    @Schema(description = "外出员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
+    @Schema(description = "外出事由")
+    // @ExcelProperty("外出事由")
     private String reason;
 
-    @Schema(description = "外出地点", requiredMode = Schema.RequiredMode.REQUIRED)
+    @Schema(description = "外出地点")
     @ExcelProperty("外出地点")
     private String destination;
 
-    @Schema(description = "外出开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
+    @Schema(description = "外出开始时间")
     @ExcelProperty("外出开始时间")
     private String startDate;
 
-    @Schema(description = "外出结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
+    @Schema(description = "外出结束时间")
     @ExcelProperty("外出结束时间")
     private String endDate;
 
-    @Schema(description = "外出时长,单位(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("外出时长,单位(小时)")
+    @Schema(description = "外出时长,单位(小时)")
+    // @ExcelProperty("外出时长,单位(小时)")
     private String hour;
 
     @Schema(description = "流程实例id", example = "8014")
-    @ExcelProperty("流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人员工id")
+    // @ExcelProperty("申请人员工id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人员工id", example = "11675")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工姓名", example = "张三")
-    @ExcelProperty("当前审核人员工姓名")
+    @Schema(description = "当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
-    @Schema(description = "当前审核人用户id", example = "29595")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工id", example = "1")
-    @ExcelProperty("申请人员工id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人员工姓名", example = "王五")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 51 - 43
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/purchase/vo/OaPurchaseRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.purchase.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.purchase.OaPurchaseObjDO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
@@ -8,6 +9,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -18,90 +20,95 @@ import java.util.List;
 @ExcelIgnoreUnannotated
 public class OaPurchaseRespVO {
 
-    @Schema(description = "表单主键", example = "1")
-    @ExcelProperty("表单主键")
+    @Schema(description = "表单主键")
+    // @ExcelProperty("表单主键")
     private Long id;
 
-    @Schema(description = "采购申请人id", example = "1")
-    @ExcelProperty("采购申请人id")
+    @Schema(description = "采购申请人id")
+    // @ExcelProperty("采购申请人id")
     private Long employeeId;
 
-    @Schema(description = "采购申请员工姓名", example = "李四")
-    @ExcelProperty("采购申请员工姓名")
+    @Schema(description = "采购申请员工姓名")
+    @ExcelProperty("申请人")
     private String employeeName;
 
-    @Schema(description = "采购申请员工手机号")
-    @ExcelProperty("采购申请员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "15248")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "32213")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "采购申请员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "总预算金额,单位(元)")
     @ExcelProperty("总预算金额,单位(元)")
     private BigDecimal totalBudget;
 
-    @Schema(description = "预期供应商", example = "赵六")
+    @Schema(description = "预期供应商")
     @ExcelProperty("预期供应商")
     private String supplierName;
 
     @Schema(description = "采购事由")
-    @ExcelProperty("采购事由")
+    // @ExcelProperty("采购事由")
     private String reason;
 
-    @Schema(description = "流程实例id", example = "27318")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "1")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人员工id")
+    // @ExcelProperty("申请人员工id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("状态")
     private String auditStatus;
 
-    @Schema(description = "当前审核人员工id", example = "6900")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工姓名", example = "赵六")
-    @ExcelProperty("当前审核人员工姓名")
+    @Schema(description = "当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
-    @Schema(description = "当前审核人用户id", example = "1010")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工id", example = "30637")
-    @ExcelProperty("申请人员工id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人员工姓名", example = "李四")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
-    @Schema(description = "创建时间")
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "采购流程信息子表列表")
     private List<OaPurchaseObjDO> oaPurchaseObjs;
 
@@ -110,6 +117,7 @@ public class OaPurchaseRespVO {
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 49 - 41
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/receive/vo/OaReceiveRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.receive.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.receive.OaReceiveObjDO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
@@ -8,6 +9,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -18,93 +20,98 @@ import java.util.List;
 public class OaReceiveRespVO {
 
     @Schema(description = "主键")
-    @ExcelProperty("主键")
+    // @ExcelProperty("主键")
     private Long id;
 
     @Schema(description = "uuid")
-    @ExcelProperty("uuid")
+    // @ExcelProperty("uuid")
     private String receiveUuid;
 
-    @Schema(description = "领用人id", example = "1")
-    @ExcelProperty("领用人id")
+    @Schema(description = "领用人id")
+    // @ExcelProperty("领用人id")
     private Long employeeId;
 
-    @Schema(description = "领用员工姓名", example = "赵六")
-    @ExcelProperty("领用员工姓名")
+    @Schema(description = "领用员工姓名")
+    @ExcelProperty("领用")
     private String employeeName;
 
-    @Schema(description = "领用员工手机号")
-    @ExcelProperty("领用员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "13756")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "17336")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "领用员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "领用日期")
     @ExcelProperty("领用日期")
     private String receiveDate;
 
     @Schema(description = "领用原因")
-    @ExcelProperty("领用原因")
+    // @ExcelProperty("领用原因")
     private String reason;
 
-    @Schema(description = "流程实例id", example = "13073")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
+    @Schema(description = "申请人员工id")
+    // @ExcelProperty("申请人员工id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
     @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人员工id", example = "10618")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工姓名", example = "王五")
-    @ExcelProperty("当前审核人员工姓名")
+    @Schema(description = "当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
-    @Schema(description = "当前审核人用户id", example = "744")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工id", example = "1")
-    @ExcelProperty("申请人员工id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人员工姓名", example = "李四")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "数据来源,0流程添加、1手动添加")
-    @ExcelProperty("数据来源,0流程添加、1手动添加")
+    // @ExcelProperty("数据来源,0流程添加、1手动添加")
     private String infoSource;
 
-    @Schema(description = "创建时间")
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "领用流程信息子表列表")
     private List<OaReceiveObjDO> oaReceiveObjs;
 
@@ -113,6 +120,7 @@ public class OaReceiveRespVO {
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 54 - 48
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/renew/vo/OaRenewRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.renew.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -17,56 +18,56 @@ import com.alibaba.excel.annotation.*;
 @ExcelIgnoreUnannotated
 public class OaRenewRespVO {
 
-    @Schema(description = "续签表单主键", example = "1")
-    @ExcelProperty("续签表单主键")
+    @Schema(description = "续签表单主键")
+    // @ExcelProperty("续签表单主键")
     private Long id;
 
-    @Schema(description = "uuid", example = "14308")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String renewId;
 
-    @Schema(description = "续签人id", example = "4530")
-    @ExcelProperty("续签人id")
+    @Schema(description = "续签人id")
+    // @ExcelProperty("续签人id")
     private Long employeeId;
 
-    @Schema(description = "续签员工姓名", example = "赵六")
-    @ExcelProperty("续签员工姓名")
+    @Schema(description = "续签员工姓名")
+    @ExcelProperty("续签")
     private String employeeName;
 
-    @Schema(description = "续签员工手机号", example = "1394920000")
-    @ExcelProperty("续签员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "16762")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "28162")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "续签员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "原合同开始日期")
-    @ExcelProperty("原合同开始日期")
+    // @ExcelProperty("原合同开始日期")
     private String oldContractStartDate;
 
     @Schema(description = "原合同结束日期")
-    @ExcelProperty("原合同结束日期")
+    // @ExcelProperty("原合同结束日期")
     private String oldContractEndDate;
 
     @Schema(description = "续签合同期限")
-    @ExcelProperty("续签合同期限")
+    // @ExcelProperty("续签合同期限")
     private String renewPeriod;
 
     @Schema(description = "续签开始日期")
@@ -77,54 +78,59 @@ public class OaRenewRespVO {
     @ExcelProperty("续签结束日期")
     private String renewContractEndDate;
 
-    @Schema(description = "续签理由", example = "不喜欢")
-    @ExcelProperty("续签理由")
+    @Schema(description = "续签理由")
+    // @ExcelProperty("续签理由")
     private String renewReason;
 
     @Schema(description = "工作表现")
-    @ExcelProperty("工作表现")
+    // @ExcelProperty("工作表现")
     private String workPerformance;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "25043")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "1")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人姓名")
+    @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "申请时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人用户id", example = "19532")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
-    @Schema(description = "当前审核人员工id", example = "22621")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请时间")
-    @ExcelProperty("申请时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人姓名")
-    @ExcelProperty("申请人姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 

+ 55 - 47
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/stamp/vo/OaStampRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.stamp.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -7,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -16,103 +18,109 @@ import java.util.List;
 @ExcelIgnoreUnannotated
 public class OaStampRespVO {
 
-    @Schema(description = "表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18395")
-    @ExcelProperty("表单主键")
+    @Schema(description = "表单主键")
+    // @ExcelProperty("表单主键")
     private Long id;
 
-    @Schema(description = "用印申请人id", example = "7953")
-    @ExcelProperty("用印申请人id")
+    @Schema(description = "用印申请人id")
+    // @ExcelProperty("用印申请人id")
     private Long employeeId;
 
-    @Schema(description = "用印申请员工姓名", example = "芋艿")
-    @ExcelProperty("用印申请员工姓名")
+    @Schema(description = "用印申请员工姓名")
+    @ExcelProperty("用印")
     private String employeeName;
 
-    @Schema(description = "用印申请员工手机号")
-    @ExcelProperty("用印申请员工手机号")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "24136")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "部门id", example = "30975")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "员工职位")
-    @ExcelProperty("员工职位")
+    @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "用印申请员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "用印标题")
     @ExcelProperty("用印标题")
     private String stampTitle;
 
-    @Schema(description = "印章id,多个用逗号分隔", example = "15927")
-    @ExcelProperty("印章id集合")
+    @Schema(description = "印章id,多个用逗号分隔")
+    // @ExcelProperty("印章id集合")
     private List<Long> stampSealId;
 
-    @Schema(description = "用印事由", example = "不好")
-    @ExcelProperty("用印事由")
+    @Schema(description = "用印事由")
+    // @ExcelProperty("用印事由")
     private String reason;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "10738")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人员工id")
+    // @ExcelProperty("申请人员工id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人员工姓名")
+    // @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人员工id", example = "31309")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
-    @Schema(description = "当前审核人员工姓名", example = "芋艿")
-    @ExcelProperty("当前审核人员工姓名")
+    @Schema(description = "当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
-    @Schema(description = "当前审核人用户id", example = "2555")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "申请人员工id", example = "11188")
-    @ExcelProperty("申请人员工id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人员工姓名", example = "张三")
-    @ExcelProperty("申请人员工姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "数据来源,0流程添加、1手动添加")
-    @ExcelProperty("数据来源,0流程添加、1手动添加")
+    // @ExcelProperty("数据来源,0流程添加、1手动添加")
     private String infoSource;
 
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 58 - 49
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/turnover/vo/OaTurnoverRespVO.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.bpm.controller.admin.oa.turnover.vo;
 
+import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
 import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
@@ -7,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -16,57 +18,58 @@ import java.util.List;
 @ExcelIgnoreUnannotated
 public class OaTurnoverRespVO {
 
-    @Schema(description = "离职表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15606")
-    @ExcelProperty("离职表单主键")
+    @Schema(description = "离职表单主键")
+    // @ExcelProperty("离职表单主键")
     private Long id;
 
-    @Schema(description = "uuid", example = "18425")
-    @ExcelProperty("uuid")
+    @Schema(description = "uuid")
+    // @ExcelProperty("uuid")
     private String turnoverId;
 
-    @Schema(description = "离职人id", example = "18376")
-    @ExcelProperty("离职人id")
+    @Schema(description = "离职人id")
+    // @ExcelProperty("离职人id")
     private Long employeeId;
 
-    @Schema(description = "离职人uuid", example = "2649")
-    @ExcelProperty("离职人uuid")
+    @Schema(description = "离职人uuid")
+    // @ExcelProperty("离职人uuid")
     private String employeeUuid;
 
-    @Schema(description = "离职员工姓名", example = "赵六")
-    @ExcelProperty("离职员工姓名")
+    @Schema(description = "离职员工姓名")
+    @ExcelProperty("离职")
     private String employeeName;
 
-    @Schema(description = "离职员工手机号", example = "1394920000")
-    private String employeePhone;
-
-    @Schema(description = "用户账号id", example = "9650")
-    @ExcelProperty("用户账号id")
+    @Schema(description = "用户账号id")
+    // @ExcelProperty("用户账号id")
     private Long userId;
 
-    @Schema(description = "用户账号uuid", example = "4544")
-    @ExcelProperty("用户账号uuid")
+    @Schema(description = "用户账号uuid")
+    // @ExcelProperty("用户账号uuid")
     private String userUuid;
 
-    @Schema(description = "部门id", example = "24445")
-    @ExcelProperty("部门id")
+    @Schema(description = "部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
-    @Schema(description = "部门uuid", example = "29090")
-    @ExcelProperty("部门uuid")
+    @Schema(description = "部门uuid")
+    // @ExcelProperty("部门uuid")
     private String deptUuid;
 
     @Schema(description = "部门名称")
-    @ExcelProperty("部门名称")
+    @ExcelProperty("部门")
     private String deptName;
 
-    @Schema(description = "职位id", example = "1")
-    @ExcelProperty("职位id")
+    @Schema(description = "职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "离职员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "入职日期")
     @ExcelProperty("入职日期")
     private String entryDate;
@@ -75,55 +78,61 @@ public class OaTurnoverRespVO {
     @ExcelProperty("离职日期")
     private String turnoverDate;
 
-    @Schema(description = "离职原因", example = "不喜欢")
-    @ExcelProperty("离职原因")
+    @Schema(description = "离职原因")
+    // @ExcelProperty("离职原因")
     private String turnoverReason;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
-    @Schema(description = "流程实例id", example = "18482")
-    @ExcelProperty("流程实例id")
+    @Schema(description = "流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
-    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)", example = "2")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @Schema(description = "申请人id")
+    // @ExcelProperty("申请人id")
+    private Long applyEmployeeId;
+
+    @Schema(description = "申请人姓名")
+    @ExcelProperty("申请人")
+    private String applyEmployeeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("申请时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime createTime;
+
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
     private String auditStatus;
 
-    @Schema(description = "当前审核人用户id", example = "12344")
-    @ExcelProperty("当前审核人用户id")
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
+    @Schema(description = "当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
-    @Schema(description = "当前审核人员工id", example = "31626")
-    @ExcelProperty("当前审核人员工id")
+    @Schema(description = "当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     private LocalDateTime finalAuditDate;
 
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
-    private Long applyEmployeeId;
-
-    @Schema(description = "申请人姓名")
-    @ExcelProperty("申请人姓名")
-    private String applyEmployeeName;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 33 - 26
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/universal/vo/OaUniversalRespVO.java

@@ -20,37 +20,35 @@ import java.util.List;
 public class OaUniversalRespVO {
 
     @Schema(description = "自增主键")
-    @ExcelProperty("自增主键")
+    // @ExcelProperty("自增主键")
     private Long id;
 
     @Schema(description = "uuid")
-    @ExcelProperty("uuid")
+    // @ExcelProperty("uuid")
     private String universalId;
 
     @Schema(description = "申请人id")
-    @ExcelProperty("申请人id")
+    // @ExcelProperty("申请人id")
     private Long employeeId;
 
     @Schema(description = "申请人uuid")
-    @ExcelProperty("申请人uuid")
+    // @ExcelProperty("申请人uuid")
     private String employeeUuid;
 
     @Schema(description = "申请员工姓名")
-    @ExcelProperty("申请员工姓名")
+    @ExcelProperty("申请")
     private String employeeName;
 
-    @Schema(description = "申请员工手机号")
-    private String employeePhone;
-
     @Schema(description = "申请用户账号id")
-    @ExcelProperty("申请用户账号id")
+    // @ExcelProperty("申请用户账号id")
     private Long userId;
 
     @Schema(description = "申请用户账号手机号")
+    // @ExcelProperty("申请用户账号手机号")
     private String userPhone;
 
     @Schema(description = "部门id")
-    @ExcelProperty("部门id")
+    // @ExcelProperty("部门id")
     private Long deptId;
 
     @Schema(description = "部门名称")
@@ -58,68 +56,77 @@ public class OaUniversalRespVO {
     private String deptName;
 
     @Schema(description = "职位id")
-    @ExcelProperty("职位id")
+    // @ExcelProperty("职位id")
     private Long postId;
 
     @Schema(description = "职位")
     @ExcelProperty("职位")
     private String position;
 
+    @Schema(description = "申请员工手机号")
+    @ExcelProperty("手机号")
+    private String employeePhone;
+
     @Schema(description = "申请事项标题")
     @ExcelProperty("申请事项标题")
     private String title;
 
     @Schema(description = "详细描述")
-    @ExcelProperty("详细描述")
+    // @ExcelProperty("详细描述")
     private String description;
 
     @Schema(description = "备注")
-    @ExcelProperty("备注")
+    // @ExcelProperty("备注")
     private String remarks;
 
     @Schema(description = "流程实例id")
-    @ExcelProperty("流程实例id")
+    // @ExcelProperty("流程实例id")
     private String procInstId;
 
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    @ExcelProperty("申请时间")
+    private LocalDateTime createTime;
+
     @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
-    @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
+    // @ExcelProperty("审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
     private String auditStatus;
 
+    @Schema(description = "审核状态(0暂存、1已提交、2审核中、3已审核、4已关闭、5已驳回、6已撤回)")
+    @ExcelProperty("状态")
+    private String auditStatusDesc;
+
     @Schema(description = "当前审核人用户id")
-    @ExcelProperty("当前审核人用户id")
+    // @ExcelProperty("当前审核人用户id")
     private Long currentAuditUserId;
 
     @Schema(description = "当前审核人员工id")
-    @ExcelProperty("当前审核人员工id")
+    // @ExcelProperty("当前审核人员工id")
     private Long currentAuditEmployeeId;
 
     @Schema(description = "当前审核人员工姓名")
-    @ExcelProperty("当前审核人员工姓名")
+    @ExcelProperty("当前处理人")
     private String currentAuditEmployeeName;
 
     @Schema(description = "最后审核时间")
-    @ExcelProperty("最后审核时间")
+    // @ExcelProperty("最后审核时间")
     @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime finalAuditDate;
 
     @Schema(description = "数据来源,0流程添加、1手动添加")
-    @ExcelProperty("数据来源,0流程添加、1手动添加")
+    // @ExcelProperty("数据来源,0流程添加、1手动添加")
     private String infoSource;
 
     @Schema(description = "创建者")
-    @ExcelProperty("创建者")
+    // @ExcelProperty("创建者")
     private String creator;
 
-    @Schema(description = "创建时间")
-    @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
     @Schema(description = "附件列表")
     private List<FileDTO> fileList;
 
     @Schema(description = "附件id列表")
     private List<Long> fileIdList;
+
     @Schema(description = "审批记录列表")
     private List<BpmTaskRespVO> auditRecordList;
 

+ 44 - 11
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/business/OaBusinessServiceImpl.java

@@ -24,6 +24,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.business.OaBusinessDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.business.OaBusinessMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -92,6 +95,9 @@ public class OaBusinessServiceImpl implements OaBusinessService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private AttendanceBusinessApi attendanceBusinessApi;
 
@@ -341,6 +347,8 @@ public class OaBusinessServiceImpl implements OaBusinessService {
             // 转换为DTO
             AttendanceBusinessCreateReqDTO businessCreateReqDTO = BeanUtils.toBean(business, AttendanceBusinessCreateReqDTO.class);
             businessCreateReqDTO.setStatus(0);
+            businessCreateReqDTO.setCreatorEmployeeId(business.getApplyEmployeeId());
+            businessCreateReqDTO.setCreatorEmployeeName(business.getApplyEmployeeName());
             businessCreateReqDTO.setInfoSource(InfoSourceEnum.FLOW.getSource());
 
             // 保存单据信息
@@ -632,6 +640,14 @@ public class OaBusinessServiceImpl implements OaBusinessService {
             }
         }
 
+        // 职位
+        if (oaBusinessDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaBusinessDO.getPostId());
+            if (post != null) {
+                oaBusinessRespVO.setPosition(post.getName());
+            }
+        }
+
         String procInstId = oaBusinessDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
             Task task = taskService.createTaskQuery()
@@ -736,25 +752,42 @@ public class OaBusinessServiceImpl implements OaBusinessService {
             List<Long> employeeIdList = oaBusinessRespVOList.stream().map(OaBusinessRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaBusinessRespVO respVO : oaBusinessRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaBusinessRespVOList.stream().map(OaBusinessRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaBusinessRespVOList.stream().map(OaBusinessRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaBusinessRespVO respVO : oaBusinessRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
-
         return oaBusinessRespVOPageResult;
     }
 

+ 51 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/conversion/OaConversionServiceImpl.java

@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.conversion.OaConversionDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.conversion.OaConversionMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.relations.api.conversion.RelationsConversionApi;
 import cn.iocoder.yudao.module.relations.api.conversion.dto.RelationsConversionCreateReqDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -94,6 +97,9 @@ public class OaConversionServiceImpl implements OaConversionService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private RelationsConversionApi relationsConversionApi;
 
@@ -668,6 +674,19 @@ public class OaConversionServiceImpl implements OaConversionService {
             }
         }
 
+        // 职位
+        if (oaConversionDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaConversionDO.getPostId());
+            if (post != null) {
+                oaConversionRespVO.setPosition(post.getName());
+            }
+        }
+
+        // 状态
+        if (StrUtil.isNotBlank(oaConversionDO.getAuditStatus())) {
+            oaConversionRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaConversionDO.getAuditStatus()));
+        }
+
         String procInstId = oaConversionDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
             Task task = taskService.createTaskQuery()
@@ -772,22 +791,44 @@ public class OaConversionServiceImpl implements OaConversionService {
             List<Long> employeeIdList = oaConversionRespVOList.stream().map(OaConversionRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaConversionRespVO respVO : oaConversionRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaConversionRespVOList.stream().map(OaConversionRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaConversionRespVOList.stream().map(OaConversionRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaConversionRespVO respVO : oaConversionRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 51 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/entry/OaEntryServiceImpl.java

@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.entry.OaEntryDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.entry.OaEntryMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.relations.api.entry.RelationsEntryApi;
 import cn.iocoder.yudao.module.relations.api.entry.dto.RelationsEntryCreateReqDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -92,6 +95,9 @@ public class OaEntryServiceImpl implements OaEntryService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private RelationsEntryApi relationsEntryApi;
 
@@ -562,6 +568,19 @@ public class OaEntryServiceImpl implements OaEntryService {
             }
         }
 
+        // 职位
+        if (oaEntryDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaEntryDO.getPostId());
+            if (post != null) {
+                oaEntryRespVO.setPosition(post.getName());
+            }
+        }
+
+        // 状态
+        if (StrUtil.isNotBlank(oaEntryDO.getAuditStatus())) {
+            oaEntryRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaEntryDO.getAuditStatus()));
+        }
+
         String procInstId = oaEntryDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
             Task task = taskService.createTaskQuery()
@@ -666,22 +685,44 @@ public class OaEntryServiceImpl implements OaEntryService {
             List<Long> employeeIdList = oaEntryRespVOList.stream().map(OaEntryRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaEntryRespVO respVO : oaEntryRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaEntryRespVOList.stream().map(OaEntryRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaEntryRespVOList.stream().map(OaEntryRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaEntryRespVO respVO : oaEntryRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 54 - 17
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/expense/OaExpenseServiceImpl.java

@@ -24,6 +24,7 @@ import cn.iocoder.yudao.module.bpm.dal.mysql.oa.expense.OaExpenseMapper;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.expense.OaExpenseObjMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -40,7 +41,9 @@ import cn.iocoder.yudao.module.expense.api.expensetype.dto.ExpenseTypeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -109,6 +112,9 @@ public class OaExpenseServiceImpl implements OaExpenseService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private ExpenseTypeApi expenseTypeApi;
 
@@ -796,6 +802,17 @@ public class OaExpenseServiceImpl implements OaExpenseService {
                 oaExpenseRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaExpenseDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaExpenseDO.getPostId());
+            if (post != null) {
+                oaExpenseRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        if (StrUtil.isNotBlank(oaExpenseDO.getAuditStatus())) {
+            oaExpenseRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaExpenseDO.getAuditStatus()));
+        }
 
         // 附件列表
         List<FileDTO> fileList = fileApi.getFileDTOListByBiz(oaExpenseDO.getExpenseUuid());
@@ -841,39 +858,59 @@ public class OaExpenseServiceImpl implements OaExpenseService {
             List<Long> employeeIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaExpenseRespVO respVO : oaExpenseRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             // 部门名称
             List<Long> deptIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
 
             // 报销类型名称
             List<Long> expenseTypeIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getExpenseTypeId).collect(Collectors.toList());
             List<ExpenseTypeRespDTO> expenseTypeList = expenseTypeApi.getExpenseTypeList(expenseTypeIdList);
+            Map<Long, ExpenseTypeRespDTO> typeMap = CollectionUtils.convertMap(expenseTypeList, ExpenseTypeRespDTO::getId);
 
             for (OaExpenseRespVO respVO : oaExpenseRespVOList) {
-
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
                     }
                 }
-
-                for (ExpenseTypeRespDTO expenseType : expenseTypeList) {
-                    if (expenseType.getId() != null && expenseType.getId().equals(respVO.getExpenseTypeId())) {
-                        respVO.setExpenseTypeName(expenseType.getName());
-                        break;
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
+                    }
+                }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
+                // 类型
+                if (respVO.getExpenseTypeId() != null) {
+                    ExpenseTypeRespDTO expenseTypeRespDTO = typeMap.get(respVO.getExpenseTypeId());
+                    if (expenseTypeRespDTO != null) {
+                        respVO.setExpenseTypeName(expenseTypeRespDTO.getName());
                     }
                 }
             }
         }
-
         return oaExpenseRespVOPageResult;
     }
 

+ 51 - 11
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/leave/OaLeaveServiceImpl.java

@@ -24,6 +24,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.leave.OaLeaveDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.leave.OaLeaveMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -96,6 +99,9 @@ public class OaLeaveServiceImpl implements OaLeaveService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private AttendanceLeaveApi attendanceLeaveApi;
 
@@ -481,7 +487,7 @@ public class OaLeaveServiceImpl implements OaLeaveService {
                 .eq(OaLeaveDO::getProcInstId, currentTask.getProcessInstanceId());
         OaLeaveDO oaLeaveDO = oaLeaveMapper.selectOne(lambdaQueryWrapper);
         if (!DictDataConstants.OA_AUDIT_STATUS_COMMITTED.equals(oaLeaveDO.getAuditStatus())
-                || !Objects.equals(String.valueOf(loginUserId), oaLeaveDO.getCreator())) {
+                || !Objects.equals(String.valueOf(loginEmployee.getId()), oaLeaveDO.getCreator())) {
             throw ServiceExceptionUtil.exception(ErrorCodeConstants.TASK_REVOCATION_NOT_ALLOWED);
         }
 
@@ -733,6 +739,17 @@ public class OaLeaveServiceImpl implements OaLeaveService {
                 oaLeaveRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaLeaveDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaLeaveDO.getPostId());
+            if (post != null) {
+                oaLeaveRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        if (StrUtil.isNotBlank(oaLeaveDO.getAuditStatus())) {
+            oaLeaveRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaLeaveDO.getAuditStatus()));
+        }
 
         // 附件列表
         List<FileDTO> fileList = fileApi.getFileDTOListByBiz(oaLeaveDO.getLeaveId());
@@ -777,22 +794,45 @@ public class OaLeaveServiceImpl implements OaLeaveService {
             List<Long> employeeIdList = oaLeaveRespVOList.stream().map(OaLeaveRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaLeaveRespVO respVO : oaLeaveRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
+            // 部门
             List<Long> deptIdList = oaLeaveRespVOList.stream().map(OaLeaveRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaLeaveRespVOList.stream().map(OaLeaveRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaLeaveRespVO respVO : oaLeaveRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 51 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/out/OaOutServiceImpl.java

@@ -24,6 +24,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.out.OaOutDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.out.OaOutMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -93,6 +96,9 @@ public class OaOutServiceImpl implements OaOutService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private AttendanceOutApi attendanceOutApi;
 
@@ -627,6 +633,19 @@ public class OaOutServiceImpl implements OaOutService {
             }
         }
 
+        // 职位
+        if (oaOutDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaOutDO.getPostId());
+            if (post != null) {
+                oaOutRespVO.setPosition(post.getName());
+            }
+        }
+
+        // 状态
+        if (StrUtil.isNotBlank(oaOutDO.getAuditStatus())) {
+            oaOutRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaOutDO.getAuditStatus()));
+        }
+
         String procInstId = oaOutDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
             Task task = taskService.createTaskQuery()
@@ -731,22 +750,44 @@ public class OaOutServiceImpl implements OaOutService {
             List<Long> employeeIdList = oaOutRespVOList.stream().map(OaOutRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaOutRespVO respVO : oaOutRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaOutRespVOList.stream().map(OaOutRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaOutRespVOList.stream().map(OaOutRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaOutRespVO respVO : oaOutRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 48 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/purchase/OaPurchaseServiceImpl.java

@@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.bpm.dal.mysql.oa.purchase.OaPurchaseMapper;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.purchase.OaPurchaseObjMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -32,7 +33,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -95,6 +98,9 @@ public class OaPurchaseServiceImpl implements OaPurchaseService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private NotifyMessageSendApi notifyMessageSendApi;
 
@@ -656,6 +662,17 @@ public class OaPurchaseServiceImpl implements OaPurchaseService {
                 oaPurchaseRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaPurchaseDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaPurchaseDO.getPostId());
+            if (post != null) {
+                oaPurchaseRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        if (StrUtil.isNotBlank(oaPurchaseDO.getAuditStatus())) {
+            oaPurchaseRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaPurchaseDO.getAuditStatus()));
+        }
         // 子表数据
         List<OaPurchaseObjDO> oaPurchaseObjDOS = getOaPurchaseObjListByPurchaseId(oaPurchaseDO.getId());
         oaPurchaseRespVO.setOaPurchaseObjs(oaPurchaseObjDOS);
@@ -764,22 +781,43 @@ public class OaPurchaseServiceImpl implements OaPurchaseService {
             List<Long> employeeIdList = oaPurchaseRespVOList.stream().map(OaPurchaseRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaPurchaseRespVO respVO : oaPurchaseRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaPurchaseRespVOList.stream().map(OaPurchaseRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaPurchaseRespVOList.stream().map(OaPurchaseRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
             for (OaPurchaseRespVO respVO : oaPurchaseRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 49 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/receive/OaReceiveServiceImpl.java

@@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.bpm.dal.mysql.oa.receive.OaReceiveMapper;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.receive.OaReceiveObjMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -32,7 +33,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -96,6 +99,9 @@ public class OaReceiveServiceImpl implements OaReceiveService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private NotifyMessageSendApi notifyMessageSendApi;
 
@@ -659,6 +665,17 @@ public class OaReceiveServiceImpl implements OaReceiveService {
                 oaReceiveRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaReceiveDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaReceiveDO.getPostId());
+            if (post != null) {
+                oaReceiveRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        if (StrUtil.isNotBlank(oaReceiveDO.getAuditStatus())) {
+            oaReceiveRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaReceiveDO.getAuditStatus()));
+        }
         // 子表数据
         List<OaReceiveObjDO> oaReceiveObjDOS = getOaReceiveObjListByReceiveId(oaReceiveDO.getId());
         oaReceiveRespVO.setOaReceiveObjs(oaReceiveObjDOS);
@@ -767,22 +784,44 @@ public class OaReceiveServiceImpl implements OaReceiveService {
             List<Long> employeeIdList = oaReceiveRespVOList.stream().map(OaReceiveRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaReceiveRespVO respVO : oaReceiveRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaReceiveRespVOList.stream().map(OaReceiveRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaReceiveRespVOList.stream().map(OaReceiveRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaReceiveRespVO respVO : oaReceiveRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 49 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/renew/OaRenewServiceImpl.java

@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.renew.OaRenewDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.renew.OaRenewMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.relations.api.renew.RelationsRenewApi;
 import cn.iocoder.yudao.module.relations.api.renew.dto.RelationsRenewCreateReqDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -95,6 +98,9 @@ public class OaRenewServiceImpl implements OaRenewService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private RelationsRenewApi relationsRenewApi;
 
@@ -690,6 +696,17 @@ public class OaRenewServiceImpl implements OaRenewService {
                 oaRenewRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaRenewDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaRenewDO.getPostId());
+            if (post != null) {
+                oaRenewRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        if (StrUtil.isNotBlank(oaRenewDO.getAuditStatus())) {
+            oaRenewRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaRenewDO.getAuditStatus()));
+        }
 
         String procInstId = oaRenewDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
@@ -795,22 +812,44 @@ public class OaRenewServiceImpl implements OaRenewService {
             List<Long> employeeIdList = oaRenewRespVOList.stream().map(OaRenewRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaRenewRespVO respVO : oaRenewRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaRenewRespVOList.stream().map(OaRenewRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaRenewRespVOList.stream().map(OaRenewRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaRenewRespVO respVO : oaRenewRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 47 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/stamp/OaStampServiceImpl.java

@@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.stamp.stampinfo.OaStampInfoDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.stamp.OaStampMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.stamp.stampinfo.OaStampInfoService;
@@ -33,7 +34,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -97,6 +100,9 @@ public class OaStampServiceImpl implements OaStampService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private NotifyMessageSendApi notifyMessageSendApi;
 
@@ -648,6 +654,15 @@ public class OaStampServiceImpl implements OaStampService {
                 oaStampRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaStampDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaStampDO.getPostId());
+            if (post != null) {
+                oaStampRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        oaStampRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaStampDO.getAuditStatus()));
 
         // 印章列表
         String stampSealId = oaStampDO.getStampSealId();
@@ -773,22 +788,44 @@ public class OaStampServiceImpl implements OaStampService {
             List<Long> employeeIdList = oaStampRespVOList.stream().map(OaStampRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaStampRespVO respVO : oaStampRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaStampRespVOList.stream().map(OaStampRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaStampRespVOList.stream().map(OaStampRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaStampRespVO respVO : oaStampRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 48 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/turnover/OaTurnoverServiceImpl.java

@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.turnover.OaTurnoverDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.turnover.OaTurnOverMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -33,10 +34,13 @@ import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.relations.api.turnover.RelationsTurnoverApi;
 import cn.iocoder.yudao.module.relations.api.turnover.dto.RelationsTurnoverCreateReqDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import liquibase.pro.packaged.S;
 import org.apache.commons.lang3.StringUtils;
 import org.flowable.engine.TaskService;
 import org.flowable.task.api.Task;
@@ -96,6 +100,9 @@ public class OaTurnoverServiceImpl implements OaTurnoverService {
     @Resource
     private DeptApi deptApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Resource
     private RelationsTurnoverApi relationsTurnoverApi;
 
@@ -654,6 +661,15 @@ public class OaTurnoverServiceImpl implements OaTurnoverService {
                 oaTurnoverRespVO.setDeptName(dept.getName());
             }
         }
+        // 职位
+        if (oaTurnoverDO.getPostId() != null) {
+            PostRespDTO post = postApi.getPost(oaTurnoverDO.getPostId());
+            if (post != null) {
+                oaTurnoverRespVO.setPosition(post.getName());
+            }
+        }
+        // 状态
+        oaTurnoverRespVO.setAuditStatus(OaAuditStatusEnum.getByStatus(oaTurnoverDO.getAuditStatus()));
 
         String procInstId = oaTurnoverDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
@@ -759,22 +775,44 @@ public class OaTurnoverServiceImpl implements OaTurnoverService {
             List<Long> employeeIdList = oaTurnoverRespVOList.stream().map(OaTurnoverRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
-            for (OaTurnoverRespVO respVO : oaTurnoverRespVOList) {
-                EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
-                if (employeeRespDTO != null) {
-                    respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
-                }
-            }
 
             List<Long> deptIdList = oaTurnoverRespVOList.stream().map(OaTurnoverRespVO::getDeptId).collect(Collectors.toList());
             List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaTurnoverRespVOList.stream().map(OaTurnoverRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaTurnoverRespVO respVO : oaTurnoverRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
+                // 当前处理人
+                if (respVO.getCurrentAuditEmployeeId() != null) {
+                    EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
+                    if (employeeRespDTO != null) {
+                        respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
+                    }
+                }
+                // 部门
+                if (respVO.getDeptId() != null) {
+                    DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                    if (deptRespDTO != null) {
+                        respVO.setDeptName(deptRespDTO.getName());
+                    }
+                }
+                // 职位
+                if (respVO.getPostId() != null) {
+                    PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                    if (postRespDTO != null) {
+                        respVO.setPosition(postRespDTO.getName());
                     }
                 }
+                // 状态
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }
 

+ 39 - 10
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/universal/OaUniversalServiceImpl.java

@@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.universal.OaUniversalDO;
 import cn.iocoder.yudao.module.bpm.dal.mysql.oa.universal.OaUniversalMapper;
 import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
 import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
+import cn.iocoder.yudao.module.bpm.enums.OaAuditStatusEnum;
 import cn.iocoder.yudao.module.bpm.enums.ProcessKeyEnum;
 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
 import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
@@ -30,7 +31,9 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
 import cn.iocoder.yudao.module.infra.api.file.FileApi;
 import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.PostApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
 import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -93,6 +96,9 @@ public class OaUniversalServiceImpl implements OaUniversalService {
     @Resource
     private NotifyMessageSendApi notifyMessageSendApi;
 
+    @Resource
+    private PostApi postApi;
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Long stagingOaUniversal(OaUniversalSaveReqVO stagingReqVO) {
@@ -548,6 +554,15 @@ public class OaUniversalServiceImpl implements OaUniversalService {
             }
         }
 
+        // 职位
+        Long postId = oaUniversalDO.getPostId();
+        if (postId != null) {
+            PostRespDTO post = postApi.getPost(postId);
+            if (post != null) {
+                oaUniversalRespVO.setPosition(post.getName());
+            }
+        }
+
         String procInstId = oaUniversalDO.getProcInstId();
         if (StrUtil.isNotBlank(procInstId)) {
             Task task = taskService.createTaskQuery()
@@ -649,25 +664,39 @@ public class OaUniversalServiceImpl implements OaUniversalService {
 
         List<OaUniversalRespVO> oaUniversalRespVOList = oaUniversalRespVOPageResult.getList();
         if (CollectionUtil.isNotEmpty(oaUniversalRespVOList)) {
+            // 当前处理人
             List<Long> employeeIdList = oaUniversalRespVOList.stream().map(OaUniversalRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
             List<EmployeeRespDTO> employeeRespDTOList = employeeApi.getEmployeeListByIds(employeeIdList);
             Map<Long, EmployeeRespDTO> longEmployeeRespDTOMap = CollectionUtils.convertMap(employeeRespDTOList, EmployeeRespDTO::getId);
+
+            // 部门
+            List<Long> deptIdList = oaUniversalRespVOList.stream().map(OaUniversalRespVO::getDeptId).collect(Collectors.toList());
+            List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
+            Map<Long, DeptRespDTO> deptMap = CollectionUtils.convertMap(deptList, DeptRespDTO::getId);
+
+            // 职位
+            List<Long> postIdList = oaUniversalRespVOList.stream().map(OaUniversalRespVO::getPostId).collect(Collectors.toList());
+            List<PostRespDTO> postList = postApi.getPostList(postIdList);
+            Map<Long, PostRespDTO> postMap = CollectionUtils.convertMap(postList, PostRespDTO::getId);
+
+            // 状态
+            Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
+                    .collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
+
             for (OaUniversalRespVO respVO : oaUniversalRespVOList) {
                 EmployeeRespDTO employeeRespDTO = longEmployeeRespDTOMap.get(respVO.getCurrentAuditEmployeeId());
                 if (employeeRespDTO != null) {
                     respVO.setCurrentAuditEmployeeName(employeeRespDTO.getName());
                 }
-            }
-
-            List<Long> deptIdList = oaUniversalRespVOList.stream().map(OaUniversalRespVO::getDeptId).collect(Collectors.toList());
-            List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
-            for (OaUniversalRespVO respVO : oaUniversalRespVOList) {
-                for (DeptRespDTO dept : deptList) {
-                    if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
-                        respVO.setDeptName(dept.getName());
-                        break;
-                    }
+                DeptRespDTO deptRespDTO = deptMap.get(respVO.getDeptId());
+                if (deptRespDTO != null) {
+                    respVO.setDeptName(deptRespDTO.getName());
+                }
+                PostRespDTO postRespDTO = postMap.get(respVO.getPostId());
+                if (postRespDTO != null) {
+                    respVO.setPosition(postRespDTO.getName());
                 }
+                respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
             }
         }