From 9084fac6b0907a2d56b7ba012193bce7d48cc2fb Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期五, 13 五月 2022 12:38:30 +0800
Subject: [PATCH] 不良率报表过滤条件调整
---
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
index beeee53..ccdeb43 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
@@ -82,14 +82,15 @@
{
try
{
- string sql = string.Format(@"select a.HInterID,a.HBillNo,a.HMaterID,m.HName HMaterName, a.HUnitID,u.HName HUnitName,a.HPlanQty,a.HCusID, c.HName HCusName,a.HEmpID,e.HName HEmpName,a.HDeptID,d.HName HDeptName,a.HPlanEndDate,0 HMinQty,0 HTotalQty,0 HSpsQty
+ string sql = string.Format(@"select a.HInterID,a.HBillNo,a.HMaterID,m.HName HMaterName, a.HUnitID,u.HName HUnitName,b.HQty HPlanQty,a.HCusID, c.HName HCusName,a.HEmpID,e.HName HEmpName,a.HDeptID,d.HName HDeptName,a.HPlanEndDate,0 HMinQty,0 HTotalQty,0 HSpsQty
from Sc_ICMOBillMain a
- left join Gy_Material m on a.HMaterID=m.HItemID
- left join Gy_Unit u on a.HUnitID=u.HItemID
+ left join Sc_ICMOBillSub b on a.HInterID=b.HInterID
+ left join Gy_Material m on b.HMaterID=m.HItemID
+ left join Gy_Unit u on b.HUnitID=u.HItemID
left join Gy_Customer c on a.HCusID=c.HItemID
left join Gy_Employee e on a.HEmpID=e.HItemID
left join Gy_Department d on a.HDeptID=d.HItemID
- where HSeOrderInterID=(select HSeOrderInterID from Sc_ICMOBillMain where HBillNo='" + HBillNo + "')");
+ where b.HDEPTID='113546' and b.HSeOrderInterID=(select HSeOrderInterID from Sc_PPBomBillMain where HBillNo='" + HBillNo + "')");
ds = oCN.RunProcReturn(sql, "Sc_ICMOBillMain");
if (ds.Tables[0].Rows.Count != 0 || ds != null)
@@ -185,7 +186,7 @@
+ ",0"
+ ",'" + oItemSub.HMaterName + "','','',0,'','')");
- string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
+ string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
oCN.RunProc(sql1);
}
}
@@ -238,7 +239,7 @@
"0,0,"+ oItemSub.HMaterID+","+ oItemSub.HUnitID+","+ oItemSub.HPlanQty+", 0,0,0,0,"+
"getdate(),'"+ LSH + "','" +HBillNo+"')");
//鏇存敼鐢熶骇璁㈠崟鐨勬暟閲�
- string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
+ string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
oCN.RunProc(sql);
oCN.RunProc(sql1);
@@ -343,7 +344,7 @@
#region[澧欏挃瑁呯鍒楄〃]
/// <summary>
- /// 妯″叿淇濆吇璁板綍琛ㄥ垪琛�
+ /// 澧欏挃瑁呯鍒楄〃
/// </summary>
/// <returns></returns>
[Route("Sc_ICMOBillController/QK_GetPackingBillList")]
@@ -422,7 +423,7 @@
ds = oCN.RunProcReturn("select * from Gy_BarCodeBill where HItemID=" + HInterID, "Gy_BarCodeBill");
DataRow dr = ds.Tables[0].Rows[0];
string sql = string.Format(@"delete from Gy_BarCodeBill where HItemID=" + HInterID);
- string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=HPlanQty+" + dr["HQty"] +" where HInterID=(select HSourceInterID from Gy_BarCodeBill where HItemID="+ HInterID + ")");
+ string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HPlanQty+" + dr["HQty"] +" where HInterID=(select HSourceInterID from Gy_BarCodeBill where HItemID="+ HInterID + ")");
oCN.RunProc(sql);
oCN.RunProc(sql1);
}
@@ -443,7 +444,7 @@
DataRow dr1 = ds.Tables[0].Rows[0];
string sql = string.Format(@"delete from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString()+"'");
- string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=HPlanQty+" + dr1["HQty"] + " where HInterID=(select HSourceInterID from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "')");
+ string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HPlanQty+" + dr1["HQty"] + " where HInterID=(select HSourceInterID from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "')");
oCN.RunProc(sql);
oCN.RunProc(sql1);
}
--
Gitblit v1.9.1