From 7b65d5dc4876e07f98b3e5bdc12f6f16be0cbb41 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 25 二月 2025 16:23:01 +0800
Subject: [PATCH] spc中心线查询 不良采集根据不良类型判断出站单的不良明细
---
Model/生产管理/ClsSc_QualityReportBillSub.cs | 1
WebAPI/Controllers/品质管理/基础资料/Gy_BaseInformationController.cs | 78 ++++++++++++++++++++++++++++++++++++++
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 34 +++++++++++++++--
3 files changed, 108 insertions(+), 5 deletions(-)
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_QualityReportBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_QualityReportBillSub.cs"
index 74e9d1c..bbaa9cd 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_QualityReportBillSub.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_QualityReportBillSub.cs"
@@ -31,5 +31,6 @@
public int HBadProcID;//班组
public int HNowProcID;//当前工序
public int HBadPhenomenaID;//不良现象
+ public int HBadTypeID;//不良类型
}
}
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 4d893d2..4885568 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -290,8 +290,22 @@
oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'");
//淇敼鍑虹珯鍗曠殑 涓嶈壇 鎶ュ簾鏁伴噺
- if (HResult == "涓嶈壇") {
- oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid);
+ if (HResult == "涓嶈壇" && (oSub.HBadTypeID == 3 || oSub.HBadTypeID == 4 || oSub.HBadTypeID == 6))
+ {
+ //宸ュ簾
+ if (oSub.HBadTypeID == 3)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Work+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid);
+ }//鏂欏簾
+ else if (oSub.HBadTypeID == 4)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Mater+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid);
+ }//杩斿伐
+ else if (oSub.HBadTypeID == 6)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HBackWorkQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid);
+ }
+
}
else if (HResult == "鎶ュ簾")
{
@@ -1657,8 +1671,20 @@
if (dataSet.Tables[0].Rows.Count > 0)
{
string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString();
-
- oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1 where HInterID='" + HOutInterID + "'");
+ //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾鏂欏簾 杩斿伐
+ //宸ュ簾
+ if (subLsit[0].HBadTypeID == 3)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Work-=1 where HInterID='" + HOutInterID + "'");
+ }//鏂欏簾
+ else if (subLsit[0].HBadTypeID == 4)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Mater-=1 where HInterID='" + HOutInterID + "'");
+ }//杩斿伐
+ else if (subLsit[0].HBadTypeID == 6)
+ {
+ oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HBackWorkQty-=1 where HInterID='" + HOutInterID + "'");
+ }
}
else
{
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BaseInformationController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BaseInformationController.cs"
index 7b1c65c..05164dd 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BaseInformationController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BaseInformationController.cs"
@@ -757,7 +757,83 @@
return objJsonResult;
}
}
- #endregion
+ #endregion
+
+ #region SPC涓績绾垮垪琛� 鏌ヨ
+ [Route("QC_SpcCenterlineList/List")]
+ [HttpGet]
+ public object List(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_QC_SpcCenterlineList order by HInterID desc", "锘縣_v_QC_SpcCenterlineList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_QC_SpcCenterlineList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by HInterID desc";
+ ds = oCN.RunProcReturn(sql, "锘縣_v_QC_SpcCenterlineList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region SPC涓績绾垮垪琛� 寮傚父鏁版嵁 鏇存柊
+ [Route("QC_SpcCenterlineList/UpdateData")]
+ [HttpGet]
+ public object UpdateData(string HInterID, string user)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_QC_SpcCenterlineList order by HInterID desc", "锘縣_v_QC_SpcCenterlineList");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1