Browse Source

特殊申购

baishaojie 1 year ago
parent
commit
60d8427a77
3 changed files with 8 additions and 3 deletions
  1. 5 1
      apiserver/model/bigpartpurchase.go
  2. 1 0
      apiserver/service/job.go
  3. 2 2
      cmd/main.go

+ 5 - 1
apiserver/model/bigpartpurchase.go

@@ -42,6 +42,10 @@ func (b *BigPartPurchase) TableName() string {
 func NewBigPartPurchase(pastureId, departmentId, employeeId, providerId int64,
 	purchaseType modernPb.PurchaseType_Kind, orderNumber, createdTime string,
 ) *BigPartPurchase {
+	var statue int32 = 2
+	if purchaseType == 3 {
+		statue = 7
+	}
 	local, _ := time.LoadLocation("Asia/Shanghai")
 	createTime, _ := time.ParseInLocation("2006-01-02 15:04:05", fmt.Sprintf("%s 00:00:00", createdTime), local)
 	return &BigPartPurchase{
@@ -55,7 +59,7 @@ func NewBigPartPurchase(pastureId, departmentId, employeeId, providerId int64,
 		FlowWorkNote:   "",
 		BuyStatue:      0,
 		WorkflowNote:   "",
-		Statue:         7,
+		Statue:         statue,
 		ProviderId:     providerId,
 		PurchaseType:   purchaseType,
 	}

+ 1 - 0
apiserver/service/job.go

@@ -107,6 +107,7 @@ func SapJobInit() {
 		AutoContractToASP()
 	})
 	//AutoContractToASP()
+	AutoContractToASP()
 	//c1.Start()
 }
 

+ 2 - 2
cmd/main.go

@@ -37,8 +37,8 @@ import (
 // @BasePath /
 func main() {
 	var path string
-	path = "./"
-	//path = "D:/catering/eam-go/cmd/"
+	//path = "./"
+	path = "D:/catering/eam-go/cmd/"
 	flag.Parse()
 	setting.Setup(path)
 	dao.Setup()