调整写法
This commit is contained in:
@@ -225,9 +225,9 @@ namespace WMS.Web.Domain.Services
|
|||||||
/// <param name="isTransaction"></param>
|
/// <param name="isTransaction"></param>
|
||||||
/// <param name="sourceBillNos"></param>
|
/// <param name="sourceBillNos"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<Result> BillQueryForMisDeliveryOutStock(bool isTransaction, List<string> sourceBillNos = null,DateTime? beginTime=null)
|
public async Task<Result> BillQueryForMisDeliveryOutStock(bool isTransaction, List<string> sourceBillNos = null, DateTime? beginTime = null)
|
||||||
{
|
{
|
||||||
var erp_result = await _erpService.BillQueryForMisDeliveryOutStock(sourceBillNos,beginTime);
|
var erp_result = await _erpService.BillQueryForMisDeliveryOutStock(sourceBillNos, beginTime);
|
||||||
if (!erp_result.IsSuccess)
|
if (!erp_result.IsSuccess)
|
||||||
return Result.ReFailure(erp_result.Message, erp_result.Status);
|
return Result.ReFailure(erp_result.Message, erp_result.Status);
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
//更新时间范围内所有
|
//更新时间范围内所有
|
||||||
result = await BillQueryForDeliveryNoticeOutStock(false, null);
|
result = await BillQueryForDeliveryNoticeOutStock(false, null);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
result = await BillQueryForTransferDirectOutStock(false, null);
|
result = await BillQueryForTransferDirectOutStock(false, null);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
result = await BillQueryForTransferOutOutStock(false, null);
|
result = await BillQueryForTransferOutOutStock(false, null);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
@@ -261,13 +261,9 @@ namespace WMS.Web.Domain.Services
|
|||||||
result = await BillQueryForMisDeliveryOutStock(false, null);
|
result = await BillQueryForMisDeliveryOutStock(false, null);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
|
|
||||||
//同步成功后 更新定时开始时间
|
//更新时间管理
|
||||||
if (!isRollback)
|
isSuccess = await _erpOpsSyncDateRepositories.Edit(ErpOpsSyncType.Ops, false);
|
||||||
{
|
if (!isSuccess) isRollback = true;
|
||||||
//更新时间管理
|
|
||||||
isSuccess = await _erpOpsSyncDateRepositories.Edit(ErpOpsSyncType.Ops, false);
|
|
||||||
if (!isSuccess) isRollback = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//4.提交事务
|
//4.提交事务
|
||||||
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||||
@@ -300,7 +296,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
|
|
||||||
if (DeliveryNotice_Nos.Count() > 0)
|
if (DeliveryNotice_Nos.Count() > 0)
|
||||||
{
|
{
|
||||||
result= await BillQueryForDeliveryNoticeOutStock(false, DeliveryNotice_Nos);
|
result = await BillQueryForDeliveryNoticeOutStock(false, DeliveryNotice_Nos);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
}
|
}
|
||||||
if (TransferDirect_Nos.Count() > 0)
|
if (TransferDirect_Nos.Count() > 0)
|
||||||
@@ -325,7 +321,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
//4.提交事务
|
//4.提交事务
|
||||||
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||||
if (!isSuccess)
|
if (!isSuccess)
|
||||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
return Result.ReSuccess();
|
return Result.ReSuccess();
|
||||||
|
|||||||
Reference in New Issue
Block a user