分拣、工位bom、现场问题处理
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.EventBus;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
@@ -13,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.BasicData.Interfaces;
|
||||
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Attributes;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
@@ -89,5 +92,42 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<dynamic> WmsSourtingtaskList(WmsSortingtaskListOutput input)
|
||||
{
|
||||
Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary<string, object>() : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||
string? status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : "";
|
||||
if (string.IsNullOrEmpty(input.sidx))
|
||||
{
|
||||
input.sidx = "a.id";
|
||||
}
|
||||
else
|
||||
{
|
||||
input.sidx = input.sidx.Replace("create_time", "a.create_time").Replace("erp_bill_code", "e.erp_bill_code");
|
||||
|
||||
}
|
||||
SqlSugarPagedList<WmsSortingtask> result = await _db.Queryable<WmsSortingtask>()
|
||||
.InnerJoin<WmsCarryCode>((a, b) => a.carry_id == b.carry_id)
|
||||
.InnerJoin<BasMaterial>((a, b, c) => b.material_id == c.id)
|
||||
.InnerJoin<WmsSaleD>((a, b, c, d) => a.source_id == d.id)
|
||||
.InnerJoin<WmsSaleH>((a, b, c, d, e) => e.id == d.bill_id)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
.Select((a, b, c, d, e) => new WmsSortingtask
|
||||
{
|
||||
create_time = DateTime.Parse(a.create_time.ToString("yyyy-MM-dd HH:mm:ss")),
|
||||
material_id = c.id,
|
||||
material_code =c.code ,
|
||||
material_name = c.name,
|
||||
material_specification =c.material_specification,
|
||||
code_batch = b.code_batch,
|
||||
erp_bill_code = e.erp_bill_code
|
||||
}, true)
|
||||
.OrderBy($"{input.sidx} {input.sort}")
|
||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
return PageResult<WmsSortingtask>.SqlSugarPageResult(result);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user