yangle
2025-04-09 5898d7f62ec4b29f313a018c7526ce100e9d30a6
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_JIT_ComplementGoodBillController.cs
@@ -1,4 +1,5 @@
using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -32,6 +33,7 @@
        {
            try
            {
                List<object> a = new List<object>();
                //查询权限
                if (!DBUtility.ClsPub.Security_Log_second("JIT_ComplementGoodBill_Query", 1, false, user))
                {
@@ -43,11 +45,17 @@
                }
                ds = oCN.RunProcReturn("select * from h_v_JIT_Gy_WorkWarehouseBillList where 1=1 " + sWhere + " order by hmainid desc ", "h_v_JIT_Gy_WorkWarehouseBillList");
                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)
@@ -292,6 +300,7 @@
        {
            try
            {
                List<object> A = new List<object>();
                //查询权限
                if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanConfigBill_Query", 1, false, user))
                {
@@ -303,11 +312,18 @@
                }
                ds = oCN.RunProcReturn("select * from h_v_JIT_Cg_PODemandPlanConfigBillList where 1=1 " + sWhere + " order by hmainid desc ", "h_v_JIT_Cg_PODemandPlanConfigBillList");
                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)
@@ -451,7 +467,7 @@
                    return objJsonResult;
                }
                if (oSystemParameter.omodel.WMS_CampanyName != "帅威")
                if (oSystemParameter.omodel.WMS_CampanyName != "帅威"&& oSystemParameter.omodel.WMS_CampanyName != "宝工" && oSystemParameter.omodel.WMS_CampanyName != "三升")
                {
                    if (oSub.HLeadTime_Sec == 0 || oSub.HLeadTime_Sec == null)
                    {
@@ -1126,8 +1142,9 @@
        public json AddNeedBillSub(string msg3)
        {
            string Ret = "";
            omodelNeedsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JIT_NeedMaterPlanConfigBillSub>>(msg3);
            oSystemParameter.ShowBill(ref Ret);
            foreach (Models.JIT_NeedMaterPlanConfigBillSub oSub in omodelNeedsub)
            {
                if (oSub.HWorkShopID == 0 || oSub.HWorkShopID == null)
@@ -1162,14 +1179,18 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oSub.HDeliveryDaysCtrl == 0 || oSub.HDeliveryDaysCtrl == null)
                if (oSystemParameter.omodel.WMS_CampanyName != "宝工"&& oSystemParameter.omodel.WMS_CampanyName != "三升")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = " JIT送货控制天数不能为空";
                    objJsonResult.data = null;
                    return objJsonResult;
                    if (oSub.HDeliveryDaysCtrl == 0 || oSub.HDeliveryDaysCtrl == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = " JIT送货控制天数不能为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            //删除子表