Browse Source

feat(供应商):审核第一步增加退回 和退回原因

liutao 7 months ago
parent
commit
b3cd7479b4

+ 18 - 18
src/main/java/com/inkasso/factoring/creditmanagement/service/impl/SupplierInfoServiceImpl.java

@@ -435,24 +435,6 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
     @Override
     public SupplierInfo findSupplierById(Long id) {
         SupplierInfo supplierInfo = getById(id);
-        List<BusinessProcessingLog> list = businessProcessingLogService.lambdaQuery()
-                .eq(BusinessProcessingLog::getBusinessType, ConstantUtil.SUPPLIER_INFO)
-                .eq(BusinessProcessingLog::getBusnessKey, id)
-                .isNotNull(BusinessProcessingLog::getEndTime)
-                .orderByDesc(BusinessProcessingLog::getGmtCreate).list();
-        if(CollectionUtil.isNotEmpty(list)){
-            String reason = null;
-            BusinessProcessingLog businessProcessingLog = list.get(0);
-            if(ConstantUtil.FIRST_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
-                SupplierApprovalFirst supplierApprovalFirst = supplierApprovalFirstService.getById(businessProcessingLog.getFormBusinessId());
-                reason = supplierApprovalFirst.getApprovalComment();
-            }
-            if(ConstantUtil.SECOND_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
-                SupplierApprovalSecond supplierApprovalSecond = supplierApprovalSecondService.getById(businessProcessingLog.getId());
-                reason = supplierApprovalSecond.getApprovalComment();
-            }
-            supplierInfo.setReason(reason);
-        }
         Enterprise enterprise = enterpriseService.getById(supplierInfo.getcEnterpriseId());
         //sop获取企业省市区
         String getEnterpriseAreaUrl = getEnterpriseArea + "?comprehensiveRiskInvestigationId=" + enterprise.getcComprehensiveRiskInvestigationId();
@@ -801,6 +783,24 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
             } else if (supplierInfo.getStatus().equals(SupplierStatusEnums.DUE_DILIGENCE_APPOINTMENT.getCode())) {
                 supplierInfo.setStatusStr(SupplierStatusEnums.VOTE.getDesc());
             }
+            List<BusinessProcessingLog> list = businessProcessingLogService.lambdaQuery()
+                    .eq(BusinessProcessingLog::getBusinessType, ConstantUtil.SUPPLIER_INFO)
+                    .eq(BusinessProcessingLog::getBusnessKey, supplierInfo.getId())
+                    .isNotNull(BusinessProcessingLog::getEndTime)
+                    .orderByDesc(BusinessProcessingLog::getGmtCreate).list();
+            if(CollectionUtil.isNotEmpty(list)){
+                String reason = null;
+                BusinessProcessingLog businessProcessingLog = list.get(0);
+                if(ConstantUtil.FIRST_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
+                    SupplierApprovalFirst supplierApprovalFirst = supplierApprovalFirstService.getById(businessProcessingLog.getFormBusinessId());
+                    reason = supplierApprovalFirst.getApprovalComment();
+                }
+                if(ConstantUtil.SECOND_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
+                    SupplierApprovalSecond supplierApprovalSecond = supplierApprovalSecondService.getById(businessProcessingLog.getFormBusinessId());
+                    reason = supplierApprovalSecond.getApprovalComment();
+                }
+                supplierInfo.setReason(reason);
+            }
         }
         return supplierInfos;
     }

+ 9 - 13
src/main/java/com/inkasso/factoring/system/businessProcessLog/entity/BusinessProcessingLog.java

@@ -47,7 +47,7 @@ public class BusinessProcessingLog extends BaseEntity {
     })
     private Long formBusinessId;// 流程中任务涉及的表单业务ID
 //    @ObjectValidator(message = "办理人ID不能为空")
-    private Long assignee;
+    private Long assigneeId;
     @Length(min = 1, max = 20, message = "办理人类型不能为空,且不超过20个字符")
     private String assigneeType;// 与ConstantConversionUtil.java中assigneeType定义的常量保持一致
     @JSONField(format = "yyyy-MM-dd HH:mm:ss")
@@ -55,7 +55,7 @@ public class BusinessProcessingLog extends BaseEntity {
     @JSONField(format = "yyyy-MM-dd HH:mm:ss")
     private Date endTime;
     private Float overdueDays;// 若为null,表示无时间限制,最小单位0.5(天),目前业务只记录逾期时间,故默认为逾期,默认不超过1000天FLOAT(4,1)
-    private boolean workingDay;// 工作日(true)、自然日(false)标识
+    private boolean isWorkingDay;// 工作日(true)、自然日(false)标识
     @Length(min = 1, max = 50, message = "任务状态不能为空,且不超过50个字符", groups = {
             Update.class
     })
@@ -105,20 +105,16 @@ public class BusinessProcessingLog extends BaseEntity {
         return formBusinessId;
     }
 
-    public boolean isWorkingDay() {
-        return workingDay;
-    }
-
     public void setFormBusinessId(Long formBusinessId) {
         this.formBusinessId = formBusinessId;
     }
 
-    public Long getAssignee() {
-        return assignee;
+    public Long getAssigneeId() {
+        return assigneeId;
     }
 
-    public void setAssignee(Long assignee) {
-        this.assignee = assignee;
+    public void setAssigneeId(Long assigneeId) {
+        this.assigneeId = assigneeId;
     }
 
     public String getAssigneeType() {
@@ -153,12 +149,12 @@ public class BusinessProcessingLog extends BaseEntity {
         this.overdueDays = overdueDays;
     }
 
-    public boolean getWorkingDay() {
-        return workingDay;
+    public boolean isWorkingDay() {
+        return isWorkingDay;
     }
 
     public void setWorkingDay(boolean workingDay) {
-        this.workingDay = workingDay;
+        isWorkingDay = workingDay;
     }
 
     public String getStatus() {