From c86d3069d9cc1047c8334acecb324b4f9013de35 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期四, 20 十月 2022 22:51:32 +0800 Subject: [PATCH] 修改了看板 生产流转卡同步JSON --- WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 77 +++++++++++++++++++++++++++++--------- 1 files changed, 58 insertions(+), 19 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index e84c7db..4e55383 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -40,30 +40,32 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_MES_StationEntrustInBillList " + sWhere+ " order by 鍙戝嚭鏃堕棿 desc", "h_v_MES_StationEntrustInBillList"); + ds = oCN.RunProcReturn("select * from h_v_MES_StationEntrustInBillList", "h_v_MES_StationEntrustInBillList"); + // order by hmainid desc 鎺掑簭涓㈠埌鏁版嵁搴撻噷杩涜澶勭悊 } else { - string sql1 = "select * from h_v_MES_StationEntrustInBillList where 1 = 1 order by 鍙戝嚭鏃堕棿 desc"; - string sql = sql1 + sWhere; + string sql1 = "select * from h_v_MES_StationEntrustInBillList where 1 = 1 "; + string sql = sql1 + sWhere+ " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustInBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "false锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} } catch (Exception e) { @@ -128,6 +130,43 @@ } #endregion + + #region 鍑虹珯姹囨姤鍗曟樉绀鸿〃浣撴槑缁� + [Route("Cj_StationEntrustInBill/DisBillEntryList")] + [HttpGet] + public object DisBillEntryList(Int64 HProcExchHinteID) + { + try + { + + //寰楀埌淇℃伅 + ds = oCN.RunProcReturn("exec h_p_Sc_ProcExchBilltransRelationQty " + HProcExchHinteID + "", "h_p_Sc_ProcExchBilltransRelationQty"); + //鍐欏叆淇℃伅 + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈煡璇㈠埌鍑虹珯鍗曟槑缁嗕俊鎭紒"; + objJsonResult.data = null; + return objJsonResult; + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 鏂板鍗曟嵁-淇濆瓨鎸夐挳 [Route("Cj_StationEntrustInBill/AddBill")] [HttpPost] -- Gitblit v1.9.1