This commit is contained in:
2024-11-06 17:56:13 +08:00
8 changed files with 21 additions and 10 deletions

View File

@@ -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(); 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) if (!result_createPretask)
{ {
LoggerYCLGLDPJInstock.LogWarning($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败"); 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(); 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) if (!result_createPretask)
{ {
LoggerYCLGLDPJInstock.LogWarning($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败"); 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.require_id = require_id;
commonCreatePretaskInput.source_id = source_id; commonCreatePretaskInput.source_id = source_id;
commonCreatePretaskInput.isExcuteMission = false; commonCreatePretaskInput.isExcuteMission = false;
if (task_type == WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID)
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
logger.LogInformation($"开始执行 GenPreTask {JsonConvert.SerializeObject(commonCreatePretaskInput)}"); logger.LogInformation($"开始执行 GenPreTask {JsonConvert.SerializeObject(commonCreatePretaskInput)}");
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, dbConn); var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, dbConn);
if (res.code == JNPF.Common.Enums.HttpStatusCode.OK) if (res.code == JNPF.Common.Enums.HttpStatusCode.OK)

View File

@@ -1059,6 +1059,7 @@ namespace Tnb.WarehouseMgr
if (material != null) if (material != null)
{ {
wmsMaterialTransferD.material_id = material.id; wmsMaterialTransferD.material_id = material.id;
wmsMaterialTransferD.material_ex = material.name;
wmsMaterialTransferD.material_specification = material.material_specification; wmsMaterialTransferD.material_specification = material.material_specification;
} }

View File

@@ -264,6 +264,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code; commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID; commonCreatePretaskInput.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
commonCreatePretaskInput.biz_type = WmsWareHouseConst.BIZTYPE_WmsMaterialSign_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}"); Logger.LogInformation($"【MaterialSign】 开始生成原材料仓回库任务 起点{carryLoc.location_code} 终点{endLocations[0].location_code} 托盘 {wmsCarryH.carry_code}");

View File

@@ -126,7 +126,7 @@ namespace Tnb.WarehouseMgr
if (power.Count() > 0) if (power.Count() > 0)
isShowJZGL = true; isShowJZGL = true;
} }
SqlSugarPagedList<WmsMaterialTransfer> result = await _db.Queryable<WmsMaterialTransfer>() SqlSugarPagedList<WmsMaterialTransfer> result = await _db.Queryable<WmsMaterialTransfer>()
.InnerJoin<DictionaryDataEntity>((a, b) => a.status == b.Id) .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) => d.id == a.warehouse_outstock)
.InnerJoin<BasWarehouse>((a, b, c, d, e) => e.id == a.warehouse_instock) .InnerJoin<BasWarehouse>((a, b, c, d, e) => e.id == a.warehouse_instock)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.type == f.EnCode) .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") //.Where(a => a.status != "25065149810453")
.WhereIF(queryJson != null && queryJson["type"] != null, a => a.type == queryJson["type"].ToString()) .WhereIF(queryJson != null && queryJson["type"] != null && queryJson["type"].ToString() != "", 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["bill_code"] != null && queryJson["bill_code"].ToString() != "", 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["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["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) .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, id = a.id,
create_id = c.RealName, create_id = c.RealName,
@@ -169,8 +172,6 @@ namespace Tnb.WarehouseMgr
.OrderBy("a.create_time desc") .OrderBy("a.create_time desc")
.ToPagedListAsync(input.currentPage, input.pageSize); .ToPagedListAsync(input.currentPage, input.pageSize);
var _data = PageResult<WmsMaterialTransfer>.SqlSugarPageResult(result); var _data = PageResult<WmsMaterialTransfer>.SqlSugarPageResult(result);
var json = JsonConvert.SerializeObject(_data); var json = JsonConvert.SerializeObject(_data);
var data = JsonConvert.DeserializeObject<dynamic>(json); 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()))); wmsTransferInstockH["tablefield120"] = JArray.Parse(JsonConvert.SerializeObject(wmsTransferInstockDs.Where(r => r.bill_id == wmsTransferInstockH["id"].ToString())));
} }
return data; return data;
} }
catch (Exception ex) catch (Exception ex)
@@ -2089,6 +2091,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_id = wmsCarryH.id; commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code; commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.isExcuteMission = false; commonCreatePretaskInput.isExcuteMission = false;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput); Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput);

View File

@@ -455,6 +455,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_code = input.carry_code; commonCreatePretaskInput.carry_code = input.carry_code;
commonCreatePretaskInput.task_type = ""; commonCreatePretaskInput.task_type = "";
commonCreatePretaskInput.biz_type = WmsWareHouseConst.BIZTYPE_PRDRETURN_ID; commonCreatePretaskInput.biz_type = WmsWareHouseConst.BIZTYPE_PRDRETURN_ID;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_instock;
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput); var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput);
if (res.code != JNPF.Common.Enums.HttpStatusCode.OK) if (res.code != JNPF.Common.Enums.HttpStatusCode.OK)

View File

@@ -185,6 +185,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_id = wmsCarryH.id; commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code; commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.isExcuteMission = false; commonCreatePretaskInput.isExcuteMission = false;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db); Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);

View File

@@ -340,6 +340,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_id = wmsCarryH.id; commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code; commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.isExcuteMission = false; commonCreatePretaskInput.isExcuteMission = false;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db); Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);

View File

@@ -201,6 +201,7 @@ namespace Tnb.WarehouseMgr
commonCreatePretaskInput.carry_id = wmsCarryH.id; commonCreatePretaskInput.carry_id = wmsCarryH.id;
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code; commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
commonCreatePretaskInput.isExcuteMission = false; commonCreatePretaskInput.isExcuteMission = false;
commonCreatePretaskInput.priority = WmsWareHouseConst.priority_outstock;
Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db); Entities.Dto.Outputs.Result res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, _db);