|
@@ -1429,14 +1429,23 @@ func (c *ZHHisApiController) GetPreSettleInfo() {
|
1429
|
1429
|
detailStr := string(setlDetail)
|
1430
|
1430
|
order.SetlDetail = detailStr
|
1431
|
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
|
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
|
|