入库功能
This commit is contained in:
@@ -31,9 +31,10 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_location")]
|
||||
[Log(Title = "判断是否为库位码")]
|
||||
public IActionResult IsProductionLocation(string production_location_code = "")
|
||||
{
|
||||
if(string.IsNullOrEmpty(production_location_code))
|
||||
if (string.IsNullOrEmpty(production_location_code))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
|
||||
@@ -49,6 +50,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_package")]
|
||||
[Log(Title = "判断是否为成品库箱子码")]
|
||||
public IActionResult IsProductionPackage(string package_code = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(package_code))
|
||||
@@ -76,6 +78,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_full_package")]
|
||||
[Log(Title = "判断是否为满箱")]
|
||||
public IActionResult IsFullPackage(string package_code = "")
|
||||
{
|
||||
|
||||
@@ -85,9 +88,16 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
|
||||
}
|
||||
bool state = this.wm_entryWarehousing_productService.isFullPackage(package_code);
|
||||
string msg = state ? "满箱" : "不满箱";
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, true));
|
||||
string msg = null;
|
||||
if (state)
|
||||
{
|
||||
msg = "满箱";
|
||||
}else
|
||||
{
|
||||
msg = "零头箱";
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, state));
|
||||
}
|
||||
/// <summary>
|
||||
/// 4.入库
|
||||
@@ -95,24 +105,25 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// <param name="wmgoodsDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("into_product_warehouse")]
|
||||
public IActionResult IntoProductwarehouse([FromBody] WmgoodsDto wmgoodsDto)
|
||||
[Log(Title = "入库")]
|
||||
public IActionResult IntoProductwarehouse([FromBody] WmgoodsDto wmgoodsDto)
|
||||
{
|
||||
if(wmgoodsDto == null)
|
||||
if (wmgoodsDto == null)
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = "";
|
||||
bool data = false;
|
||||
string createName=HttpContext.GetName();
|
||||
string createName = HttpContext.GetName();
|
||||
|
||||
int status=this.wm_entryWarehousing_productService.IntoProductwarehouse(wmgoodsDto, createName);
|
||||
if(status == 0)
|
||||
int status = this.wm_entryWarehousing_productService.IntoProductwarehouse(wmgoodsDto, createName);
|
||||
if (status == 0)
|
||||
{
|
||||
msg = "数据插入异常";
|
||||
data = false;
|
||||
|
||||
}
|
||||
else if(status == 1)
|
||||
else if (status == 1)
|
||||
{
|
||||
msg = "success";
|
||||
data = true;
|
||||
@@ -126,18 +137,66 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// <param name="locationcode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("packagelist")]
|
||||
[Log(Title = "获取库位已经存在箱子")]
|
||||
public IActionResult Getpackagelist(string locationcode)
|
||||
{
|
||||
if(string.IsNullOrEmpty(locationcode))
|
||||
if (string.IsNullOrEmpty(locationcode))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = null;
|
||||
|
||||
List<WmGoodsNowProduction> productionList= this.wm_entryWarehousing_productService.Getpackagelist(locationcode);
|
||||
|
||||
List<WmGoodsNowProduction> productionList = this.wm_entryWarehousing_productService.Getpackagelist(locationcode);
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, productionList));
|
||||
}
|
||||
/// <summary>
|
||||
/// 解析外标签码
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("resolution_package")]
|
||||
public IActionResult ResolutionPackage(string code = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(code))
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
ResultionPackageCodeDto data = this.wm_entryWarehousing_productService.ResolutionPackage(code);
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 7 判断箱子是否存在成品库仓库里
|
||||
/// </summary>
|
||||
/// <param name="PatchCode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_existed_warehouse")]
|
||||
public IActionResult IsExistedWarehouse(string originalCode = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(originalCode))
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = null;
|
||||
bool data = this.wm_entryWarehousing_productService.IsExistedWarehouse(originalCode);
|
||||
if (data)
|
||||
{
|
||||
msg = "存在";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "不存在";
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, data));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user