From 112f15a096f27207a34a0a7c8997fb6048a2bbe0 Mon Sep 17 00:00:00 2001
From: majian <780924089@qq.com>
Date: Fri, 21 Jun 2024 16:05:56 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=91=BC=E5=8F=AB=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dto/ErpInputs/MaterialTransferInput.cs | 110 ++++++++++++++++++
...alTransferCallRackToProductionLineInput.cs | 5 +
.../WmsMaterialTransferService.cs | 16 ++-
3 files changed, 126 insertions(+), 5 deletions(-)
create mode 100644 WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/ErpInputs/MaterialTransferInput.cs
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 = "";