|  |  | 
 |  |  |                 pakinType = "ctu";
 | 
 |  |  |             }
 | 
 |  |  |         }
 | 
 |  |  |         ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>().eq(ZpalletBarcode::getBarcode, barcode));
 | 
 |  |  |         if (one != null) {
 | 
 |  |  |             return R.error("条码起始值已存在");
 | 
 |  |  |         }
 | 
 |  |  | 
 | 
 |  |  |         if (pakinType.equals("flat")) {
 | 
 |  |  |             int barcodeInt = Integer.parseInt(String.valueOf(barcode));
 | 
 |  |  |             for (int i = 0; i < Integer.parseInt(String.valueOf(num)); i++) {
 | 
 |  |  |                 ZpalletBarcode zpalletBarcode = new ZpalletBarcode();
 | 
 |  |  |                 String strBarcode = String.format("%08d", barcodeInt);
 | 
 |  |  |                 zpalletBarcode.setBarcode("PK" + strBarcode);
 | 
 |  |  |                 ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>()
 | 
 |  |  |                         .eq(ZpalletBarcode::getBarcode, strBarcode));
 | 
 |  |  |                 if (one != null) {
 | 
 |  |  |                     continue;
 | 
 |  |  |                 }
 | 
 |  |  |                 zpalletBarcodeService.save(zpalletBarcode);
 | 
 |  |  |                 barcodeInt += 1;
 | 
 |  |  |             }
 | 
 |  |  | 
 |  |  |                 ZpalletBarcode zpalletBarcode = new ZpalletBarcode();
 | 
 |  |  |                 String strBarcode = String.format("%08d", barcodeInt);
 | 
 |  |  |                 zpalletBarcode.setBarcode(strBarcode);
 | 
 |  |  |                 ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>()
 | 
 |  |  |                         .eq(ZpalletBarcode::getBarcode, strBarcode));
 | 
 |  |  |                 if (one != null) {
 | 
 |  |  |                     continue;
 | 
 |  |  |                 }
 | 
 |  |  |                 zpalletBarcodeService.save(zpalletBarcode);
 | 
 |  |  |                 barcodeInt += 1;
 | 
 |  |  |             }
 |