From 34ef7217a034599217a7fdd1e28e1ae6910e1b4b Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期三, 11 十月 2023 20:15:21 +0800
Subject: [PATCH] 菜单获取编码规则

---
 api/v1/contract.go |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/api/v1/contract.go b/api/v1/contract.go
index ff42186..98b4ee9 100644
--- a/api/v1/contract.go
+++ b/api/v1/contract.go
@@ -38,6 +38,14 @@
 		return
 	}
 
+	if params.CodeRule.Method == 1 {
+		autoCode := model.GetAutoCode(contract.Id, &params.CodeRule)
+		m := map[string]interface{}{
+			"number": autoCode,
+		}
+		_ = model.NewContractSearch().SetId(contract.Id).UpdateByMap(m)
+	}
+
 	ctx.Ok()
 }
 
@@ -113,6 +121,7 @@
 		QuotationId: contract.QuotationId,
 		StatusId:    contract.StatusId,
 		File:        contract.File,
+		CodeStandID: contract.CodeStandID,
 	}
 
 	return ecode.OK, contractModel

--
Gitblit v1.8.0