From 6695afe1e1c478dbb599a1d382d8d6628b456d03 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 18 一月 2025 17:30:49 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs"
index fa7fd73..d1a47ae 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs"
@@ -20,6 +20,8 @@
using WIDESEA_IBasicService;
using WIDESEA_Common.LocationEnum;
using WIDESEA_IRecordService;
+using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.TaskEnum;
namespace WIDESEA_OutboundService
{
@@ -104,6 +106,9 @@
{
try
{
+ stockInfos.ForEach(x => {
+ x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
_stockService.StockInfoService.Repository.UpdateData(stockInfos);
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
foreach (var item in stockInfos)
@@ -140,5 +145,54 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+ public WebResponseContent AddMesOrder(SubstrateOutModel substrateOutModel)
+ {
+ try
+ {
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString());
+ if (warehouse == null)
+ {
+ return WebResponseContent.Instance.Error($"浠撳簱鍩虹淇℃伅鏈厤缃�");
+ }
+
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == substrateOutModel.MaterialCode);
+ if (materielInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡淇℃伅");
+ }
+ int orderType = 0;
+ if(substrateOutModel.Line == "1011")
+ {
+ orderType = MesOutboundOrderTypeEnum.HandSubstrateOutPick.ObjToInt();
+ }
+ else
+ {
+ orderType = MesOutboundOrderTypeEnum.HandSubstrateOut.ObjToInt();
+ }
+
+ Dt_MesOutboundOrder mesOutboundOrder = new Dt_MesOutboundOrder()
+ {
+ CreateType = OrderCreateTypeEnum.CreateInSystem.ObjToInt(),
+ Line = substrateOutModel.Line,
+ MaterialCode = substrateOutModel.MaterialCode,
+ MaterialName = materielInfo.MaterielName,
+ OrderQuantity = substrateOutModel.RequiredQuantity,
+ TaskNo = DateTime.Now.ToString("yyyyMMddHHmmss"),
+ Unit = substrateOutModel.Unit,
+ OrderType = orderType,
+ OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ WarehouseId = warehouse.WarehouseId
+ };
+
+ AddData(mesOutboundOrder);
+
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
--
Gitblit v1.9.3