调整接口

This commit is contained in:
18942506660
2023-11-15 11:48:17 +08:00
parent 9840fb93fb
commit a1b1cdedbd
9 changed files with 85 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ using System.ServiceModel;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure;
using WMS.Web.Domain.IService;
using WMS.Web.Domain.IService.Public;
@@ -26,21 +27,59 @@ namespace WMS.Web.Api.Controllers
private IBasicsRepositories _transactionRepositories;
private readonly IOpsService _opsService;
private readonly IBoxService _boxService;
private readonly IOutStockTaskRepositories _outStockTaskRepositories;
public TestController(IErpService erpService, IInStockTaskService inStockTaskService,
IBasicsRepositories transactionRepositories, IOpsService opsService, IBoxService boxService)
IBasicsRepositories transactionRepositories, IOpsService opsService, IBoxService boxService,
IOutStockTaskRepositories outStockTaskRepositories)
{
this._erpService = erpService;
this._inStockTaskService = inStockTaskService;
this._transactionRepositories = transactionRepositories;
_opsService = opsService;
_boxService = boxService;
_outStockTaskRepositories = outStockTaskRepositories;
}
[HttpGet]
[Route("hj")]
public async Task<string> TestHJ()
{
await _boxService.Sync();
OutStockTask entity = new OutStockTask()
{
DeliveryOrgId = 1,
ReceiptCustomerId = 1
};
try
{
var d = new OutStockTaskDetails();
d.MaterialId = 1;
d.AccruedQty = 1;
d.Erp_DetailId = 1;
d.SaleBillNo = "sdf34343";
d.StockCode = "234";
d.SubStockId =234;
d.SourceBillNos = new List<string>() { "wwre", "32423" };
entity.Details.Add(d);
}
catch (Exception ex)
{
throw ex;
}
entity.Details.Add(new OutStockTaskDetails()
{
MaterialId = 1,
AccruedQty = 1,
Erp_DetailId = 1,
SaleBillNo = "ddddd",
StockCode = "ddd",
SubStockId = 1
});
var b = await _outStockTaskRepositories.Add(entity, true);
var bc = await _outStockTaskRepositories.Get(entity.Id);
// await _boxService.Sync();
//var res = await this._erpService.BillQueryForDeliveryNoticeOutStock(null,DateTime.Now.AddDays(-300));
//var result= await this._erpService.BillQueryForPurchaseInStock();
//var result = await this._erpService.BillQueryForOrg();