|
|
@@ -200,12 +200,25 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ Long userUU = SystemSession.getUser().getUserUU();
|
|
|
+ Long enUU = SystemSession.getUser().getEnterprise().getUu();
|
|
|
List<ReleaseProductByBatch> addList = new ArrayList<>(releaseProductByBatchs.size());
|
|
|
addList.addAll(releaseProductByBatchs);
|
|
|
resetRepeatData(addList, isAPerson);
|
|
|
+ if (isAPerson) {
|
|
|
+ for (ReleaseProductByBatch releaseProductByBatch : addList) {
|
|
|
+ List<Product> productList = productDao.findByEnUUAndPcmpcodeAndPbrandenAndB2cEnabled(enUU,releaseProductByBatch.getB2cCode(),
|
|
|
+ releaseProductByBatch.getB2cBranden(),IntegerConstant.YES_SHORT);
|
|
|
+ if (!CollectionUtils.isEmpty(productList)) {
|
|
|
+ releaseProductByBatch.setErrmsg(ErrorInfoConstant.REPEAT_INFO.getInfo());
|
|
|
+ releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
|
|
|
+ releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
|
|
|
+ total --;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
commonDao.save(addList, ReleaseProductByBatch.class);
|
|
|
- Long userUU = SystemSession.getUser().getUserUU();
|
|
|
- Long enUU = SystemSession.getUser().getEnterprise().getUu();
|
|
|
+
|
|
|
releaseProductByBatchDao.callValidProcedure(enUU, batch);
|
|
|
Integer filter = releaseProductByBatchDao.getCountOfImportFail(userUU, batch, failCode);
|
|
|
Integer failure = releaseProductByBatchDao.getCountPublisherUuAndBatchAndReleaseCode(userUU, batch, ReleaseStatus.failure.value());
|