From 32db7992dd4ed10d97707f428ee8a0499988ffec Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 24 三月 2023 15:22:29 +0800
Subject: [PATCH] 采购到货:采购订单带物料信息过滤已全部到货物料
---
VueWebApi/DLL/DAL/AppPurchManagementDAL.cs | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
index 3b05d98..c3c3b74 100644
--- a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
@@ -79,7 +79,7 @@
left join TUom U on M.uom_code=U.code
left join TCustomer C on B.customercode=C.code
left join TOrganization T on A.departmentcode=T.org_code
- where A.ordercode=@purchordercode";
+ where B.quantity>B.countarrivalquantity and A.ordercode=@purchordercode";
dynamicParams.Add("@purchordercode", purchordercode);
var data = DapperHelper.selectdata(sql, dynamicParams);
if (data.Rows.Count > 0)
@@ -170,8 +170,8 @@
for (int i = 0; i < json.Count; i++)
{
//鍐欏叆閲囪喘鍒拌揣鍗曞瓙琛�
- sql = @"insert into T_PurchaseArrivalOrder_sub(hbillno,rownumber,hpartcode,hplanqty,hqty,hacceptdate,hischeck,hbatchno)
- values(@hbillno,@hpartcode,@hplanqty,@hqty,@hacceptdate,@hischeck,@hbatchno)";
+ sql = @"insert into T_PurchaseArrivalOrder_sub(hbillno,rownumber,hpartcode,hplanqty,hqty,hacceptdate,hcheckstaus,hbatchno)
+ values(@hbillno,@rownumber,@hpartcode,@hplanqty,@hqty,@hacceptdate,@hcheckstaus,@hbatchno)";
list.Add(new
{
str = sql,
@@ -183,7 +183,7 @@
hplanqty = decimal.Parse(json[i].hplanqty),
hqty = decimal.Parse(json[i].hqty),
hacceptdate = hacceptdate == "" ? null : hacceptdate,
- hischeck = json[i].hischeck,
+ hcheckstaus = json[i].hischeck,
hbatchno = json[i].hbatchno
}
});
@@ -193,7 +193,7 @@
{
//鍐欏叆鏉$爜妗f琛�
sql = @"insert into T_BarCodeBill(rightcode,hbillno,hbilltype,hbarcode,hbarcodestatus,hbarcodetype,hmaterialcode,hqty,hbatchno,hcustomercode,hdeptcode,hsourcebillno,hsourcebilltype,barcodeposition,lm_user,lm_date)
- values(@rightcode,hbillno,@hbilltype,@hbarcode,@hbarcodestatus,@hbarcodetype,@hmaterialcode,@hqty,@hbatchno,@hcustomercode,@hdeptcode,@hsourcebillno,@hsourcebilltype,@barcodeposition,@lm_user,@lm_date)";
+ values(@rightcode,@hbillno,@hbilltype,@hbarcode,@hbarcodestatus,@hbarcodetype,@hmaterialcode,@hqty,@hbatchno,@hcustomercode,@hdeptcode,@hsourcebillno,@hsourcebilltype,@barcodeposition,@lm_user,@lm_date)";
list.Add(new
{
str = sql,
@@ -219,7 +219,7 @@
});
}
//鏇存柊閲囪喘璁㈠崟瀛愯〃锛氱疮璁″埌璐ф暟閲�
- sql = @"update T_PurchaseOrder_sub set countarrivalquantity=countarrivalquantity+@hqty where ordercode=@purordercode and materiel_code=@materiel_code and rownumber=@rownumber";
+ sql = @"update T_PurchaseOrder_sub set countarrivalquantity=countarrivalquantity+@hqty where purchaseorder_code=@purordercode and materiel_code=@materiel_code and rownumber=@rownumber";
list.Add(new
{
str = sql,
@@ -233,7 +233,7 @@
});
}
//鏇存柊閲囪喘璁㈠崟涓昏〃锛氳鍗曠姸鎬�
- sql = @"update T_PurchaseOrder set status=@status where ordercode=@purordercode";
+ sql = @"update T_PurchaseOrder set status=@status where ordercode=@ordercode";
list.Add(new
{
str = sql,
--
Gitblit v1.9.3