From 2045b7d31aa63e97d820c72c21cf145adb58960c Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 16 一月 2025 13:11:29 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/liudongl/jc24-wms
---
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
index 8c3ef1b..386cd35 100644
--- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -6,6 +6,7 @@
using Model.ModelDto.BllQualityDto;
using Model.ModelVm;
using SqlSugar;
+using Utility.Tools;
using WMS.DAL;
using WMS.Entity.BllAsnEntity;
using WMS.Entity.BllQualityEntity;
@@ -193,23 +194,37 @@
return isquality;
}
-
/// <summary>
/// 璐ㄦ澶嶆牳淇℃伅
/// </summary>
- /// <param name="model">璐ㄦ淇℃伅瀹炰綋妯″瀷</param>
+ /// <param name="id"></param>
+ /// <param name="userNo"></param>
+ /// <param name="password"></param>
+ /// <param name="userId"></param>
/// <returns></returns>
- public int FinshQuality(int id,string type,int userId)
+ /// <exception cref="Exception"></exception>
+ public int FinshQuality(int id,string userNo, string password, int userId)
{
- //楠岃瘉璐ㄦ鍙锋槸鍚︿负绌�
- if (string.IsNullOrEmpty(type))
+ var loginPwd = Md5Tools.CalcMd5(password);
+ var date = Db.Queryable<SysUserInfor>().First(m => m.IsDel == "0" && m.UserName == userNo && m.PassWord == loginPwd);
+
+ if (date == null) //璐﹀彿瀵嗙爜鏄惁姝g‘
{
- throw new Exception("鐘舵�佷笉鑳戒负绌猴紒");
+ throw new Exception("璐﹀彿瀵嗙爜涓嶆纭垨娌℃湁姝よ处鍙�");
}
+ if (date.Status != "0") //褰撳墠璐﹀彿鏄惁姝e父鍚敤
+ {
+ throw new Exception("褰撳墠璐﹀彿闈炲惎鐢ㄧ姸鎬�");
+ }
+
var model = Db.Queryable<BllQualityInspect>().First(m=>m.IsDel == "0" && m.Id == id);
if (model == null)
{
throw new Exception("鏈煡璇㈠埌璐ㄦ淇℃伅");
+ }
+ if (date.Id == model.CreateUser)
+ {
+ throw new Exception("澶嶆牳澶辫触锛屽鏍镐汉鍛樺拰鍏抽棴璁㈠崟浜哄憳涓嶈兘鐩稿悓锛�");
}
int isTui = 0;
//楠岃瘉鍏ュ簱鍗曞彿鏄惁涓虹┖
@@ -233,8 +248,9 @@
- model.Status = type; //瑙勬牸
- model.IsQualified = type;
+ model.Status = "1"; //瑙勬牸
+ model.UpdateTime = DateTime.Now;
+ model.UpdateUser = userId;
//model.SupplierLot = arrivalDetail.SupplierLot; //渚涜揣鎵规
//鏌ユ壘搴撳瓨鏄庣粏淇℃伅
@@ -247,7 +263,7 @@
{
List<DataBoxInfo> box = Db.Queryable<DataBoxInfo>().Where(a => a.IsDel == "0" && a.StockDetailId == item.Id && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
//鍒ゆ柇鍚堟牸鐘舵�佹槸鍚﹀悎鏍�
- if (type == "1")
+ if (model.IsQualified == "1")
{
//鍚堟牸 鐩稿悓鎵规搴撳瓨淇℃伅鍏ㄩ儴鏀逛负鍚堟牸鐘舵�� 涓斿悎鏍兼暟閲忓鍔犱负鍚屾壒娆″悓鍗曞彿璇ョ墿鏂欏叏閮ㄦ暟閲忎箣鍜�
model.PassQty += item.Qty;
--
Gitblit v1.8.0