parent
e20ae7c05e
commit
bfc9144226
|
@ -10,6 +10,7 @@ import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||||
import kd.bos.list.ListShowParameter;
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.org.OrgUnitServiceHelper;
|
import kd.bos.servicehelper.org.OrgUnitServiceHelper;
|
||||||
import kd.bos.servicehelper.org.OrgViewType;
|
import kd.bos.servicehelper.org.OrgViewType;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
@ -68,9 +69,37 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug
|
||||||
dataFilter.add(accountQFilter.and(accountQFilter2));
|
dataFilter.add(accountQFilter.and(accountQFilter2));
|
||||||
}
|
}
|
||||||
if("shkd_enryborrower".equals(name)){
|
if("shkd_enryborrower".equals(name)){
|
||||||
List<Long> allSubordinateOrgs = OrgUnitServiceHelper.getAllSubordinateOrgs(OrgViewType.BDControl, Collections.singletonList(orgId), true);
|
String number = org.getString("number");
|
||||||
QFilter accountQFilter = new QFilter("id", QCP.in, allSubordinateOrgs);
|
List<Long> allSubordinateOrgs = new ArrayList<>();
|
||||||
dataFilter.add(accountQFilter);
|
//编码为SIG0010000的组织要找到SIG0000000的所有子集
|
||||||
|
if("SIG0010000".equals(number)){
|
||||||
|
QFilter qFilter = new QFilter("number", "=", "SIG0000000");
|
||||||
|
DynamicObject bos_org = BusinessDataServiceHelper.loadSingle("bos_org","id",qFilter.toArray());
|
||||||
|
allSubordinateOrgs = OrgUnitServiceHelper.getAllSubordinateOrgs(OrgViewType.BDControl, Collections.singletonList((Long)bos_org.getPkValue()), false);
|
||||||
|
QFilter accountQFilter = new QFilter("id", QCP.in, allSubordinateOrgs);
|
||||||
|
dataFilter.add(accountQFilter);
|
||||||
|
}else{
|
||||||
|
QFilter qFilter = new QFilter("number", "=", number+"-uatierp");
|
||||||
|
DynamicObject bos_org = BusinessDataServiceHelper.loadSingle("bos_org","id",qFilter.toArray());
|
||||||
|
if(bos_org == null){
|
||||||
|
//未找到后缀为uatierp的合并层 正常拿下级
|
||||||
|
allSubordinateOrgs = OrgUnitServiceHelper.getAllSubordinateOrgs(OrgViewType.BDControl, Collections.singletonList(orgId), true);
|
||||||
|
QFilter accountQFilter = new QFilter("id", QCP.in, allSubordinateOrgs);
|
||||||
|
dataFilter.add(accountQFilter);
|
||||||
|
}else {
|
||||||
|
//找到了后缀为uatierp的合并层 用其当上级找所有下级 然后过滤掉所有后缀为uatierp的值
|
||||||
|
allSubordinateOrgs = OrgUnitServiceHelper.getAllSubordinateOrgs(OrgViewType.BDControl, Collections.singletonList((Long)bos_org.getPkValue()), false);
|
||||||
|
List<Long> demoArr = new ArrayList<>();
|
||||||
|
for (Long subId : allSubordinateOrgs) {
|
||||||
|
QFilter qFilter1 = new QFilter("id", "=", subId);
|
||||||
|
DynamicObject tempOrg = BusinessDataServiceHelper.loadSingle("bos_org","id,number",qFilter1.toArray());
|
||||||
|
if(tempOrg.getString("number").contains("uatierp"))continue;
|
||||||
|
demoArr.add((Long)tempOrg.getPkValue());
|
||||||
|
}
|
||||||
|
QFilter accountQFilter = new QFilter("id", QCP.in, demoArr);
|
||||||
|
dataFilter.add(accountQFilter);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
formShowParameter.getListFilterParameter().getQFilters().addAll(dataFilter);
|
formShowParameter.getListFilterParameter().getQFilters().addAll(dataFilter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue