成品入库 接口
This commit is contained in:
parent
55c83b2b7c
commit
59f7962ffc
@ -0,0 +1,59 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
/// <summary>
|
||||
/// 入库模块
|
||||
/// </summary>
|
||||
[Route("/mes/wm/entrywarehouse")]
|
||||
public class WMentryWarehousing_productController : BaseController
|
||||
{
|
||||
|
||||
private readonly IWMentryWarehousing_productService wm_entryWarehousing_productService;
|
||||
public WMentryWarehousing_productController(IWMentryWarehousing_productService wm_entryWarehousing_productService)
|
||||
{
|
||||
this.wm_entryWarehousing_productService = wm_entryWarehousing_productService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 1. 判断是否为库位码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_location")]
|
||||
public IActionResult IsProductionLocation(string production_location_code = "")
|
||||
{
|
||||
|
||||
// 查询 wm_info 表,根据库位码,查询在表中是否存在,true false
|
||||
bool state = this.wm_entryWarehousing_productService.IsProductionLoacation(production_location_code);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", state));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2. 判断是否为成品库箱子码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_package")]
|
||||
public IActionResult IsProductionPackage(string package_code = "")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "success", true));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.判断是否为满箱
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_full_package")]
|
||||
public IActionResult IsFullPackage(string package_code = "")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "success", true));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,6 +8,7 @@ using ZR.Service.mes.wms.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
|
||||
[Route("/mes/wm/storagelocation")]
|
||||
public class WMlocationInfoController : BaseController
|
||||
{
|
||||
|
||||
@ -6,14 +6,14 @@
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"urls": "http://localhost:8888", //(app会默认去读)项目启动url,如果改动端口前端对应devServer也需要进行修改
|
||||
"urls": "http://0.0.0.0:8888", //(app会默认去读)项目启动url,如果改动端口前端对应devServer也需要进行修改
|
||||
"dbConfigs": [
|
||||
{
|
||||
|
||||
//外网连接服务器
|
||||
"Conn": "Data Source=47.116.122.230;Port=3307;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=127.0.0.1;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
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"urls": "http://localhost:8888", //(app会默认去读)项目启动url,如果改动端口前端对应devServer也需要进行修改
|
||||
"urls": "http://0.0.0.0:8888", //(app会默认去读)项目启动url,如果改动端口前端对应devServer也需要进行修改
|
||||
"dbConfigs": [
|
||||
{
|
||||
//"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=127.0.0.1;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;",
|
||||
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
|
||||
22
ZR.Service/mes/wms/IService/IWMWarehousingService.cs
Normal file
22
ZR.Service/mes/wms/IService/IWMWarehousingService.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.qc.DTO;
|
||||
using ZR.Model.MES.wms;
|
||||
|
||||
namespace ZR.Service.mes.wms.IService
|
||||
{
|
||||
public interface IWMentryWarehousing_productService
|
||||
{
|
||||
|
||||
|
||||
// 获取库位列表
|
||||
public bool IsProductionLoacation(string production_location_code);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
28
ZR.Service/mes/wms/WMentryWarehousing_productService.cs
Normal file
28
ZR.Service/mes/wms/WMentryWarehousing_productService.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.qc.IService;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
namespace ZR.Service.mes.wms
|
||||
{
|
||||
[AppService(ServiceType = typeof(IWMentryWarehousing_productService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class WMentryWarehousing_productService : BaseService<WmInfo>, IWMentryWarehousing_productService
|
||||
{
|
||||
bool IWMentryWarehousing_productService.IsProductionLoacation(string production_location_code)
|
||||
{
|
||||
|
||||
return Context.Queryable<WmInfo>().Where(it => it.WarehouseNum == 1)
|
||||
.Where(it => it.Location.Equals(production_location_code)).Any();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user