|
@@ -8,16 +8,13 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
import kd.bos.entity.datamodel.events.BeforeImportEntryEventArgs;
|
|
|
import kd.bos.entity.datamodel.events.ChangeData;
|
|
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
|
|
-import kd.bos.exception.KDBizException;
|
|
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
|
|
import kd.bos.form.plugin.importentry.resolving.ImportEntryData;
|
|
|
import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
-import scala.Int;
|
|
|
-
|
|
|
import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
+
|
|
|
|
|
|
public class BusinessProcessingSplitPlugin extends AbstractFormPlugin {
|
|
|
|
|
@@ -64,9 +61,6 @@ public class BusinessProcessingSplitPlugin extends AbstractFormPlugin {
|
|
|
if (CollectionUtils.isEmpty(entryEntityImportDataList)) {
|
|
|
return;
|
|
|
}
|
|
|
- DynamicObject nckd_orgfield = (DynamicObject) this.getModel().getValue("nckd_orgfield");
|
|
|
- Long orgId = nckd_orgfield.getLong("id");
|
|
|
-
|
|
|
|
|
|
DynamicObjectCollection nckd_entryentity61121s = this.getModel().getEntryEntity("nckd_entryentity61121");
|
|
|
Map<String, DynamicObject> entryMap = new HashMap<>();
|
|
@@ -80,12 +74,7 @@ public class BusinessProcessingSplitPlugin extends AbstractFormPlugin {
|
|
|
JSONObject jsonObject = entryData.getData();
|
|
|
String importNumber = jsonObject.getJSONObject("nckd_basedatafield18").getString("number");
|
|
|
DynamicObject dynamicObject = entryMap.get(importNumber);
|
|
|
- QFilter cardFilter = new QFilter("number", QCP.equals, importNumber);
|
|
|
- cardFilter.and("org", QCP.equals, orgId);
|
|
|
- DynamicObject[] card = BusinessDataServiceHelper.load("fa_card_fin","id",new QFilter[] {cardFilter});
|
|
|
- if (card.length == 0) {
|
|
|
- iterator.remove();
|
|
|
- }else if (card.length > 0 && dynamicObject != null){
|
|
|
+ if (dynamicObject != null){
|
|
|
nckd_entryentity61121s.remove(dynamicObject);
|
|
|
}
|
|
|
}
|