Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
e61ae2529e
3 changed files with 10 additions and 4 deletions
  1. 1 1
      conf/app.conf
  2. 6 1
      controllers/manager_center_api_controller.go
  3. 3 2
      models/drug.go

+ 1 - 1
conf/app.conf View File

@@ -1,5 +1,5 @@
1 1
 appname = 血透
2
-httpport = 9529
2
+httpport = 9531
3 3
 runmode = dev
4 4
 
5 5
 #

+ 6 - 1
controllers/manager_center_api_controller.go View File

@@ -143,6 +143,7 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
143 143
 	drug_day := c.GetString("drug_day")
144 144
 	hosp_appr_flag, _ := c.GetInt64("hosp_appr_flag")
145 145
 	lmt_used_flag, _ := c.GetInt64("lmt_used_flag")
146
+	prescribing_number_unit := c.GetString("prescribing_number_unit")
146 147
 	adminInfo := c.GetAdminUserInfo()
147 148
 	drugLib := &models.BaseDrugLib{
148 149
 		DrugName:                    drug_name,
@@ -205,6 +206,7 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
205 206
 		DoseUnit:                    dose_unit,
206 207
 		HospApprFlag:                hosp_appr_flag,
207 208
 		LmtUsedFlag:                 lmt_used_flag,
209
+		PrescribingNumberUnit:       prescribing_number_unit,
208 210
 	}
209 211
 
210 212
 	total := service.FindAllDrugLibRecordTotal(adminInfo.CurrentOrgId)
@@ -293,10 +295,12 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
293 295
 	drug_day := c.GetString("drug_day")
294 296
 	dose, _ := c.GetFloat("dose")
295 297
 	dose_unit := c.GetString("dose_unit")
296
-	fmt.Println("单位999999999999999999999999999999", dose_unit)
298
+
297 299
 	min_price, _ := c.GetFloat("min_price")
298 300
 	hosp_appr_flag, _ := c.GetInt64("hosp_appr_flag")
299 301
 	lmt_used_flag, _ := c.GetInt64("lmt_used_flag")
302
+	prescribing_number_unit := c.GetString("prescribing_number_unit")
303
+	fmt.Println("大内00000000000000000000000", prescribing_number_unit)
300 304
 	adminInfo := c.GetAdminUserInfo()
301 305
 	drug, _ := service.FindBaseDrugLibRecord(adminInfo.CurrentOrgId, id)
302 306
 	drugLib := &models.BaseDrugLib{
@@ -362,6 +366,7 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
362 366
 		Dose:                        dose,
363 367
 		MinPrice:                    min_price,
364 368
 		DoseUnit:                    dose_unit,
369
+		PrescribingNumberUnit:       prescribing_number_unit,
365 370
 	}
366 371
 
367 372
 	err := service.UpdateBaseDrugLib(drugLib)

+ 3 - 2
models/drug.go View File

@@ -65,8 +65,9 @@ type BaseDrugLib struct {
65 65
 	HospApprFlag                int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
66 66
 	LmtUsedFlag                 int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
67 67
 	//MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
68
-	DrugDay string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
69
-	Total   float64 `gorm:"column:total" json:"total" form:"total"`
68
+	DrugDay               string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
69
+	Total                 float64 `gorm:"column:total" json:"total" form:"total"`
70
+	PrescribingNumberUnit string  `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
70 71
 }
71 72
 
72 73
 func (BaseDrugLib) TableName() string {