|
@@ -56,6 +56,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
private SysCusNationCodeDao sysCusNationCodeDao;
|
|
private SysCusNationCodeDao sysCusNationCodeDao;
|
|
@Autowired
|
|
@Autowired
|
|
private SysCusUnitCodeDao sysCusUnitCodeDao;
|
|
private SysCusUnitCodeDao sysCusUnitCodeDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MerchDao merchDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExportExceptionDataDao exportExceptionDataDao;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public GoodsEntity queryObject(Integer id) {
|
|
public GoodsEntity queryObject(Integer id) {
|
|
@@ -96,7 +100,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
public int save(GoodsEntity goods) {
|
|
public int save(GoodsEntity goods) {
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goods);
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goods);
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
- builder.put("merchSn", "商户");
|
|
|
|
|
|
+ builder.put("merchSn", "商户编号");
|
|
builder.put("attributeCategory", "商品分类");
|
|
builder.put("attributeCategory", "商品分类");
|
|
builder.put("categoryId", "商品二级分类");
|
|
builder.put("categoryId", "商品二级分类");
|
|
builder.put("goodsSn", "商品编码");
|
|
builder.put("goodsSn", "商品编码");
|
|
@@ -237,7 +241,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
public int update(GoodsEntity goods) {
|
|
public int update(GoodsEntity goods) {
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goods);
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goods);
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
- builder.put("merchSn", "商户");
|
|
|
|
|
|
+ builder.put("merchSn", "商户编号");
|
|
builder.put("attributeCategory", "商品分类");
|
|
builder.put("attributeCategory", "商品分类");
|
|
builder.put("categoryId", "商品二级分类");
|
|
builder.put("categoryId", "商品二级分类");
|
|
builder.put("goodsSn", "商品编码");
|
|
builder.put("goodsSn", "商品编码");
|
|
@@ -499,14 +503,15 @@ public class GoodsServiceImpl implements GoodsService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @Transactional
|
|
|
|
- public int uploadExcel(List<GoodsDto> goodsEntityList) {
|
|
|
|
|
|
+ public int uploadExcel(List<GoodsDto> goodsEntityList,int exportDataType) {
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
|
+ String merchSn = user.getMerchSn();
|
|
boolean isSuccess = false;
|
|
boolean isSuccess = false;
|
|
- List<String> failSameSkuList = new ArrayList<>(), failHotSkuList = new ArrayList<>(), failCateSkuList = new ArrayList<>(),
|
|
|
|
- failBrandSkuList = new ArrayList<>(), failFreightSkuList = new ArrayList<>(), failSuppSkuList = new ArrayList<>(),
|
|
|
|
- failUnitSkuList = new ArrayList<>(), failNationSkuList = new ArrayList<>(),failProdbarSkuList = new ArrayList<>(),
|
|
|
|
- failCateL2SkuList = new ArrayList<>(), failTypeSkuList = new ArrayList<>();
|
|
|
|
|
|
+ List<String> failSameSkuList = new ArrayList<>(), failHotGoodsSnList = new ArrayList<>(), failCateGoodsSnList = new ArrayList<>(),
|
|
|
|
+ failBrandGoodsSnList = new ArrayList<>(), failFreightGoodsSnList = new ArrayList<>(), failSuppGoodsSnList = new ArrayList<>(),
|
|
|
|
+ failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),failProdbarGoodsSnList = new ArrayList<>(),
|
|
|
|
+ failCateL2GoodsSnList = new ArrayList<>(), failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
|
|
|
|
+ failMerchUserGoodsSnList = new ArrayList<>();
|
|
List<String> failGoodsSnList = new ArrayList<>();
|
|
List<String> failGoodsSnList = new ArrayList<>();
|
|
List<String> failGoodsTypeList = new ArrayList<>();
|
|
List<String> failGoodsTypeList = new ArrayList<>();
|
|
List<String> failFreightList = new ArrayList<>();
|
|
List<String> failFreightList = new ArrayList<>();
|
|
@@ -516,6 +521,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
GoodsEntity goodsEntity = new GoodsEntity();
|
|
GoodsEntity goodsEntity = new GoodsEntity();
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goodsDto);
|
|
Map<String, Object> valideDate = MapBeanUtil.fromObject(goodsDto);
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
|
|
+ builder.put("merchSn", "商户编号");
|
|
builder.put("goodsSn", "商品编码");
|
|
builder.put("goodsSn", "商品编码");
|
|
builder.put("categoryName", "商品分类");
|
|
builder.put("categoryName", "商品分类");
|
|
builder.put("goodsBizType", "货品业务类型");
|
|
builder.put("goodsBizType", "货品业务类型");
|
|
@@ -550,14 +556,30 @@ public class GoodsServiceImpl implements GoodsService {
|
|
throw new RRException(r.get("msg").toString());
|
|
throw new RRException(r.get("msg").toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //业务类型校验
|
|
if(!Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())){
|
|
if(!Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())){
|
|
if(!(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
if(!(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
|| Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
|| Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
|| Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType()))){
|
|
|| Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType()))){
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failTypeSkuList.add(goodsDto.getSku());
|
|
|
|
|
|
+ failTypeGoodsSnList.add(goodsDto.getSku());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(!user.getRoleType().equalsIgnoreCase(Dict.roleType.item_1.getItem())) {
|
|
|
|
+ if (!merchSn.equalsIgnoreCase(goodsDto.getMerchSn())) {
|
|
|
|
+ isSuccess = true;
|
|
|
|
+ failMerchUserGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ MerchEntity merchEntity = merchDao.findByMerchSn(goodsDto.getMerchSn());
|
|
|
|
+ if(merchEntity != null){
|
|
|
|
+ goodsEntity.setMerchSn(merchEntity.getMerchSn());
|
|
|
|
+ }else{//商户不存在
|
|
|
|
+ isSuccess = true;
|
|
|
|
+ failMerchGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //校验商品信息是否已存在
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("isSame", "true");
|
|
map.put("isSame", "true");
|
|
map.put("sku", goodsDto.getSku());
|
|
map.put("sku", goodsDto.getSku());
|
|
@@ -567,42 +589,45 @@ public class GoodsServiceImpl implements GoodsService {
|
|
if (list != null && list.size() != 0) {
|
|
if (list != null && list.size() != 0) {
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
if(goodsDto.getSku()!=null) {
|
|
if(goodsDto.getSku()!=null) {
|
|
- failSameSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failSameSkuList.add(goodsDto.getSku());
|
|
}
|
|
}
|
|
failGoodsSnList.add(goodsDto.getGoodsSn());
|
|
failGoodsSnList.add(goodsDto.getGoodsSn());
|
|
failGoodsTypeList.add(goodsDto.getGoodsBizType());
|
|
failGoodsTypeList.add(goodsDto.getGoodsBizType());
|
|
}
|
|
}
|
|
- GoodsEntity prodbarGoods = goodsDao.queryObjectByProdBarcode(goodsDto.getProdBarcode(),"",null);
|
|
|
|
|
|
+ //校验产品条码是否存在
|
|
|
|
+ GoodsEntity prodbarGoods = goodsDao.queryObjectByProdBarcode(goodsDto.getProdBarcode(),merchSn,null);
|
|
if(prodbarGoods != null){
|
|
if(prodbarGoods != null){
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failProdbarSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failProdbarGoodsSnList.add(goodsDto.getGoodsSn());
|
|
}else{
|
|
}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())) {
|
|
if(goodsDto.getIsHotStr().equalsIgnoreCase("1")){
|
|
if(goodsDto.getIsHotStr().equalsIgnoreCase("1")){
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failHotSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failHotGoodsSnList.add(goodsDto.getGoodsSn());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //商品配置校验
|
|
CategoryEntity categoryEntity = categoryDao.queryObjectByName(goodsDto.getCategoryName());
|
|
CategoryEntity categoryEntity = categoryDao.queryObjectByName(goodsDto.getCategoryName());
|
|
if(categoryEntity==null){
|
|
if(categoryEntity==null){
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failCateSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failCateGoodsSnList.add(goodsDto.getGoodsSn());
|
|
}else{
|
|
}else{
|
|
if(categoryEntity.getLevel().equalsIgnoreCase("L2")) {
|
|
if(categoryEntity.getLevel().equalsIgnoreCase("L2")) {
|
|
goodsEntity.setCategoryId(categoryEntity.getId());
|
|
goodsEntity.setCategoryId(categoryEntity.getId());
|
|
goodsEntity.setAttributeCategory(categoryEntity.getParentId());
|
|
goodsEntity.setAttributeCategory(categoryEntity.getParentId());
|
|
}else{
|
|
}else{
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failCateL2SkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failCateL2GoodsSnList.add(goodsDto.getGoodsSn());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
BrandEntity brandEntity = brandDao.queryObjectByName(goodsDto.getBrandName());
|
|
BrandEntity brandEntity = brandDao.queryObjectByName(goodsDto.getBrandName());
|
|
if (brandEntity == null) {
|
|
if (brandEntity == null) {
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failBrandSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failBrandGoodsSnList.add(goodsDto.getGoodsSn());
|
|
} else {
|
|
} else {
|
|
goodsEntity.setBrandId(brandEntity.getId());
|
|
goodsEntity.setBrandId(brandEntity.getId());
|
|
}
|
|
}
|
|
@@ -610,7 +635,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
FreightEntity freightEntity = freightDao.queryObjectByName(goodsDto.getDefaultFreight());
|
|
FreightEntity freightEntity = freightDao.queryObjectByName(goodsDto.getDefaultFreight());
|
|
if(freightEntity==null){
|
|
if(freightEntity==null){
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failFreightSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failFreightGoodsSnList.add(goodsDto.getGoodsSn());
|
|
failFreightList.add(goodsDto.getDefaultFreight());
|
|
failFreightList.add(goodsDto.getDefaultFreight());
|
|
}else {
|
|
}else {
|
|
goodsEntity.setFreightId(freightEntity.getId());
|
|
goodsEntity.setFreightId(freightEntity.getId());
|
|
@@ -619,14 +644,14 @@ public class GoodsServiceImpl implements GoodsService {
|
|
SupplierEntity supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName());
|
|
SupplierEntity supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName());
|
|
if (supplierEntity == null) {
|
|
if (supplierEntity == null) {
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failSuppSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failSuppGoodsSnList.add(goodsDto.getGoodsSn());
|
|
} else {
|
|
} else {
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
}
|
|
}
|
|
SysCusUnitCodeEntity sysCusUnitCodeEntity = sysCusUnitCodeDao.queryObjectByName(goodsDto.getUnitName());
|
|
SysCusUnitCodeEntity sysCusUnitCodeEntity = sysCusUnitCodeDao.queryObjectByName(goodsDto.getUnitName());
|
|
if (sysCusUnitCodeEntity == null) {
|
|
if (sysCusUnitCodeEntity == null) {
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failUnitSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failUnitGoodsSnList.add(goodsDto.getGoodsSn());
|
|
} else {
|
|
} else {
|
|
goodsEntity.setUnitCode(sysCusUnitCodeEntity.getCode());
|
|
goodsEntity.setUnitCode(sysCusUnitCodeEntity.getCode());
|
|
}
|
|
}
|
|
@@ -634,7 +659,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
SysCusNationCodeEntity sysCusNationCodeEntity = sysCusNationCodeDao.queryObjectByName(goodsDto.getOriCntName());
|
|
SysCusNationCodeEntity sysCusNationCodeEntity = sysCusNationCodeDao.queryObjectByName(goodsDto.getOriCntName());
|
|
if (sysCusNationCodeEntity == null) {
|
|
if (sysCusNationCodeEntity == null) {
|
|
isSuccess = true;
|
|
isSuccess = true;
|
|
- failNationSkuList.add(goodsDto.getGoodsSn());
|
|
|
|
|
|
+ failNationGoodsSnList.add(goodsDto.getGoodsSn());
|
|
} else {
|
|
} else {
|
|
goodsEntity.setOriCntCode(sysCusNationCodeEntity.getCode());
|
|
goodsEntity.setOriCntCode(sysCusNationCodeEntity.getCode());
|
|
}
|
|
}
|
|
@@ -715,45 +740,93 @@ public class GoodsServiceImpl implements GoodsService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ ExportExceptionDataEntity exportExceptionDataEntity = new ExportExceptionDataEntity();
|
|
|
|
+ exportExceptionDataEntity.setCreaterSn(user.getUserId().toString());
|
|
|
|
+ exportExceptionDataEntity.setUserId(user.getUserId().intValue());
|
|
|
|
+ exportExceptionDataEntity.setCreateTime(new Date());
|
|
|
|
+ exportExceptionDataEntity.setModTime(new Date());
|
|
|
|
+ exportExceptionDataEntity.setMerchSn(merchSn);
|
|
|
|
+ exportExceptionDataEntity.setStoreId(user.getStoreId());
|
|
|
|
+ if(exportDataType == 1) {
|
|
|
|
+ exportExceptionDataEntity.setExportDataType("1");
|
|
|
|
+ }else{
|
|
|
|
+ exportExceptionDataEntity.setExportDataType("2");
|
|
|
|
+ }
|
|
|
|
+ if(failMerchUserGoodsSnList != null && failMerchUserGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("不能操作除了登录用户以外商户的商品,当前商户编号为【"+merchSn+"】,请检查商品编码【"+failMerchUserGoodsSnList+"】的商品信息");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
+ }
|
|
|
|
+ if(failMerchGoodsSnList != null && failMerchGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("商户编号不存在,请检查商品编码【"+failMerchGoodsSnList+"】的商品信息,请先维护用户商户编号信息再继续操作!");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
|
|
+ }
|
|
if(failGoodsSnList != null && failGoodsSnList.size() > 0){
|
|
if(failGoodsSnList != null && failGoodsSnList.size() > 0){
|
|
if(failSameSkuList.size()>0) {
|
|
if(failSameSkuList.size()>0) {
|
|
- throw new RRException("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
|
|
failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}else{
|
|
}else{
|
|
- throw new RRException("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
failGoodsTypeList + "】的商品信息");
|
|
failGoodsTypeList + "】的商品信息");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(failTypeSkuList != null && failTypeSkuList.size() > 0){
|
|
|
|
- throw new RRException("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查SKU【"+failTypeSkuList+"】的商品信息");
|
|
|
|
|
|
+ if(failTypeGoodsSnList != null && failTypeGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查商品编码【"+failTypeGoodsSnList+"】的商品信息");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failProdbarSkuList != null && failProdbarSkuList.size() > 0){
|
|
|
|
- throw new RRException("不能有重复的产品条码信息!请检查SKU【"+failProdbarSkuList+"】的商品产品条码信息");
|
|
|
|
|
|
+ if(failProdbarGoodsSnList != null && failProdbarGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("不能有重复的产品条码信息!请检查商品编码【"+failProdbarGoodsSnList+"】的商品产品条码信息");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failHotSkuList != null && failHotSkuList.size() > 0){
|
|
|
|
- throw new RRException("请检查业务类型为【保税补货或保税展示】的商品,sku【"+failHotSkuList+"】的商品不能设置为热销!");
|
|
|
|
|
|
+ if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failCateSkuList != null && failCateSkuList.size() > 0){
|
|
|
|
- throw new RRException("分类信息请在商城配置》商品分类中维护,不存在的商品sku【"+failCateSkuList+"】");
|
|
|
|
|
|
+ if(failCateGoodsSnList != null && failCateGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("分类信息请在商城配置》商品分类中维护,不存在的商品编码【"+failCateGoodsSnList+"】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failCateL2SkuList != null && failCateL2SkuList.size() > 0){
|
|
|
|
- throw new RRException("分类信息请在商城配置》商品分类中查看,商品分类必须为二级分类,错误的商品sku【"+failCateL2SkuList+"】");
|
|
|
|
|
|
+ if(failCateL2GoodsSnList != null && failCateL2GoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("分类信息请在商城配置》商品分类中查看,商品分类必须为二级分类,不存在的商品编码【"+failCateL2GoodsSnList+"】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failBrandSkuList != null && failBrandSkuList.size() > 0){
|
|
|
|
- throw new RRException("品牌信息请在商城配置》品牌制造商中维护,不存在的商品sku【" + failBrandSkuList + "】");
|
|
|
|
|
|
+ if(failBrandGoodsSnList != null && failBrandGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("品牌信息请在商城配置》品牌制造商中维护,不存在的商品编码【" + failBrandGoodsSnList + "】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failFreightSkuList != null && failFreightSkuList.size() > 0){
|
|
|
|
- throw new RRException("运费信息请在商城配置》运费模板中维护,不存在的商品sku【"+failFreightSkuList+"】,运费【"+failFreightList+"】");
|
|
|
|
|
|
+ if(failFreightGoodsSnList != null && failFreightGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("运费信息请在商城配置》运费模板中维护,不存在的商品编码【"+failFreightGoodsSnList+"】,运费【"+failFreightList+"】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failSuppSkuList != null && failSuppSkuList.size() > 0){
|
|
|
|
- throw new RRException("供应商信息请在商城配置》商品供应商中维护,不存在的商品sku【" + failSuppSkuList + "】");
|
|
|
|
|
|
+ if(failSuppGoodsSnList != null && failSuppGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("供应商信息请在商城配置》商品供应商中维护,不存在的商品编码【" + failSuppGoodsSnList + "】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failUnitSkuList != null && failUnitSkuList.size() > 0){
|
|
|
|
- throw new RRException("计算单位信息请在商城配置》计算单位中维护,不存在的商品sku【" + failUnitSkuList + "】");
|
|
|
|
|
|
+ if(failUnitGoodsSnList != null && failUnitGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("计算单位信息请在商城配置》计算单位中维护,不存在的商品编码【" + failUnitGoodsSnList + "】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
- if(failNationSkuList != null && failNationSkuList.size() > 0){
|
|
|
|
- throw new RRException("原产国信息请在商城配置》原产国中维护,不存在的商品sku【" + failNationSkuList + "】");
|
|
|
|
|
|
+ if(failNationGoodsSnList != null && failNationGoodsSnList.size() > 0){
|
|
|
|
+ exportExceptionDataEntity.setExportExceptionData("原产国信息请在商城配置》原产国中维护,不存在的商品编码【" + failNationGoodsSnList + "】");
|
|
|
|
+ exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
|
|
+ throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ throw new RRException("导入数据为空,或者检查商品编码数据是否为空");
|
|
}
|
|
}
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|