|
@@ -162,24 +162,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbJixinDownload item : addRec){
|
|
|
- if (oldProductRecMap.containsKey(item.getId()) ||
|
|
|
- dictcodes.contains(item.getId())){
|
|
|
+ if (oldProductRecMap.containsKey(item.getId())){
|
|
|
upGetProduct(updateProduct, oldProductRecMap, item);
|
|
|
} else {
|
|
|
- addGetProduct(brandRec, addProduct, item);
|
|
|
- dictcodes.add(item.getId());
|
|
|
+ if (!dictcodes.contains(item.getId())){
|
|
|
+ addGetProduct(brandRec, addProduct, item);
|
|
|
+ dictcodes.add(item.getId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbJixinDownload item : updateRec){
|
|
|
- if (oldProductRecMap.containsKey(item.getId()) ||
|
|
|
- dictcodes.contains(item.getId())){
|
|
|
+ if (oldProductRecMap.containsKey(item.getId())){
|
|
|
upGetProduct(updateProduct, oldProductRecMap, item);
|
|
|
} else {
|
|
|
- addGetProduct(brandRec, addProduct, item);
|
|
|
- dictcodes.add(item.getId());
|
|
|
+ if (!dictcodes.contains(item.getId())){
|
|
|
+ addGetProduct(brandRec, addProduct, item);
|
|
|
+ dictcodes.add(item.getId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -977,7 +979,7 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
oldRecId.add(item.getId());
|
|
|
addRec.add(item);
|
|
|
|
|
|
- if (addRec.size()>=1000){
|
|
|
+ if (addRec.size()>=500){
|
|
|
itfTblSplbJixinDownloadService.saveBatch(addRec);
|
|
|
log.info("格力品牌机型基础资料信息同步新增插入了{}条数据", addRec.size());
|
|
|
addAllRec.addAll(addRec);
|
|
@@ -1019,17 +1021,13 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbXilieDownload item : addRec){
|
|
|
- log.info("xiids {}",JSONObject.toJSONString(xiids));
|
|
|
- log.info("item {}",JSONObject.toJSONString(item));
|
|
|
- log.info("oldSysDictRefRecMap {}",JSONObject.toJSONString(oldSysDictRefRecMap));
|
|
|
-
|
|
|
-
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXiid())) ||
|
|
|
- xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXiid()))){
|
|
|
upSysDictRef(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addSysDictRef(brandRec, addSysDictRef, item);
|
|
|
- xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ if (!xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ addSysDictRef(brandRec, addSysDictRef, item);
|
|
|
+ xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1037,12 +1035,13 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbXilieDownload item : updateRec){
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXiid())) ||
|
|
|
- xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXiid()))){
|
|
|
upSysDictRef(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addSysDictRef(brandRec, addSysDictRef, item);
|
|
|
- xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ if (!xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ addSysDictRef(brandRec, addSysDictRef, item);
|
|
|
+ xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1123,24 +1122,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbXilieDownload item : addRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getXiid())) ||
|
|
|
- xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getXiid()))){
|
|
|
upSysDict(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addSysDict(addSysDict, item);
|
|
|
- xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ if (!xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ addSysDict(addSysDict, item);
|
|
|
+ xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbXilieDownload item : updateRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getXiid())) ||
|
|
|
- xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getXiid()))){
|
|
|
upSysDict(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addSysDict(addSysDict, item);
|
|
|
- xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ if (!xiids.contains(String.valueOf(item.getXiid()))){
|
|
|
+ addSysDict(addSysDict, item);
|
|
|
+ xiids.add(String.valueOf(item.getXiid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1338,24 +1339,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbXiaoleiDownload item : addRec){
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXlid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXlid()))){
|
|
|
upxlSysdRef(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addxlSysdRef(brandRec, addSysDictRef, item);
|
|
|
- dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ addxlSysdRef(brandRec, addSysDictRef, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbXiaoleiDownload item : updateRec){
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXlid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getXlid()))){
|
|
|
upxlSysdRef(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addxlSysdRef(brandRec, addSysDictRef, item);
|
|
|
- dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ addxlSysdRef(brandRec, addSysDictRef, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1484,24 +1487,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbXiaoleiDownload item : addRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getXlid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getXlid()))){
|
|
|
upXiaoLei(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addXiaoLei(addSysDict, item);
|
|
|
- dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ addXiaoLei(addSysDict, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbXiaoleiDownload item : updateRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getXlid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getXlid()))){
|
|
|
upXiaoLei(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addXiaoLei(addSysDict, item);
|
|
|
- dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getXlid()))){
|
|
|
+ addXiaoLei(addSysDict, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getXlid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1691,24 +1696,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbDaleiDownload item : addRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getSpid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getSpid()))){
|
|
|
updalei(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addDalei(addSysDict, item);
|
|
|
- dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ addDalei(addSysDict, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbDaleiDownload item : updateRec){
|
|
|
- if (oldSysDictRecMap.containsKey(String.valueOf(item.getSpid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ if (oldSysDictRecMap.containsKey(String.valueOf(item.getSpid()))){
|
|
|
updalei(updateSysDict, oldSysDictRecMap, item);
|
|
|
} else {
|
|
|
- addDalei(addSysDict, item);
|
|
|
- dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ addDalei(addSysDict, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1865,24 +1872,26 @@ public class GLPPLeiBieServiceImpl implements GLPPLeiBieService {
|
|
|
// 获取新增的
|
|
|
if (addRec.size()>0){
|
|
|
for (ItfTblSplbDaleiDownload item : addRec){
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getSpid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getSpid()))){
|
|
|
updateLeibie(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addLeibie(brandRec, addSysDictRef, item);
|
|
|
- dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ addLeibie(brandRec, addSysDictRef, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 获取修改的
|
|
|
if (updateRec.size()>0){
|
|
|
for (ItfTblSplbDaleiDownload item : updateRec){
|
|
|
- if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getSpid())) ||
|
|
|
- dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ if (oldSysDictRefRecMap.containsKey(String.valueOf(item.getSpid()))){
|
|
|
updateLeibie(updateSysDictRef, oldSysDictRefRecMap, item);
|
|
|
} else {
|
|
|
- addLeibie(brandRec, addSysDictRef, item);
|
|
|
- dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ if (!dictcodes.contains(String.valueOf(item.getSpid()))){
|
|
|
+ addLeibie(brandRec, addSysDictRef, item);
|
|
|
+ dictcodes.add(String.valueOf(item.getSpid()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|