Browse Source

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

csx 3 years ago
parent
commit
c6fba29597
1 changed files with 15 additions and 6 deletions
  1. 15 6
      controllers/zh/zh_his_api_controller.go

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

1429
 		detailStr := string(setlDetail)
1429
 		detailStr := string(setlDetail)
1430
 		order.SetlDetail = detailStr
1430
 		order.SetlDetail = detailStr
1431
 		//err := service.UpdataOrderStatusTwo(chrg_bchno, c.GetAdminUserInfo().CurrentOrgId)
1431
 		//err := service.UpdataOrderStatusTwo(chrg_bchno, c.GetAdminUserInfo().CurrentOrgId)
1432
-		err := service.UpDateOrder(order)
1433
-		if err == nil {
1432
+		if record.OutHospitalStatus == 1 && order.ID > 0 {
1433
+			err := service.UpDateOrder(order)
1434
+			if err == nil {
1435
+				c.ServeSuccessJSON(map[string]interface{}{
1436
+					"msg":       "预结算成功",
1437
+					"order_way": 1,
1438
+				})
1439
+			} else {
1440
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAmountAccountException)
1441
+				return
1442
+			}
1443
+		} else if record.OutHospitalStatus == 0 && order.ID == 0 {
1434
 			c.ServeSuccessJSON(map[string]interface{}{
1444
 			c.ServeSuccessJSON(map[string]interface{}{
1435
-				"msg": "预结算成功",
1445
+				"msg":       "预结算成功",
1446
+				"order":     order,
1447
+				"order_way": 2,
1436
 			})
1448
 			})
1437
-		} else {
1438
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAmountAccountException)
1439
-			return
1440
 		}
1449
 		}
1441
 	}
1450
 	}
1442
 
1451