From 6e1231595e0e72b0fa421711d34bc77d3b406a4b Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 21 四月 2023 10:14:37 +0800
Subject: [PATCH] 高级排程过工单信息测试接口(实现不了) 采购到货单接口开发
---
VueWebApi/DLL/DAL/AppPurchManagementDAL.cs | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
index 5897eb7..a380e1f 100644
--- a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
@@ -356,9 +356,22 @@
try
{
//鍒ゆ柇鏉$爜鐘舵��
- mes = LabCodeStatusMessage.LabCodeStatus("2060", "1103", labcode);//鍔熻兘缂栧彿銆佸崟鎹被鍨嬬紪鐮併�佹爣绛剧紪鐮�
+ mes = LabCodeStatusMessage.LabCodeStatus("2060", "1103", labcode);//鍔熻兘缂栧彿(閲囪喘鍒拌揣)銆佸崟鎹被鍨嬬紪鐮�(閲囪喘鍒拌揣鍗�)銆佹爣绛剧紪鐮�
if (mes.code == "300")
{
+ return mes;
+ }
+ //鍒ゆ柇鏍囩鐘舵��(鏄惁宸插叆搴�(涓嶈兘鍐嶅叆))
+ sql = @"select * from TK_WMS_Inwh_Sub where labcode like '%'+@labcode+'%'";
+ dynamicParams.Add("@labcode", "labcode");
+ dynamicParams.Add("@labcode", labcode);
+ var dt = DapperHelper.selectdata(sql, dynamicParams);
+ if (dt.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠鏉$爜宸插叆搴�!";
+ mes.data = null;
return mes;
}
//鍒ゆ柇鎵弿鏍囩鏄惁涓哄綋鍓嶉�夋嫨閲囪喘璁㈠崟涓嬬殑鍒拌揣鍗曟墍鐢熸垚鏍囩
@@ -697,6 +710,25 @@
var dynamicParams = new DynamicParameters();
try
{
+ //鍒ゆ柇鏉$爜鐘舵��
+ mes = LabCodeStatusMessage.LabCodeStatus("2060", "1103", labcode);//鍔熻兘缂栧彿(閲囪喘鍒拌揣)銆佸崟鎹被鍨嬬紪鐮�(閲囪喘鍒拌揣鍗�)銆佹爣绛剧紪鐮�
+ if (mes.code == "300")
+ {
+ return mes;
+ }
+ //鍒ゆ柇鏍囩鐘舵��(鏄惁宸插叆搴�(涓嶈兘閫�璐�))
+ sql = @"select * from TK_WMS_Inwh_Sub where labcode like '%'+@labcode+'%'";
+ dynamicParams.Add("@labcode", "labcode");
+ dynamicParams.Add("@labcode", labcode);
+ var data0 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data0.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠鏉$爜宸插叆搴�!";
+ mes.data = null;
+ return mes;
+ }
//鏍规嵁閲囪喘璁㈠崟鍙枫�佺墿鏂欑紪鐮併�佹爣绛炬潯鐮佹煡鎵炬爣绛句俊鎭�
sql = @"select A.hbarcode,A.hcustomercode,C.name as hcustomercode,
A.hbatchno,A.qualitystatus,A.location_code,L.name as location_name,A.hqty
@@ -804,6 +836,18 @@
//鏌ヨ姹囨�绘爣绛句俊鎭�
for (int j = 0; j < arra[i]["labcont"].Count(); j++)//寰幆鑾峰彇鏍囩淇℃伅
{
+ //鏇存柊鏉$爜鐘舵��
+ sql = @"update T_BarCodeBill set hbarcodestatus=@hbarcodestatus where hsourcebillno=@hsourcebillno and hbarcode=@hbarcode";
+ list.Add(new
+ {
+ str = sql,
+ parm = new
+ {
+ hbarcodestatus="N",
+ hsourcebillno = ordercode,
+ hbarcode = arra[i]["labcont"][j]["labcode"].ToString()
+ }
+ });
//鏇存柊鍒拌揣鍗曞瓙琛ㄩ��璐ф暟閲�
sql = @"update T_PurchaseArrivalOrder_sub set hreturnqty=isnull(hreturnqty,0)+@inqty where hbillno=@hbillno and hpartcode=@hpartcode";
list.Add(new
--
Gitblit v1.9.3