|
@@ -179,6 +179,7 @@ func (this *OilContractReviewController) AddEntity() {
|
|
|
fmt.Print(i)
|
|
fmt.Print(i)
|
|
|
var temp contractEvaluationItems.OilContractEvaluationItems
|
|
var temp contractEvaluationItems.OilContractEvaluationItems
|
|
|
temp.ContentReviewId = reviewMode.Id
|
|
temp.ContentReviewId = reviewMode.Id
|
|
|
|
|
+ temp.Type = v.Type
|
|
|
temp.Category = 0
|
|
temp.Category = 0
|
|
|
temp.ItemId = v.Id
|
|
temp.ItemId = v.Id
|
|
|
temp.ParentId = v.ParentId
|
|
temp.ParentId = v.ParentId
|
|
@@ -210,6 +211,60 @@ func (this *OilContractReviewController) AddEntity() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// @Title 添加
|
|
|
|
|
+// @Description 二级科室保存评价
|
|
|
|
|
+// @Param body body contractReview.OilContractReviewWorkFlow
|
|
|
|
|
+// @Success 200 {object} controllers.Request
|
|
|
|
|
+// @router /save-sec-evaluation [post]
|
|
|
|
|
+func (this *OilContractReviewController) SaveEvaluationItemsBySec(){
|
|
|
|
|
+ id := this.Ctx.Input.Param(":id")
|
|
|
|
|
+ var errinfo ErrorInfo
|
|
|
|
|
+ if id == "" {
|
|
|
|
|
+ errinfo.Message = "操作失败!请求信息不完整"
|
|
|
|
|
+ errinfo.Code = -2
|
|
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
|
|
+ this.ServeJSON()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ var modeVO contractReview.OilContractReviewVo
|
|
|
|
|
+ itemSvc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
|
|
|
|
|
+ var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
|
|
+ json.Unmarshal(jsonBlob, &modeVO)
|
|
|
|
|
+ where := "ContentReviewId=" + id
|
|
|
|
|
+ // 清除掉之前的
|
|
|
|
|
+ itemSvc.DeleteEntityBytbl(OilContractReviewName,where)
|
|
|
|
|
+ var items []contractEvaluationItems.OilContractEvaluationItems
|
|
|
|
|
+ // 新增配置项
|
|
|
|
|
+ for i,v := range modeVO.Items{
|
|
|
|
|
+ fmt.Print(i)
|
|
|
|
|
+ var temp contractEvaluationItems.OilContractEvaluationItems
|
|
|
|
|
+ temp.ContentReviewId,_ = strconv.Atoi(id)
|
|
|
|
|
+ temp.Type = v.Type
|
|
|
|
|
+ temp.Category = 1
|
|
|
|
|
+ temp.ParentId = v.ParentId
|
|
|
|
|
+ temp.SequenceNo = v.SequenceNo
|
|
|
|
|
+ temp.Content = v.Content
|
|
|
|
|
+ temp.NormalScore = v.NormalScore
|
|
|
|
|
+ temp.Score = v.Score
|
|
|
|
|
+ temp.LevelCode = v.LevelCode
|
|
|
|
|
+ temp.Remark = v.Remark
|
|
|
|
|
+ temp.Content = v.Content
|
|
|
|
|
+ items = append(items, temp)
|
|
|
|
|
+ }
|
|
|
|
|
+ _ , err := itemSvc.DBE.Insert(items)
|
|
|
|
|
+ if err == nil {
|
|
|
|
|
+ errinfo.Message = "修改成功!"
|
|
|
|
|
+ errinfo.Code = 0
|
|
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
|
|
+ this.ServeJSON()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
|
|
|
|
|
+ errinfo.Code = -1
|
|
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
|
|
+ this.ServeJSON()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// @Title 修改实体
|
|
// @Title 修改实体
|
|
|
// @Description 修改实体
|
|
// @Description 修改实体
|
|
|
// @Param body body contractReview.OilContractReviewWorkFlow
|
|
// @Param body body contractReview.OilContractReviewWorkFlow
|
|
@@ -293,6 +348,7 @@ func (this *OilContractReviewController) UpdateEntity() {
|
|
|
fmt.Print(i)
|
|
fmt.Print(i)
|
|
|
var temp contractEvaluationItems.OilContractEvaluationItems
|
|
var temp contractEvaluationItems.OilContractEvaluationItems
|
|
|
temp.ContentReviewId = reviewMode.Id
|
|
temp.ContentReviewId = reviewMode.Id
|
|
|
|
|
+ temp.Type = v.Type
|
|
|
temp.Category = 0
|
|
temp.Category = 0
|
|
|
temp.ParentId = v.ParentId
|
|
temp.ParentId = v.ParentId
|
|
|
temp.SequenceNo = v.SequenceNo
|
|
temp.SequenceNo = v.SequenceNo
|