From 2ff3d19d449ed1258468814544fbec7cf26aa8ee Mon Sep 17 00:00:00 2001 From: cwjbxqmz <1134865194@qq.com> Date: 星期五, 03 十一月 2023 20:34:31 +0800 Subject: [PATCH] PDA 增加 工序出站汇报单列表查询、工序进站接收单列表查询; --- WebAPI/Controllers/条码管理/WEBSController.cs | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 60a7b0f..74ba567 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -3360,7 +3360,103 @@ } #endregion + #region 宸ュ簭鍑虹珯姹囨姤鍗曞垪琛ㄦ煡璇㈣皟鐢ㄦ柟娉� + /// <summary> + /// 鑾峰彇鏉$爜淇℃伅 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetMES_StationOutBillList_PDA_QiaoYi_Json")] + [HttpGet] + public object GetMES_StationOutBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user) + { + try + { + ds = oCn.RunProcReturn("exec h_p_MES_StationOutBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationOutBillList_PDA_QiaoYi"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + 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 = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄦ煡璇㈣皟鐢ㄦ柟娉� + /// <summary> + /// 鑾峰彇鏉$爜淇℃伅 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetMES_StationInBillList_PDA_QiaoYi_Json")] + [HttpGet] + public object GetMES_StationInBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user) + { + try + { + ds = oCn.RunProcReturn("exec h_p_MES_StationInBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationInBillList_PDA_QiaoYi"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + 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 = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #region 鎶ヨ〃鏁版嵁鑾峰彇鏂规硶 -- Gitblit v1.9.1