From f124565982920c54c7c92d27d0a0c6bf61689e83 Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期四, 19 六月 2025 17:14:23 +0800
Subject: [PATCH] Merge branch 'csc'
---
Wms/Wms/appsettings.json | 8 ++++----
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 33 ++++++++++++++++++++++++++++++++-
Pda/View/AsnSetting/LocationOptimize.html | 2 +-
3 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/Pda/View/AsnSetting/LocationOptimize.html b/Pda/View/AsnSetting/LocationOptimize.html
index 76423b8..90e8d8c 100644
--- a/Pda/View/AsnSetting/LocationOptimize.html
+++ b/Pda/View/AsnSetting/LocationOptimize.html
@@ -86,7 +86,7 @@
<table border="" cellspacing="" cellpadding="">
<tr>
<td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td>
- <td class="title-text" lang>搴撲綅宸烽亾</td>
+ <td class="title-text" lang>鎸囧畾鍌ㄤ綅</td>
<td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td>
</tr>
</table>
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 6075b7c..edf83da 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -301,6 +301,8 @@
};
List<BllArrivalNoticeDetail> details = new List<BllArrivalNoticeDetail>();
+ var skuList = Db.Queryable<SysMaterials>().Where(m => m.IsDel == "0").ToList();
+
foreach (ArrivalNoticeDetailVm detailModel in model.AsnDetail)
{
if (string.IsNullOrEmpty(detailModel.SkuNo))
@@ -318,7 +320,7 @@
strMessage = "-1:鏁伴噺蹇呴』澶т簬0;";
continue;
}
-
+
if ( model.Type == "5" || model.Type == "6" || model.Type == "7")
{
if (!string.IsNullOrWhiteSpace(detailModel.LotNo))
@@ -375,6 +377,33 @@
{
detailModel.Price = 0;
}
+ var sku = skuList.FirstOrDefault(m => m.SkuNo == detailModel.SkuNo);
+ if (sku == null)
+ {
+ throw new Exception("鏈煡璇㈠嚭鐗╂枡淇℃伅!");
+ }
+ string lot1 = detailModel.Lot1;
+ string lot2 = detailModel.Lot2;
+ if (sku.IsPasteCode == "0")
+ {
+ //涓嶈创鏍囩墿鏂� 鐢熶骇鏃ユ湡銆佹湁鏁堟湡涓嶈兘涓虹┖
+ DateTime lot12;
+ DateTime lot22;
+ if (!DateTime.TryParse(detailModel.Lot1, out lot12))
+ {
+ throw new Exception("闈炶创鏍囩墿鏂欑敓浜ф棩鏈熻浆鎹㈠け璐�");
+ }
+ if (!DateTime.TryParse(detailModel.Lot2, out lot22))
+ {
+ throw new Exception("闈炶创鏍囩墿鏂欒繃鏈熸棩鏈熻浆鎹㈠け璐�");
+ }
+ lot1 = lot12.ToString();
+ lot2 = lot22.ToString();
+ }
+ if (string.IsNullOrWhiteSpace(detailModel.PackagNo))
+ {
+ throw new Exception("鍖呰涓嶈兘涓虹┖");
+ }
// 璁$畻鍑烘�婚噾棰�
detailModel.Money = detailModel.Price * detailModel.Qty;
BllArrivalNoticeDetail detail = new BllArrivalNoticeDetail()
@@ -397,6 +426,8 @@
Status = "0",
IsSampling = "0",
InspectStatus = "0",
+ Lot1 = lot1, //鐢熶骇鏃ユ湡
+ Lot2 = lot2, // 杩囨湡鏃ユ湡
UDF1 = detailModel.UDF1,
UDF2 = detailModel.UDF2,
UDF3 = detailModel.UDF3,
diff --git a/Wms/Wms/appsettings.json b/Wms/Wms/appsettings.json
index 5ab4953..f67b999 100644
--- a/Wms/Wms/appsettings.json
+++ b/Wms/Wms/appsettings.json
@@ -11,8 +11,8 @@
//"ConnectionString": "Server=47.95.120.93;Database=WMS_JC09;User ID=sa;password=boxline!@#; Integrated Security=True;",
//"ConnectionString": "Server=47.95.120.53;Database=WMS_JC09;User ID=sa;Password=boxline!@#;Integrated Security=False;",
//"ConnectionString": "Server=192.168.62.106;Database=WMS_JC24;User ID=sa;Password=sql2019;Integrated Security=False;",
- "ConnectionString": "Server=10.26.200.29;Database=WMS_JC34;User ID=sa;Password=boxline@2016;Integrated Security=False;",
- //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;"
+ //"ConnectionString": "Server=10.26.200.29;Database=WMS_JC34;User ID=sa;Password=boxline@2016;Integrated Security=False;",
+ "ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;"
//"ConnectionString": "Server=.;Database=WMS_JC09;User ID=sa;Password=sql2019;Integrated Security=False;"
//"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;"
},
@@ -49,8 +49,8 @@
},
"Quartz": {
"dbProviderName": "SqlServer",
- //"connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;",
- "connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;"
+ "connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;"
+ //"connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;"
}
--
Gitblit v1.8.0