提交
This commit is contained in:
@@ -40,6 +40,18 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
return SUCCESS(response);
|
return SUCCESS(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询成品入库检验列表 一级
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("first_level_list")]
|
||||||
|
[ActionPermissionFilter(Permission = "wmsManagement:wmfgentryinspect:list")]
|
||||||
|
public IActionResult QueryWmFgentryInspect_first([FromQuery] WmFgentryInspectQueryDto parm)
|
||||||
|
{
|
||||||
|
var response = _WmFgentryInspectService.GetList_first(parm);
|
||||||
|
return SUCCESS(response);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询成品入库检验详情
|
/// 查询成品入库检验详情
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -7,6 +7,19 @@ namespace ZR.Model.MES.wms.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class WmFgentryInspectQueryDto : PagerInfo
|
public class WmFgentryInspectQueryDto : PagerInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public string Workorder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Packcode { get; set; }
|
||||||
|
|
||||||
|
public string Partnumber { get; set; }
|
||||||
|
|
||||||
|
public DateTime starttime { get; set; }
|
||||||
|
public DateTime endtime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace ZR.Service.mes.wms.IService
|
|||||||
public interface IWmFgentryInspectService : IBaseService<WmFgentryInspect>
|
public interface IWmFgentryInspectService : IBaseService<WmFgentryInspect>
|
||||||
{
|
{
|
||||||
PagedInfo<WmFgentryInspectDto> GetList(WmFgentryInspectQueryDto parm);
|
PagedInfo<WmFgentryInspectDto> GetList(WmFgentryInspectQueryDto parm);
|
||||||
|
PagedInfo<WmFgentryInspectDto> GetList_first(WmFgentryInspectQueryDto parm);
|
||||||
|
|
||||||
|
|
||||||
WmFgentryInspect GetInfo(int Id);
|
WmFgentryInspect GetInfo(int Id);
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using System.Linq;
|
|||||||
using ZR.Service.mes.wms.IService;
|
using ZR.Service.mes.wms.IService;
|
||||||
using ZR.Model.MES.wms;
|
using ZR.Model.MES.wms;
|
||||||
using ZR.Model.MES.wms.Dto;
|
using ZR.Model.MES.wms.Dto;
|
||||||
|
using Mapster;
|
||||||
|
|
||||||
namespace ZR.Service.mes.wms
|
namespace ZR.Service.mes.wms
|
||||||
{
|
{
|
||||||
@@ -35,6 +36,46 @@ namespace ZR.Service.mes.wms
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询成品入库检验列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public PagedInfo<WmFgentryInspectDto> GetList_first(WmFgentryInspectQueryDto parm)
|
||||||
|
{
|
||||||
|
var predicate = Expressionable.Create<WmFgentryInspect>()
|
||||||
|
.AndIF(!string.IsNullOrEmpty(parm.Workorder), it => it.Workorder.Contains(parm.Workorder))
|
||||||
|
.AndIF(!string.IsNullOrEmpty(parm.Packcode), it => it.Packcode.Contains(parm.Packcode))
|
||||||
|
.AndIF(!string.IsNullOrEmpty(parm.Partnumber), it => it.Partnumber.Contains(parm.Partnumber))
|
||||||
|
.AndIF(parm.starttime!=null&&parm.starttime>new DateTime(1999,1,1), it => it.CreatedTime>parm.starttime)
|
||||||
|
.AndIF(parm.endtime!=null&&parm.endtime>new DateTime(1999,1,1), it => it.CreatedTime<parm.endtime)
|
||||||
|
;
|
||||||
|
|
||||||
|
//var response = Queryable()
|
||||||
|
// .Where(predicate.ToExpression())
|
||||||
|
// .ToPage<WmFgentryInspect, WmFgentryInspectDto>(parm);
|
||||||
|
List<WmFgentryInspect> inspects = Queryable()
|
||||||
|
.Where(predicate.ToExpression()).GroupBy(it => it.Workorder)
|
||||||
|
.Select(it => new WmFgentryInspect()
|
||||||
|
{
|
||||||
|
Workorder = it.Workorder,
|
||||||
|
ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0),
|
||||||
|
Partnumber = SqlFunc.AggregateMax(it.Partnumber)
|
||||||
|
}).ToList();
|
||||||
|
int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
|
||||||
|
var pageProducts = inspects.Skip((parm.PageNum - 1) * parm.PageSize).Take(parm.PageSize);
|
||||||
|
|
||||||
|
PagedInfo<WmFgentryInspectDto> response = new PagedInfo<WmFgentryInspectDto>()
|
||||||
|
{
|
||||||
|
PageSize = parm.PageSize,
|
||||||
|
PageIndex = parm.PageNum,
|
||||||
|
TotalPage = totalPages,
|
||||||
|
Result= pageProducts.Adapt<List<WmFgentryInspectDto>>()
|
||||||
|
};
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取详情
|
/// 获取详情
|
||||||
|
|||||||
Reference in New Issue
Block a user