Model/Model.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Model/基础资料/基础资料/ClsGy_UnitConvertRate_Model.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Kf_WeighToBarCode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Kf_WeighToBarCode.designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/MateOutController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/基础资料/基础资料/Gy_UnitConvertRateController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/条码管理/WEBSController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/InvokeHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Web.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Model/Model.csproj
@@ -468,6 +468,7 @@ <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_BarCodeCheckType_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_Item30JiTai_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_User_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_UnitConvertRate_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_Work_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsXt_FastICSchemeMain_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsXt_FastICSchemeSub_Model.cs" /> Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_UnitConvertRate_Model.cs
New file @@ -0,0 +1,18 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsGy_UnitConvertRate_Model : DBUtility.ClsGy_Base_Model { public string HBILLNO; // varchar(30) public Int64 HMATERID; // int --ç©æ public Int64 HCURRENTUNITID; // int --å½ååä½ public Int64 HDESTUNITID; // int --ç®æ åä½ public string HCONVERTTYPE; // varchar(20) --ç±»å public double HCONVERTNUMERATOR; // dec(23, 10) --åå public double HCONVERTDENOMINATOR; // dec(23, 10) --忝 public string HFORBIDSTATUS; // varchar(10) --״̬ } } WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode.cs
@@ -14,9 +14,6 @@ using System.IO.Ports; using System.Linq; using System.IO.Ports; using System.Linq; namespace WarM { public partial class Kf_WeighToBarCode : Form @@ -54,13 +51,6 @@ public DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl(); public DBUtility.ClsPub.Enum_BillStatus BillStatus; SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); private static string repeatData = string.Empty; private SerialPort ComDevice = null; private int HGetWeight = 0; private string Message = ""; private int timeIndex = 0; #region //åºå®ä»£ç @@ -191,228 +181,6 @@ DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name); DBUtility.Xt_BaseBillFun.DefaultGridView(grdSub, this.Name + "grdSub"); } //æå¼ä¸²å£ private void button3_Click(object sender, EventArgs e) { OpenCom(); } public void OpenCom() { //åå§åä¸²å£ ComDevice = new SerialPort(); ComDevice.DataReceived += new SerialDataReceivedEventHandler(Com_DataReceived);//ç»å®äºä»¶ string[] PortNames = SerialPort.GetPortNames(); if (!ComDevice.IsOpen) { try { ComDevice.PortName = txtPortName.Text; ComDevice.BaudRate = int.Parse(txtBaudRate.Text); switch (cmbParity.SelectedItem.ToString()) { case "0": ComDevice.Parity = Parity.None; break; case "1": ComDevice.Parity = Parity.Odd; break; case "2": ComDevice.Parity = Parity.Even; break; case "3": ComDevice.Parity = Parity.Mark; break; case "4": ComDevice.Parity = Parity.Space; break; default: break; } ComDevice.DataBits = int.Parse(txtDataBits.Text); switch (cmbStopBits.SelectedItem.ToString()) { case "0": ComDevice.StopBits = StopBits.None; break; case "1": ComDevice.StopBits = StopBits.One; break; case "2": ComDevice.StopBits = StopBits.Two; break; case "1.5": ComDevice.StopBits = StopBits.OnePointFive; break; default: break; } ComDevice.Open(); //lblComStatus.Text = "串å£ç¶æï¼å¼å¯"; timer3.Enabled = true; } catch (Exception ex) { MessageBox.Show("æå¼ä¸²å£å¤±è´¥ï¼" + ex.Message, "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } else { } } //å ³éä¸²å£ private void button2_Click(object sender, EventArgs e) { CloseCom(); } public void CloseCom() { if (!ComDevice.IsOpen) { } else { try { timer3.Enabled = false; Thread.Sleep(100); ComDevice.Close(); // valueCounts = new Dictionary<string, int>(); // lblComStatus.Text = "串å£ç¶æï¼å ³é"; } catch (Exception ex) { MessageBox.Show(ex.Message, "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } } //åéæ°æ® public bool SendData(byte[] data) { if (ComDevice.IsOpen) { try { ComDevice.Write(data, 0, data.Length);//åéæ°æ® return true; } catch (Exception ex) { MessageBox.Show(ex.Message, "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { } } else { MessageBox.Show("䏲壿ªæå¼", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); } return false; } //æ¥æ¶æ°æ® private void Com_DataReceived(object sender, SerialDataReceivedEventArgs e) { //if (!ComDevice.IsOpen) // { // return; // } // Thread.Sleep(100); if (HGetWeight == 1) { byte[] ReDatas = new byte[ComDevice.BytesToRead]; ComDevice.Read(ReDatas, 0, ReDatas.Length);//è¯»åæ°æ® this.AddData(ReDatas);//è¾åºæ°æ® } } //å¤çæ¥æ¶å°çæ°æ® public void AddData(byte[] data) { //Thread.Sleep(100); StringBuilder sb = new StringBuilder(); sb.Append(Encoding.ASCII.GetString(data)); var str = sb.ToString(); str = str.Replace("w", "").Replace("n", "").Replace("kg\r\n", ";"); if (str != repeatData) { repeatData = str; string[] strArray = str.Split(';'); for (int i = 0; i < strArray.Length; i++) { if (double.TryParse(strArray[i], out double ret))//夿æ¯å¦æ¯æ°å { Message += double.Parse(strArray[i]) + ";"; //UpdateLabel(ret.ToString()); } } } } //è·åæ°ç»ä¸åºç°é¢çæé«çæ°æ® private string getMostStr(string message) { string[] strArray = message.Split(';'); // 使ç¨LINQæ¥è¯¢åºç°æ¬¡æ°æå¤çå ç´ var maxElement = strArray.GroupBy(x => x) .OrderByDescending(g => g.Count()) .First() .Key; return maxElement; } //便®çº¿ç¨ï¼å°æ°æ®åå ¥çé¢ç»ä»¶ private void UpdateLabel(string text) { if (txtHWeightQyt.InvokeRequired) { // å¨UI线ç¨ä¸è°ç¨ UpdateLabel txtHWeightQyt.Invoke(new Action<string>(UpdateLabel), text); } else { // ç´æ¥æ´æ° txtHWeightQyt.Text txtHWeightQyt.Text = text; } } //è·åæ°æ®æé®ï¼å¯å¨è®¡æ¶å¨ private void button4_Click(object sender, EventArgs e) { HGetWeight = 1; timer2.Enabled = true; } //计æ¶å¨äºä»¶ private void timer2_Tick(object sender, EventArgs e) { } #endregion @@ -1272,12 +1040,6 @@ this.txtHRemark.Tag = oBadReason.oModel.HItemID.ToString(); } } #endregion WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode.designer.cs
@@ -650,7 +650,6 @@ this.txtHWeightQyt.Name = "txtHWeightQyt"; this.txtHWeightQyt.Size = new System.Drawing.Size(190, 28); this.txtHWeightQyt.TabIndex = 149; this.txtHWeightQyt.TextChanged += new System.EventHandler(this.txtHWeightQyt_TextChanged); // // label7 // WebAPI/Controllers/MateOutController.cs
@@ -2776,6 +2776,162 @@ } } #endregion #region æ»çæ¶é´æ¥è¡¨ [Route("MaterOutEntryReport/Sc_RetentionTimeReport")] [HttpGet] public object Sc_RetentionTimeReport(string HBeginDate,string HEndDate,string sWhere, string user) { try { if (!DBUtility.ClsPub.Security_Log("Sc_RetentionTimeReport", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æ¥çæéï¼"; objJsonResult.data = null; return objJsonResult; } string sql = "exec h_p_Sc_RetentionTimeReport '" + HBeginDate + "','" + HEndDate + "','" + sWhere + "'"; ds = oCN.RunProcReturn(sql, "h_p_Sc_RetentionTimeReport"); DataTable dt = ds.Tables[0]; //è·ååå 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));//è·åå°DataColumnå对象çåå } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.list = columnNameList; objJsonResult.data = ds.Tables; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region éå®ä»·æ ¼å¯¹æ¯æ¥è¡¨ [Route("MaterOutEntryReport/Sc_CompareOrderToSelloutReport")] [HttpGet] public object Sc_CompareOrderToSelloutReport(string HBeginDate, string HEndDate, string sWhere, string user) { try { if (!DBUtility.ClsPub.Security_Log("Sc_CompareOrderToSelloutReport", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æ¥çæéï¼"; objJsonResult.data = null; return objJsonResult; } string sql = "exec h_p_Sc_CompareOrderToSelloutReport '" + HBeginDate + "','" + HEndDate + "','" + sWhere + "'"; ds = oCN.RunProcReturn(sql, "h_p_Sc_CompareOrderToSelloutReport"); DataTable dt = ds.Tables[0]; //è·ååå 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));//è·åå°DataColumnå对象çåå } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.list = columnNameList; objJsonResult.data = ds.Tables; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region éå®æåæ¥è¡¨ [Route("MaterOutEntryReport/Xs_SellOutMoneyRangeReport")] [HttpGet] public object Xs_SellOutMoneyRangeReport(string sWhere, string user) { try { if (!DBUtility.ClsPub.Security_Log("Xs_SellOutMoneyRangeReport", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æ¥çæéï¼"; objJsonResult.data = null; return objJsonResult; } List<object> columnNameList = new List<object>(); if (sWhere == null || sWhere.Equals("")) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "è¯·éæ©ææå¹´ä»½"; return objJsonResult; } else { ds = oCN.RunProcReturn("exec h_p_Xs_SellOutMoneyRangeReport '" + sWhere + "'", "h_p_Xs_SellOutMoneyRangeReport"); } //æ·»å åå 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));//è·åå°DataColumnå对象çåå } 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 #endregion } WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_UnitConvertRateController.cs
New file @@ -0,0 +1,307 @@ using DBUtility; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class Gy_UnitConvertRateController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; const string ModCaption = "å使¢ç®"; public const string ModRightName = "Gy_UnitConvertRate"; public const string ModRightNameDelete = ModRightName + "_Delete"; //å é¤ public DataSet ds = new DataSet(); private json objJsonResult = new json(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); #region å使¢ç®å表 /// <summary> /// è·åå使¢ç®åè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("Gy_UnitConvertRateController/GetGy_UnitConvertRateList_Json")] [HttpGet] public object GetGy_UnitConvertRateList_Json(string sWhere, string HMaker, string OperationType) { try { //夿æé 1ä¸ºç´æ¥å表模åæå¼ 2为ä»å ¶ä»æ¨¡å跳转æå¼å表 if (OperationType == "1") { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } } //è¿ååè¡¨ä¿¡æ¯ ds = oCn.RunProcReturn("select * from h_v_Gy_UnitConvertRateList where " + sWhere + " order by HItemID desc", "h_v_Gy_UnitConvertRateList"); 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)); //è·åå°DataColumnå对象çåå } 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("Gy_UnitConvertRateController/GetGy_UnitConvertRate_Delete_Json")] [HttpGet] public object GetGy_UnitConvertRate_Delete_Json(Int64 HItemID, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå é¤åè½æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } oCn.BeginTran(); //夿å卿§ ds = oCn.RunProcReturn("select HNumber,HName from Gy_UnitConvertRate with(nolock) where HItemID= " + HItemID.ToString(), "Gy_UnitConvertRate"); if (ds == null || ds.Tables[0].Rows.Count == 0) { oCn.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æªæ¥è¯¢å°è¯¥å使¢ç®ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; objJsonResult.data = null; return objJsonResult; } else { oCn.RunProc("Delete from Gy_UnitConvertRate where HItemID= " + HItemID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); //åå ¥æ¥å¿ DBUtility.ClsPub.Add_Log("", "å é¤å使¢ç®ï¼ä»£ç ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HNumber"]) + ",åç§°ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HName"]), HMaker); oCn.Commit(); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å é¤å使¢ç®æåï¼"; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { oCn.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å使¢ç®å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region å使¢ç®æ¹é忥 /// <summary> /// ä»éè¶äºæ¹é忥å使¢ç®è³æ¬å°è¡¨ /// </summary> [Route("Gy_UnitConvertRateController/GetGy_UnitConvertRate_BatchSync_Json")] [HttpGet] public object GetGy_UnitConvertRate_BatchSync_Json() { try { //è·åç³»ç»åæ° string sErrMsg = ""; if (oSystemParameter.ShowBill(ref sErrMsg) == true) { //ç³»ç»åæ°æ¯å¦ä¸ºç§æäºæ¨¡å¼,Nä¸ºå ¬æäºæ¨¡å¼ï¼Yä¸ºç§æäºæ¨¡å¼ //ç§æäºæ¨¡å¼ï¼éè¿è°ç¨åå¨è¿ç¨è¿è¡åæ¥ if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "Y") { ds = oCn.RunProcReturn("exec h_p_IFCLD_ERPDataToLocal_UnitConvertRate", "h_p_IFCLD_ERPDataToLocal_UnitConvertRate"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å使¢ç®æ¹é忥æåï¼"; objJsonResult.data = null; return objJsonResult; } //å ¬æäºæ¨¡å¼ï¼éè¿è°ç¨WEBAPIæ¹å¼è¿è¡åæ¥ else if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") { //夿éè¶äºæ¯å¦ç»å½æå var loginRet = InvokeHelper.Login(); var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); //夿æ¯å¦ç»å½æå if (isSuccess <= 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¹éåæ¥å¤±è´¥ï¼éè¶äºç»å ¥ä¸æåï¼è¯·ç¡®è®¤Cçé ç½®æä»¶æè®¾ç½®éè¶äºå¯¹åºç½åãè´¦å¥ãç»å½ç¨æ·ãç»å½å¯ç æ¯å¦æ£ç¡®ï¼"; objJsonResult.data = null; return objJsonResult; } var json = new { FormId = "BD_UNITCONVERTRATE", FieldKeys = "FUNITCONVERTRATEID,FBILLNO,FMATERIALID,FUSEORGID,FCREATEORGID,FFORBIDSTATUS" + ",FCURRENTUNITID,FDESTUNITID,FCONVERTTYPE,FCONVERTNUMERATOR,FCONVERTDENOMINATOR" + ",FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FAPPROVERID,FAPPROVEDATE,FFORBIDDERID,FFORBIDDATE", FilterString = "", OrderString = "", TopRowCount = 0, StartRow = 0, Limit = 0 }; //æ¥ç è·åæ°æ® var _result = InvokeHelper.Query("BD_UNITCONVERTRATE", JsonConvert.SerializeObject(json)); //ååºåå _result = _result.Replace("\"", ""); _result = _result.Replace("\n", ""); _result = _result.Replace(",[", ""); _result = _result.Replace("[", ""); string[] rows = _result.Split(new string[] { "]" }, StringSplitOptions.RemoveEmptyEntries); //以"]"å鿝ä¸è¡å¹¶ç§»é¤ç©ºè¡ string[,] arr = new string[rows.Length, rows[0].Split(',').Length]; //æ ¹æ®è¡ååæ°å建äºç»´æ°ç» for (int i = 0; i < rows.Length; i++) //é忝ä¸è¡ { string[] cols = rows[i].Split(','); //以éå·å鿝ä¸å for (int j = 0; j < cols.Length; j++) //é忝ä¸å { arr[i, j] = cols[j]; //åå ¥äºç»´æ°ç» } } //æ¸ ç©ºå使¢ç®è¡¨æ°æ® oCn.RunProc("Delete from Gy_UnitConvertRate", ref DBUtility.ClsPub.sExeReturnInfo); //è¾åºäºç»´æ°ç» for (int i = 0; i < arr.GetLength(0); i++) { var subData = new { HItemID = DBUtility.ClsPub.isLong(arr[i, 0]), HNumber = "", HName = "", HShortNumber = "", HParentID = 0, HLevel = 1, HEndFlag = 1, HStopflag = arr[i, 5].ToString() == "B" ? 1 : 0, HRemark = "CLD-ERPå¯¼å ¥", HUseFlag = "已使ç¨", HUSEORGID = DBUtility.ClsPub.isLong(arr[i, 3]), HCREATEORGID = DBUtility.ClsPub.isLong(arr[i, 4]), HBILLNO = DBUtility.ClsPub.isStrNull(arr[i, 1]), HMATERID = DBUtility.ClsPub.isLong(arr[i, 2]), HCURRENTUNITID = DBUtility.ClsPub.isLong(arr[i, 6]), HDESTUNITID = DBUtility.ClsPub.isLong(arr[i, 7]), HCONVERTTYPE = DBUtility.ClsPub.isStrNull(arr[i, 8]), HCONVERTNUMERATOR = DBUtility.ClsPub.isDoule(arr[i, 9]), HCONVERTDENOMINATOR = DBUtility.ClsPub.isDoule(arr[i, 10]), HFORBIDSTATUS = DBUtility.ClsPub.isStrNull(arr[i, 5]), HUnitID = DBUtility.ClsPub.isLong(arr[i, 2] == "0" ? arr[i, 6] : "-1"), HMakeEmp = DBUtility.ClsPub.isStrNull(arr[i, 11]), HMakeTime = DBUtility.ClsPub.isDate(arr[i, 12]), HCheckEmp = DBUtility.ClsPub.isStrNull(arr[i, 15]), HCheckTime = DBUtility.ClsPub.isDate(arr[i, 16]), HModifyEmp = DBUtility.ClsPub.isStrNull(arr[i, 13]), HModifyTime = DBUtility.ClsPub.isDate(arr[i, 14]), HStopEmp = DBUtility.ClsPub.isStrNull(arr[i, 17]), HStopTime = DBUtility.ClsPub.isDate(arr[i, 18]), }; //åå ¥å使¢ç®è¡¨æ°æ® oCn.RunProc("set identity_insert Gy_UnitConvertRate on", ref DBUtility.ClsPub.sExeReturnInfo); string sql = $@"Insert into Gy_UnitConvertRate (HItemID,HNumber,HName,HShortNumber,HParentID,HLevel ,HEndFlag,HStopflag,HRemark,HUseFlag,HUSEORGID,HCREATEORGID ,HBILLNO,HMATERID,HCURRENTUNITID,HDESTUNITID,HCONVERTTYPE,HCONVERTNUMERATOR ,HCONVERTDENOMINATOR,HFORBIDSTATUS,HUnitID ,HMakeEmp,HMakeTime ,HCheckEmp,HCheckTime ,HModifyEmp,HModifyTime ,HStopEmp,HStopTime) Values({subData.HItemID},'{subData.HNumber}','{subData.HName}','{subData.HShortNumber}',{subData.HParentID},{subData.HLevel} ,{subData.HEndFlag},{subData.HStopflag},'{subData.HRemark}','{subData.HUseFlag}',{subData.HUSEORGID},{subData.HCREATEORGID} ,'{subData.HBILLNO}',{subData.HMATERID},{subData.HCURRENTUNITID},{subData.HDESTUNITID},{subData.HCONVERTTYPE},{subData.HCONVERTNUMERATOR} ,{subData.HCONVERTDENOMINATOR},'{subData.HFORBIDSTATUS}',{subData.HUnitID} ,'{subData.HMakeEmp}',case when '{subData.HMakeTime}' = '1900/1/1 0:00:00' then NULL else '{subData.HMakeTime}' end ,'{subData.HCheckEmp}',case when '{subData.HCheckTime}' = '1900/1/1 0:00:00' then NULL else '{subData.HCheckTime}' end ,'{subData.HModifyEmp}',case when '{subData.HModifyTime}' = '1900/1/1 0:00:00' then NULL else '{subData.HModifyTime}' end ,'{subData.HStopEmp}',case when '{subData.HStopTime}' = '1900/1/1 0:00:00' then NULL else '{subData.HStopTime}' end)"; oCn.RunProc(sql.Replace("\r\n", "")); oCn.RunProc("set identity_insert Gy_UnitConvertRate off", ref DBUtility.ClsPub.sExeReturnInfo); } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å使¢ç®æ¹é忥æåï¼"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "䏿¯ææ¹é忥åè½ï¼"; objJsonResult.data = null; return objJsonResult; } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å使¢ç®æ¹éåæ¥å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -7443,6 +7443,65 @@ #endregion #region å®¢æ·æ¡ç æ«æè®°å½å #region å®¢æ·æ¡ç æ«æè®°å½å 夿忮巿¯å¦ä¸ºç¼åå表ä¸çåæ®å·ï¼æ¯ åæåå¹¶è¿åæ°æ®ï¼å¦ åå¤æå¤±è´¥ã [Route("WEBSController/Gy_getCusBarCodeBill_judgeHBillNoIsInTempList")] [HttpGet] public object Gy_getCusBarCodeBill_judgeHBillNoIsInTempList(Int64 HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID) { try { //å¤æä¿®æ¹åçåæ®å·ï¼ä¸åå ç ï¼æ¯å¦åå¨å¯¹åºå·²ç»ä¸ä¼ çåæ®ä¿¡æ¯ string sql = "select * from Gy_getCusBarCodeBillMain " + "where HInterID = " + HInterID + " " + "and HBillNo = '" + HBillNo + "' " + "and HBillType = '" + HBillType + "' " + "and HMaker = '" + HMaker + "' " + "and HOrgID = " + HStockOrgID; DataSet ds = oCn.RunProcReturn(sql, "Gy_getCusBarCodeBillMain"); if(ds!=null && ds.Tables[0].Rows.Count > 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿®æ¹å¤±è´¥ï¼åå ï¼ä¿®æ¹åæ®å·ä¸å ç 对åºçåæ®å·²ç»æäº¤ï¼"; objJsonResult.data = null; return objJsonResult; } //å¤æä¿®æ¹åçåæ®å·ï¼ä¸åå ç ï¼æ¯å¦åå¨å¯¹åºå·²ç»ä¸ä¼ çåæ®ä¿¡æ¯ string sql1 = "select top(1)* from Gy_getCusBarCodeBill_Temp " + "where HBillNo = '" + HBillNo + "' " + "and HBillType = '" + HBillType + "' " + "and HMaker = '" + HMaker + "' " + "and HOrgID = " + HStockOrgID; DataSet ds1 = oCn.RunProcReturn(sql1, "Gy_getCusBarCodeBill_Temp"); if (ds1 != null && ds1.Tables[0].Rows.Count == 0) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = ds1.Tables[0]; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿®æ¹å¤±è´¥ï¼åå ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region å®¢æ·æ¡ç æ«æè®°å½å æ«ææ¡ç /// <summary> /// çäº§ç»æåæ¨¡å æ«æææ¡ç @@ -8056,12 +8115,12 @@ if (sWhere == null || sWhere == "") { sql = "select top(1000)* from h_v_Gy_getCusBarCodeBillList_Query order by å¶åæ¥æ desc"; sql = "select * from h_v_Gy_getCusBarCodeBillList_Query order by å¶åæ¥æ desc"; ds = oCn.RunProcReturn(sql, "h_v_Gy_getCusBarCodeBillList_Query"); } else { sql = "select top(1000)* from h_v_Gy_getCusBarCodeBillList_Query where 1=1 " + sWhere + " order by å¶åæ¥æ desc"; sql = "select * from h_v_Gy_getCusBarCodeBillList_Query where 1=1 " + sWhere + " order by å¶åæ¥æ desc"; ds = oCn.RunProcReturn(sql, "h_v_Gy_getCusBarCodeBillList_Query"); } @@ -8101,6 +8160,497 @@ } } #endregion #region å®¢æ·æ¡ç æ«æè®°å½å ç»´æ¤å表-æ¡ç å表 /// <summary> /// è¿åç»æåè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("WEBSController/Gy_getCusBarCodeBill_rushedBarCodeList_CodeList")] [HttpGet] public object Gy_getCusBarCodeBill_rushedBarCodeList_CodeList(long HInterID, string HBillNo, string HBillType, long HOrgID) { try { string sql = "select * from Gy_getCusBarCodeBill_Temp where HBillNo = '" + HBillNo + "' and HBillType = '" + HBillType + "' and HOrgID = " + HOrgID + " Order by HDate desc"; ds = oCn.RunProcReturn(sql, "Gy_getCusBarCodeBill_Temp"); if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } 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 #endregion #region æ«ç éªè¯å #region æ«ç éªè¯å æ«ç ç©ææ¡ç [Route("WEBSController/Gy_BarCodeConfirmBill_rushBarCode")] [HttpGet] public object Gy_BarCodeConfirmBill_rushBarCode(Int64 HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID, string HBarCode) { DataSet ds; try { string sql = "exec h_p_Gy_BarCodeConfirmBill_rushBarCode " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HStockOrgID + ",'" + HBarCode + "'"; ds = oCn.RunProcReturn(sql, "h_p_Gy_BarCodeConfirmBill_rushBarCode"); if(ds==null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ«ææ¡ç 失败ï¼åå ï¼æ«ç æ¡ç é误ï¼è¯·å¯»æ¾IT人åï¼"; objJsonResult.data = null; return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ«ææ¡ç 失败ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region æ«ç éªè¯å è¿åæ«ææ¡ç åè¡¨ä¿¡æ¯ [Route("WEBSController/Gy_BarCodeConfirmBill_rushedBarCodeList")] [HttpGet] public object Gy_BarCodeConfirmBill_rushedBarCodeList(long HInterID, string HBillNo, string HBillType, long HOrgID) { try { string sql = "select * from h_v_Gy_BarCodeConfirmBillTempList_singleBill " + "where HInterID = " + HInterID + " and åæ®å· = '" + HBillNo + "' and HBillType = '" + HBillType + "' and HOrgID = " + HOrgID + " Order by æ«ç æ¶é´ desc"; ds = oCn.RunProcReturn(sql, "h_v_Gy_BarCodeConfirmBillTempList_singleBill"); if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } 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/Gy_BarCodeConfirmBill_DeleteRushedBarCodeList")] [HttpGet] public object Gy_BarCodeConfirmBill_DeleteRushedBarCodeList(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker, Int64 HStockOrgID) { try { string sql = "delete from Gy_BarCodeConfirmBillTempList " + "where HInterID = " + HInterID + "" + " and HBillNo = '" + HBillNo + "'" + " and HBillType = '" + HBillType + "'" + " and HStockOrgID = " + HStockOrgID + "" + " and HBarCode = '" + HBarCode + "'"; oCn.RunProc(sql); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å 餿åï¼"; //æåï¼ objJsonResult.data = null; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region æ«ç éªè¯å è¿åç¼ååè¡¨ä¿¡æ¯ [Route("WEBSController/Gy_BarCodeConfirmBill_TempList")] [HttpGet] public object Gy_BarCodeConfirmBill_TempList(string HBillType, string HMaker, long HStockOrgID) { DataSet ds; try { string sql = "exec h_p_Gy_BarCodeConfirmBill_TempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID; ds = oCn.RunProcReturn(sql, "h_p_Gy_BarCodeConfirmBill_TempList"); if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } 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/Gy_BarCodeConfirmBill_DeleteTempListNote")] [HttpGet] public object Gy_BarCodeConfirmBill_DeleteTempListNote(Int64 HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID) { DataSet ds; try { //å é¤åæ§å¶============================================================================================================================ string sql_beforeDeleteTempListNote = "exec h_p_Gy_BarCodeConfirmBill_beforeDeleteTempListNote " + HInterID + ",'" + HBillNo + "','" + HBillType + "'," + HStockOrgID + ",'" + HMaker + "'"; ds = oCn.RunProcReturn(sql_beforeDeleteTempListNote, "h_p_Gy_BarCodeConfirmBill_beforeDeleteTempListNote"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼å é¤åæ§å¶å¤±è´¥ï¼è¯·å¯»æ¾ç½ç»ç®¡ç人å"; objJsonResult.data = null; return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; return objJsonResult; } //============================================================================================================================================= //å¼å¯äºå¡ oCn.BeginTran(); string sql = "delete from Gy_BarCodeConfirmBillTempList where " + " HInterID = " + HInterID + "" + " and HBillNo = '" + HBillNo + "'" + " and HBillType = '" + HBillType + "'" + " and HStockOrgID = " + HStockOrgID + ""; oCn.RunProc(sql); //å é¤åæ§å¶============================================================================================================================ string sql_afterDeleteTempListNote = "exec h_p_Gy_BarCodeConfirmBill_afterDeleteTempListNote " + HInterID + ",'" + HBillNo + "','" + HBillType + "'," + HStockOrgID + ",'" + HMaker + "'"; ds = oCn.RunProcReturn(sql_afterDeleteTempListNote, "h_p_Gy_BarCodeConfirmBill_afterDeleteTempListNote"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼å é¤åæ§å¶å¤±è´¥ï¼è¯·å¯»æ¾ç½ç»ç®¡ç人å"; objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } //============================================================================================================================================= oCn.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å 餿åï¼"; //æåï¼ objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCn.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region æ«ç éªè¯å ç»´æ¤å表 /// <summary> /// è¿åç»æç¼ååè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("WEBSController/Gy_BarCodeConfirmBillList")] [HttpGet] public object Gy_BarCodeConfirmBillList(string sWhere, string user) { DataSet ds; try { string sql = ""; if (sWhere == null || sWhere == "") { sql = "select * from h_v_Gy_BarCodeConfirmBillList_Query order by æ¥æ desc"; ds = oCn.RunProcReturn(sql, "h_v_Gy_BarCodeConfirmBillList_Query"); } else { sql = "select * from h_v_Gy_BarCodeConfirmBillList_Query where 1=1 " + sWhere + " order by æ¥æ desc"; ds = oCn.RunProcReturn(sql, "h_v_Gy_BarCodeConfirmBillList_Query"); } if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } objJsonResult.code = "1"; 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/Gy_BarCodeConfirmBill_rushedBarCodeList_CodeList")] [HttpGet] public object Gy_BarCodeConfirmBill_rushedBarCodeList_CodeList(long HSourceInterID, string HSourceEntryID, string HSourceBillType, long HOrgID) { try { string sql = "select * from Gy_BarCodeConfirmBillTempList where HSourceInterID = " + HSourceInterID + " and HSourceEntryID = " + HSourceEntryID + " and HSourceBillType = '" + HSourceBillType + "' and HStockOrgID = " + HOrgID + " Order by HMakeDate desc"; ds = oCn.RunProcReturn(sql, "Gy_BarCodeConfirmBillTempList"); if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } 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/Gy_BarCodeConfirmBill_rushedBarCodeList_waitCodeList")] [HttpGet] public object Gy_BarCodeConfirmBill_rushedBarCodeList_waitCodeList(long HSourceInterID, string HSourceEntryID, string HSourceBillType, long HOrgID) { try { string sql = "exec h_p_Gy_BarCodeConfirmBill_waitRushBarCodeList " + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillType + "'," + HOrgID; ds = oCn.RunProcReturn(sql, "h_p_Gy_BarCodeConfirmBill_waitRushBarCodeList"); if (ds == null) { 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)); //è·åå°DataColumnå对象çåå } 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 #endregion } } WebAPI/InvokeHelper.cs
@@ -16,9 +16,17 @@ /// </summary> public static string Login() { var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId"); var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName"); var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord"); //ä»Cçé ç½®æä»¶è·å CLOUDç½åãè´¦å¥ä¿¡æ¯ãç»å½ç¨æ·ãç»å½å¯ç Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo); var useName = Pub_Class.ClsPub.sCLOUDUseName; var pwd = Pub_Class.ClsPub.sCLOUDPsd; var dbId = Pub_Class.ClsPub.sCLOUDAcc; CloudUrl = Pub_Class.ClsPub.sCLOUDUrl; //åä»Config/kdapi.config模åä¸è·å 20240712å±è½ //var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId"); //var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName"); //var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord"); HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); @@ -215,6 +223,9 @@ return httpClient.SyncRequest(); } /// <summary> /// åæ®æ¥è¯¢ /// </summary> public static string Query(string formId, string content) { HttpClient httpClient = new HttpClient(); WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,7 +10,7 @@ <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration> <LastUsedPlatform>x86</LastUsedPlatform> <PublishProvider>FileSystem</PublishProvider> <PublishUrl>G:\issWeb\ç½ç«åå¸\API</PublishUrl> <PublishUrl>D:\ç½ç«åå¸\æºäºMESWMS\API</PublishUrl> <WebPublishMethod>FileSystem</WebPublishMethod> <SiteUrlToLaunchAfterPublish /> </PropertyGroup> WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -9,7 +9,10 @@ </PropertyGroup> <ItemGroup> <File Include="apiapp.json"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Aliyun.Credentials.dll"> <publishTime>12/05/2022 15:40:12</publishTime> </File> <File Include="bin/Antlr3.Runtime.dll"> <publishTime>02/22/2013 16:43:40</publishTime> @@ -81,7 +84,7 @@ <publishTime>08/25/2021 10:28:25</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.FormService.dll"> <publishTime>09/20/2018 19:23:20</publishTime> @@ -115,7 +118,7 @@ <publishTime>07/12/2024 08:46:30</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Newtonsoft.Json.dll"> <publishTime>09/07/2014 18:39:38</publishTime> @@ -214,8 +217,14 @@ <File Include="bin/System.Net.Http.dll"> <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.Net.Http.Extensions.dll"> <publishTime>02/20/2015 04:10:46</publishTime> </File> <File Include="bin/System.Net.Http.Formatting.dll"> <publishTime>11/28/2018 21:00:36</publishTime> </File> <File Include="bin/System.Net.Http.Primitives.dll"> <publishTime>02/20/2015 04:10:46</publishTime> </File> <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll"> <publishTime>09/19/2018 03:38:10</publishTime> @@ -251,7 +260,7 @@ <publishTime>11/28/2018 21:01:00</publishTime> </File> <File Include="bin/System.Web.Http.WebHost.dll"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/System.Web.Mvc.dll"> <publishTime>01/28/2015 12:02:18</publishTime> @@ -306,58 +315,58 @@ <publishTime>11/29/2018 21:26:30</publishTime> </File> <File Include="Config/kdapi.config"> <publishTime>04/15/2024 12:55:43</publishTime> <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/bootstrap.css"> <publishTime>04/15/2024 12:55:43</publishTime> <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/bootstrap.min.css"> <publishTime>04/15/2024 12:55:43</publishTime> <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/Site.css"> <publishTime>04/15/2024 12:55:43</publishTime> <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="DLL/BLL.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/DAL.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/DBUtility.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Kingdee.BOS.WebApi.Client.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Model.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Newtonsoft.Json.Net35.dll"> <publishTime>04/15/2024 12:55:44</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Pub_Class.dll"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Pub_Control.dll"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/SQLHelper.dll"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.eot"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.svg"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.ttf"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.woff"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Global.asax"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="grpc_csharp_ext.x64.dll"> <publishTime>03/22/2022 13:17:22</publishTime> @@ -366,7 +375,7 @@ <publishTime>03/22/2022 13:17:22</publishTime> </File> <File Include="Index.html"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="libgrpc_csharp_ext.x64.dylib"> <publishTime>03/19/2022 07:38:44</publishTime> @@ -375,121 +384,121 @@ <publishTime>03/19/2022 07:38:42</publishTime> </File> <File Include="libman.json"> <publishTime>04/15/2024 12:55:47</publishTime> <publishTime>07/12/2023 08:14:21</publishTime> </File> <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json"> <publishTime>04/15/2024 12:55:45</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="packages.config"> <publishTime>06/25/2024 12:46:38</publishTime> <publishTime>06/25/2024 13:29:13</publishTime> </File> <File Include="Views/Scripts/bootstrap.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/bootstrap.min.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.map"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.min.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/modernizr-2.6.2.js"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Shared/Error.cshtml"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Shared/_Layout.cshtml"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/web.config"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/_ViewStart.cshtml"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Department_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Customer_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Department_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Employee_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Group_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Source_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource"> <publishTime>04/15/2024 12:55:46</publishTime> <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/Reference.cs"> <publishTime>12/20/2021 13:19:56</publishTime> </File> <File Include="Web References/WebS/Reference.map"> <publishTime>04/29/2024 08:30:03</publishTime> <publishTime>05/06/2024 13:47:57</publishTime> </File> <File Include="Web References/WebS/WebService1.disco"> <publishTime>12/20/2021 13:19:56</publishTime> WebAPI/Web.config
@@ -22,7 +22,7 @@ <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> <!--<add key="FileIP" value="http://localhost:8080/" />--> <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> <!--<add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/> é¢å°å¼æº--> <add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/> <!--é¢å°å¼æº--> <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> --> <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> åæ¥ç§æ--> @@ -35,7 +35,7 @@ <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--æµè¯æå¡å¨--> <!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/> æ¬å°--> <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>--> <!--éé¯éæ¬å°é ç½®--> <add key="surl" value="http://localhost/webs-web/webservice1.asmx"/> <!--ç¿æ¶æ¶æ¬å°é ç½®--> <!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>--> <!--ç¿æ¶æ¶æ¬å°é ç½®--> <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>ä¹è±--> <!--<add key="sUrl" value="http://61.130.182.102:18181/WEBSCS/WebService1.asmx"/>--><!--æ¯è«å°--> WebAPI/WebAPI.csproj
@@ -573,6 +573,7 @@ <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_TaxRateBillController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_WorkController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_WorkStationBillController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_UnitConvertRateController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Xt_CheckFlowBillController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Xt_CheckFlowProgressBillController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Xt_CheckItemBillController.cs" />