From f7a99b8d50c3cad18038c88985e8932d0f6a130b Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 13 六月 2024 11:04:55 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs | 42 +++++++++++++++++++++ WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 16 ++++++++ WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 56 ++++++++++++++-------------- 3 files changed, 86 insertions(+), 28 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index ef3de00..2410e0d 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -174,12 +174,28 @@ entryid_PGD = arr[1]; } + //鎴彇鏉$爜绫诲瀷 鍓嶄袱浣� + string BillNoType1 = BillNo_PGD.Substring(0, Math.Min(2, BillNo_PGD.Length)); //鎴彇鏉$爜绫诲瀷 鍓嶄笁浣� string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length)); //鎴彇鏉$爜绫诲瀷2 鍓嶅洓浣� string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length)); //鎴彇鍐呯爜 string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length)); + switch (BillNoType1) + { + case "20"://娴佽浆鍗� + string sErr = ""; + if (oSystemParameter.ShowBill(ref sErr)) + { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + } + } + break; + } + switch (BillNoType2) { case "GXLZ"://宸ュ簭娴佽浆娲惧伐 diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs index 6f5e9e6..a9e4e6e 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs @@ -318,34 +318,34 @@ return objJsonResult; } - ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); - if (ds == null) - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (ds.Tables[0].Rows.Count == 0) - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") - { - oCN.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); - objJsonResult.data = null; - return objJsonResult; - } + //ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); + //if (ds == null) + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //if (ds.Tables[0].Rows.Count == 0) + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") + //{ + // oCN.RollBack(); + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + // objJsonResult.data = null; + // return objJsonResult; + //} oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",1"); //鍒ゆ柇鏄惁鏄� 棣栭亾宸ュ簭 ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a " + diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" index d1ded94..c8a752a 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" @@ -457,5 +457,47 @@ } #endregion + #region 璐ㄩ噺妯″潡 SPC妫�楠屽崟鍒嗘瀽 + /// <summary> + /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("QC_CustomerAppealReport/QC_InspectionFormReport")] + [HttpGet] + public object QC_InspectionFormReport(string sWhere) + { + try + { + List<object> columnNameList = new List<object>(); + + //ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + Year + "','" + DeptName + "'", "h_p_QC_InspectionFormReport"); + + //娣诲姞鍒楀悕 + 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 + } } -- Gitblit v1.9.1