Bladeren bron

'合同年度评价调整'

Yikoo 5 jaren geleden
bovenliggende
commit
b926d4c9af

+ 2 - 0
src/dashoo.cn/backend/api/business/oilcontract/contractSumScore/contractSumScore.go

@@ -8,6 +8,7 @@ type OilContractSumScore struct {
 	Id               int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
 	SupplierId       int       `json:"SupplierId" xorm:"default 0 comment('供应商ID') INT(11) 'SupplierId'"`
 	SupplierName     string    `json:"SupplierName" xorm:"comment('企业名称') VARCHAR(255) 'SupplierName'"`
+	ContractClass    string    `json:"ContractClass" xorm:"comment('合同类别') VARCHAR(255) 'ContractClass'"`
 	ContractId       int       `json:"ContractId" xorm:"not null default 0 comment('合同表ID') INT(11) 'ContractId'"`
 	Category         int       `json:"Category" xorm:"not null default 0 comment('0二级单位创建1专业处创建') INT(11) 'Category'"`
 	SumScore         float64   `json:"SumScore" xorm:"default 0.00 comment('实际分值') DECIMAL(11,2) 'SumScore'"`
@@ -51,6 +52,7 @@ type OilContractSumScore struct {
 type OilContractComputeSumScoreVo struct {
 	SupplierId    int       `json:"SupplierId"`
 	SupplierName  string    `json:"SupplierName"`
+	ContractClass string    `json:"ContractClass"`
 	Score         string    `json:"Score"`
 	Score1    	  string    `json:"Score1"`
 	Score2  	  string    `json:"Score2"`

+ 1 - 1
src/dashoo.cn/backend/api/business/oilcontract/contractSumScore/contractSumScoreService.go

@@ -30,7 +30,7 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl(page
 	sqlCount += ` ) t `
 
 	var sql string
-	sql =  `select contract.SupplierId,contract.SupplierName,count(review.id) as count,ROUND(sum(items.Score)/count(review.id),2) as Score, `
+	sql =  `select contract.ContractClass,contract.SupplierId,contract.SupplierName,count(review.id) as count,ROUND(sum(items.Score)/count(review.id),2) as Score, `
 	sql += ` ROUND(sum(case when items.SequenceNo in  ('1') then items.Score else 0 end)/count(review.id),2) Score1,  `
 	sql += ` ROUND(sum(case when items.SequenceNo in  ('2') then items.Score else 0 end)/count(review.id),2) Score2,  `
 	sql += ` ROUND(sum(case when items.SequenceNo in  ('3') then items.Score else 0 end)/count(review.id),2) Score3,  `

+ 8 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

@@ -43,6 +43,7 @@ func (this *OilContractSumScoreController) GetEntityList() {
 	}
 	Id := this.GetString("Id")
 	ContractId := this.GetString("ContractId")
+	ContractClass := this.GetString("ContractClass")
 	SumScore := this.GetString("SumScore")
 	NormalSumScore1 := this.GetString("NormalSumScore1")
 	SumScore1 := this.GetString("SumScore1")
@@ -77,6 +78,11 @@ func (this *OilContractSumScoreController) GetEntityList() {
 		where = where + " and ContractId like '%" + ContractId + "%'"
 	}
 
+
+	if ContractClass != "" {
+		where = where + " and ContractClass like '%" + ContractClass + "%'"
+	}
+
 	if SumScore != "" {
 		where = where + " and SumScore like '%" + SumScore + "%'"
 	}
@@ -348,6 +354,8 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 
 		"ContractId",
 
+		"ContractClass",
+
 		"SumScore",
 
 		"Content1",