|
|
@@ -1124,29 +1124,32 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
List<com.uas.ps.entity.Product> products = new ArrayList<>();
|
|
|
for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
|
|
|
- com.uas.ps.entity.Product product = new com.uas.ps.entity.Product();
|
|
|
- // releaseProductByBatch.getCode(); 在公有库生成
|
|
|
- product.setMinPack(releaseProductByBatch.getMinPackage());
|
|
|
- product.setCmpImg(releaseProductByBatch.getImg());
|
|
|
- product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
|
- product.setBrand(releaseProductByBatch.getBrandNameEn());
|
|
|
- product.setCmpCode(releaseProductByBatch.getCode());
|
|
|
- product.setCmpUuid(releaseProductByBatch.getComponentUuId());
|
|
|
- product.setKind(releaseProductByBatch.getKindName());
|
|
|
- product.setKindId(releaseProductByBatch.getKindUuid());
|
|
|
- product.setpCmpCode(releaseProductByBatch.getB2cCode());
|
|
|
- product.setpBrand(releaseProductByBatch.getB2cBrandcn());
|
|
|
- product.setpBrandEn(releaseProductByBatch.getB2cBranden());
|
|
|
- product.setpBrandId(releaseProductByBatch.getBrandId());
|
|
|
- product.setpBrandUuid(releaseProductByBatch.getBranduuid());
|
|
|
- product.setStandard(releaseProductByBatch.getComponentUuId() == null ? (short)0 : (short)1);
|
|
|
- product.setCmpUuid(releaseProductByBatch.getComponentUuId());
|
|
|
- if (isAPerson) {
|
|
|
- product.setSpec(releaseProductByBatch.getPackaging());
|
|
|
- }
|
|
|
- String batchCode = "PNUM" + createNumberService.getTimeNumber("trade$product_import_num", 8);
|
|
|
- product.setCode(batchCode);
|
|
|
- products.add(product);
|
|
|
+ if (releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.failure) ||
|
|
|
+ releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.success)) {
|
|
|
+ com.uas.ps.entity.Product product = new com.uas.ps.entity.Product();
|
|
|
+ // releaseProductByBatch.getCode(); 在公有库生成
|
|
|
+ product.setMinPack(releaseProductByBatch.getMinPackage());
|
|
|
+ product.setCmpImg(releaseProductByBatch.getImg());
|
|
|
+ product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
|
+ product.setBrand(releaseProductByBatch.getBrandNameEn());
|
|
|
+ product.setCmpCode(releaseProductByBatch.getCode());
|
|
|
+ product.setCmpUuid(releaseProductByBatch.getComponentUuId());
|
|
|
+ product.setKind(releaseProductByBatch.getKindName());
|
|
|
+ product.setKindId(releaseProductByBatch.getKindUuid());
|
|
|
+ product.setpCmpCode(releaseProductByBatch.getB2cCode());
|
|
|
+ product.setpBrand(releaseProductByBatch.getB2cBrandcn());
|
|
|
+ product.setpBrandEn(releaseProductByBatch.getB2cBranden());
|
|
|
+ product.setpBrandId(releaseProductByBatch.getBrandId());
|
|
|
+ product.setpBrandUuid(releaseProductByBatch.getBranduuid());
|
|
|
+ product.setStandard(releaseProductByBatch.getComponentUuId() == null ? (short)0 : (short)1);
|
|
|
+ product.setCmpUuid(releaseProductByBatch.getComponentUuId());
|
|
|
+ if (isAPerson) {
|
|
|
+ product.setSpec(releaseProductByBatch.getPackaging());
|
|
|
+ }
|
|
|
+ String batchCode = "PNUM" + createNumberService.getTimeNumber("trade$product_import_num", 8);
|
|
|
+ product.setCode(batchCode);
|
|
|
+ products.add(product);
|
|
|
+ }
|
|
|
}
|
|
|
return products;
|
|
|
}
|