1
cwjbxqmz
2023-11-01 aee44f23c1bb37762b017ad6b1efc5bdd075fe8b
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_CompleteController..cs
@@ -15,6 +15,7 @@
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        DataSet ds;
        #region é½å¥—分析信息明细列表
@@ -41,6 +42,52 @@
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.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>
        ///
        /// </summary>
        /// <param name="sWhere">查询条件</param>
        /// <param name="HMainICMOEntryID">生产订单明细表id</param>
        /// <returns></returns>
        [Route("JIT_Complete/JIT_CompleteMaterlDetailList")]
        [HttpGet]
        public object JIT_CompleteMaterlDetailList(string sWhere )
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_JIT_MaterDetailList  " + sWhere, "h_p_JIT_MaterDetailList");
                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.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
@@ -98,7 +145,18 @@
        {
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory");
                string Ret = "";
                oSystemParameter.ShowBill(ref Ret);
                if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                {
                    ds = oCN.RunProcReturn("select top 1000 * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory");
                }
                else
                {
                    ds = oCN.RunProcReturn("select * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory");
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;