diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/MaterialTransferInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/MaterialTransferInput.cs
new file mode 100644
index 00000000..06a7195c
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/MaterialTransferInput.cs
@@ -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
+ {
+ ///
+ /// 单号
+ ///
+ public string? bill_code { get; set; }
+
+ ///
+ /// 单据状态
+ ///
+ public string? biil_status { get; set; }
+
+ ///
+ /// 入库单创建日期
+ ///
+ public DateTime? bill_date { get; set; }
+
+ ///
+ /// 出库仓库
+ ///
+ public string? warehouse_outstock { get; set; }
+
+ ///
+ /// 入库仓库
+ ///
+ public string? warehouse_instock { get; set; }
+
+ ///
+ /// 出库业务员
+ ///
+ public string? biller_out { get; set; }
+
+ ///
+ /// 出库部门
+ ///
+ public string? depart_out { get; set; }
+
+ ///
+ /// 入库业务员
+ ///
+ public string? biller_in { get; set; }
+
+ ///
+ /// 入库部门
+ ///
+ public string? depart_in { get; set; }
+
+ ///
+ /// 应发货日期
+ ///
+ public DateTime deliver_date { get; set; }
+
+ ///
+ /// 应到货日期
+ ///
+ public DateTime arrival_date { get; set; }
+
+ public List details { get; set; }
+ }
+ public class MaterialTransferDetail
+ {
+ ///
+ /// 行号
+ ///
+ public string? lineno { get; set; }
+
+ ///
+ /// 物品代码
+ ///
+ public string? material_code { get; set; }
+
+ ///
+ /// 规格型号
+ ///
+ public string material_specification { get; set; }
+
+ ///
+ /// 单位代码
+ ///
+ public string? unit_code { get; set; }
+
+ ///
+ /// 批号
+ ///
+ public string? code_batch { get; set; }
+
+ ///
+ /// 工位编码
+ ///
+ public string? station_code { get; set; }
+
+ ///
+ /// 应转主数量
+ ///
+ public decimal? qty { get; set; }
+
+ ///
+ /// 物料描述
+ ///
+ public string? material_ex { get; set; }
+ }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialTransferCallRackToProductionLineInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialTransferCallRackToProductionLineInput.cs
index 91dac301..c291316b 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialTransferCallRackToProductionLineInput.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/MaterialTransferCallRackToProductionLineInput.cs
@@ -18,5 +18,10 @@
/// 料架号
///
public string? carry_code { get; set; }
+
+ ///
+ /// 终点库位
+ ///
+ public string? endlocation_id { get; set; }
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
index 013a4e44..58bd71b5 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialTransferService.cs
@@ -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().Where(r => r.location_code == wmsCarryH.work_station).First();
+ //BasLocation endlocation = _db.Queryable().Where(r => r.location_code == wmsCarryH.work_station).First();
WmsPretaskH wmsPretaskH = _db.Queryable().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 = "";