Forráskód Böngészése

fix: 审批列表新增记录审批状态

hsun 1 éve
szülő
commit
3c36e14681
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      models/report_approve/report_approve.go

+ 5 - 2
models/report_approve/report_approve.go

@@ -184,6 +184,7 @@ type ReportApproveItem struct {
 	ClassifyFirstId       int    `description:"一级分类ID"`
 	ClassifySecondId      int    `description:"二级分类ID"`
 	State                 int    `description:"审批状态:1-待审批;2-已审批;3-已驳回;4-已撤回"`
+	RecordState           int    `description:"审批记录状态:1-待审批;2-已通过;3-已驳回"`
 	FlowId                int    `description:"审批流ID"`
 	FlowVersion           int    `description:"审批流版本"`
 	StartNodeId           int    `description:"开始节点ID"`
@@ -211,6 +212,7 @@ func FormatReportApproveOrm2Item(origin *ReportApproveItemOrm) (item *ReportAppr
 	item.ClassifyFirstId = origin.ClassifyFirstId
 	item.ClassifySecondId = origin.ClassifySecondId
 	item.State = origin.State
+	item.RecordState = origin.RecordState
 	item.FlowId = origin.FlowId
 	item.FlowVersion = origin.FlowVersion
 	item.StartNodeId = origin.StartNodeId
@@ -257,6 +259,7 @@ type ReportApproveItemOrm struct {
 	ClassifyFirstId       int       `description:"一级分类ID"`
 	ClassifySecondId      int       `description:"二级分类ID"`
 	State                 int       `description:"审批状态:1-待审批;2-已审批;3-已驳回;4-已撤回"`
+	RecordState           int       `description:"审批记录状态:1-待审批;2-已通过;3-已驳回"`
 	FlowId                int       `description:"审批流ID"`
 	FlowVersion           int       `description:"审批流版本"`
 	StartNodeId           int       `description:"开始节点ID"`
@@ -289,7 +292,7 @@ func GetApprovingReportApprovePageList(cond string, pars []interface{}, orderRul
 	if orderRule != "" {
 		order = ` ORDER BY ` + orderRule
 	}
-	sql := fmt.Sprintf(`SELECT a.report_approve_record_id, b.*
+	sql := fmt.Sprintf(`SELECT a.report_approve_record_id, a.state AS record_state, b.*
 		FROM report_approve_record AS a
 		JOIN report_approve AS b ON a.report_approve_id = b.report_approve_id
 		WHERE 1 = 1 %s %s
@@ -317,7 +320,7 @@ func GetApprovedReportApprovePageList(cond string, pars []interface{}, orderRule
 	if orderRule != "" {
 		order = ` ORDER BY ` + orderRule
 	}
-	sql := fmt.Sprintf(`SELECT a.report_approve_record_id, a.approve_time AS handle_time, b.*
+	sql := fmt.Sprintf(`SELECT a.report_approve_record_id, a.state AS record_state, a.approve_time AS handle_time, b.*
 		FROM report_approve_record AS a
 		JOIN report_approve AS b ON a.report_approve_id = b.report_approve_id
 		WHERE 1 = 1 %s %s