入库功能
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));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,8 +41,6 @@
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.6" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||
<PackageReference Include="NLog" Version="5.2.0" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.0" />
|
||||
<PackageReference Include="Mapster" Version="7.3.0" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,9 +11,12 @@
|
||||
{
|
||||
|
||||
//外网连接服务器
|
||||
"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
"Conn": "Data Source=127.0.0.01;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
|
||||
//外网连接服务器
|
||||
//"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
//内网连接服务器
|
||||
//"Conn": "Data Source=192.168.0.36;Port=3306;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
//"Conn": "Data Source=192.168.0.36;Port=3306;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
"Type": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4,
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{
|
||||
//"Conn": "Data Source=147.116.122.230;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
//"Conn": "Data Source=47.116.122.230;Port=3307;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
"Conn": "Data Source=192.168.0.36;Port=3306;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
"Conn": "Data Source=192.168.60.251;Port=3306;User ID=root;Password=123456;Initial Catalog=ZrAdmin;",
|
||||
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
|
||||
Reference in New Issue
Block a user