|
@@ -255,7 +255,7 @@ func (this *OilContractReviewController) SaveEvaluationItemsBySec(){
|
|
|
json.Unmarshal(jsonBlob, &modeVO)
|
|
json.Unmarshal(jsonBlob, &modeVO)
|
|
|
where := "ContentReviewId=" + id + " AND Category = 1 "
|
|
where := "ContentReviewId=" + id + " AND Category = 1 "
|
|
|
// 清除掉之前的
|
|
// 清除掉之前的
|
|
|
- itemSvc.DeleteEntityBytbl(OilContractReviewName,where)
|
|
|
|
|
|
|
+ itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName,where)
|
|
|
var items []contractEvaluationItems.OilContractEvaluationItems
|
|
var items []contractEvaluationItems.OilContractEvaluationItems
|
|
|
// 新增配置项
|
|
// 新增配置项
|
|
|
for i,v := range modeVO.Items{
|
|
for i,v := range modeVO.Items{
|
|
@@ -264,6 +264,7 @@ func (this *OilContractReviewController) SaveEvaluationItemsBySec(){
|
|
|
temp.ContentReviewId,_ = strconv.Atoi(id)
|
|
temp.ContentReviewId,_ = strconv.Atoi(id)
|
|
|
temp.Type = v.Type
|
|
temp.Type = v.Type
|
|
|
temp.Category = 1
|
|
temp.Category = 1
|
|
|
|
|
+ temp.ItemId = v.ItemId
|
|
|
temp.ParentId = v.ParentId
|
|
temp.ParentId = v.ParentId
|
|
|
temp.SequenceNo = v.SequenceNo
|
|
temp.SequenceNo = v.SequenceNo
|
|
|
temp.Content = v.Content
|
|
temp.Content = v.Content
|
|
@@ -386,10 +387,38 @@ func (this *OilContractReviewController) UpdateEntity() {
|
|
|
temp.Content = v.Content
|
|
temp.Content = v.Content
|
|
|
items = append(items, temp)
|
|
items = append(items, temp)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
_, err2 := itemSvc.DBE.Insert(items)
|
|
_, err2 := itemSvc.DBE.Insert(items)
|
|
|
|
|
|
|
|
|
|
+ where2 := "ContentReviewId=" + id + " AND Category = 1 "
|
|
|
|
|
+ // 清除掉之前的
|
|
|
|
|
+ itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName,where2)
|
|
|
|
|
|
|
|
- if err == nil && err2 == nil {
|
|
|
|
|
|
|
+ var items2 []contractEvaluationItems.OilContractEvaluationItems
|
|
|
|
|
+ // 新增配置项
|
|
|
|
|
+ for i,v := range modeVO.Items{
|
|
|
|
|
+ fmt.Print(i)
|
|
|
|
|
+ var temp2 contractEvaluationItems.OilContractEvaluationItems
|
|
|
|
|
+ temp2.ContentReviewId ,_ = strconv.Atoi(id)
|
|
|
|
|
+ temp2.Type = v.Type
|
|
|
|
|
+ temp2.ItemId = v.ItemId
|
|
|
|
|
+ temp2.Category = 1
|
|
|
|
|
+ temp2.ParentId = v.ParentId
|
|
|
|
|
+ temp2.SequenceNo = v.SequenceNo
|
|
|
|
|
+ temp2.Content = v.Content
|
|
|
|
|
+ temp2.NormalScore = v.NormalScore
|
|
|
|
|
+ temp2.Score = v.Score
|
|
|
|
|
+ temp2.Value = v.Value
|
|
|
|
|
+ temp2.LevelCode = v.LevelCode
|
|
|
|
|
+ temp2.Remark = v.Remark
|
|
|
|
|
+ temp2.Content = v.Content
|
|
|
|
|
+ items2 = append(items2, temp2)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ _, err3 := itemSvc.DBE.Insert(items2)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if err == nil && err2 == nil && err3 == nil{
|
|
|
errinfo.Message = "修改成功!"
|
|
errinfo.Message = "修改成功!"
|
|
|
errinfo.Code = 0
|
|
errinfo.Code = 0
|
|
|
this.Data["json"] = &errinfo
|
|
this.Data["json"] = &errinfo
|