WebAPI/Controllers/Æ·ÖʹÜÀí/ÖÊÁ¿Ô¶ÈÄ¿±êµ¥/QC_MonthTarGetBillController.cs
@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -80,6 +81,62 @@
        }
        #endregion
        #region è´¨é‡æœˆåº¦ç›®æ ‡å• åˆ†é¡µåˆ—表
        [Route("QC_MonthTarGetBill/getQC_MonthTarGetBillListPage")]
        [HttpGet]
        public json getQC_MonthTarGetBillListPage(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("QC_MonthTarGetBill_Query", 3, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "您没有该模块权限,请与管理员联系!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_MonthTarGetBillMainList " + page + "," + size + ",''", "h_p_QC_MonthTarGetBillMainList");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_MonthTarGetBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_MonthTarGetBillMainList");
                }
                //添加列名
                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列对象的列名
                }
                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 res;
            }
        }
        #endregion
        #region è´¨é‡æœˆåº¦ç›®æ ‡å• ä¿å­˜/编辑
        /// <summary>
@@ -173,13 +230,7 @@
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "7523";
                    oItem.HBillSubType = "7523";
                    //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    //oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillSubType = "7523";
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
@@ -303,12 +354,7 @@
        }
        #endregion
        #region æ ¹æ®åŸºç¡€èµ„æ–™ID æŸ¥æ‰¾è®°å½•(加载表用)
        /// <summary>
        /// æ ¹æ®åŸºç¡€èµ„æ–™ID æŸ¥æ‰¾è®°å½•
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        #region è´¨é‡æœˆåº¦ç›®æ ‡å•  ç¼–辑回显
        [Route("QC_MonthTarGetBill/cx")]
        [HttpGet]
        public object cx(long HInterID)