|
@@ -84,17 +84,17 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
|
|
|
UserInfo user = userUtil.getUser();
|
|
|
|
|
|
//获取起始序号和结束序号
|
|
|
- Long indexBeagin = getCodeIndex(req.getBeginQrCode());
|
|
|
+ Long indexBegin = getCodeIndex(req.getBeginQrCode());
|
|
|
Long indexEnd = getCodeIndex(req.getEndQrCode());
|
|
|
//条数
|
|
|
- Long qrCodeCount = indexEnd - indexBeagin;
|
|
|
+ Long qrCodeCount = indexEnd - indexBegin;
|
|
|
if (qrCodeCount < 0) {
|
|
|
throw new BusinessException("起始序号大于结束序号,无法生成条形码");
|
|
|
}
|
|
|
|
|
|
QrBoxMapping qbm = new QrBoxMapping();
|
|
|
qbm.setBoxCode(String.valueOf(IdWorker.getId()));
|
|
|
- qbm.setIndexBegin(indexBeagin);
|
|
|
+ qbm.setIndexBegin(indexBegin);
|
|
|
qbm.setIndexEnd(indexEnd);
|
|
|
qbm.setBeginQrCode(req.getBeginQrCode());
|
|
|
qbm.setEndQrCode(req.getEndQrCode());
|
|
@@ -177,13 +177,12 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
|
|
|
|
|
|
@Override
|
|
|
public PrintingDetailRes getPrintingDetail(PrintingDetailReq req) {
|
|
|
-
|
|
|
-
|
|
|
PrintingDetailVO printingDetail = qrBoxMappingMapper.getPrintingDetail(req.getBoxCode());
|
|
|
PrintingDetailRes res = PojoConverterUtils.copy(printingDetail, PrintingDetailRes.class);
|
|
|
- res.setFactoryCoverName(null == printingDetail.getFactoryCoverLevelTwoId() ? "" : getFactoryName(printingDetail.getFactoryCoverLevelTwoId()));
|
|
|
- res.setFactoryBeerName(null == printingDetail.getFactoryBeerId() ? "" : getFactoryName(printingDetail.getFactoryBeerId()));
|
|
|
-
|
|
|
+ res.setFactoryCoverName(null == printingDetail.getFactoryCoverLevelTwoId() ?
|
|
|
+ "" : getFactoryName(printingDetail.getFactoryCoverLevelTwoId()));
|
|
|
+ res.setFactoryBeerName(null == printingDetail.getFactoryBeerId() ?
|
|
|
+ "" : getFactoryName(printingDetail.getFactoryBeerId()));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
@@ -220,7 +219,6 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
|
|
|
|
|
|
@Override
|
|
|
public void replenishActivation(ReplenishActivationReq req) {
|
|
|
-
|
|
|
QrBoxMapping qrBoxMapping = getActiveQrBoxMapping(req.getBoxCode());
|
|
|
qrBoxMapping.setRemark(req.getReason());
|
|
|
|
|
@@ -245,18 +243,13 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
|
|
|
|
|
|
@Override
|
|
|
public void activateNow(ActivateNowReq req) {
|
|
|
-
|
|
|
List<String> boxCodeList = req.getBoxCodeList();
|
|
|
for (String boxCode : boxCodeList) {
|
|
|
-
|
|
|
QrBoxMapping qrBoxMapping = getActiveQrBoxMapping(boxCode);
|
|
|
qrBoxMapping.setProductionLineName(req.getProductionLineName());
|
|
|
qrBoxMapping.setProductionTime(LocalDateTime.parse(req.getProductionTime()));
|
|
|
-
|
|
|
qrBoxMappingMapper.updateById(qrBoxMapping);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|