|
@@ -745,7 +745,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
String merchSn = user.getMerchSn();
|
|
String merchSn = user.getMerchSn();
|
|
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<>(),
|
|
failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),
|
|
// failProdbarGoodsSnList = new ArrayList<>(),
|
|
// failProdbarGoodsSnList = new ArrayList<>(),
|
|
failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
|
|
failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
|
|
@@ -860,10 +860,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
if (supplierEntity == null) {
|
|
if (supplierEntity == null) {
|
|
//导入没有查到供货商,执行新增
|
|
//导入没有查到供货商,执行新增
|
|
MerchEntity merchEntity = merchDao.findByMerchSn(thirdMerchantBizEntity.getMerchSn());
|
|
MerchEntity merchEntity = merchDao.findByMerchSn(thirdMerchantBizEntity.getMerchSn());
|
|
- if(null == merchEntity || !StringUtils.isNotEmpty(goodsDto.getSupplierFlag())){
|
|
|
|
- isFail = true;
|
|
|
|
- failSuppGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
- }
|
|
|
|
|
|
+// if(null == merchEntity || !StringUtils.isNotEmpty(goodsDto.getSupplierFlag())){
|
|
|
|
+// isFail = true;
|
|
|
|
+// failSuppGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
|
+// }
|
|
|
|
|
|
supplierEntity = new SupplierEntity();
|
|
supplierEntity = new SupplierEntity();
|
|
supplierEntity.setLevelMerchSn(merchEntity.getMerchSn());
|
|
supplierEntity.setLevelMerchSn(merchEntity.getMerchSn());
|
|
@@ -874,6 +874,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
supplierEntity.setIsShow("0");
|
|
supplierEntity.setIsShow("0");
|
|
|
|
|
|
supplierDao.save(supplierEntity);
|
|
supplierDao.save(supplierEntity);
|
|
|
|
+// supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
} else {
|
|
} else {
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
goodsEntity.setSupplierId(supplierEntity.getId());
|
|
@@ -955,6 +956,8 @@ public class GoodsServiceImpl implements GoodsService {
|
|
goodsEntity.setUpdateTime(new Date());
|
|
goodsEntity.setUpdateTime(new Date());
|
|
goodsEntity.setModTime(new Date());
|
|
goodsEntity.setModTime(new Date());
|
|
goodsEntity.setGoodsNumber(Integer.parseInt(goodsDto.getGoodsNumber()));
|
|
goodsEntity.setGoodsNumber(Integer.parseInt(goodsDto.getGoodsNumber()));
|
|
|
|
+ goodsEntity.setPlu(goodsDto.getPlu());
|
|
|
|
+ goodsEntity.setMychemId(goodsDto.getMychemId());
|
|
|
|
|
|
if(!isFail){
|
|
if(!isFail){
|
|
GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
|
|
GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
|
|
@@ -1110,11 +1113,11 @@ public class GoodsServiceImpl implements GoodsService {
|
|
// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
// exportExceptionDataDao.save(exportExceptionDataEntity);
|
|
// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
// throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
|
|
// }
|
|
// }
|
|
- if(failSuppGoodsSnList != null && failSuppGoodsSnList.size() > 0){
|
|
|
|
- exportExceptionDataEntity.setExportExceptionData("供应商信息请在商城配置》商品供应商中维护,供应商与商户信息对应,请检查该商品商户信息下的供应商是否维护,不存在的商品编码【" + failSuppGoodsSnList + "】");
|
|
|
|
- goodsUtils.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);
|