|
|
@@ -1810,7 +1810,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if (StringUtils.isEmpty(importNum)) {
|
|
|
throw new IllegalOperatorException("生成批次号失败");
|
|
|
}
|
|
|
- String time = importNum.substring(IntegerConstant.NO_SHORT, (IntegerConstant.TIME_LENGTH - 1));
|
|
|
+ String time = importNum.substring(IntegerConstant.NO_SHORT, (IntegerConstant.TIME_LENGTH));
|
|
|
Integer num = Integer.valueOf(importNum.substring(IntegerConstant.TIME_LENGTH));
|
|
|
String prodNum = null;
|
|
|
for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
|
|
|
@@ -1856,13 +1856,16 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- List<Product> products1 = productDao.save(products);
|
|
|
+ List<Product> products1 = new ArrayList<>();
|
|
|
+ if (products.size() != 0) {
|
|
|
+ List<Product> productes = productDao.save(products);
|
|
|
+ products1.addAll(productes);
|
|
|
+ }
|
|
|
for (Product product : products1) {
|
|
|
prIds.add(product.getId());
|
|
|
}
|
|
|
- if (reIds.size() < 1) {
|
|
|
- map.put("reIds", prIds);
|
|
|
+ if (reIds.size() > 0) {
|
|
|
+ map.put("reIds", reIds);
|
|
|
}
|
|
|
map.put("prIds", prIds);
|
|
|
map.put("propertyvalues", propertyMap);
|