|
@@ -17,12 +17,6 @@ namespace JLHHJSvr.Excutor
|
|
|
protected override void ExcuteInternal(UnLockTableRequest request, object state, UnLockTableResponse rslt)
|
|
|
{
|
|
|
var tokendata = BllHelper.GetToken(request.token);
|
|
|
- if (tokendata == null)
|
|
|
- {
|
|
|
- rslt.ErrMsg = "会话已经中断,请重新登录";
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
using (var con = GlobalVar.ConnectionString.NewSqlConnection())
|
|
|
using (var cmd = con.CreateCommand())
|
|
|
{
|
|
@@ -32,16 +26,12 @@ namespace JLHHJSvr.Excutor
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- foreach (var bill in request.lockList)
|
|
|
- {
|
|
|
- LockHelper.UnLockBill(cmd, bill.keyword, bill.billid, tokendata.username,tokendata.empid == 0 ? (byte)1 : (byte)0);
|
|
|
- }
|
|
|
-
|
|
|
+ LockHelper.UnLockBill(cmd, request.keyword, request.billid, tokendata.username,tokendata.empid == 0 ? (byte)1 : (byte)0);
|
|
|
cmd.Transaction.Commit();
|
|
|
}
|
|
|
catch (Exception e)
|
|
|
{
|
|
|
- cmd.Transaction.Rollback();
|
|
|
+ cmd.Transaction?.Rollback();
|
|
|
rslt.ErrMsg = e.Message;
|
|
|
}
|
|
|
}
|