From 3652ccd21dffadf73d58ab241938c49c1929ff5b Mon Sep 17 00:00:00 2001 From: llj <132905093+newwwwwwtree@users.noreply.github.com> Date: 星期一, 04 八月 2025 10:30:59 +0800 Subject: [PATCH] 页面过滤条件:开始时间和结束时间(根据检验信息中的创建时间进行过滤)、站台(检验信息中的检验工序)、料号(PNL布局信息名称)、批次(lot号) 2.柱状图:x轴lot号,y轴良品率。根据开始时间和结束时间、站台、料号 过滤检验信息并去重(一个PNL里的PCS不能有重复记录),然后根据料号、批次分组合计得到该料号每个批次的不良PCS的数量合计。然后获取该料号每个批次中PNL条码的数量(PNL条码不能重复)并乘PNL布局信息中子表的记录数(该料号中的PCS数量)得到每个批次的PCS总数。对每个批次进行((PCS总数-不良PCS数量)/PCS总数 *100)得到每个批次的良品率。 3.饼状图:根据开始时间和结束时间、站台、料号 过滤检验信息并去重(一个PNL里的PCS不能有重复记录),然后根据检验信息中的不良原因分组统计各个原因的数量。在饼状图显示 4.表格:根据开始时间和结束时间、站台、料号 过滤检验信息,表头包含(站台、料号、PNL条码、PCS号、正反面、不良原因),并针对表头字段进行去重 --- WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs | 65 ++++++++++++++++++++++++++++---- 1 files changed, 57 insertions(+), 8 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs index 4b70e17..20a17db 100644 --- a/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs @@ -18,6 +18,7 @@ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); /// <summary> /// 杩斿洖鏁呴殰绫诲埆鍒楄〃 @@ -169,7 +170,7 @@ //淇濆瓨鍓嶆帶鍒�========================================= - string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl " + HMakeEmp + ",'" + 1 + "'"; + string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl '" + HNumber + "','" + HName + "'," + HUSEORGID + ",1,0"; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeSaveCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { @@ -185,7 +186,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; objJsonResult.data = null; oCN.RollBack(); return objJsonResult; @@ -235,7 +236,7 @@ oCN.BeginTran(); //淇濆瓨鍓嶆帶鍒�========================================= - string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl " + HMakeEmp + ",'" + 2 + "'"; + string sql1 = "exec h_p_Gy_ConkType_BeforeSaveCtrl '" + HNumber + "','" + HName + "'," + HUSEORGID + ",3," + HItemID; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeSaveCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { @@ -251,7 +252,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; objJsonResult.data = null; oCN.RollBack(); return objJsonResult; @@ -306,11 +307,48 @@ oCN.Commit(); } - objJsonResult.code = "0"; + + //鑷姩瀹℃牳鍔熻兘 + if (HItemID == 0) + { + ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_ConkType with(nolock) where HNumber='" + HNumber + "' and HUSEORGID = " + HUSEORGID, "Gy_ConkType"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛佽嚜鍔ㄥ鏍稿け璐ユ壘涓嶅埌瀵瑰簲鍗曟嵁"; + objJsonResult.data = null; + return objJsonResult; + } + else if (ds.Tables[0].Rows.Count > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鐩稿悓浣跨敤缁勭粐涓嬶紝鍑虹幇" + ds.Tables[0].Rows.Count + "涓浉鍚岀殑浠g爜锛�" + ds.Tables[0].Rows[0]["HNumber"]; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string sAutoCheck = oClsXt_SystemParameter.GetSingleSystemParameter("Gy_ConkType_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo); + objJsonResult.Verify = "N"; + if (sAutoCheck == "Y") + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛"; + objJsonResult.data = ds.Tables[0].Rows[0]["HItemID"].ToString(); + objJsonResult.Verify = "Y"; + return objJsonResult; + } + } + } + + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); - objJsonResult.data = 1; + objJsonResult.data = null; return objJsonResult; } catch (Exception e) @@ -336,7 +374,7 @@ try { - ds = oCN.RunProcReturn("select * from h_v_Gy_ConkTypeList where HitemID=" + HInterID, "h_v_Gy_ConkTypeList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_ConkType_Edit where HitemID=" + HInterID, "h_v_Gy_ConkType_Edit"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -364,7 +402,7 @@ } } - + [Route("DeltetGy_ConkType")] [HttpGet] public object DeltetGy_ConkType(string HItemID, string user) @@ -420,6 +458,17 @@ objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "" || ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵�侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + } //鍒犻櫎鍓嶆帶鍒�========================================= string sql1 = "exec h_p_Gy_ConkType_BeforeDelCtrl " + HItemID + ",'" + user + "'"; ds = oCN.RunProcReturn(sql1, "h_p_Gy_ConkType_BeforeDelCtrl"); -- Gitblit v1.9.1