Browse Source

fix: 修复箱码合一计算条数不对

Marko552 3 years ago
parent
commit
7dec412fdc

+ 2 - 2
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrBoxMappingServiceImpl.java

@@ -78,7 +78,7 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
         Long indexEnd = getCodeIndex(req.getEndQrCode());
         AssertUtil.isNull(indexBegin,"结束序号不存在!");
         //条数
-        Long qrCodeCount = indexEnd - indexBegin;
+        Long qrCodeCount = indexEnd - indexBegin+1;
         if (qrCodeCount < 0) {
             throw new BusinessException("起始序号大于结束序号,无法生成条形码");
         }
@@ -144,7 +144,7 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
                 resultMap.put(o.getKey(), new UploadFileRes(SUCCESS, "上传箱码合一文件成功!"));
             } catch (BusinessException e) {
                 log.warn("文件上传失败",e);
-                throw new BusinessException(ErrorCodeEnum.FAIL.getCode(), "文件上传失败");
+                throw e;
             } catch (Exception e) {
                 log.warn("文件上传异常",e);
                 throw new BusinessException(ErrorCodeEnum.FAIL.getCode(), "文件上传异常");