Kaynağa Gözat

准备自动评价

yaojianjun 9 ay önce
ebeveyn
işleme
cd607e2332
2 değiştirilmiş dosya ile 23 ekleme ve 12 silme
  1. 22 11
      Tech/controllers/电调.go
  2. 1 1
      Tech/models/教员模型.go

+ 22 - 11
Tech/controllers/电调.go

@@ -177,19 +177,28 @@ func (c *EDispatchController) Eqpmtvalue() {
 	c.ServeJSON()
 }
 
-// /courserun/add_ctrl_log 添加电调控制日志
+// /操作日志req
+type Addctrllog_req struct {
+	CtrlType    int    `json:"CtrlType"`
+	CtrlSubType int    `json:"CtrlSubType"`
+	CtrlFrom    int    `json:"CtrlFrom"`
+	CtrlUser    string `json:"CtrlUser"`
+	Param1      string `json:"Param1"`
+	Param2      string `json:"Param2"`
+	Param3      string `json:"Param3"`
+	Param4      string `json:"Param4"`
+	Param5      string `json:"Param5"`
+}
+
+// /实现自动评价
+func (c *EDispatchController) Eqpmtlist(req Addctrllog_req) {
+
+}
+
 // /courserun/add_ctrl_log 添加电调控制日志
 func (c *EDispatchController) Addctrllog() {
-	var req struct {
-		CtrlType int    `json:"CtrlType"`
-		CtrlFrom int    `json:"CtrlFrom"`
-		CtrlUser string `json:"CtrlUser"`
-		Param1   string `json:"Param1"`
-		Param2   string `json:"Param2"`
-		Param3   string `json:"Param3"`
-		Param4   string `json:"Param4"`
-		Param5   string `json:"Param5"`
-	}
+
+	var req Addctrllog_req
 	requestBody := c.Ctx.Input.RequestBody
 	println("Request Body:", string(requestBody))
 	if err := json.Unmarshal(c.Ctx.Input.RequestBody, &req); err != nil {
@@ -202,6 +211,8 @@ func (c *EDispatchController) Addctrllog() {
 		return
 	}
 
+	c.Eqpmtlist(req)
+
 	// 获取数据库连接
 	o := orm.NewOrm()
 

+ 1 - 1
Tech/models/教员模型.go

@@ -154,7 +154,7 @@ type TemplateOperation struct {
 	Param5Type      int    `orm:"column(参数5类型)" json:"param5Type"`
 	Param5Desc      string `orm:"column(参数5说明);type(text)" json:"param5Desc"`
 
-	// 0客观 1主观
+	// 0主观评价1客观评价
 	SubjectiveEvaluation int `orm:"column(主观评价标记)" json:"subjectiveEvaluation"`
 }