|
|
@@ -1054,7 +1054,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
private int convertValueToProduct(Row row, ReleaseProductByBatch aProduct, int rowNum, boolean isAPerson, boolean isPcb) {
|
|
|
// 统计为空的个数
|
|
|
int result = 0;
|
|
|
-
|
|
|
+ aProduct.setNum(rowNum - 2);
|
|
|
Object brandValue = readWorkBookCell(row.getCell(UploadConstant.BRAND_ENGLISH), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.BRAND_ENGLISH);
|
|
|
if (StringUtils.isEmpty(brandValue)) {
|
|
|
@@ -1829,6 +1829,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
// releaseProductByBatch.getCode(); 在公有库生成
|
|
|
prodNum = "PNUM" + time + CreateNumberServiceImpl.formatIntToStr(++num, 8);
|
|
|
product.setProdNum(prodNum);
|
|
|
+ releaseProductByBatch.setProductNum(prodNum);
|
|
|
products.add(product);
|
|
|
} else {
|
|
|
//对于已经存在于物料库的信息,如果规格信息已存在,则做更新,如果是
|
|
|
@@ -1863,6 +1864,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ List<ReleaseProductByBatch> reList = new ArrayList<>();
|
|
|
if (products.size() != 0) {
|
|
|
List<Product> productes = productDao.save(products);
|
|
|
for (Product producte : productes) {
|
|
|
@@ -1873,8 +1875,18 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
productPrivates.add(productPrivate);
|
|
|
|
|
|
prIds.add(producte.getId());
|
|
|
+
|
|
|
+ for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
|
|
|
+ if (StringUtilB2C.equals(releaseProductByBatch.getProductNum(), producte.getProdNum())) {
|
|
|
+ releaseProductByBatch.setProductid(producte.getId());
|
|
|
+ reList.add(releaseProductByBatch);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ if (CollectionUtils.isNotEmpty(reList)) {
|
|
|
+ releaseProductByBatchDao.save(reList);
|
|
|
+ }
|
|
|
if (CollectionUtils.isNotEmpty(productPrivates)) {
|
|
|
productPrivateService.saveProductPrivate(productPrivates);
|
|
|
}
|