生产入库记录增加是否同步bip字段,并且修改新增生产入库记录逻辑
This commit is contained in:
@@ -31,6 +31,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
|
||||
/// 起始库位编号
|
||||
/// </summary>
|
||||
public string location_code { get; set; } = string.Empty;
|
||||
public int is_sync_bip { get; set; }
|
||||
}
|
||||
|
||||
public class PrdInstockRecordUpListDownOutPut
|
||||
|
||||
@@ -85,5 +85,8 @@ public partial class PrdInstockH : BaseEntity<string>
|
||||
/// 入库单编号
|
||||
/// </summary>
|
||||
public string? code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否同步bip
|
||||
/// </summary>
|
||||
public int? is_sync_bip { get; set; } = 0;
|
||||
}
|
||||
@@ -82,14 +82,14 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<PrdMo>((a, b, c, d) => a.mo_id == d.id)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d, e, f) => a.workline_id == f.Id)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>a.eqp_id==g.id)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d, e, f, g) => a.eqp_id == g.id)
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code))
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_code), (a, b, c, d, e) => d.mo_code.Contains(mo_code))
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_type),(a,b,c,d,e)=>d.mo_type==mo_type)
|
||||
.WhereIF(!string.IsNullOrEmpty(name),(a,b,c,d,e)=>b.name.Contains(name))
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_type), (a, b, c, d, e) => d.mo_type == mo_type)
|
||||
.WhereIF(!string.IsNullOrEmpty(name), (a, b, c, d, e) => b.name.Contains(name))
|
||||
.Where(a => a.act_start_date != null)
|
||||
.OrderBy($"{input.sidx} {input.sort}")
|
||||
.Select((a, b, c, d, e, f,g) => new PrdInstockRecordUpListOutPut()
|
||||
.Select((a, b, c, d, e, f, g) => new PrdInstockRecordUpListOutPut()
|
||||
{
|
||||
id = a.id,
|
||||
mo_task_code = a.mo_task_code,
|
||||
@@ -98,15 +98,15 @@ namespace Tnb.ProductionMgr
|
||||
workstation_id = c.FullName,
|
||||
mo_task_status = e.FullName,
|
||||
workline_id = f.FullName,
|
||||
eqp_code=g.code,
|
||||
eqp_code = g.code,
|
||||
act_start_date = a.act_start_date == null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
create_time = a.create_time.HasValue ? a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
|
||||
tablefield102 = SqlFunc.Subqueryable<PrdInstockH>()
|
||||
.LeftJoin<UserEntity>((x, y) => x.create_id == y.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((x, y, z) => x.bill_type == z.Id)
|
||||
.LeftJoin<WmsCarryH>((x,y,z,j)=>x.carry_code==j.id)
|
||||
.LeftJoin<BasLocation>((x,y,z,j,k)=>x.location_code==k.id)
|
||||
.Where(x => x.mo_task_id == a.id).ToList((x, y, z,j,k) => new PrdInstockRecordUpListChildOutPut()
|
||||
.LeftJoin<WmsCarryH>((x, y, z, j) => x.carry_code == j.id)
|
||||
.LeftJoin<BasLocation>((x, y, z, j, k) => x.location_code == k.id)
|
||||
.Where(x => x.mo_task_id == a.id).ToList((x, y, z, j, k) => new PrdInstockRecordUpListChildOutPut()
|
||||
{
|
||||
id = x.id,
|
||||
code = x.code,
|
||||
@@ -115,6 +115,7 @@ namespace Tnb.ProductionMgr
|
||||
location_code = k.location_code,
|
||||
create_id = y.RealName,
|
||||
bill_date = x.bill_date == null ? "" : x.bill_date.ToString(DbTimeFormat.SS),
|
||||
is_sync_bip = x.is_sync_bip.HasValue ? x.is_sync_bip.Value : 0
|
||||
}),
|
||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
return PageResult<PrdInstockRecordUpListOutPut>.SqlSugarPageResult(result);
|
||||
|
||||
Reference in New Issue
Block a user