From 28e1721d265cb676ad65030cc7967066fa324760 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期四, 04 十一月 2021 15:14:39 +0800 Subject: [PATCH] 出站汇报单模块界面新增报废品质确认按钮;新增工序隔离品报表、工序报废品报表 --- WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs | 95 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 93 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs index be3b1c1..a05f5e8 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs @@ -16,6 +16,7 @@ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛� private json objJsonResult = new json(); public DataSet ds = new DataSet(); + public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public DLL.ClsSc_MouldProdInBill BillNew0 = new DLL.ClsSc_MouldProdInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� public DLL.ClsSc_MouldProdInBill BillOld0 = new DLL.ClsSc_MouldProdInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� @@ -32,7 +33,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } @@ -409,6 +410,7 @@ public object Sc_MouldScrapInProdBillListProjectDetai(string sqlWhere) { DataSet ds; + DataSet ds1; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); @@ -419,6 +421,11 @@ 瀹炴敹鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney,hwhid1 HWHID, 鏀舵枡浠撳簱浠g爜 HWHCode,鏀舵枡浠撳簱 HWHName, HSPID, 鏀舵枡浠撲綅浠g爜 HSPCode,鏀舵枡浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID FROM h_v_Sc_MouldProdInHouseBillList"), "h_v_Sc_MouldProdInHouseBillList"); + //鏌ユ眹鎬� + ds1 = oCN.RunProcReturn(string.Format(@"select 妯″叿浠g爜,妯″叿鍚嶇О,鍗曟嵁鍙�,瑙勬牸鍨嬪彿,鎵规,瀹炴敹鏁伴噺,hwhid1,鏀舵枡浠撳簱浠g爜, + 鏀舵枡浠撳簱,琛ㄤ綋澶囨敞,sum(HMaterID) from h_v_Sc_MouldProdInHouseBillList group by 妯″叿浠g爜, + 妯″叿鍚嶇О,鍗曟嵁鍙�,瑙勬牸鍨嬪彿,鎵规,瀹炴敹鏁伴噺,hwhid1,鏀舵枡浠撳簱浠g爜,鏀舵枡浠撳簱,琛ㄤ綋澶囨敞"), + "h_v_Sc_MouldProdInHouseBillList"); objJsonResult.code = "0"; objJsonResult.count = 1; @@ -482,7 +489,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } @@ -649,5 +656,89 @@ } } #endregion + + #region 鍣ㄥ叿閲囪喘鍏ュ簱鍗曞鏍�/鍙嶅鏍� + [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")] + [HttpGet] + public object AuditMouldProdInHouseBill(string HInterID, string user, int flag) + { + //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍� + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Check", 1, true, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲鏍告潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + if (lngBillKey == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) + { + if (flag == 1) + { + if (oBill.omodel.HBillStatus == 2) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鍗曟嵁宸插鏍革紝鏃犻渶鍐嶆瀹℃牳"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string HCheckDate = DateTime.Now.Date.ToString(); + oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + } + else + { + if (oBill.omodel.HBillStatus == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鍗曟嵁鏈鏍革紝鏃犻渶鍙嶅鏍�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string HCheckDate = DateTime.Now.Date.ToString(); + oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒"; + objJsonResult.data = 1; + return objJsonResult; + } + } + + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈壘鍒�"; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } -- Gitblit v1.9.1