Parcourir la source

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

csx il y a 3 ans
Parent
révision
b07d3078ef
1 fichiers modifiés avec 17 ajouts et 1 suppressions
  1. 17 1
      controllers/zh/zh_his_api_controller.go

+ 17 - 1
controllers/zh/zh_his_api_controller.go Voir le fichier

@@ -1301,7 +1301,23 @@ func (c *ZHHisApiController) GetPreSettleInfo() {
1301 1301
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
1302 1302
 	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
1303 1303
 	order, _ := service.GetHisOrderByID(order_id)
1304
-	allTotal := fmt.Sprintf("%.4f", order.MedfeeSumamt)
1304
+
1305
+	var allTotal string
1306
+	if record.OutHospitalStatus == 0 && order.ID == 0 {
1307
+
1308
+		orders, _ := service.GetHisOrderInfoByNumberFour(record.Number)
1309
+		var total float64
1310
+		for _, item := range orders {
1311
+			total = total + item.DetItemFeeSumamt
1312
+		}
1313
+		allTotal = fmt.Sprintf("%.4f", total)
1314
+
1315
+	} else {
1316
+
1317
+		allTotal = fmt.Sprintf("%.4f", order.MedfeeSumamt)
1318
+
1319
+	}
1320
+
1305 1321
 	var rf []*ResultFive
1306 1322
 	json.Unmarshal([]byte(record.Iinfo), &rf)
1307 1323
 	chrg_bchno := order.Number