Browse Source

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

csx 3 years ago
parent
commit
a6fe6b7a1c
2 changed files with 7 additions and 6 deletions
  1. 1 6
      controllers/zh/zh_his_api_controller.go
  2. 6 0
      service/his_service.go

+ 1 - 6
controllers/zh/zh_his_api_controller.go View File

@@ -1053,17 +1053,12 @@ func (this *ZHHisApiController) GetZHOutHospitalCheck() {
1053 1053
 		record.OutWay = 1
1054 1054
 		service.CreateHospitalRecord(&record)
1055 1055
 
1056
-		orders, _ := service.GetHisOrderInfoByNumberThree(record.Number)
1057
-
1058
-		//orders, _ := service.GetHisOrderInfoByNumberThree(record.Number)
1059
-
1056
+		orders, _ := service.GetHisOrderInfoByNumberFour(record.Number)
1060 1057
 		var total float64
1061 1058
 		for _, item := range orders {
1062 1059
 			total = total + item.DetItemFeeSumamt
1063 1060
 		}
1064 1061
 
1065
-		//allTotal := fmt.Sprintf("%.4f", total)
1066
-
1067 1062
 		order := &models.HisOrder{
1068 1063
 			UserOrgId:           adminInfo.CurrentOrgId,
1069 1064
 			HisPatientId:        record.ID,

+ 6 - 0
service/his_service.go View File

@@ -1363,3 +1363,9 @@ func GetAllHisOrderErr(org_id int64, stage int64) (his []*models.HisOrderError,
1363 1363
 	err = readDb.Model(&models.HisOrderError{}).Where("user_org_id = ? AND status = 1 AND stage = ?", org_id, stage).Find(&his).Error
1364 1364
 	return
1365 1365
 }
1366
+
1367
+func GetHisOrderInfoByNumberFour(order_number string) (order []*models.HisOrderInfo, err error) {
1368
+	db := readDb.Model(&models.HisOrderInfo{})
1369
+	err = db.Where("order_number = ? AND status = 1", order_number).Find(&order).Error
1370
+	return
1371
+}