From c5d064d840e01fec1a728204d3776ab831008309 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 24 十月 2024 14:41:49 +0800 Subject: [PATCH] 15白标生成打印 --- WebAPI/Controllers/WebAPIController.cs | 113 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 89 insertions(+), 24 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 828fb1d..953bd54 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -181,7 +181,7 @@ string sErrMsg = ""; Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈� HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg); - HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true); + //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true); DataSet ds; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); @@ -435,47 +435,57 @@ /// <returns></returns> [Route("Web/GetXGPassword")] [HttpGet] - public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword) + public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword,string HCloudUserName,string HCloudUserPsd) { try { ClsCN oCn = new ClsCN(); DataSet oDs = new DataSet(); //========== - oDs = oCn.RunProcReturn("select Czmm from Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl"); - if (PassWord.Trim() != Repassword.Trim()) + + if(PassWord!=null) { - objjson.code = "0"; - objjson.count = 0; - objjson.Message = "2娆″瘑鐮佷笉涓�鑷达紒"; - objjson.data = oDs.Tables[0]; - return objjson; ; - } - //=========== - if (oDs == null || oDs.Tables[0].Rows.Count == 0) - { - objjson.code = "0"; - objjson.count = 0; - objjson.Message = "娌℃湁杩欎釜鐢ㄦ埛锛屼笉鑳戒慨鏀瑰瘑鐮侊紒"; - objjson.data = null; - return objjson; ; - } - else - { - oCn.RunProc("update Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "' where Czybm='" + UserName.Trim() + "'"); + oDs = oCn.RunProcReturn("select Czmm from Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl"); + if (PassWord.Trim() != Repassword.Trim()) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "2娆″瘑鐮佷笉涓�鑷达紒"; + objjson.data = oDs.Tables[0]; + return objjson; ; + } + //=========== + if (oDs == null || oDs.Tables[0].Rows.Count == 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "娌℃湁杩欎釜鐢ㄦ埛锛屼笉鑳戒慨鏀瑰瘑鐮侊紒"; + objjson.data = null; + return objjson; ; + } + oCn.RunProc("update Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "',HCloudUserName = '" + HCloudUserName+ "',HCloudUserPsd = '" + HCloudUserPsd+ "' where Czybm='" + UserName.Trim() + "'"); objjson.code = "0"; objjson.count = 1; objjson.Message = "* 瀵嗙爜淇敼鎴愬姛锛�"; objjson.data = null; + return objjson; + } + else + { + oCn.RunProc("update Gy_Czygl set HCloudUserName = '" + HCloudUserName + "',HCloudUserPsd = '" + HCloudUserPsd + "' where Czybm='" + UserName.Trim() + "'"); + objjson.code = "0"; + objjson.count = 1; + objjson.Message = "* 閲戣澏浜戣处鍙蜂慨鏀规垚鍔燂紒"; + objjson.data = null; return objjson; ; } } - catch (Exception) + catch (Exception e) { objjson.code = "0"; objjson.count = 0; - objjson.Message = "淇敼瀵嗙爜寮傚父锛�"; + objjson.Message = "淇敼瀵嗙爜寮傚父锛�" + e.ToString(); objjson.data = null; return objjson; ; } @@ -14712,6 +14722,61 @@ return objjson; } } + + #region 鏉$爜涓绘。鍒嗛〉鍒楄〃 + [Route("Gy_BarCodeBillList/page")] + [HttpGet] + public json Gy_BarCodeBillListPage(string sWhere, string user, int page, int size) + { + DataSet ds; + json res = new json(); + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; + objJsonResult.data = null; + return objJsonResult; + } + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList"); + } + else + { + ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); + } + + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + res.code = CodeConstant.SUCCEED; + res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + res.Message = "Sucess锛�"; + res.list = columnNameList; + res.data = ds.Tables[0]; + return res; + } + catch (Exception e) + { + res.code = CodeConstant.FAIL; + res.count = CountConstant.FAIL; + res.Message = "Exception锛�" + e.ToString(); + res.data = null; + return objJsonResult; + } + } + #endregion + /// <summary> /// 鏍规嵁璁惧淇濆吇瑙勭▼鏄剧ず璁惧淇濆吇瑙勭▼椤圭洰 /// </summary> -- Gitblit v1.9.1