Merge branch 'production' of https://gitee.com/doan-tech/shanghaigangxiangtuzhuangMES
# Conflicts: # ZR.Admin.WebApi/appsettings.development.json
This commit is contained in:
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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
21
ZR.Service/mes/wms/IService/IWMlocationInfoService.cs
Normal file
21
ZR.Service/mes/wms/IService/IWMlocationInfoService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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 IWMlocationInfoService
|
||||
{
|
||||
|
||||
|
||||
// 获取成品库信息
|
||||
public (List<WmInfo>,int) Getwminfo_product(string shelf , int layer, int pageNum , int pageSize);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
41
ZR.Service/mes/wms/WMlocationInfoService.cs
Normal file
41
ZR.Service/mes/wms/WMlocationInfoService.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Infrastructure.Attribute;
|
||||
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(IWMlocationInfoService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class WMlocationInfoService : BaseService<WmInfo>, IWMlocationInfoService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取成品库库位信息
|
||||
/// </summary>
|
||||
/// <param name="shelf"></param>
|
||||
/// <param name="layer"></param>
|
||||
/// <param name="pageNum"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
public (List<WmInfo>, int) Getwminfo_product(string shelf, int layer, int pageNum, int pageSize)
|
||||
{
|
||||
int totalNum = 0;
|
||||
var predicate = Expressionable.Create<WmInfo>()
|
||||
.AndIF(!string.IsNullOrEmpty(shelf), it => it.Shelf == shelf)
|
||||
.AndIF(layer > 0, it => it.Layer == layer)
|
||||
.ToExpression();
|
||||
List<WmInfo> product_wminfoList = Context.Queryable<WmInfo>().Where(predicate).ToPageList(pageNum, pageSize, ref totalNum);
|
||||
|
||||
return (product_wminfoList, totalNum);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user