优先级、转库单批号过滤
This commit is contained in:
@@ -908,7 +908,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
//锁定终点库位
|
||||
await db_YCLGLDPJInstocktimer.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endLocation.id).ExecuteCommandAsync();
|
||||
|
||||
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLGLDPJInstocktimer);
|
||||
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLGLDPJInstocktimer, "", "", "", WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID);
|
||||
if (!result_createPretask)
|
||||
{
|
||||
LoggerYCLGLDPJInstock.LogWarning($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
|
||||
@@ -1002,7 +1002,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
//锁定终点库位
|
||||
await db_YCLWXDPJInstocktimer.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endLocation.id).ExecuteCommandAsync();
|
||||
|
||||
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLWXDPJInstocktimer);
|
||||
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLWXDPJInstocktimer, "", "", "", WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID);
|
||||
if (!result_createPretask)
|
||||
{
|
||||
LoggerYCLGLDPJInstock.LogWarning($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
|
||||
@@ -1976,7 +1976,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
commonCreatePretaskInput.require_id = require_id;
|
||||
commonCreatePretaskInput.source_id = source_id;
|
||||
commonCreatePretaskInput.isExcuteMission = false;
|
||||
|
||||
if (task_type == WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID)
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
|
||||
|
||||
logger.LogInformation($"开始执行 GenPreTask {JsonConvert.SerializeObject(commonCreatePretaskInput)}");
|
||||
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, dbConn);
|
||||
if (res.code == JNPF.Common.Enums.HttpStatusCode.OK)
|
||||
|
||||
@@ -1059,6 +1059,7 @@ namespace Tnb.WarehouseMgr
|
||||
if (material != null)
|
||||
{
|
||||
wmsMaterialTransferD.material_id = material.id;
|
||||
wmsMaterialTransferD.material_ex = material.name;
|
||||
wmsMaterialTransferD.material_specification = material.material_specification;
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
||||
commonCreatePretaskInput.biz_type = WmsWareHouseConst.BIZTYPE_WmsMaterialSign_ID;
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
|
||||
|
||||
Logger.LogInformation($"【MaterialSign】 开始生成原材料仓回库任务 起点{carryLoc.location_code} 终点{endLocations[0].location_code} 托盘 {wmsCarryH.carry_code}");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -455,6 +455,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput.carry_code = input.carry_code;
|
||||
commonCreatePretaskInput.task_type = "";
|
||||
commonCreatePretaskInput.biz_type = WmsWareHouseConst.BIZTYPE_PRDRETURN_ID;
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
|
||||
|
||||
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput);
|
||||
if (res.code != JNPF.Common.Enums.HttpStatusCode.OK)
|
||||
|
||||
@@ -185,6 +185,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput.carry_id = wmsCarryH.id;
|
||||
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput.isExcuteMission = false;
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
|
||||
|
||||
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput.carry_id = wmsCarryH.id;
|
||||
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput.isExcuteMission = false;
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
|
||||
|
||||
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);
|
||||
|
||||
|
||||
@@ -201,6 +201,7 @@ namespace Tnb.WarehouseMgr
|
||||
commonCreatePretaskInput.carry_id = wmsCarryH.id;
|
||||
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput.isExcuteMission = false;
|
||||
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
|
||||
|
||||
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user