wtt
2025-03-17 15316f51a5e129c2ebcf8dabff4ac30c1ee1dc32
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Gy_BarCodeBill_OutController.cs
@@ -27,6 +27,7 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_BarCodeBill_OutList order by HMainID asc", "h_v_Gy_BarCodeBill_OutList");
@@ -37,11 +38,17 @@
                    string sql = sql1 + sWhere + " order by HMainID asc";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_BarCodeBill_OutList");
                }
                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格式的字符串
                    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;
            }
            catch (Exception e)
@@ -238,8 +245,18 @@
                string HBarCode_Pack = list[0].HBarCode_Pack;
                long HCustomQty1 = list[0].HCustomQty1;
                DateTime HProduceDate = list[0].HProduceDate;         //生产日期(保质期用)
                DateTime HExpiryDate = list[0].HExpiryDate;         //保质期至(保质期用)
                DateTime HExpiryDate = list[0].HExpiryDate;         //保质期至(保质期用)
                //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                ////判断权限
                //if (!ClsPub.Security_Log(msg5, 1, false, msg4))
@@ -365,6 +382,17 @@
        {
            try
            {
                //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("Delete From Gy_BarCodeBill_Out where HItemID = " + HItemID);
                oCN.Commit();