From 230e7f01f1fcff7520e744235317a127ddb7622d Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 23 六月 2025 14:27:44 +0800
Subject: [PATCH] 修改问题
---
HTML/views/QualityControl/QualityInformationFrom.html | 3 -
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs | 79 ++++++++++++++++++++++++---------------
Pda/View/AsnSetting/productEnterQuantity.html | 10 ++--
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 8 ++--
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 8 ++--
5 files changed, 62 insertions(+), 46 deletions(-)
diff --git a/HTML/views/QualityControl/QualityInformationFrom.html b/HTML/views/QualityControl/QualityInformationFrom.html
index b16fd47..06e8017 100644
--- a/HTML/views/QualityControl/QualityInformationFrom.html
+++ b/HTML/views/QualityControl/QualityInformationFrom.html
@@ -30,8 +30,7 @@
<div class="layui-form-item">
<label class="layui-form-label">鎵规鍙�</label>
<div class="layui-input-block" style="width: 70%;">
- <input type="text" name="LotNo" placeholder="璇疯緭鍏ユ壒娆″彿" lay-verify="required" autocomplete="off"
- class="layui-input">
+ <input type="text" name="LotNo" placeholder="璇疯緭鍏ユ壒娆″彿" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index ed63d72..75e05b7 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -737,7 +737,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
} else {
@@ -748,7 +748,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
@@ -759,7 +759,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
}
@@ -811,7 +811,7 @@
.SkuName);
}
if (res.data[i].LotNo != null) {
- $("#goodSelect1").append("-" + res.data[i].LotNo +
+ $("#goodSelect1").append("=>" + res.data[i].LotNo +
'</option>');
}
} else {
@@ -821,7 +821,7 @@
'</option>');
} else {
$("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
}
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 83b9df7..7aca437 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -405,18 +405,18 @@
}
string lot1 = detailModel.Lot1;
string lot2 = detailModel.Lot2;
- if (sku.IsPasteCode == "0")
+ if (sku.IsInspect == "0")//鏄惁鍏嶆锛�0锛氬惁 1锛氭槸
{
- //涓嶈创鏍囩墿鏂� 鐢熶骇鏃ユ湡銆佹湁鏁堟湡涓嶈兘涓虹┖
+ //涓嶅厤妫�鐗╂枡 鐢熶骇鏃ユ湡銆佹湁鏁堟湡涓嶈兘涓虹┖
DateTime lot12;
DateTime lot22;
if (!DateTime.TryParse(detailModel.Lot1, out lot12))
{
- throw new Exception("闈炶创鏍囩墿鏂欑敓浜ф棩鏈熻浆鎹㈠け璐�");
+ throw new Exception("涓嶅厤妫�鐗╂枡鐢熶骇鏃ユ湡杞崲澶辫触");
}
if (!DateTime.TryParse(detailModel.Lot2, out lot22))
{
- throw new Exception("闈炶创鏍囩墿鏂欒繃鏈熸棩鏈熻浆鎹㈠け璐�");
+ throw new Exception("涓嶅厤妫�鐗╂枡杩囨湡鏃ユ湡杞崲澶辫触");
}
lot1 = lot12.ToString();
lot2 = lot22.ToString();
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 81a389c..0c63e38 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -77,10 +77,10 @@
else
{
//浠庣墿鏂欏悕绉�-鎵规涓彇鍑烘壒娆�
- int indexOfDash = model.LotNo.IndexOf("-");
+ int indexOfDash = model.LotNo.IndexOf("=>");
if (indexOfDash != -1)
{
- model.LotNo = model.LotNo.Substring(indexOfDash + 1);
+ model.LotNo = model.LotNo.Substring(indexOfDash + 2);
}
else
{
@@ -1136,10 +1136,10 @@
else
{
//浠庣墿鏂欏悕绉�-鎵规涓彇鍑烘壒娆�
- int indexOfDash = model.LotNo.IndexOf("-");
+ int indexOfDash = model.LotNo.IndexOf("=>");
if (indexOfDash != -1)
{
- model.LotNo = model.LotNo.Substring(indexOfDash + 1);
+ model.LotNo = model.LotNo.Substring(indexOfDash + 2);
}
else
{
diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
index f2de73b..7bed1a0 100644
--- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -112,51 +112,59 @@
throw new Exception("鐗╂枡淇℃伅涓虹┖锛岃鏍告煡锛�");
}
//楠岃瘉鎵规鍙锋槸鍚︿负绌�
- if (string.IsNullOrEmpty(model.LotNo))
+ if (string.IsNullOrEmpty(model.LotNo) && string.IsNullOrEmpty(model.ASNNo))
{
- throw new Exception("鎵规鍙蜂笉鍙负绌猴紝璇锋牳鏌ワ紒");
+ throw new Exception("璇疯緭鍏ユ壒娆″彿鎴栧叆搴撳崟鍙凤紒");
}
//楠岃瘉鍏ュ簱鍗曞彿鏄惁涓虹┖
- if (string.IsNullOrEmpty(model.ASNNo))
- {
- throw new Exception("鍏ュ簱鍗曞彿涓嶅彲涓虹┖锛�");
+ //if (string.IsNullOrEmpty(model.ASNNo))
+ //{
+ // throw new Exception("鍏ュ簱鍗曞彿涓嶅彲涓虹┖锛�");
- //鏌ヨ鏄惁涓洪��璐у叆搴撳崟鎹�
- //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3");
- //if (Arrival == null)
- //{
- // throw new Exception("鍙湁鍏ュ簱鍗曟嵁涓洪��璐у叆搴撳崟鍙緭鍏� 鍏ュ簱鍗曞彿锛岃鏍告煡锛�");
- //}
+ //鏌ヨ鏄惁涓洪��璐у叆搴撳崟鎹�
+ //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3");
+ //if (Arrival == null)
+ //{
+ // throw new Exception("鍙湁鍏ュ簱鍗曟嵁涓洪��璐у叆搴撳崟鍙緭鍏� 鍏ュ簱鍗曞彿锛岃鏍告煡锛�");
+ //}
- ////鑾峰彇鍏ュ簱鍗曟槑缁�
- //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo);
- //if (ArrivalDetail == null)
- //{
- // throw new Exception("杈撳叆鐨勬壒娆℃垨鐗╂枡淇℃伅涓庡叆搴撳崟鎹笉绗︼紝璇锋牳鏌ワ紒");
- //}
- //isTui = 1;
- }
+ ////鑾峰彇鍏ュ簱鍗曟槑缁�
+ //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo);
+ //if (ArrivalDetail == null)
+ //{
+ // throw new Exception("杈撳叆鐨勬壒娆℃垨鐗╂枡淇℃伅涓庡叆搴撳崟鎹笉绗︼紝璇锋牳鏌ワ紒");
+ //}
+ //isTui = 1;
+ //}
//鏌ユ壘璐ㄦ淇℃伅涓槸鍚﹀瓨鍦ㄥ悓鎵规璐ㄦ褰曞叆璁板綍
//BllQualityInspect quality = Db.Queryable<BllQualityInspect>().First(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo);
//if (quality != null)
//{
- ////鍒ゆ柇鏄惁涓洪��璐у叆搴撳崟
- //if (isTui == 1)
- //{
- // if (quality.ASNNo == model.ASNNo)
- // {
- // throw new Exception("褰撳墠閫�璐у叆搴撳崟宸插垱寤鸿川妫�淇℃伅锛岃鍕块噸澶嶅垱寤猴紒");
- // }
- //}
+ ////鍒ゆ柇鏄惁涓洪��璐у叆搴撳崟
+ //if (isTui == 1)
+ //{
+ // if (quality.ASNNo == model.ASNNo)
+ // {
+ // throw new Exception("褰撳墠閫�璐у叆搴撳崟宸插垱寤鸿川妫�淇℃伅锛岃鍕块噸澶嶅垱寤猴紒");
+ // }
+ //}
// throw new Exception("褰撳墠鐗╂枡鍜屾壒娆″凡杩涜璐ㄦ锛岃鏍告煡锛�");
//}
////鏌ユ壘鍚屾壒娆� 鍚屽崟鎹� 鍏ュ簱鍗曚俊鎭��
- BllArrivalNoticeDetail arrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0"
- && m.ASNNo == model.ASNNo && m.LotNo == model.LotNo && m.SkuNo == model.SkuNo);
+ string sqlStr = $@"select * from BllArrivalNoticeDetail where IsDel='0' and SkuNo='{model.SkuNo}' ";
+ if (!string.IsNullOrEmpty(model.ASNNo))
+ {
+ sqlStr += $" and ASNNo='{model.ASNNo}' ";
+ }
+ if (!string.IsNullOrEmpty(model.LotNo))
+ {
+ sqlStr += $" and LotNo='{model.LotNo}' ";
+ }
+ BllArrivalNoticeDetail arrivalDetail = Db.SqlQueryable<BllArrivalNoticeDetail>(sqlStr).First();
if (arrivalDetail == null)
{
throw new Exception("鏈壘鍒板叆搴撳崟淇℃伅锛�");
@@ -170,10 +178,19 @@
model.PassQty = 0; //鍚堟牸鏁伴噺
model.FailQty = 0; //涓嶅悎鏍兼暟閲�
model.Standard = sku.Standard; //瑙勬牸
- //model.SupplierLot = arrivalDetail.SupplierLot; //渚涜揣鎵规
+ //model.SupplierLot = arrivalDetail.SupplierLot; //渚涜揣鎵规
//鏌ユ壘搴撳瓨鏄庣粏淇℃伅
- List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList();
+ string sqlStr2 = $@"select * from DataStockDetail where IsDel='0' and SkuNo='{model.SkuNo}' ";
+ if (!string.IsNullOrEmpty(model.ASNNo))
+ {
+ sqlStr2 += $" and ASNNo='{model.ASNNo}' ";
+ }
+ if (!string.IsNullOrEmpty(model.LotNo))
+ {
+ sqlStr2 += $" and LotNo='{model.LotNo}' ";
+ }
+ 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();
--
Gitblit v1.8.0