|
|
@ -165,6 +165,9 @@ where patient.id = patient_register.patient_id and |
|
|
char chargeRequestFlag) |
|
|
char chargeRequestFlag) |
|
|
{ |
|
|
{ |
|
|
using (DbConnection conn = new NpgsqlConnection(AppConnctionStr)) |
|
|
using (DbConnection conn = new NpgsqlConnection(AppConnctionStr)) |
|
|
|
|
|
{ |
|
|
|
|
|
var trans = conn.BeginTransaction(); |
|
|
|
|
|
try |
|
|
{ |
|
|
{ |
|
|
//加ConcurrencyStamp,以防止并发
|
|
|
//加ConcurrencyStamp,以防止并发
|
|
|
string sql; |
|
|
string sql; |
|
|
@ -176,7 +179,7 @@ where patient.id = patient_register.patient_id and |
|
|
{ |
|
|
{ |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestForPlugIns.ConcurrencyStamp |
|
|
chargeRequestForPlugIns.ConcurrencyStamp |
|
|
}); |
|
|
|
|
|
|
|
|
}, trans); |
|
|
|
|
|
|
|
|
foreach (var chargeRequestAsbitem in chargeRequestForPlugIns.Asbitems) |
|
|
foreach (var chargeRequestAsbitem in chargeRequestForPlugIns.Asbitems) |
|
|
{ |
|
|
{ |
|
|
@ -190,7 +193,7 @@ where patient.id = patient_register.patient_id and |
|
|
{ |
|
|
{ |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestAsbitem.ConcurrencyStamp |
|
|
chargeRequestAsbitem.ConcurrencyStamp |
|
|
}); |
|
|
|
|
|
|
|
|
}, trans); |
|
|
} |
|
|
} |
|
|
else if (chargeRequestFlag == ChargeRequestFlag.AlreadyRefund) |
|
|
else if (chargeRequestFlag == ChargeRequestFlag.AlreadyRefund) |
|
|
{ |
|
|
{ |
|
|
@ -202,11 +205,18 @@ where patient.id = patient_register.patient_id and |
|
|
{ |
|
|
{ |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestForPlugIns.ChargeRequestId, |
|
|
chargeRequestAsbitem.ConcurrencyStamp |
|
|
chargeRequestAsbitem.ConcurrencyStamp |
|
|
}); |
|
|
|
|
|
|
|
|
}, trans); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trans.Commit(); |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
trans.Rollback(); |
|
|
|
|
|
throw ex; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|