From ae3735e011b0780efdae8b9220ff90ec8a8446b6 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期三, 03 十二月 2025 11:02:29 +0800
Subject: [PATCH] 删除包装DelPackag增加admin跳过验证
---
Wms/WMS.BLL/SysServer/PackagServer.cs | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/Wms/WMS.BLL/SysServer/PackagServer.cs b/Wms/WMS.BLL/SysServer/PackagServer.cs
index 4f7bca8..0916b9d 100644
--- a/Wms/WMS.BLL/SysServer/PackagServer.cs
+++ b/Wms/WMS.BLL/SysServer/PackagServer.cs
@@ -47,7 +47,8 @@
var data = await PackagRst.GetAllByOrderPage(item, limit, page, out int counts)
.Includes(x => x.CreateUserInfo)
.Includes(x => x.UpdateUserInfo).ToListAsync();
- count = counts;
+
+ count.Value = counts;
return data.Select(m => new PackagDto()
{
@@ -209,7 +210,7 @@
//鍒ゆ柇浜旂骇鍖呰鏄惁涓虹┖
if (!string.IsNullOrEmpty(model.L5Num) && !string.IsNullOrEmpty(model.L5Name))
{
- packagItems.L5Num = int.Parse(model.L5Num);
+ packagItems.L5Num = decimal.Parse(model.L5Num);
packagItems.L5Name = model.L5Name;
packagItems.Level += 1;
//鍒ゆ柇鍥涚骇鍖呰鏄惁涓虹┖
@@ -226,7 +227,7 @@
//鍒ゆ柇鍥涚骇鍖呰鏄惁涓虹┖
if (!string.IsNullOrEmpty(model.L4Num) && !string.IsNullOrEmpty(model.L4Name))
{
- packagItems.L4Num = int.Parse(model.L4Num);
+ packagItems.L4Num = decimal.Parse(model.L4Num);
packagItems.L4Name = model.L4Name;
packagItems.Level += 1;
//鍒ゆ柇涓夌骇鍖呰鏄惁涓虹┖
@@ -243,7 +244,7 @@
//鍒ゆ柇涓夌骇鍖呰鏄惁涓虹┖
if (!string.IsNullOrEmpty(model.L3Num) && !string.IsNullOrEmpty(model.L3Name))
{
- packagItems.L3Num = int.Parse(model.L3Num);
+ packagItems.L3Num = decimal.Parse(model.L3Num);
packagItems.L3Name = model.L3Name;
packagItems.Level += 1;
//鍒ゆ柇浜岀骇鍖呰鏄惁涓虹┖
@@ -260,7 +261,7 @@
//鍒ゆ柇浜岀骇鍖呰鏄惁涓虹┖
if (!string.IsNullOrEmpty(model.L2Num) && !string.IsNullOrEmpty(model.L2Name))
{
- packagItems.L2Num = int.Parse(model.L2Num);
+ packagItems.L2Num = decimal.Parse(model.L2Num);
packagItems.L2Name = model.L2Name;
packagItems.Level += 1;
//鍒ゆ柇涓�绾у寘瑁呮槸鍚︿负绌�
@@ -277,7 +278,7 @@
//鍒ゆ柇涓�绾у寘瑁呮槸鍚︿负绌�
if (!string.IsNullOrEmpty(model.L1Num) && !string.IsNullOrEmpty(model.L1Name))
{
- packagItems.L1Num = int.Parse(model.L1Num);
+ packagItems.L1Num = decimal.Parse(model.L1Num);
packagItems.L1Name = model.L1Name;
packagItems.Level += 1;
}
@@ -304,10 +305,14 @@
{
throw Oops.Bah("鍖呰淇℃伅涓嶅瓨鍦紒");
}
- var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo);
- if (modMaterial != null)
+ //admin鍙互璺宠繃姝ら獙璇�
+ if (userId != 1)
{
- throw Oops.Bah("瀛樺湪姝e湪浣跨敤姝ゅ寘瑁呯殑鐗╂枡锛�");
+ var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo);
+ if (modMaterial != null)
+ {
+ throw Oops.Bah("瀛樺湪姝e湪浣跨敤姝ゅ寘瑁呯殑鐗╂枡锛�");
+ }
}
packagItems.IsDel = "1";
--
Gitblit v1.8.0