1
chenhaozhe
2025-08-08 05a1bcf2d3fb7033b09a0cb7f99dc0514eacf537
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -179,6 +179,31 @@
                }
                if (bResult)
                {
                    //自动审核设置
                    if (msg5 == "xz")
                    {
                        objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID
                        //系统参数  自动审核
                        string sReturn = "";
                        if (oSystemParameter.ShowBill(ref sReturn) == true)
                        {
                            if (oSystemParameter.omodel.Sc_ProcessExchangeBill_AutoCheck == "Y") //系统参数  自动审核
                            {
                                objJsonResult.Verify = "Y";
                            }
                            else
                            {
                                objJsonResult.Verify = "N";
                            }
                        }
                    }
                    else
                    {
                        objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //返回主ID
                        objJsonResult.Verify = "N";
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "[0000-1-050]保存成功!";
@@ -2418,5 +2443,52 @@
            }
        }
        #endregion
        #region 可打印备料单报表(添康)
        [Route("Sc_ProcessExchangeBill/AllowedPrint")]
        [HttpGet]
        public object AllowedPrint(string sWhere, string user, string Organization, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Sc_ProcessExchangeBillList_AllowedPrint");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_AllowedPrint");
                }
                //添加列名
                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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                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
    }
}