Sfoglia il codice sorgente

配置一级列表根据type返回

baichengfei 5 anni fa
parent
commit
207c8f5872

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

@@ -20,6 +20,9 @@ type OilContractSumScore struct {
 	Content4    	 string    `json:"Content4" xorm:"default '0' comment('评价内容') VARCHAR(50) 'Content4'"`
 	NormalSumScore4  string    `json:"NormalSumScore4" xorm:"default 0.00 comment('标准分值') DECIMAL(11,2) 'NormalSumScore4'"`
 	SumScore4        string    `json:"SumScore4" xorm:"default 0.00 comment('实际分值') DECIMAL(11,2) 'SumScore4'"`
+	Content5    	 string    `json:"Content5" xorm:"default '0' comment('评价内容') VARCHAR(50) 'Content5'"`
+	NormalSumScore5  string    `json:"NormalSumScore5" xorm:"default 0.00 comment('标准分值') DECIMAL(11,2) 'NormalSumScore5'"`
+	SumScore5        string    `json:"SumScore5" xorm:"default 0.00 comment('实际分值') DECIMAL(11,2) 'SumScore5'"`
 	Note			 string    `json:"Note" xorm:"comment('备注') VARCHAR(255) 'Note'"`
 	ConclusionReason string    `json:"ConclusionReason" xorm:"comment('不合格原因') VARCHAR(255) 'ConclusionReason'"`
 	Conclusion       int       `json:"Conclusion" xorm:"default 0 comment('0不合格,1观察使用,2合格,3优秀') INT(11) 'Conclusion'"`

+ 5 - 3
src/dashoo.cn/backend/api/controllers/oilcontract/evaluationItems.go

@@ -161,14 +161,16 @@ func (this *OilEvaluationItemsController) GetDictList() {
 // @Title 获取一级列表
 // @Description get user by token
 // @Success 200 {object} []evaluationItems.OilEvaluationItems
-// @router /onelist [get]
+// @router /onelist/:type [get]
 func (this *OilEvaluationItemsController) GetOneEntityList() {
-
+	Type := this.Ctx.Input.Param(":type")
 	//获取分页信息
 	page := this.GetPageInfoForm()
 	orderby := "Id"
 	where := " ParentId = 0"
-
+	if Type != "0" {
+		where += " AND Type = " + Type
+	}
 	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
 	var list []evaluationItems.OilEvaluationItems
 	var result []evaluationItems.DailyItems