物料呼叫接口修改
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.WarehouseMgr.Entities.Dto.ErpInputs
|
||||
{
|
||||
public class MaterialTransferInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? bill_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单据状态
|
||||
/// </summary>
|
||||
public string? biil_status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单创建日期
|
||||
/// </summary>
|
||||
public DateTime? bill_date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出库仓库
|
||||
/// </summary>
|
||||
public string? warehouse_outstock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库仓库
|
||||
/// </summary>
|
||||
public string? warehouse_instock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出库业务员
|
||||
/// </summary>
|
||||
public string? biller_out { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出库部门
|
||||
/// </summary>
|
||||
public string? depart_out { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库业务员
|
||||
/// </summary>
|
||||
public string? biller_in { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库部门
|
||||
/// </summary>
|
||||
public string? depart_in { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 应发货日期
|
||||
/// </summary>
|
||||
public DateTime deliver_date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 应到货日期
|
||||
/// </summary>
|
||||
public DateTime arrival_date { get; set; }
|
||||
|
||||
public List<MaterialTransferDetail> details { get; set; }
|
||||
}
|
||||
public class MaterialTransferDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 行号
|
||||
/// </summary>
|
||||
public string? lineno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物品代码
|
||||
/// </summary>
|
||||
public string? material_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string material_specification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位代码
|
||||
/// </summary>
|
||||
public string? unit_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批号
|
||||
/// </summary>
|
||||
public string? code_batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工位编码
|
||||
/// </summary>
|
||||
public string? station_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 应转主数量
|
||||
/// </summary>
|
||||
public decimal? qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料描述
|
||||
/// </summary>
|
||||
public string? material_ex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,5 +18,10 @@
|
||||
/// 料架号
|
||||
/// </summary>
|
||||
public string? carry_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 终点库位
|
||||
/// </summary>
|
||||
public string? endlocation_id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,13 +554,19 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($"此料架目标工位为空!{input.carry_code}!", 500);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(wmsCarryH.location_id))
|
||||
//if (string.IsNullOrEmpty(wmsCarryH.location_id))
|
||||
//{
|
||||
// Logger.LogWarning($"【CallRackToProductionLine】此料架的库位为空!{input.carry_code}");
|
||||
// throw new AppFriendlyException($"此料架的库位为空!{input.carry_code}", 500);
|
||||
//}
|
||||
|
||||
if (string.IsNullOrEmpty(input.endlocation_id))
|
||||
{
|
||||
Logger.LogWarning($"【CallRackToProductionLine】此料架的库位为空!{input.carry_code}");
|
||||
throw new AppFriendlyException($"此料架的库位为空!{input.carry_code}", 500);
|
||||
Logger.LogWarning($"【CallRackToProductionLine】终点库位不能为空!{input.carry_code}");
|
||||
throw new AppFriendlyException($"终点库位不能为空!{input.carry_code}", 500);
|
||||
}
|
||||
|
||||
BasLocation endlocation = _db.Queryable<BasLocation>().Where(r => r.location_code == wmsCarryH.work_station).First();
|
||||
//BasLocation endlocation = _db.Queryable<BasLocation>().Where(r => r.location_code == wmsCarryH.work_station).First();
|
||||
|
||||
WmsPretaskH wmsPretaskH = _db.Queryable<WmsPretaskH>().Where(r => r.carry_code == wmsCarryH.carry_code && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID).First();
|
||||
if (wmsPretaskH != null)
|
||||
@@ -571,7 +577,7 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
CommonCreatePretaskInput commonCreatePretaskInput = new CommonCreatePretaskInput();
|
||||
commonCreatePretaskInput.startlocation_id = wmsCarryH.location_id;
|
||||
commonCreatePretaskInput.endlocation_id = endlocation.id;
|
||||
commonCreatePretaskInput.endlocation_id = input.endlocation_id;
|
||||
commonCreatePretaskInput.carry_id = wmsCarryH.id;
|
||||
commonCreatePretaskInput.carry_code = wmsCarryH.carry_code;
|
||||
commonCreatePretaskInput.task_type = "";
|
||||
|
||||
Reference in New Issue
Block a user