From 1471318df6795d4c0e78d66ed239899882a6947c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 28 九月 2022 17:01:27 +0800
Subject: [PATCH] 车间工序全程跟踪报表 、工序在制品报表纵向、不良明细良率报表、车间生产汇报统计表
---
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs | 35 +++++++++++++++++++----------------
1 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs b/WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
index 8eef032..77aef79 100644
--- a/WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
@@ -40,6 +40,7 @@
public DateTime HEndDate { get; set; }//缁撴潫鏃堕棿
public int ps { get; set; }//浠呮樉绀烘湭瀹屽叏閰嶉��
public string user { get; set; }//褰撳墠鐧诲綍浜�
+ public string Arbitrarily { get; set; }//浠绘剰鍙傛暟
}
[Route("Sc_ComplementGoodBill/ComplementGoodBillList")]
@@ -68,11 +69,13 @@
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
ComplementGoodBill com = JsonConvert.DeserializeObject<ComplementGoodBill>(sWhere.ToString());
- ds = oCN.RunProcReturn($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," +
- $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}','{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}'," +
- $"{com.ps},{com.Organization},'{com.user}' ", "h_p_JIT_CallGoodsPlatForm_Query");
+ oCN.RunProc($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," +
+ $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}'," +
+ $"{com.ps},{com.Organization},'{com.user}' ");
- objJsonResult.code = "1";
+ ds = oCN.RunProcReturn("select * from ##h_p_JIT_CallGoodsPlatForm_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_CallGoodsPlatForm_Query");
+
+ objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
@@ -232,14 +235,14 @@
return objJsonResult;
}
- if (listCa[i].璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺 == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺涓�0!";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //if (listCa[i].璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺 == 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺涓�0!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
j = 1;
@@ -415,7 +418,7 @@
{
if (listCa[i].閫�鏂欐暟閲� > 0)
{
- if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲�)
+ if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲�&& listCa[i].宸查厤閫佹暟閲�>0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -424,7 +427,7 @@
return objJsonResult;
}
- ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " +
+ ds = oCN.RunProcReturn("select isnull(sum(d.HQty),0) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " +
$"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub");
if ((double.Parse(ds.Tables[0].Rows[0][0].ToString()==""?"0": ds.Tables[0].Rows[0][0].ToString()) +listCa[i].閫�鏂欐暟閲�) > listCa[i].宸插彨鏂欐暟閲�)
@@ -570,7 +573,7 @@
{
if (listCa[i].閫�鏂欐暟閲� > 0)
{
- if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲�)
+ if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲� && listCa[i].宸查厤閫佹暟閲� > 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -667,7 +670,7 @@
{
if (listCa[i].閫�鏂欐暟閲� > 0)
{
- if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲�)
+ if (listCa[i].閫�鏂欐暟閲� > listCa[i].宸查厤閫佹暟閲� && listCa[i].宸查厤閫佹暟閲� > 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
--
Gitblit v1.9.1