using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Threading.Tasks;
|
using Rhea.Common;
|
using Tiger.IBusiness;
|
using Microsoft.AspNetCore.Mvc;
|
using Tiger.Model.Minsun;
|
|
namespace Tiger.Api.Controllers.WMS
|
{
|
public partial class WMSController : ControllerBase
|
{
|
/// <summary>
|
/// 物料包装管理 物料包装层级:小包归属于哪个中包、中包归属于哪个外包 wms_barcode 有
|
/// </summary>
|
/// <param name="sn"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetPackageInfoAsync(string sn)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().GetPackageInfo(sn));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 物料入库信息 物料名称、物料代码、物料供应商、数量、库位、储位、批次、入库时间
|
/// </summary>
|
/// <param name="param"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetInStoreInfoAsync(iParams param)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(_IInventroyInfo.GetInStoreInfo(param)); //response.GetResponse(DI.Resolve<IiWMS>().GetInStoreInfo(param));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 物料出库信息 领料单号、领料料号、数量、库位、储位、出库时间
|
/// </summary>
|
/// <param name="param"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetOutStoreInfoAsync(iParams param)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(_IInventroyInfo.GetOutStoreInfo(param)); // response.GetResponse(DI.Resolve<IiWMS>().GetOutStoreInfo(param));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 物料退料信息 退料料号、退料时间、退料条码、退料库位、称重清点结果
|
/// </summary>
|
/// <param name="param"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetReturnInfoAsync(iParams param)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().GetReturnInfo(param));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 备料分包装信息 拆包备料,重新组包的包装号关系:拆包编号、组包后编号、组包后数量、备领料单号、料号
|
/// </summary>
|
/// <param name="param"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetSplitInfoAsync(iParams param)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().GetSplitInfo(param));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 物料库存信息
|
/// </summary>
|
/// <param name="param"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetStorageInfo(iParamsBase param)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(_IInventroyInfo.GetStorageInfo(param)); // response.GetResponse(DI.Resolve<IiWMS>().GetStorageInfo(param));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
|
/// <summary>
|
/// 到货单生成接口 清点系统 --> wms, 接口需wms定义
|
/// </summary>
|
/// <param name="dtls"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GenerateReceiptAsync(iReceiptInput dtls)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().GenerateReceipt(dtls));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 获取T100领料单数据
|
/// </summary>
|
/// <param name="dtls"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> GetMaterialReq(List<WMS_PRDPICK_H> dtls)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().GetMaterialReq(dtls));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
/// <summary>
|
/// 领料单取消审核
|
/// </summary>
|
/// <param name="dtls"></param>
|
/// <returns></returns>
|
[HttpPost]
|
[Route("api/[controller]/[action]")]
|
public async Task<IActionResult> MaterialRem(MaterialRem dtls)
|
{
|
ApiAction response = new();
|
try
|
{
|
response = response.GetResponse(DI.Resolve<IiWMS>().MaterialRem(dtls));
|
}
|
catch (System.Exception ex)
|
{
|
response = response.GetResponse().CatchExceptionWithLog(ex);
|
}
|
return Ok(response);
|
}
|
}
|
|
}
|