Browse Source

11月8日库存管理

XMLWAN 2 years ago
parent
commit
daf5ddd365
1 changed files with 2 additions and 2 deletions
  1. 2 2
      service/stock_service.go

+ 2 - 2
service/stock_service.go View File

5236
 func GetHisAdviceListByDrugIdEight(drugid int64, patient_id int64, advice_date int64, advice_id int64) (models.HisDoctorAdviceInfo, error) {
5236
 func GetHisAdviceListByDrugIdEight(drugid int64, patient_id int64, advice_date int64, advice_id int64) (models.HisDoctorAdviceInfo, error) {
5237
 
5237
 
5238
 	info := models.HisDoctorAdviceInfo{}
5238
 	info := models.HisDoctorAdviceInfo{}
5239
-	err := XTReadDB().Model(&info).Where("drug_id = ? and patient_id = ? and advice_date = ? and status = 1 and id =?", drugid, patient_id, advice_date, advice_id).Find(&info).Error
5239
+	err := XTReadDB().Model(&info).Where("drug_id = ? and patient_id = ? and advice_date = ? and status = 1 and id =?", drugid, patient_id, advice_date, advice_id).First(&info).Error
5240
 	return info, err
5240
 	return info, err
5241
 }
5241
 }
5242
 
5242
 
6970
 func GetDrugOpenConfigOne(orgid int64) (models.DrugOutConfig, error) {
6970
 func GetDrugOpenConfigOne(orgid int64) (models.DrugOutConfig, error) {
6971
 
6971
 
6972
 	config := models.DrugOutConfig{}
6972
 	config := models.DrugOutConfig{}
6973
-	err := XTReadDB().Where("user_org_id = ? and status = 1", orgid).Find(&config).Error
6973
+	err := XTReadDB().Where("user_org_id = ? and status = 1", orgid).First(&config).Error
6974
 
6974
 
6975
 	return config, err
6975
 	return config, err
6976
 }
6976
 }