Browse Source

'合同评价异常'

Yikoo 5 years ago
parent
commit
d383583ef3

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilcontract/contractEvaluationItems.go

@@ -120,7 +120,7 @@ func (this *OilContractEvaluationItemsController) GetTreeList() {
 	where := " ParentId = 0 "
 	Id      := this.GetString("ContentReviewId")     // 评价主表ID
 	Category:= this.GetString("Category","0")   // 类型  0 二级部门创建  1 专业处创建
-	Type    := this.GetString("Type","0")       //  项类型 1分值 2布尔
+	Type    := this.GetString("Type","1")       //  项类型 1分值 2布尔
 	if Id != "" {
 		where = where + " and ContentReviewId = '" + Id + "'"
 	}

+ 4 - 6
src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go

@@ -509,8 +509,8 @@ func (this *OilContractReviewController) UpdateEntity() {
 		var temp1 evaluationItems.OilEvaluationItems
 		svc.GetEntityById(v.ItemId, &temp1)
 		temp.ContentReviewId ,_ = strconv.Atoi(id)
-		temp.Type     = temp1.Category
-		temp.ItemId   = v.ItemId
+		temp.Type     = v.Category   //v.Type
+		temp.ItemId   = v.Id
 		temp.Category = 0
 		temp.ParentId = v.ParentId
 		temp.SequenceNo = v.SequenceNo
@@ -536,10 +536,8 @@ func (this *OilContractReviewController) UpdateEntity() {
 		fmt.Print(i)
 		var temp2 contractEvaluationItems.OilContractEvaluationItems
 		temp2.ContentReviewId ,_ = strconv.Atoi(id)
-		var temp1 evaluationItems.OilEvaluationItems
-		svc.GetEntityById(v.ItemId, &temp1)
-		temp2.Type     = temp1.Category
-		temp2.ItemId   = v.ItemId
+		temp2.Type     = v.Category //v.Type
+		temp2.ItemId   = v.Id
 		temp2.Category = 1
 		temp2.ParentId = v.ParentId
 		temp2.SequenceNo = v.SequenceNo