Kaynağa Gözat

Merge branch '20201014_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20201014_xt_api_new_branch

csx 4 yıl önce
ebeveyn
işleme
2d543787c2
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      controllers/his_api_controller.go

+ 6 - 1
controllers/his_api_controller.go Dosyayı Görüntüle

@@ -251,6 +251,7 @@ func (c *HisApiController) CreateHisPrescription() {
251 251
 							p.RecordDate = recordDateTime
252 252
 							p.UserOrgId = adminInfo.CurrentOrgId
253 253
 							p.HisPatientId = his_patient_id
254
+							p.Status = 1
254 255
 							errcode := c.setProjectWithJSON(&p, project.(map[string]interface{}))
255 256
 							if errcode > 0 {
256 257
 								c.ServeFailJSONWithSGJErrorCode(errcode)
@@ -805,8 +806,12 @@ func (c *HisApiController) setProjectWithJSON(project *models.HisPrescriptionPro
805 806
 		project.Price = float_price
806 807
 	}
807 808
 
809
+	if json["total"] != nil && reflect.TypeOf(json["total"]).String() == "string" {
810
+		total, _ := json["total"].(string)
811
+		totals, _ := strconv.ParseInt(total, 10, 64)
812
+		project.Count = totals
813
+	}
808 814
 	return 0
809
-
810 815
 }
811 816
 
812 817
 type ResultFour struct {