仓库-批量查询库存功能新建文件,暂未实现

This commit is contained in:
2024-04-26 11:22:33 +08:00
parent cae2643a41
commit ebc4712da0
5 changed files with 260 additions and 5 deletions

View File

@@ -0,0 +1,60 @@
using System;
using SqlSugar;
using Infrastructure.Attribute;
using Infrastructure.Extensions;
using ZR.Model;
using ZR.Model.Dto;
using ZR.Model.MES.wms;
using ZR.Repository;
using ZR.Service.Business.IBusinessService;
using System.Linq;
using ZR.Service.mes.wms.IService;
using ZR.Model.MES.wms.Dto;
using System.Text.Json;
using MimeKit.Utils;
using System.Collections.Generic;
using Org.BouncyCastle.Crypto;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace ZR.Service.Business
{
/// <summary>
/// 仓库操作日志Service业务层处理
/// </summary>
[AppService(ServiceType = typeof(IWmGoodsBatchSearchService), ServiceLifetime = LifeTime.Transient)]
public class WmGoodsBatchSearchService : BaseService<WmGoodsBatchSearchDto>, IWmGoodsBatchSearchService
{
public List<WmGoodsBatchTableDto> GetBatchOutRecordByPackageCodeShort(WmGoodsBatchSearchDto parm)
{
try
{
// 查询条件
var exp = Expressionable.Create<WmGoodsOutRecord>()
.AndIF(!string.IsNullOrEmpty(parm.Partnumber), it => it.PackageCodeClient.Contains(parm.Partnumber))
.AndIF(!string.IsNullOrEmpty(parm.PackageCode), it => it.PackageCodeClient.Contains(parm.PackageCode))
.ToExpression();
// 出库记录
List<WmGoodsOutRecord> outPackageList = Context.Queryable<WmGoodsOutRecord>()
.Where(exp)
.GroupBy(x => x.PackageCode)
.ToList();
List<WmGoodsBatchTableDto> result = new List<WmGoodsBatchTableDto>();
return result;
}
catch
{
return null;
}
}
public List<WmGoodsBatchTableDto> GetBatchOutRecordTreeLazyByPackageCodeShort(WmGoodsBatchSearchDto parm)
{
throw new NotImplementedException();
}
}
}