仓库-入库解析标签功能添加,添加一个综合判断是否能入库的接口
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
@@ -26,6 +19,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
this.wm_entryWarehousing_productService = wm_entryWarehousing_productService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 1. 判断是否为库位码
|
||||
/// </summary>
|
||||
@@ -92,7 +87,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
if (state)
|
||||
{
|
||||
msg = "满箱";
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "零头箱";
|
||||
}
|
||||
@@ -113,20 +109,20 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = "";
|
||||
|
||||
|
||||
string createName = HttpContext.GetName();
|
||||
|
||||
int num = this.wm_entryWarehousing_productService.IntoProductwarehouse(wmgoodsDto, createName);
|
||||
if (num == 0)
|
||||
{
|
||||
msg = "数据插入异常";
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (num >= 1)
|
||||
{
|
||||
msg = "成功入库"+num+"个";
|
||||
|
||||
msg = "成功入库" + num + "个";
|
||||
|
||||
|
||||
}
|
||||
return ToResponse(new ApiResult(200, msg, num));
|
||||
@@ -164,6 +160,10 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
ResultionPackageCodeDto data = this.wm_entryWarehousing_productService.ResolutionPackage(code);
|
||||
if (data == null)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, "外标签解析异常", data));
|
||||
}
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
}
|
||||
@@ -191,12 +191,33 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
msg = "不存在";
|
||||
}
|
||||
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, data));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// all.判断标签扫描结果是否可入库(综合结果判断)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("checkWarehousing")]
|
||||
[Log(Title = "判断标签扫描结果是否可入库")]
|
||||
public IActionResult CheckWarehousing(string production_packcode = "", string location = "",
|
||||
bool isStrict = false)
|
||||
{
|
||||
string msg = this.wm_entryWarehousing_productService.checkWarehousing(production_packcode, location, isStrict);
|
||||
if ("ok".Equals(msg))
|
||||
{
|
||||
// 可入库
|
||||
return ToResponse(new ApiResult(200, msg, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
// 不可入库
|
||||
return ToResponse(new ApiResult(200, msg, false));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Model.MES.wms;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
//创建时间:2024-03-16
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
@@ -52,8 +49,8 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
public IActionResult GetWmMaterial(string Id)
|
||||
{
|
||||
var response = _WmMaterialService.GetInfo(Id);
|
||||
|
||||
|
||||
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@@ -115,7 +112,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
WmGoodsNowProduction nowProduction= _WmMaterialService.GetInfoByPatchCode(patchCode);
|
||||
WmGoodsNowProduction nowProduction = _WmMaterialService.GetInfoByPatchCode(patchCode);
|
||||
return SUCCESS(nowProduction);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user