金蝶获取采购入库单
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
using ERP;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ServiceModel;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
|
||||
namespace WMS.Web.Api.Controllers
|
||||
@@ -17,9 +21,13 @@ namespace WMS.Web.Api.Controllers
|
||||
public class TestController : ControllerBase
|
||||
{
|
||||
private readonly IErpService _erpService;
|
||||
public TestController(IErpService erpService)
|
||||
private IInStockTaskService _inStockTaskService;
|
||||
private ITransactionRepositories _transactionRepositories;
|
||||
public TestController(IErpService erpService, IInStockTaskService inStockTaskService, ITransactionRepositories transactionRepositories)
|
||||
{
|
||||
this._erpService = erpService;
|
||||
this._inStockTaskService = inStockTaskService;
|
||||
this._transactionRepositories = transactionRepositories;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -32,5 +40,30 @@ namespace WMS.Web.Api.Controllers
|
||||
return "";
|
||||
return JsonConvert.SerializeObject(result.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试:同步采购单的入库
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("InStock")]
|
||||
public async Task<Result> InStock()
|
||||
{
|
||||
//1.事务
|
||||
IDbContextTransaction _transaction = _transactionRepositories.GetTransaction();
|
||||
bool isRollback = false;
|
||||
bool isTransaction = false;
|
||||
|
||||
//3.同步数据
|
||||
var result = await _inStockTaskService.SsynPurchaseInStock(isTransaction);
|
||||
if (!result.IsSuccess) isRollback = true;
|
||||
|
||||
//4.提交事务
|
||||
var isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(result.Message,result.Status);
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,5 +282,11 @@
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.TestController.InStock">
|
||||
<summary>
|
||||
测试:同步采购单的入库
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -300,11 +300,6 @@
|
||||
目标箱子
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.ChangeBoxRecord.ChangeBoxRecordQueryRequest.StockId">
|
||||
<summary>
|
||||
仓库
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.ChangeBoxRecord.ChangeBoxRecordQueryRequest.SrcSubStockId">
|
||||
<summary>
|
||||
原仓位ID
|
||||
@@ -350,11 +345,6 @@
|
||||
物料规格型号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.ChangeBoxRecord.ChangeBoxRecordQueryInfoResponse.Stock">
|
||||
<summary>
|
||||
仓库
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.ChangeBoxRecord.ChangeBoxRecordQueryInfoResponse.SerialNumbers">
|
||||
<summary>
|
||||
序列号
|
||||
|
||||
Reference in New Issue
Block a user