|
@@ -1994,14 +1994,14 @@ func BatchDeleteAdvice(ids []int64) (err error) {
|
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
|
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
|
2000
|
return detail, err
|
2001
|
2001
|
}
|
2002
|
2002
|
|
2003
|
2003
|
func DeleteAutoReduceDetail(good_id int64, record_time int64, patient_id int64) error {
|
2004
|
|
- detail := models.DialysisBeforePrepare{}
|
|
2004
|
+ detail := models.AutomaticReduceDetail{}
|
2005
|
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
|
2006
|
return err
|
2007
|
2007
|
}
|