60 lines
2.0 KiB
C#
60 lines
2.0 KiB
C#
|
|
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();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|