caipin 4 éve
szülő
commit
ebe6db1914
3 módosított fájl, 28 hozzáadás és 20 törlés
  1. 22 19
      models/cm_tree.go
  2. 1 1
      models/cm_tree_contracts.go
  3. 5 0
      web/viewmodels/folder_contract.go

+ 22 - 19
models/cm_tree.go

@@ -5,23 +5,26 @@ import (
 )
 
 type CmTree struct {
-	Id                int       `xorm:"not null pk autoincr comment('自增ID') INT(11)"`
-	Name              string    `xorm:"not null comment('名称') VARCHAR(64)"`
-	ProjectId         int       `xorm:"not null default 0 comment('项目ID') INT(11)"`
-	Depth             int       `xorm:"not null default 0 comment('深度') TINYINT(4)"`
-	Serial            int       `xorm:"not null default 0 comment('序号') TINYINT(4)"`
-	Attribution       string    `xorm:"comment('归属') VARCHAR(32)"`
-	Sort              int       `xorm:"not null default 0 comment('排序') TINYINT(4)"`
-	Isfolder          int       `xorm:"not null default 1 comment('是否文件夹 1文件夹 0其他') TINYINT(1)"`
-	BidsectionId      int       `xorm:"comment('标段ID') INT(11)"`
-	ParentId          int       `xorm:"not null default 0 comment('父级ID') INT(11)"`
-	Ancounts          int       `xorm:"not null default 0 comment('账号数') TINYINT(4)"`
-	Contracts         int       `xorm:"not null default 0 comment('合同数') TINYINT(4)"`
-	ContractsIncome   string    `xorm:"not null default 0.00 comment('合同收入总金额') DECIMAL(12,2)"`
-	ContractsReturned string    `xorm:"not null default 0.00 comment('合同已收总金额') DECIMAL(12,2)"`
-	ContractsPay      string    `xorm:"not null default 0.00 comment('合同支付总金额') DECIMAL(12,2)"`
-	ContractsPaid     string    `xorm:"not null default 0.00 comment('合同已支付金额') DECIMAL(12,2)"`
-	Isdelete          int       `xorm:"not null default 0 comment('1删除') TINYINT(1)"`
-	CreateTime        time.Time `xorm:"comment('创建时间') DATETIME"`
-	UpdateTime        time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
+	Id                  int       `xorm:"not null pk autoincr comment('自增ID') INT(11)"`
+	Name                string    `xorm:"not null comment('名称') VARCHAR(64)"`
+	ProjectId           int       `xorm:"not null default 0 comment('项目ID') INT(11)"`
+	Depth               int       `xorm:"not null default 0 comment('深度') TINYINT(4)"`
+	Serial              int       `xorm:"not null default 0 comment('序号') TINYINT(4)"`
+	Attribution         string    `xorm:"comment('归属') VARCHAR(32)"`
+	Sort                int       `xorm:"not null default 0 comment('排序') TINYINT(4)"`
+	Isfolder            int       `xorm:"not null default 1 comment('是否文件夹 1文件夹 0其他') TINYINT(1)"`
+	BidsectionId        int       `xorm:"comment('标段ID') INT(11)"`
+	ParentId            int       `xorm:"not null default 0 comment('父级ID') INT(11)"`
+	Ancounts            int       `xorm:"not null default 0 comment('账号数') TINYINT(4)"`
+	Contracts           int       `xorm:"not null default 0 comment('合同数') TINYINT(4)"`
+	ContractsIncome     string    `xorm:"not null default 0.00 comment('合同收入总金额') DECIMAL(12,2)"`
+	ContractsReturned   string    `xorm:"not null default 0.00 comment('合同已收总金额') DECIMAL(12,2)"`
+	ContractsPay        string    `xorm:"not null default 0.00 comment('合同支付总金额') DECIMAL(12,2)"`
+	ContractsPaid       string    `xorm:"not null default 0.00 comment('合同已支付金额') DECIMAL(12,2)"`
+	SafeTotal           int       `xorm:"comment('安全巡检总数') TINYINT(4)"`
+	SafeRectification   int       `xorm:"comment('安全巡检整改未') TINYINT(4)"`
+	SafeRectificationIn int       `xorm:"comment('安全巡检整改中') TINYINT(4)"`
+	Isdelete            int       `xorm:"not null default 0 comment('1删除') TINYINT(1)"`
+	CreateTime          time.Time `xorm:"comment('创建时间') DATETIME"`
+	UpdateTime          time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
 }

+ 1 - 1
models/cm_tree_contracts.go

@@ -22,6 +22,6 @@ type CmTreeContracts struct {
 	ContractPrice    string    `xorm:"not null default 0.00 comment('合同金额') DECIMAL(12,2)"`
 	ContractReturned string    `xorm:"not null default 0.00 comment('回款金额') DECIMAL(12,2)"`
 	ContractsPaid    string    `xorm:"not null default 0.00 comment('合同已支付金额') DECIMAL(12,2)"`
-	ContractStatus   int       `xorm:"not null default 0 comment('合同状态') TINYINT(1)"`
+	ContractStatus   int       `xorm:"not null default 0 comment('合同状态(0履行中1待关闭2正常关闭)') TINYINT(1)"`
 	CreateTime       time.Time `xorm:"comment('创建时间') DATETIME"`
 }

+ 5 - 0
web/viewmodels/folder_contract.go

@@ -24,6 +24,11 @@ type FolderContract struct {
 	ContractsPaid           string `form:"contractsPaid" json:"contractsPaid"`
 	ContractsPayProgress    string `form:"contractsPayProgress" json:"contractsPayProgress"`
 
+	// 安全巡检字段-后期做接口后移动-TODO
+	SafeTotal           int `form:"safeTotal" json:"safeTotal"`
+	SafeRectification   int `form:"safeRectification" json:"safeRectification"`
+	SafeRectificationIn int `form:"safeRectificationIn" json:"safeRectificationIn"`
+
 	Csrf string `form:"csrf" json:"csrf"`
 	// Leaf        bool    `json:"leaf" `
 	HasFolder   bool              `json:"hasFolder" `