fix:
1.已存在的数据不在生成
This commit is contained in:
parent
35d101386a
commit
37857e0346
@ -5,7 +5,6 @@ import com.yem.wm.utils.YEM;
|
||||
import kd.bos.dataentity.OperateOption;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.operate.OperationException;
|
||||
import kd.bos.entity.operate.result.IOperateInfo;
|
||||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.exception.KDBizException;
|
||||
@ -978,6 +977,19 @@ public class AtlasUtils {
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
String selectfields = DynamicObjectUtil.getSelectfields("yem_em_bomchange", false);
|
||||
DynamicObject[] loaded = BusinessDataServiceHelper.load("yem_em_bomchange", selectfields, null);
|
||||
List<String> list = new ArrayList<>();
|
||||
if (loaded.length > 0) {
|
||||
for (DynamicObject dynamicObject : loaded) {
|
||||
String number = dynamicObject.getString("number");
|
||||
list.add(number);
|
||||
}
|
||||
}
|
||||
for (int i1 = 0; i1 < list.size(); i1++) {
|
||||
if (list.contains(changebill_code)) {
|
||||
continue;
|
||||
}
|
||||
DynamicObject cmmptable = BusinessDataServiceHelper.newDynamicObject("yem_em_bomchange");
|
||||
cmmptable.set("yem_producttype", yem_producttype);
|
||||
cmmptable.set("enable", "1");
|
||||
@ -1034,6 +1046,8 @@ public class AtlasUtils {
|
||||
throw new KDBizException("审核失败!" + changebill_code + "_" + save.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user