yl
2023-03-22 e235d94e5987d43117439837e3a0ee2e316e91d2
VueWebApi/Tools/AppLableBarCode.cs
@@ -29,8 +29,8 @@
            List<string> listdt = new List<string>();
            List<AppLabCode> lab = new List<AppLabCode>();
            var dynamicParams = new DynamicParameters();
            //获取标签个数:向下取整
            decimal labcum = Math.Floor(decimal.Parse(qty) / decimal.Parse(onelabqty));
            //获取标签个数:进一法
            decimal labcum = Math.Ceiling(decimal.Parse(qty) / decimal.Parse(onelabqty));
            try
            {
                sql = @"select prefix,filingdate,incbit,value from  T_CodeRules  where rightcode=@rightcode";
@@ -137,7 +137,6 @@
            digit2 = value.Length;//获取string类型位数  
            for (int i = 1; i <= labcum; i++)
            {
                sumqty += decimal.Parse(onelabqty);
                AppLabCode lb = new AppLabCode();
                lb.rightcode = rightcode;
                if (i == labcum)  //最后一张标签
@@ -147,6 +146,7 @@
                else
                {
                    lb.labqty = onelabqty; //单标签数量
                    sumqty += decimal.Parse(onelabqty);
                }
                //流水号循环自增