接口调整
This commit is contained in:
@@ -64,16 +64,16 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> Receive(UpdateInStockTaskRequest dto, LoginInDto loginInfo)
|
||||
{
|
||||
//IDbContextTransaction _transaction = _basicsRepositories.GetTransaction();
|
||||
//bool isRollback = false;
|
||||
//bool isTransaction = false;
|
||||
var result = await this.Update(dto, loginInfo.UserInfo.StaffId,true, false);
|
||||
//if (!result.IsSuccess) isRollback = true;
|
||||
IDbContextTransaction _transaction = _basicsRepositories.GetTransaction();
|
||||
bool isRollback = false;
|
||||
bool isTransaction = false;
|
||||
var result = await this.Update(dto, loginInfo.UserInfo.StaffId,true, isTransaction);
|
||||
if (!result.IsSuccess) isRollback = true;
|
||||
|
||||
////提交事务
|
||||
//var isSuccess = _basicsRepositories.CommitTransaction(isRollback, _transaction);
|
||||
//if (!isSuccess)
|
||||
// return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
//提交事务
|
||||
var isSuccess = _basicsRepositories.CommitTransaction(isRollback, _transaction);
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
@@ -188,7 +188,7 @@ namespace WMS.Web.Domain.Services
|
||||
entity.Receive(staffId);
|
||||
else
|
||||
entity.Shelf(staffId);
|
||||
var result = _inStockTaskRepositories.Update(entity, isTransaction);
|
||||
var result =await _inStockTaskRepositories.Update(entity, isTransaction);
|
||||
if (result != null)
|
||||
return Result.ReSuccess();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user