优先级、转库单批号过滤

This commit is contained in:
2024-11-06 17:02:55 +08:00
parent a058081207
commit 92fed4d3d5
8 changed files with 21 additions and 10 deletions

View File

@@ -126,7 +126,7 @@ namespace Tnb.WarehouseMgr
if (power.Count() > 0)
isShowJZGL = true;
}
SqlSugarPagedList<WmsMaterialTransfer> result = await _db.Queryable<WmsMaterialTransfer>()
.InnerJoin<DictionaryDataEntity>((a, b) => a.status == b.Id)
@@ -134,14 +134,17 @@ namespace Tnb.WarehouseMgr
.InnerJoin<BasWarehouse>((a, b, c, d) => d.id == a.warehouse_outstock)
.InnerJoin<BasWarehouse>((a, b, c, d, e) => e.id == a.warehouse_instock)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.type == f.EnCode)
.InnerJoin<WmsMaterialTransferD>((a, b, c, d, e, f, g) => g.bill_id == a.id)
// 只显示未完成的单据
//.Where(a => a.status != "25065149810453")
.WhereIF(queryJson != null && queryJson["type"] != null, a => a.type == queryJson["type"].ToString())
.WhereIF(queryJson != null && queryJson["bill_code"] != null, a => a.bill_code.Contains(queryJson["bill_code"].ToString()))
.WhereIF(queryJson != null && queryJson["status"] != null, a => a.status == queryJson["status"].ToString())
.WhereIF(queryJson != null && queryJson["type"] != null && queryJson["type"].ToString() != "", a => a.type == queryJson["type"].ToString())
.WhereIF(queryJson != null && queryJson["bill_code"] != null && queryJson["bill_code"].ToString() != "", a => a.bill_code.Contains(queryJson["bill_code"].ToString()))
.WhereIF(queryJson != null && queryJson["status"] != null && queryJson["status"].ToString() != "", a => a.status == queryJson["status"].ToString())
.WhereIF(queryJson != null && queryJson["erp_bill_code"] != null && queryJson["erp_bill_code"].ToString() != "", a => a.erp_bill_code.Contains(queryJson["erp_bill_code"].ToString()))
.WhereIF(queryJson != null && queryJson["tablefield120-code_batch"] != null && queryJson["tablefield120-code_batch"].ToString() != "", (a, b, c, d, e, f, g) => g.code_batch.Contains(queryJson["tablefield120-code_batch"].ToString()))
.WhereIF(!isShowJZGL, a => a.type != WmsWareHouseConst.MATERIALTRANSFER_JZGLRK_CODE)
.Select((a, b, c, d, e, f) => new WmsMaterialTransfer
.Distinct()
.Select((a, b, c, d, e, f, g) => new WmsMaterialTransfer
{
id = a.id,
create_id = c.RealName,
@@ -169,8 +172,6 @@ namespace Tnb.WarehouseMgr
.OrderBy("a.create_time desc")
.ToPagedListAsync(input.currentPage, input.pageSize);
var _data = PageResult<WmsMaterialTransfer>.SqlSugarPageResult(result);
var json = JsonConvert.SerializeObject(_data);
var data = JsonConvert.DeserializeObject<dynamic>(json);
@@ -212,6 +213,7 @@ namespace Tnb.WarehouseMgr
{
wmsTransferInstockH["tablefield120"] = JArray.Parse(JsonConvert.SerializeObject(wmsTransferInstockDs.Where(r => r.bill_id == wmsTransferInstockH["id"].ToString())));
}
return data;
}
catch (Exception ex)
@@ -2089,6 +2091,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.isExcuteMission = false;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput);