|
@@ -869,14 +869,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
failGoodsSnList.add(goodsDto.getGoodsSn());
|
|
failGoodsSnList.add(goodsDto.getGoodsSn());
|
|
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());
|
|
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())) {
|
|
@@ -905,7 +898,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
|
|
|
// TODO 这里改成批量插入 SupplierEntity
|
|
// TODO 这里改成批量插入 SupplierEntity
|
|
// insertSupplierList.add(supplierEntity);
|
|
// insertSupplierList.add(supplierEntity);
|
|
-
|
|
|
|
|
|
+ //新增商品供货信息
|
|
supplierDao.save(supplierEntity);
|
|
supplierDao.save(supplierEntity);
|
|
// supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
|
|
// supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
@@ -1178,59 +1171,17 @@ public class GoodsServiceImpl implements GoodsService {
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
-// if(failGoodsSnList != null && failGoodsSnList.size() > 0){
|
|
|
|
-// if(failSameSkuList.size()>0) {
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
|
-// failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
|
|
|
|
-// goodsUtils.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }else{
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
|
-// failGoodsTypeList + "】的商品信息");
|
|
|
|
-// goodsUtils.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
if(failTypeGoodsSnList != null && failTypeGoodsSnList.size() > 0){
|
|
if(failTypeGoodsSnList != null && failTypeGoodsSnList.size() > 0){
|
|
exportExceptionDataEntity.setExportExceptionData("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查商品编码【"+failTypeGoodsSnList+"】的商品信息");
|
|
exportExceptionDataEntity.setExportExceptionData("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查商品编码【"+failTypeGoodsSnList+"】的商品信息");
|
|
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(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
|
|
if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
|
|
exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
|
|
exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
-// if(failCateGoodsSnList != null && failCateGoodsSnList.size() > 0){
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("分类信息请在商城配置》商品分类中维护,商品分类与商户信息对应,请检查该商品商户信息下的分类是否维护,不存在的商品编码【"+failCateGoodsSnList+"】");
|
|
|
|
-// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
-// if(failCateL2GoodsSnList != null && failCateL2GoodsSnList.size() > 0){
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("分类信息请在商城配置》商品分类中查看,商品分类必须为二级分类,不存在的商品编码【"+failCateL2GoodsSnList+"】");
|
|
|
|
-// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
-// if(failBrandGoodsSnList != null && failBrandGoodsSnList.size() > 0){
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("品牌信息请在商城配置》品牌制造商中维护,品牌与商户信息对应,请检查该商品商户信息下的品牌是否维护,不存在的商品编码【" + failBrandGoodsSnList + "】");
|
|
|
|
-// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
-// if(failFreightGoodsSnList != null && failFreightGoodsSnList.size() > 0){
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("运费信息请在商城配置》运费模板中维护,运费与商户信息对应,请检查该商品商户信息下的运费是否维护,不存在的商品编码【"+failFreightGoodsSnList+"】,运费【"+failFreightList+"】");
|
|
|
|
-// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
-// if(failSuppGoodsSnList != null && failSuppGoodsSnList.size() > 0){
|
|
|
|
-// exportExceptionDataEntity.setExportExceptionData("供应商信息请在商城配置》商品供应商中维护,供应商与商户信息对应,请检查该商品商户信息下的供应商是否维护,不存在的商品编码【" + failSuppGoodsSnList + "】");
|
|
|
|
-// goodsUtils.save(exportExceptionDataEntity);
|
|
|
|
-// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
if(failUnitGoodsSnList != null && failUnitGoodsSnList.size() > 0){
|
|
if(failUnitGoodsSnList != null && failUnitGoodsSnList.size() > 0){
|
|
exportExceptionDataEntity.setExportExceptionData("计算单位信息请在商城配置》计算单位中维护,不存在的商品编码【" + failUnitGoodsSnList + "】");
|
|
exportExceptionDataEntity.setExportExceptionData("计算单位信息请在商城配置》计算单位中维护,不存在的商品编码【" + failUnitGoodsSnList + "】");
|
|
goodsUtils.save(exportExceptionDataEntity);
|
|
goodsUtils.save(exportExceptionDataEntity);
|