From 19e95f4acc328bbf62a0427fe658d00268019e66 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期一, 07 四月 2025 10:14:34 +0800
Subject: [PATCH] 修改IIS配置

---
 Wms/WMS.BLL/SysServer/MaterialsServer.cs |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/Wms/WMS.BLL/SysServer/MaterialsServer.cs b/Wms/WMS.BLL/SysServer/MaterialsServer.cs
index eb05ab5..f83c050 100644
--- a/Wms/WMS.BLL/SysServer/MaterialsServer.cs
+++ b/Wms/WMS.BLL/SysServer/MaterialsServer.cs
@@ -150,10 +150,20 @@
 
                 if (count > 0)
                 {
-                    throw new Exception("鐗╂枡缂栫爜閲嶅");
+                    return 2;
                 }
 
-
+                switch (matedto.Warrantydate)
+                {
+                    case "1": //淇濆瓨浠ユ湀涓哄崟浣�
+                        matedto.Warranty = matedto.Warranty * 30;
+                        break;
+                    case "2": //淇濆瓨浠ュ勾涓哄崟浣�
+                        matedto.Warranty = matedto.Warranty * 365;
+                        break;
+                    default:
+                        break;
+                }
                 //鏄犲皠妯″瀷
                 SysMaterials mate = _mapper.Map<SysMaterials>(matedto);
                 mate.AuditStatusNo = "9"; //瀹℃牳鐘舵��
@@ -209,14 +219,6 @@
             //鎹曡幏寮傚父
             try
             {
-
-                int count = GetMateByNo(matedto.SkuNo);
-
-                if (count > 0)
-                {
-                    throw new Exception("鐗╂枡缂栫爜閲嶅");
-                }
-
                 if (matedto.AdventTime > 365 && matedto.AdventTime < 30)
                 {
                     return 2;

--
Gitblit v1.8.0