添加出入库记录逻辑,采购收货调拨打印、绑定条码更接口变更等
This commit is contained in:
@@ -11,6 +11,7 @@ using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Entity;
|
||||
using Tnb.WarehouseMgr.Entities.Enums;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
@@ -161,5 +162,56 @@ namespace Tnb.WarehouseMgr
|
||||
};
|
||||
return PageResult<WmsStockReportH>.SqlSugarPageResult(pagedList);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<dynamic> OutinStockDetail(VisualDevModelListQueryInput input)
|
||||
{
|
||||
var code_batch = "";
|
||||
var material_specification = "";
|
||||
if (!input.queryJson.IsNullOrWhiteSpace())
|
||||
{
|
||||
code_batch = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.code_batch));
|
||||
material_specification = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.material_specification));
|
||||
}
|
||||
|
||||
IEnumerable<dynamic> result = null;
|
||||
|
||||
result = await _db.Queryable<WmsOutinStockDetail>()
|
||||
.InnerJoin<WmsOutinStockCode>((a, b) => a.id == b.bill_d_id)
|
||||
.InnerJoin<BasWarehouse>((a, b, c) => a.warehouse_id == c.id)
|
||||
.Select((a,b,c) => new
|
||||
{
|
||||
act_start_date = a.act_start_date,
|
||||
act_end_date = a.act_end_date,
|
||||
whname = c.whname,
|
||||
material_id = b.material_id,
|
||||
material_code = b.material_code,
|
||||
material_name = b.material_name,
|
||||
material_specification = b.material_specification,
|
||||
container_no = b.container_no,
|
||||
code_batch = b.code_batch,
|
||||
location_id = a.endlocation_id,
|
||||
location_code = a.endlocation_code,
|
||||
unit_id = b.unit_id,
|
||||
unit_code = b.unit_code,
|
||||
start_qty = b.start_qty,
|
||||
end_qty = b.end_qty,
|
||||
type = a.type
|
||||
}).ToListAsync();
|
||||
|
||||
List<dynamic> pages = result.Skip((input.currentPage - 1) * input.pageSize).Take(input.pageSize).ToList();
|
||||
SqlSugarPagedList<dynamic> pagedList = new()
|
||||
{
|
||||
list = pages,
|
||||
pagination = new()
|
||||
{
|
||||
CurrentPage = input.currentPage,
|
||||
PageSize = input.pageSize,
|
||||
Total = result.Count()
|
||||
}
|
||||
};
|
||||
return PageResult<dynamic>.SqlSugarPageResult(pagedList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user