PDA质检任务数据重复显示bug;载具规格为外协料架-退至二楼暂存仓
This commit is contained in:
@@ -115,37 +115,105 @@ namespace Tnb.QcMgr
|
||||
Expression<Func<QcCheckExecHOut, object>> expression = list.Where(p => p.FullName == "待执行").First().Id == status
|
||||
? (a => DateTime.Parse(a.tasktime!))
|
||||
: (a => DateTime.Parse(a.exectime!));
|
||||
SqlSugarPagedList<QcCheckExecHOut> result = await db.Queryable<QcCheckExecH>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.materialid == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.processid == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workid == d.Id)
|
||||
.LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f)=>a.mo_task_code==f.mo_task_code)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>f.eqp_id==g.id)
|
||||
.LeftJoin<OrganizeEntity>((a,b,c,d,e,f,g,h)=>d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorkshopCode)
|
||||
.LeftJoin<PositionEntity>((a,b,c,d,e,f,g,h,i)=>h.Id==i.OrganizeId)
|
||||
.WhereIF(_userManager.LoginType=="app" && !_userManager.IsAdministrator,(a,b,c,d,e,f,g,h,i)=>i.EnCode==positionCode)
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
// .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
.Select((a, b, c, d, e,f,g) => new QcCheckExecHOut
|
||||
{
|
||||
id = a.id,
|
||||
bill_code = a.bill_code,
|
||||
materialid = b.name,
|
||||
checktype = a.checktype,
|
||||
workid = d.FullName,
|
||||
processid = c.process_name,
|
||||
wareid = a.wareid,
|
||||
checknum = a.checknum,
|
||||
status = a.status,
|
||||
result = a.result,
|
||||
tasktime = a.tasktime ?? "",
|
||||
exectime = a.exectime ?? "",
|
||||
execuser = e.RealName ?? "",
|
||||
equip_name = g.name,
|
||||
}).OrderByDescending(expression).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
var result = new SqlSugarPagedList<QcCheckExecHOut>();
|
||||
if (_userManager.IsAdministrator)
|
||||
{
|
||||
result = await db.Queryable<QcCheckExecH>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.materialid == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.processid == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workid == d.Id)
|
||||
.LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
.LeftJoin<PrdMoTask>((a, b, c, d, e, f) => a.mo_task_code == f.mo_task_code)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d, e, f, g) => f.eqp_id == g.id)
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
// .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
.Select((a, b, c, d, e, f, g) => new QcCheckExecHOut
|
||||
{
|
||||
id = a.id,
|
||||
bill_code = a.bill_code,
|
||||
materialid = b.name,
|
||||
checktype = a.checktype,
|
||||
workid = d.FullName,
|
||||
processid = c.process_name,
|
||||
wareid = a.wareid,
|
||||
checknum = a.checknum,
|
||||
status = a.status,
|
||||
result = a.result,
|
||||
tasktime = a.tasktime ?? "",
|
||||
exectime = a.exectime ?? "",
|
||||
execuser = e.RealName ?? "",
|
||||
equip_name = g.name,
|
||||
}).OrderByDescending(expression).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await db.Queryable<QcCheckExecH>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.materialid == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.processid == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workid == d.Id)
|
||||
.LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
.LeftJoin<PrdMoTask>((a, b, c, d, e, f) => a.mo_task_code == f.mo_task_code)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d, e, f, g) => f.eqp_id == g.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d, e, f, g, h) => d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorkshopCode)
|
||||
.LeftJoin<PositionEntity>((a, b, c, d, e, f, g, h, i) => h.Id == i.OrganizeId)
|
||||
.WhereIF(_userManager.LoginType == "app" && !_userManager.IsAdministrator, (a, b, c, d, e, f, g, h, i) => i.EnCode == positionCode)
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
// .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
.Select((a, b, c, d, e, f, g) => new QcCheckExecHOut
|
||||
{
|
||||
id = a.id,
|
||||
bill_code = a.bill_code,
|
||||
materialid = b.name,
|
||||
checktype = a.checktype,
|
||||
workid = d.FullName,
|
||||
processid = c.process_name,
|
||||
wareid = a.wareid,
|
||||
checknum = a.checknum,
|
||||
status = a.status,
|
||||
result = a.result,
|
||||
tasktime = a.tasktime ?? "",
|
||||
exectime = a.exectime ?? "",
|
||||
execuser = e.RealName ?? "",
|
||||
equip_name = g.name,
|
||||
}).OrderByDescending(expression).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
}
|
||||
|
||||
//SqlSugarPagedList<QcCheckExecHOut> result = await db.Queryable<QcCheckExecH>()
|
||||
// .LeftJoin<BasMaterial>((a, b) => a.materialid == b.id)
|
||||
// .LeftJoin<BasProcess>((a, b, c) => a.processid == c.id)
|
||||
// .LeftJoin<OrganizeEntity>((a, b, c, d) => a.workid == d.Id)
|
||||
// .LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
// .LeftJoin<PrdMoTask>((a,b,c,d,e,f)=>a.mo_task_code==f.mo_task_code)
|
||||
// .LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>f.eqp_id==g.id)
|
||||
// .LeftJoin<OrganizeEntity>((a,b,c,d,e,f,g,h)=>d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorkshopCode)
|
||||
// .LeftJoin<PositionEntity>((a,b,c,d,e,f,g,h,i)=>h.Id==i.OrganizeId)
|
||||
// .WhereIF(_userManager.LoginType=="app" && !_userManager.IsAdministrator,(a,b,c,d,e,f,g,h,i)=>i.EnCode==positionCode)
|
||||
// .WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
// .WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
// .WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
// // .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
// .Select((a, b, c, d, e,f,g) => new QcCheckExecHOut
|
||||
// {
|
||||
// id = a.id,
|
||||
// bill_code = a.bill_code,
|
||||
// materialid = b.name,
|
||||
// checktype = a.checktype,
|
||||
// workid = d.FullName,
|
||||
// processid = c.process_name,
|
||||
// wareid = a.wareid,
|
||||
// checknum = a.checknum,
|
||||
// status = a.status,
|
||||
// result = a.result,
|
||||
// tasktime = a.tasktime ?? "",
|
||||
// exectime = a.exectime ?? "",
|
||||
// execuser = e.RealName ?? "",
|
||||
// equip_name = g.name,
|
||||
// }).OrderByDescending(expression).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
foreach (QcCheckExecHOut? item in result.list)
|
||||
{
|
||||
|
||||
@@ -421,6 +421,10 @@ namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
/// 预任务生成业务类型-盘点出库
|
||||
/// </summary>
|
||||
public const string BIZTYPE_WMSCHECKOUTSTOCK_ID = "27718132310037";
|
||||
/// <summary>
|
||||
/// 预任务生成业务类型-暂控料出库
|
||||
/// </summary>
|
||||
public const string BIZTYPE_TEMPCONTROLOUTSTOCK_ID = "38027183728661";
|
||||
|
||||
/// <summary>
|
||||
/// 成品调拨入库
|
||||
@@ -470,6 +474,11 @@ namespace Tnb.WarehouseMgr.Entities.Consts
|
||||
/// 载具规格-载运料架
|
||||
/// </summary>
|
||||
public const string CARRY_ZYLJSTD_ID = "34995839046677";
|
||||
/// <summary>
|
||||
/// 载具规格-外协料架
|
||||
/// </summary>
|
||||
public const string CARRY_WXLJSTD_ID = "37896162328597";
|
||||
|
||||
/// <summary>
|
||||
/// 打印状态-未打印
|
||||
/// </summary>
|
||||
|
||||
@@ -2386,7 +2386,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
// 料架到暂存仓
|
||||
if (wmsCarryH.carrystd_id == "26037267399717")
|
||||
if (wmsCarryH.carrystd_id == "26037267399717" || wmsCarryH.carrystd_id==WmsWareHouseConst.CARRY_WXLJSTD_ID)
|
||||
{
|
||||
return await RackInstock_到暂存仓(input, wmsCarryH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user