1
wtt
2025-06-12 60c33d122fed78adebb7cb9e85ab8dff3d7aa72a
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
@@ -506,7 +506,7 @@
        #region ææ–™è®¡åˆ’单 ææ–™è®¡åˆ’报表(采购订单维度)
        public class ReportPODemandPlanBill
        {
            public int? HORGID;
            public string HORGID;
            public DateTime HBEGINDATE;
            public DateTime HENDDATE;
            public int? HMATERIALID;
@@ -520,8 +520,9 @@
        {
            try
            {
                List<object> a = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_S", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -529,14 +530,28 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //查看供应商权限
                if (DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_AllSup", 1, false, user))
                {
                    user = "0";
                }
                ReportPODemandPlanBill Report = JsonConvert.DeserializeObject<ReportPODemandPlanBill>(sWhere);
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_ReportList {Report.HORGID},'{Report.HBEGINDATE}','{Report.HENDDATE}',{Report.HMATERIALID},{Report.HSUPPLIERID},'{Report.HXQD}','{Report.HPURORDERNO}' ", "h_p_JIT_PODemandPlanBill_ReportList");
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_ReportList {Report.HORGID},'{Report.HBEGINDATE}','{Report.HENDDATE}',{Report.HMATERIALID},{Report.HSUPPLIERID},'{Report.HXQD}','{Report.HPURORDERNO}','{user}' ", "h_p_JIT_PODemandPlanBill_ReportList");
                foreach (DataColumn col in ds.Tables[0].Columns)//遍历ds中第一个表(Tables[0])的所有列(Columns)每次循环中,col变量会持有当前列的引用
                {
                    Type dataType = col.DataType; //获取当前数据类型传入 è‡ªå®šä¹‰å˜é‡datadataType
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //字符串拼接         // å°†åˆ—名和数据类型信息拼接成一个JSON格式的字符串
                    a.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = a;
                return objJsonResult;
            }
            catch (Exception e)
@@ -558,7 +573,7 @@
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_S", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -566,8 +581,13 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //查看供应商权限
                if (DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_AllSup", 1, false, user))
                {
                    user = "0";
                }
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}','{HBEGINDATE}','{HENDDATE}' ", "h_p_JIT_PODemandPlanBill_S_ReportList");
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}','{HBEGINDATE}','{HENDDATE}','{user}' ", "h_p_JIT_PODemandPlanBill_S_ReportList");
                objJsonResult.code = "1";
                objJsonResult.count = 1;