丽知:供应商同步修改。
This commit is contained in:
parent
bc7556e1ee
commit
1a01a66203
|
@ -280,9 +280,9 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
String def1 = null;
|
String def1 = null;
|
||||||
String url = null;
|
String url = null;
|
||||||
String custName = k;//客商名称
|
String custName = k;//客商名称
|
||||||
|
//查询u8c客商基本档案
|
||||||
|
BdCubasdocEntity bdCubasdocEntity = queryU8CEntityUtil.queryBdCubasdocByName(custName);
|
||||||
try {
|
try {
|
||||||
//查询u8c客商基本档案
|
|
||||||
BdCubasdocEntity bdCubasdocEntity = queryU8CEntityUtil.queryBdCubasdocByName(custName);
|
|
||||||
if (bdCubasdocEntity == null) {
|
if (bdCubasdocEntity == null) {
|
||||||
//新增
|
//新增
|
||||||
url = OverallConstant.getOverAllValue("custdocSaveCode");
|
url = OverallConstant.getOverAllValue("custdocSaveCode");
|
||||||
|
@ -295,18 +295,23 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
//拼接def1,如果存在则跳过转换,如果不存在则新增
|
//拼接def1,如果存在则跳过转换,如果不存在则新增
|
||||||
// def1 = v.stream().map(OfsSupplierDto::getBizCode).collect(Collectors.joining(","));
|
// def1 = v.stream().map(OfsSupplierDto::getBizCode).collect(Collectors.joining(","));
|
||||||
List<String> def1_new = v.stream().map(OfsSupplierDto::getBizCode).collect(Collectors.toList());
|
List<String> def1_new = v.stream().map(OfsSupplierDto::getBizCode).collect(Collectors.toList());
|
||||||
String def1_old = bdCubasdocEntity.getDef1();
|
if(bdCubasdocEntity==null){
|
||||||
String[] def1_split_old = def1_old.split(",");
|
def1 = String.join(",", def1_new);
|
||||||
// 将数组转换为列表
|
}else {
|
||||||
List<String> def1_all=new ArrayList<>();
|
String def1_old = bdCubasdocEntity.getDef1();
|
||||||
List<String> def1_list_old = Arrays.asList(def1_split_old);//u8c里已有的def1
|
String[] def1_split_old = def1_old.split(",");
|
||||||
def1_all.addAll(def1_list_old);
|
// 将数组转换为列表
|
||||||
for (String s_new : def1_new) {
|
List<String> def1_all=new ArrayList<>();
|
||||||
if (!def1_list_old.contains(s_new)) {
|
List<String> def1_list_old = Arrays.asList(def1_split_old);//u8c里已有的def1
|
||||||
def1_all.add(s_new);
|
def1_all.addAll(def1_list_old);
|
||||||
|
for (String s_new : def1_new) {
|
||||||
|
if (!def1_list_old.contains(s_new)) {
|
||||||
|
def1_all.add(s_new);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
def1 = String.join(",", def1_all);
|
||||||
}
|
}
|
||||||
def1 = String.join(",", def1_all);
|
|
||||||
|
|
||||||
CustdocEntityDto parentvo = new CustdocEntityDto();
|
CustdocEntityDto parentvo = new CustdocEntityDto();
|
||||||
CustdocRequestVo CustdocEntityDto = new CustdocRequestVo();
|
CustdocRequestVo CustdocEntityDto = new CustdocRequestVo();
|
||||||
|
@ -351,7 +356,11 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsSupplierDto.getBizCode() + "_" + ofsSupplierDto.getLastUpdated());
|
integrationTaskLivingDetailsEntity.setRootAppPk(ofsSupplierDto.getBizCode() + "_" + ofsSupplierDto.getLastUpdated());
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsSupplierDto.getBizCode());
|
integrationTaskLivingDetailsEntity.setRootAppBill(ofsSupplierDto.getBizCode());
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
integrationTaskLivingDetailsEntity.setNewSystemNumber(res_custdoc.getParentvo().getCustcode());
|
if(bdCubasdocEntity!=null){
|
||||||
|
integrationTaskLivingDetailsEntity.setNewSystemNumber(bdCubasdocEntity.getCustcode());
|
||||||
|
}else {
|
||||||
|
integrationTaskLivingDetailsEntity.setNewSystemNumber(res_custdoc.getParentvo().getCustcode());
|
||||||
|
}
|
||||||
integrationTaskLivingDetailsEntity.setNewSystemPrimary(res_custdoc.getParentvo().getPk_cubasdoc());
|
integrationTaskLivingDetailsEntity.setNewSystemPrimary(res_custdoc.getParentvo().getPk_cubasdoc());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
}
|
}
|
||||||
|
@ -369,6 +378,9 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsSupplierDto.getBizCode() + "_" + ofsSupplierDto.getLastUpdated());
|
integrationTaskLivingDetailsEntity.setRootAppPk(ofsSupplierDto.getBizCode() + "_" + ofsSupplierDto.getLastUpdated());
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsSupplierDto.getBizCode());
|
integrationTaskLivingDetailsEntity.setRootAppBill(ofsSupplierDto.getBizCode());
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
|
if(bdCubasdocEntity!=null){
|
||||||
|
integrationTaskLivingDetailsEntity.setNewSystemNumber(bdCubasdocEntity.getCustcode());
|
||||||
|
}
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue