物料清单添加Type 1-成品 2-毛坯

This commit is contained in:
2024-05-24 10:47:22 +08:00
parent be0e699bec
commit 6f2b846473
5 changed files with 14 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ namespace ZR.Model.MES.wms.Dto
public string Search2 { get; set; }
public int? Type { get; set; }
public int? Status { get; set; }
public string CreatedBy { get; set; }
@@ -153,6 +154,8 @@ namespace ZR.Model.MES.wms.Dto
public string Search2 { get; set; }
public int? Type { get; set; }
public int? Status { get; set; }
public string CreatedBy { get; set; }

View File

@@ -80,10 +80,16 @@ namespace ZR.Model.MES.wms
///</summary>
[SugarColumn(ColumnName="search2" )]
public string Search2 { get; set; }
/// <summary>
/// 类别1-成品 2-毛坯)
///</summary>
[SugarColumn(ColumnName = "type")]
public int? Type { get; set; }
/// <summary>
/// 状态0-不可见 1-可见)
///</summary>
[SugarColumn(ColumnName="status" )]
[SugarColumn(ColumnName="status" )]
public int? Status { get; set; }
/// <summary>
/// 创建人

View File

@@ -42,7 +42,7 @@ namespace ZR.Service.mes.wms
{
WmMaterial material = Context.Queryable<WmMaterial>()
.Where(it => it.BlankNum == item.BlankNum)
.Where(it => it.Remarks == "毛坯")
.Where(it => it.Type == 2)
.First();
if (material == null)
{
@@ -125,7 +125,7 @@ namespace ZR.Service.mes.wms
{
int num = 0;
List<WmMaterial> materials = Context.Queryable<WmMaterial>()
.Where(it => it.Remarks == "毛坯")
.Where(it => it.Type == 2)
.Where(it => !string.IsNullOrEmpty(it.BlankNum))
.OrderBy(it => it.BlankNum)
.ToList();

View File

@@ -34,7 +34,8 @@ namespace ZR.Service.mes.wms
.AndIF(parm.Color != null, it => it.Color.Contains(parm.Color))
.AndIF(parm.Specification != null, it => it.Specification.Contains(parm.Specification))
.AndIF(parm.Description != null, it => it.Description.Contains(parm.Description))
.AndIF(parm.Search1 != null, it => it.Search1.Contains(parm.Search1) || it.Search2.Contains(parm.Search1))
.AndIF(!string.IsNullOrEmpty( parm.Search1), it => it.Search1.Contains(parm.Search1) || it.Search1.Contains(parm.Search2))
.AndIF(parm.Type > 0, it => it.Type == parm.Type)
.AndIF(parm.Status > -1, it => it.Status == parm.Status);