丽知:ofs供应商同步修改

This commit is contained in:
zhengyf 2024-11-13 11:08:17 +08:00
parent b2a4188c1b
commit 324077a941
1 changed files with 13 additions and 9 deletions

View File

@ -299,17 +299,21 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
def1 = String.join(",", def1_new); def1 = String.join(",", def1_new);
}else { }else {
String def1_old = bdCubasdocEntity.getDef1(); String def1_old = bdCubasdocEntity.getDef1();
String[] def1_split_old = def1_old.split(","); if(def1_old==null){
// 将数组转换为列表 def1 = String.join(",", def1_new);
List<String> def1_all=new ArrayList<>(); }else {
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);
} }