瀏覽代碼

耗材参数

XMLWAN 4 年之前
父節點
當前提交
46361e8e10
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      service/mobile_dialysis_service.go

+ 3 - 3
service/mobile_dialysis_service.go 查看文件

1994
 
1994
 
1995
 }
1995
 }
1996
 
1996
 
1997
-func UpdateAutoReduceDetail(good_id int64, count int64, record_time int64, patient_id int64) (models.DialysisBeforePrepare, error) {
1998
-	detail := models.DialysisBeforePrepare{}
1997
+func UpdateAutoReduceDetail(good_id int64, count int64, record_time int64, patient_id int64) (models.AutomaticReduceDetail, error) {
1998
+	detail := models.AutomaticReduceDetail{}
1999
 	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id = ?", good_id, record_time, patient_id).Updates(map[string]interface{}{"count": count}).Error
1999
 	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id = ?", good_id, record_time, patient_id).Updates(map[string]interface{}{"count": count}).Error
2000
 	return detail, err
2000
 	return detail, err
2001
 }
2001
 }
2002
 
2002
 
2003
 func DeleteAutoReduceDetail(good_id int64, record_time int64, patient_id int64) error {
2003
 func DeleteAutoReduceDetail(good_id int64, record_time int64, patient_id int64) error {
2004
-	detail := models.DialysisBeforePrepare{}
2004
+	detail := models.AutomaticReduceDetail{}
2005
 	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id = ?", good_id, record_time, patient_id).Updates(map[string]interface{}{"status": 0}).Error
2005
 	err := XTWriteDB().Model(&detail).Where("good_id = ? and status = 1 and record_date = ? and patient_id = ?", good_id, record_time, patient_id).Updates(map[string]interface{}{"status": 0}).Error
2006
 	return err
2006
 	return err
2007
 }
2007
 }