tt
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, isTransaction);
|
||||
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, false);
|
||||
//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();
|
||||
}
|
||||
@@ -180,10 +180,10 @@ namespace WMS.Web.Domain.Services
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
entity = _mapper.Map(dto, entity);
|
||||
////子集单独映射
|
||||
//entity.Boxs = _mapper.ToMapList(dto.Boxs, entity.Boxs);
|
||||
////子集单独映射
|
||||
//entity.Details = _mapper.ToMapList(dto.Details, entity.Details);
|
||||
//子集单独映射
|
||||
entity.Boxs = _mapper.ToMapList(dto.Boxs, entity.Boxs);
|
||||
//子集单独映射
|
||||
entity.Details = _mapper.ToMapList(dto.Details, entity.Details);
|
||||
if (isReceive)
|
||||
entity.Receive(staffId);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user