Commit 106db930 by zxw

Merge branch 'master' into 杭州自建平台

parents d9da102c 16d51677
......@@ -1555,7 +1555,9 @@ namespace JunmpPoliceStation.Controllers
{
_unitOfWork.EquipmentStateRepository.Insert(InsertState, false);
}
if (_unitOfWork.SaveChanges() > 0)
var res = _unitOfWork.SaveChanges() > 0;
if (res)
{
//上报数据
var httpResult = _httpHelper.GetHtml(new HttpItem()
......@@ -1606,14 +1608,9 @@ namespace JunmpPoliceStation.Controllers
scope.Rollback();
return JsonManager.SimpleCustResponse(obj.msg);
}
scope.Commit();
return JsonManager.ReturnSuccessResponse(InvStates);
}
else
{
scope.Rollback();
return JsonManager.SimpleStatusResponse(ResultCode.REQUEST_DATA_ERROR);
}
scope.Commit();
return JsonManager.ReturnSuccessResponse(InvStates);
}
catch (Exception e)
{
......@@ -2622,7 +2619,8 @@ namespace JunmpPoliceStation.Controllers
{
_unitOfWork.EquipmentStateRepository.Insert(InsertState, false);
}
if (_unitOfWork.SaveChanges() > 0)
var res = _unitOfWork.SaveChanges() > 0;
if (res)
{
//上报数据
var httpResult = _httpHelper.GetHtml(new HttpItem()
......@@ -2673,14 +2671,9 @@ namespace JunmpPoliceStation.Controllers
scope.Rollback();
return JsonManager.SimpleCustResponse(obj.msg);
}
scope.Commit();
return JsonManager.ReturnSuccessResponse(InvStates);
}
else
{
scope.Rollback();
return JsonManager.SimpleStatusResponse(ResultCode.REQUEST_DATA_ERROR);
}
scope.Commit();
return JsonManager.ReturnSuccessResponse(InvStates);
}
catch (Exception e)
{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论