|
@@ -208,10 +208,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
if (galleryEntityList == null || galleryEntityList.size() <= 0) {
|
|
if (galleryEntityList == null || galleryEntityList.size() <= 0) {
|
|
throw new RRException("至少添加一张商品轮播图!");
|
|
throw new RRException("至少添加一张商品轮播图!");
|
|
}
|
|
}
|
|
- List<GoodsEntity> prodbarGoodsList = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),goods.getMerchSn(),null);
|
|
|
|
- if(prodbarGoodsList != null && prodbarGoodsList.size() > 0){
|
|
|
|
- throw new RRException("不能有重复的产品条码信息!");
|
|
|
|
- }
|
|
|
|
|
|
+// List<GoodsEntity> prodbarGoodsList = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),goods.getMerchSn(),null);
|
|
|
|
+// if(prodbarGoodsList != null && prodbarGoodsList.size() > 0){
|
|
|
|
+// throw new RRException("不能有重复的产品条码信息!");
|
|
|
|
+// }
|
|
|
|
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -388,10 +388,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
// throw new RRException("至少保留一张商品轮播图!");
|
|
// throw new RRException("至少保留一张商品轮播图!");
|
|
}
|
|
}
|
|
|
|
|
|
- List<GoodsEntity> prodbarGoodsList = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),goods.getMerchSn(),goods.getId());
|
|
|
|
- if(prodbarGoodsList != null && prodbarGoodsList.size() > 0){
|
|
|
|
- throw new RRException("不能有重复的产品条码信息!");
|
|
|
|
- }
|
|
|
|
|
|
+// List<GoodsEntity> prodbarGoodsList = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),goods.getMerchSn(),goods.getId());
|
|
|
|
+// if(prodbarGoodsList != null && prodbarGoodsList.size() > 0){
|
|
|
|
+// throw new RRException("不能有重复的产品条码信息!");
|
|
|
|
+// }
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("isSame", "true");
|
|
map.put("isSame", "true");
|
|
@@ -741,7 +741,8 @@ public class GoodsServiceImpl implements GoodsService {
|
|
boolean isFail = false;
|
|
boolean isFail = false;
|
|
List<String> failSameSkuList = new ArrayList<>(), failHotGoodsSnList = new ArrayList<>(),
|
|
List<String> failSameSkuList = new ArrayList<>(), failHotGoodsSnList = new ArrayList<>(),
|
|
failSuppGoodsSnList = new ArrayList<>(),
|
|
failSuppGoodsSnList = new ArrayList<>(),
|
|
- failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),failProdbarGoodsSnList = new ArrayList<>(),
|
|
|
|
|
|
+ failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),
|
|
|
|
+// failProdbarGoodsSnList = new ArrayList<>(),
|
|
failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
|
|
failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
|
|
// failCateL2GoodsSnList = new ArrayList<>(),
|
|
// failCateL2GoodsSnList = new ArrayList<>(),
|
|
// failCateGoodsSnList = new ArrayList<>(),
|
|
// failCateGoodsSnList = new ArrayList<>(),
|
|
@@ -834,13 +835,13 @@ public class GoodsServiceImpl implements GoodsService {
|
|
failGoodsTypeList.add(goodsDto.getGoodsBizType());
|
|
failGoodsTypeList.add(goodsDto.getGoodsBizType());
|
|
}
|
|
}
|
|
//校验产品条码是否存在
|
|
//校验产品条码是否存在
|
|
- List<GoodsEntity> prodbarGoods = goodsDao.queryObjectByProdBarcode(goodsDto.getProdBarcode(),merchSn,null);
|
|
|
|
- if(prodbarGoods != null && prodbarGoods.size() > 0){
|
|
|
|
- isFail = true;
|
|
|
|
- failProdbarGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
- }else{
|
|
|
|
- goodsEntity.setProdBarcode(goodsDto.getProdBarcode());
|
|
|
|
- }
|
|
|
|
|
|
+// List<GoodsEntity> prodbarGoods = goodsDao.queryObjectByProdBarcode(goodsDto.getProdBarcode(),merchSn,null);
|
|
|
|
+// if(prodbarGoods != null && prodbarGoods.size() > 0){
|
|
|
|
+// isFail = true;
|
|
|
|
+// failProdbarGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
+// }else{
|
|
|
|
+ goodsEntity.setProdBarcode(goodsDto.getProdBarcode());
|
|
|
|
+// }
|
|
//热销商品校验
|
|
//热销商品校验
|
|
if (Dict.orderBizType.item_02.getItem().equals(goodsDto.getGoodsBizType())
|
|
if (Dict.orderBizType.item_02.getItem().equals(goodsDto.getGoodsBizType())
|
|
|| Dict.orderBizType.item_10.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|| Dict.orderBizType.item_10.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
@@ -1045,11 +1046,11 @@ public class GoodsServiceImpl implements GoodsService {
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failProdbarGoodsSnList != null && failProdbarGoodsSnList.size() > 0){
|
|
|
|
- exportExceptionDataEntity.setExportExceptionData("不能有重复的产品条码信息!请检查商品编码【"+failProdbarGoodsSnList+"】的商品产品条码信息");
|
|
|
|
- goodsUtils.save(exportExceptionDataEntity);
|
|
|
|
- throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
- }
|
|
|
|
|
|
+// if(failProdbarGoodsSnList != null && failProdbarGoodsSnList.size() > 0){
|
|
|
|
+// exportExceptionDataEntity.setExportExceptionData("不能有重复的产品条码信息!请检查商品编码【"+failProdbarGoodsSnList+"】的商品产品条码信息");
|
|
|
|
+// goodsUtils.save(exportExceptionDataEntity);
|
|
|
|
+// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
+// }
|
|
if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
|
|
if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
|
|
exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
|
|
exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
goodsUtils.save(exportExceptionDataEntity);
|