WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -1,4 +1,5 @@
using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -129,10 +130,11 @@
                    }
                    DBUtility.ClsPub.CurUserName = oItem.HMaker;
                    oItem.HBillType = "3787";
                    oItem.HBillSubType = "3787";
                    oItem.HBillType = "4502";
                    oItem.HBillSubType = "4502";
                    oItem.HBillStatus = 1;   //单据状态(1未审,2审核通过,3关闭,4作废,5审核退回,6审核中,7已阅,8已回复,9结案,10验证,11下达,12开工,13申请审批,15申请检验,16 判定合格,17判定不合格)     
                    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"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
@@ -373,6 +375,8 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user))
                {
@@ -383,24 +387,32 @@
                    return objJsonResult;
                }
                ds = Get_TransFerBillList(sWhere);
                if (sWhere == null || sWhere.Equals(""))
                {
                    string sql = "select * from h_v_OA_ErrMsgBackBillList order by 单据号 desc";
                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_OA_ErrMsgBackBillList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by 单据号 desc";
                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                //添加列名
                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;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception ex)
            {