xuzhancheng преди 1 седмица
родител
ревизия
921c985eeb

+ 26 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/vo/BoilerOrderItemReportVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Data
@@ -152,4 +153,29 @@ public class BoilerOrderItemReportVO {
 
     @Schema(description = "OA系统流程ID")
     private String summaryId;
+
+    /**
+     * 审核人
+     */
+    private String approvalId;
+    /**
+     * 审核时间
+     */
+    private LocalDateTime approvalTime;
+    /**
+     * 审核人
+     */
+    private String approvalName;
+    /**
+     * 批准人
+     */
+    private String ratifyId;
+    /**
+     * 批准人
+     */
+    private String ratifyName;
+    /**
+     * 批准时间
+     */
+    private LocalDateTime ratifyTime;
 }

+ 26 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/vo/PipeOrderItemReportVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Data
@@ -155,4 +156,29 @@ public class PipeOrderItemReportVO {
 
     @Schema(description = "OA系统流程ID")
     private String summaryId;
+
+    /**
+     * 审核人
+     */
+    private String approvalId;
+    /**
+     * 审核时间
+     */
+    private LocalDateTime approvalTime;
+    /**
+     * 审核人
+     */
+    private String approvalName;
+    /**
+     * 批准人
+     */
+    private String ratifyId;
+    /**
+     * 批准人
+     */
+    private String ratifyName;
+    /**
+     * 批准时间
+     */
+    private LocalDateTime ratifyTime;
 }

+ 46 - 12
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorderitemreport/BoilerTaskOrderItemReportServiceImpl.java

@@ -584,22 +584,56 @@ public class BoilerTaskOrderItemReportServiceImpl extends ServiceImpl<BoilerTask
                     .orElse(null);
 
             if (approval != null) {
-                List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
-                if (!userListByNickname.isEmpty()) {
-                    AdminUserRespDTO approvalUser = userListByNickname.get(0);
-                    approvalId = approvalUser.getId();
-                    approvalName = approvalUser.getNickname();
-                    approvalTime = approval.getCreateDate();
+                if (approval.getUserCode() != null){
+                    AdminUserRespDTO userRespDTO = adminUserApi.getUserByEmployeeNo(approval.getUserCode()).getCheckedData();
+                    if (userRespDTO != null) {
+                        approvalId = userRespDTO.getId();
+                        approvalName = userRespDTO.getNickname();
+                        approvalTime = approval.getCreateDate();
+                    }else {
+                        List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
+                        if (!userListByNickname.isEmpty()) {
+                            AdminUserRespDTO approvalUser = userListByNickname.get(0);
+                            approvalId = approvalUser.getId();
+                            approvalName = approvalUser.getNickname();
+                            approvalTime = approval.getCreateDate();
+                        }
+                    }
+                }else {
+                    List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
+                    if (!userListByNickname.isEmpty()) {
+                        AdminUserRespDTO approvalUser = userListByNickname.get(0);
+                        approvalId = approvalUser.getId();
+                        approvalName = approvalUser.getNickname();
+                        approvalTime = approval.getCreateDate();
+                    }
                 }
             }
 
             if (ratify != null) {
-                List<AdminUserRespDTO> userListByNickname1 = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
-                if (!userListByNickname1.isEmpty()) {
-                    AdminUserRespDTO ratifyUser = userListByNickname1.get(0);
-                    ratifyId = ratifyUser.getId();
-                    ratifyName = ratifyUser.getNickname();
-                    ratifyTime = ratify.getCreateDate();
+                if (ratify.getUserCode() != null){
+                    AdminUserRespDTO userRespDTO = adminUserApi.getUserByEmployeeNo(ratify.getUserCode()).getCheckedData();
+                    if (userRespDTO != null) {
+                        ratifyId = userRespDTO.getId();
+                        ratifyName = userRespDTO.getNickname();
+                        ratifyTime = ratify.getCreateDate();
+                    }else {
+                        List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
+                        if (!userListByNickname.isEmpty()) {
+                            AdminUserRespDTO ratifyUser = userListByNickname.get(0);
+                            ratifyId = ratifyUser.getId();
+                            ratifyName = ratifyUser.getNickname();
+                            ratifyTime = ratify.getCreateDate();
+                        }
+                    }
+                }else {
+                    List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
+                    if (!userListByNickname.isEmpty()) {
+                        AdminUserRespDTO ratifyUser = userListByNickname.get(0);
+                        ratifyId = ratifyUser.getId();
+                        ratifyName = ratifyUser.getNickname();
+                        ratifyTime = ratify.getCreateDate();
+                    }
                 }
             }
         }

+ 46 - 12
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorderitemreport/PipeTaskOrderItemReportServiceImpl.java

@@ -484,22 +484,56 @@ public class PipeTaskOrderItemReportServiceImpl extends ServiceImpl<PipeTaskOrde
                     .orElse(null);
 
             if (approval != null) {
-                List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
-                if (!userListByNickname.isEmpty()) {
-                    AdminUserRespDTO approvalUser = userListByNickname.get(0);
-                    approvalId = approvalUser.getId();
-                    approvalName = approvalUser.getNickname();
-                    approvalTime = approval.getCreateDate();
+                if (approval.getUserCode() != null){
+                    AdminUserRespDTO userRespDTO = adminUserApi.getUserByEmployeeNo(approval.getUserCode()).getCheckedData();
+                    if (userRespDTO != null) {
+                        approvalId = userRespDTO.getId();
+                        approvalName = userRespDTO.getNickname();
+                        approvalTime = approval.getCreateDate();
+                    }else {
+                        List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
+                        if (!userListByNickname.isEmpty()) {
+                            AdminUserRespDTO approvalUser = userListByNickname.get(0);
+                            approvalId = approvalUser.getId();
+                            approvalName = approvalUser.getNickname();
+                            approvalTime = approval.getCreateDate();
+                        }
+                    }
+                }else {
+                    List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(approval.getUserName()).getCheckedData();
+                    if (!userListByNickname.isEmpty()) {
+                        AdminUserRespDTO approvalUser = userListByNickname.get(0);
+                        approvalId = approvalUser.getId();
+                        approvalName = approvalUser.getNickname();
+                        approvalTime = approval.getCreateDate();
+                    }
                 }
             }
 
             if (ratify != null) {
-                List<AdminUserRespDTO> userListByNickname1 = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
-                if (!userListByNickname1.isEmpty()) {
-                    AdminUserRespDTO ratifyUser = userListByNickname1.get(0);
-                    ratifyId = ratifyUser.getId();
-                    ratifyName = ratifyUser.getNickname();
-                    ratifyTime = ratify.getCreateDate();
+                if (ratify.getUserCode() != null){
+                    AdminUserRespDTO userRespDTO = adminUserApi.getUserByEmployeeNo(ratify.getUserCode()).getCheckedData();
+                    if (userRespDTO != null) {
+                        ratifyId = userRespDTO.getId();
+                        ratifyName = userRespDTO.getNickname();
+                        ratifyTime = ratify.getCreateDate();
+                    }else {
+                        List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
+                        if (!userListByNickname.isEmpty()) {
+                            AdminUserRespDTO ratifyUser = userListByNickname.get(0);
+                            ratifyId = ratifyUser.getId();
+                            ratifyName = ratifyUser.getNickname();
+                            ratifyTime = ratify.getCreateDate();
+                        }
+                    }
+                }else {
+                    List<AdminUserRespDTO> userListByNickname = adminUserApi.getUserListByNickname(ratify.getUserName()).getCheckedData();
+                    if (!userListByNickname.isEmpty()) {
+                        AdminUserRespDTO ratifyUser = userListByNickname.get(0);
+                        ratifyId = ratifyUser.getId();
+                        ratifyName = ratifyUser.getNickname();
+                        ratifyTime = ratify.getCreateDate();
+                    }
                 }
             }