Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
3a95c6fba8
2 changed files with 3 additions and 3 deletions
  1. 1 1
      controllers/sg/his_api_controller.go
  2. 2 2
      service/his_service.go

+ 1 - 1
controllers/sg/his_api_controller.go View File

2080
 	sickConfig, _ := service.FindSickById(sick_type)
2080
 	sickConfig, _ := service.FindSickById(sick_type)
2081
 
2081
 
2082
 	if tempOrder.ID == 0 {
2082
 	if tempOrder.ID == 0 {
2083
-		tempOrder, _ = service.GetTodayHisOrder(adminUser.CurrentOrgId, id, recordDateTime)
2083
+		tempOrder, _ = service.GetTodayHisOrder(adminUser.CurrentOrgId, id, recordDateTime, his.Number)
2084
 	}
2084
 	}
2085
 
2085
 
2086
 	if tempOrder.ID == 0 {
2086
 	if tempOrder.ID == 0 {

+ 2 - 2
service/his_service.go View File

1320
 	return
1320
 	return
1321
 }
1321
 }
1322
 
1322
 
1323
-func GetTodayHisOrder(org_id int64, patient_id int64, record_time int64) (order models.HisOrder, err error) {
1324
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND patient_id = ? AND settle_accounts_date = ? AND order_status = 1", org_id, patient_id, record_time).First(&order).Error
1323
+func GetTodayHisOrder(org_id int64, patient_id int64, record_time int64, number string) (order models.HisOrder, err error) {
1324
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND patient_id = ? AND settle_accounts_date = ? AND order_status = 1 AND mdtrt_id = ?", org_id, patient_id, record_time, number).First(&order).Error
1325
 	return
1325
 	return
1326
 }
1326
 }