From 8467a224aaac3dfe516fb72a2eaf7e443311a910 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 01 十二月 2025 14:42:35 +0800
Subject: [PATCH] 采购订单(委外+采购)新增+变更共用 ERP->MES
---
MES.Service/service/BasicData/MesRohInManager.cs | 54 +++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 37 insertions(+), 17 deletions(-)
diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index 758b087..a08107d 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -4,6 +4,7 @@
using MES.Service.Modes;
using SqlSugar;
using System.Globalization;
+using System.Security.AccessControl;
namespace MES.Service.service.BasicData;
@@ -19,6 +20,11 @@
var mesRohInDatas =
GetMesRohInDatas(rohIn.ErpRohinDatas);
+ //1 | 鏈疄鐜� | 鎶涘嚭寮傚父
+ //2 | 瀹℃牳 | 璋冪敤 SaveOrUpdateData锛屾甯告彃鍏�/鏇存柊
+ //3 | 鍙嶅鏍� | 璋冪敤 SaveOrUpdateData锛孊illNo 涓�瀹氬姞鍚庣紑
+ //4 | 鎵嬪伐鍚屾 | 璋冪敤 SaveOrUpdateData锛屾甯告彃鍏�/鏇存柊
+ //5 | 鏈敞閲� | 璋冪敤 SaveOrUpdateData锛屾甯告彃鍏�/鏇存柊
return UseTransaction(db =>
{
return rohInErpRohIn.Type switch
@@ -159,9 +165,20 @@
mesRohIn.Anred = rohIn.FTContact;
mesRohIn.Telf1 = rohIn.Fmobilephone;
mesRohIn.FixedTelephone = rohIn.FixedTelephone;
- mesRohIn.Address = rohIn.Address;
- mesRohIn.Acctype = rohIn.Acctype;
+ mesRohIn.Address = rohIn.FProviderAddress;//渚涜揣鏂瑰湴鍧�
mesRohIn.SynchronousDate = DateTime.Now;
+
+ mesRohIn.Remark2= rohIn.F_UNW_GYSLXR;// 渚涘簲鍟嗚仈绯讳汉
+ mesRohIn.Remark3= rohIn.F_UNW_LXRDH;// 鑱旂郴浜虹數璇�
+ mesRohIn.Remark4 = rohIn.FProviderJob;// 鑱屽姟
+ mesRohIn.Remark5 = rohIn.FProviderPhone;// 鎵嬫満
+
+ mesRohIn.QtyAcceptance = rohIn.FACCTYPE;//楠屾敹鏂瑰紡
+ mesRohIn.QualityReq = rohIn.F_UNW_Remarks_zlyq;//璐ㄩ噺瑕佹眰
+ mesRohIn.TransportMethod = rohIn.F_UNW_Text_ysfs;//杩愯緭鏂瑰紡
+ mesRohIn.Remarks = rohIn.F_UNW_BZ;//澶囨敞
+ mesRohIn.FixtureMoldProcurement = rohIn.F_UNW_Combo_zjmj;//娌诲叿涓舵ā鍏峰姞宸ュ強閲囪喘
+ mesRohIn.urgent_material = rohIn.FUrgent_Material;//鎬ユ枡
return mesRohIn;
}
@@ -204,21 +221,21 @@
BusinessClose = s.FMRPCloseStatus,
BusinessFreeze = s.FMRPFreezeStatus,
Freezer = s.FFreezerId,
- //FreezeTime = !string.IsNullOrEmpty(s.FFreezeDate)
- // && DateTime.TryParseExact(s.FFreezeDate,
- // new[] { "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd" }, // 鏀寔澶氱鏍煎紡
- // CultureInfo.InvariantCulture,
- // DateTimeStyles.None,
- // out var parsedDate)
- // && parsedDate > new DateTime(1900, 1, 1)
- // ? parsedDate
- // : (DateTime?)null,
+ FreezeTime = !string.IsNullOrEmpty(s.FFreezeDate)
+ && DateTime.TryParseExact(s.FFreezeDate,
+ new[] { "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd" }, // 鏀寔澶氱鏍煎紡
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out var parsedDate)
+ && parsedDate > new DateTime(1900, 1, 1)
+ ? parsedDate
+ : (DateTime?)null,
BusinessTerminate = s.FMRPTerminateStatus,
Terminator = s.FTerminaterId,
- //TerminateTime = s.FTerminateDate != null
- // ? DateTime.ParseExact(s.FTerminateDate,
- // "yyyy-MM-dd HH:mm:ss", null)
- // : null,
+ TerminateTime = s.FTerminateDate != null
+ ? DateTime.ParseExact(s.FTerminateDate,
+ "yyyy-MM-dd HH:mm:ss", null)
+ : null,
TotalReceivedQty = Convert.ToDecimal(s.FReceiveQty), //绱鏀舵枡鏁�
RemainingReceivedQty =
Convert.ToDecimal(s.FRemainReceiveQty),
@@ -228,7 +245,7 @@
ReturnableReceivedQty =
Convert.ToDecimal(s.FCHECKRETQTY), //鏀舵枡鍙��鏁�
ReturnableStoredQty = Convert.ToDecimal(s.FSTOCKRETQTY), //搴撳瓨鍙��鏁�
- SourceDocumentType = s.FSrcBillTypeId,
+ SourceDocumentType = s.FBillTypeID,//閲囪喘鍗曞埆
SourceDocumentId = s.FSrcBillNo,
DemandTrackingId = s.FReqTraceNo,
PlanTrackingId = s.FMtoNo,
@@ -244,7 +261,10 @@
Receiving = s.FReceiveOrgId,
Settlement = s.FSETTLEORGID,
DemandDepartment = s.FRequireDeptId,
- ReceivingDepartment = s.FReceiveDeptId
+ ReceivingDepartment = s.FReceiveDeptId,
+
+ Remark5 = s.FUrgent_Material, //鎬ユ枡
+ SalesOrderId = s.F_UNW_Text_xsddh
};
if (s.FFreezeDate != null)
--
Gitblit v1.9.3