From c5e3b9421bf76855e51cb6192941ac39d5d11808 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期五, 30 七月 2021 14:46:24 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-API --- WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 95 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 93 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs index 5f205ba..52a3248 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs @@ -465,6 +465,46 @@ return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp"); } #endregion + + #region 鎶ュ伐骞冲彴浜ч噺姹囬獙璇佹眹鎶ユ暟閲忔槸鍚﹁秴鍑鸿鍒掓暟閲忚緫 + /// <summary> + /// + /// </summary> + /// <param name="msg"></param> + /// <returns></returns> + [Route("Sc_MESBeginWorkBill/GetMESOverStepQty")] + [HttpGet] + public object GetMESOverStepQty(string sWhere) + { + try + { + ds = new SQLHelper.ClsCN().RunProcReturn("select isnull(sum(HQty),0) HQty,isnull(sum(HBadQty),0) HBadQty,isnull(sum(HWasterQty),0) HWasterQty from Sc_ICMOBillWorkQtyStatus_Tmp" + sWhere, "Sc_ICMOBillWorkQtyStatus_Tmp"); + if (ds.Tables[0].Rows.Count > 0) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "宸叉湁浜ч噺姹囨姤鏁版嵁杩斿洖锛�"; + objJsonResult.data = ds; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱骇閲忔眹鎶ユ暟鎹紒"; + objJsonResult.data = null; + } + + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = ex.Message; + objJsonResult.data = null; + } + return objJsonResult; + } + #endregion #region 鎶ュ伐骞冲彴浜ч噺姹囨姤淇濆瓨/缂栬緫 /// <summary> @@ -533,7 +573,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.Message = "淇濆瓨澶辫触锛�"; objJsonResult.data = 1; return objJsonResult; } @@ -624,6 +664,8 @@ model.HGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HGroupID"]); model.HDeptID= DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HDeptID"]); model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]); + model.HMainSourceInterID = HICMOInterID; + model.HMainSourceEntryID = HICMOEntryID; WebS.WebService1 oWebs = new WebS.WebService1(); bool flag=oWebs.set_SaveICMOProductReportBill_Layui(model, sHSourceType, ref DBUtility.ClsPub.sErrInfo); if (flag) @@ -652,7 +694,56 @@ return objJsonResult; } #endregion - + + + #region [鍔ㄦ�佸垪琛╙ + [Route("Sc_MESBeginWorkBill/ReportFrom")] + [HttpGet] + public object ReportFrom() + { + List<string> columnNameList = new List<string>(); + try + { + //鏍规嵁閫夋嫨璧勬簮ID鑾峰彇褰撳墠鐢熶骇宸ュ崟銆佽矗浠讳汉 + ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HRemark,HUseFlag,HBirthDay from Gy_Employee where HItemID=9999", "Gy_Employee"); + string aa = ds.Tables[0].Columns[0].ToString(); + + foreach (DataColumn col in ds.Tables[0].Columns) + { + columnNameList.Add(col.ColumnName);//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + if (ds.Tables[0].Rows.Count > 0) + { + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + objJsonResult.data = ds; + objJsonResult.list = columnNameList; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�"; + objJsonResult.data = null; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion } } -- Gitblit v1.9.1