| | |
| | | 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"; |
| | |
| | | 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) //最后一张标签 |
| | |
| | | else |
| | | { |
| | | lb.labqty = onelabqty; //单标签数量 |
| | | sumqty += decimal.Parse(onelabqty); |
| | | } |
| | | |
| | | //流水号循环自增 |