From 059777821c875258b0fb6f39064cf75e12e5ad45 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期四, 04 十二月 2025 16:57:34 +0800
Subject: [PATCH] 格式化代码
---
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
index 369d67e..a389d14 100644
--- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using System.Collections.Generic;
using System.Data;
+using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.InterFaceModel;
@@ -80,9 +81,33 @@
skuname = "%" + model.SkuName + "%", //鐗╂枡鍚嶇О
lotno = model.LotNo, //鎵规鍙�
isqualified = model.IsQualified, //鏄惁鍚堟牸
- origin=model.Origin//鏉ユ簮
+ origin = model.Origin//鏉ユ簮
});
return qualityList;
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇闇�瑕佽川妫�鐨勬壒娆″彿
+ /// </summary>
+ /// <param name="pageIndex">椤电爜</param>
+ /// <param name="pageSize">椤靛ぇ灏�</param>
+ /// <returns></returns>
+ public IEnumerable<string> GetInspectLotNoList(int pageIndex, int pageSize)
+ {
+ int index = (pageIndex <= 1) ? 1 : pageIndex;
+ int size = (pageSize <= 100) ? 100 : pageSize;
+
+ string lotnoSql = $@"select LotNo
+ from DataStockDetail
+ where isnull(InspectStatus,'')='0' and isnull(ASNNo,'')!='' and isnull(SkuNo,'')!=''
+ group by LotNo
+ order by LotNo
+ offset {(index - 1) * size} rows fetch next {size} rows only";
+ DataTable lotnoDt = Db.Ado.GetDataTable(lotnoSql);
+
+ var result = lotnoDt.Rows.Cast<DataRow>().Select(e => e["LotNo"] + "");
+ return result;
}
@@ -166,7 +191,7 @@
{
sqlStr += $" and LotNo='{model.LotNo}' ";
}
- BllArrivalNoticeDetail arrivalDetail = Db.SqlQueryable<BllArrivalNoticeDetail>(sqlStr).First();
+ BllArrivalNoticeDetail arrivalDetail = Db.SqlQueryable<BllArrivalNoticeDetail>(sqlStr).First();
if (arrivalDetail == null)
{
throw new Exception("鏈壘鍒板叆搴撳崟淇℃伅锛�");
@@ -195,7 +220,7 @@
List<DataStockDetail> detail = Db.SqlQueryable<DataStockDetail>(sqlStr2).ToList();
foreach (var item in detail)
{
- List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
+ //List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();
//鍒ゆ柇鍚堟牸鐘舵�佹槸鍚﹀悎鏍�
if (model.IsQualified == "1")
{
@@ -211,13 +236,18 @@
item.InspectStatus = "2"; //2涓嶅悎鏍�
}
- Db.Updateable(box).ExecuteCommand();
+ //Db.Updateable(box).ExecuteCommand();
Db.Updateable(item).ExecuteCommand();
}
Db.Updateable(arrivalDetail).ExecuteCommand();
var isquality = Db.Insertable(model).ExecuteCommand();
+ //淇敼搴撳瓨绠辩爜璐ㄦ鐘舵��
+ string uptDataBoxStatusSql = $@"update DataBoxInfo set InspectStatus='1' where IsDel='0' and SkuNo='{model.SkuNo}' and LotNo='{model.LotNo}' and StockDetailId in (select Id from DataStockDetail where IsDel='0' and SkuNo='{model.SkuNo}' and LotNo='{model.LotNo}' and InspectStatus='1') ";
+ int uptDataBoxStatus = Db.Ado.ExecuteCommand(uptDataBoxStatusSql);
+
+
return isquality;
}
/// <summary>
--
Gitblit v1.8.0