Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
7d84a34554

+ 3 - 0
controllers/mobile_api_controllers/mobile_api_router_register.go View File

@@ -145,4 +145,7 @@ func MobileAPIControllersRegisterRouters() {
145 145
 	//beego.Router("/m/api/getPatientDialysisRecord", &DialysisAPIController{}, "Get:GetPatientDialysisRecordList")
146 146
 	//批量删除医嘱
147 147
 	//beego.Router("/m/api/batchDeleteAdvice", &DialysisAPIController{}, "Get:BathDeleteAdviceList:")
148
+
149
+	//加减耗材数量
150
+	beego.Router("/m/api/updateautoreducedetail", &DialysisAPIController{}, "Get:UpdateAutoReduceDetail")
148 151
 }

+ 6 - 0
service/mobile_dialysis_service.go View File

@@ -1996,3 +1996,9 @@ func BatchDeleteAdvice(ids []int64) (err error) {
1996 1996
 	return
1997 1997
 
1998 1998
 }
1999
+
2000
+func UpdateAutoReduceDetail(good_id int64, count int64) (models.XtAutomaticReduceDetail, error) {
2001
+	detail := models.XtAutomaticReduceDetail{}
2002
+	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1", good_id).Updates(map[string]interface{}{"count": count}).Error
2003
+	return detail, err
2004
+}