榆叶组织隔离注释

This commit is contained in:
zengweihai 2024-07-25 15:02:32 +08:00
parent b954114001
commit 6005ea5b94
2 changed files with 52 additions and 52 deletions

View File

@ -63,29 +63,29 @@ public class CommonCostCompanyPlugin extends AbstractBillPlugIn implements Befor
@Override @Override
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) { public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
String name = beforeF7SelectEvent.getProperty().getName(); // String name = beforeF7SelectEvent.getProperty().getName();
if ("paycompany".equals(name)){ // if ("paycompany".equals(name)){
DynamicObject org = (DynamicObject) this.getModel().getValue("org"); // DynamicObject org = (DynamicObject) this.getModel().getValue("org");
if (org != null){ // if (org != null){
Long orgId = org.getLong("id"); // Long orgId = org.getLong("id");
List<Long> allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 // List<Long> allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织
QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); // QFilter numberQF = new QFilter("number", QCP.equals, "16004610");
DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 // DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云
if (yuye != null){ // if (yuye != null){
Long yyId= yuye.getLong("id"); // Long yyId= yuye.getLong("id");
if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 // if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云
//过滤为榆叶飞云下级组织 // //过滤为榆叶飞云下级组织
QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); // QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList);
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); // ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
formShowParameter.getListFilterParameter().setFilter(inNumberQF); // formShowParameter.getListFilterParameter().setFilter(inNumberQF);
}else {// // }else {//
QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); // QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList);
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); // ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
formShowParameter.getListFilterParameter().setFilter(inNumberQF); // formShowParameter.getListFilterParameter().setFilter(inNumberQF);
} // }
} // }
} // }
} // }
} }
} }

View File

@ -154,35 +154,35 @@ public class ContractbillFromPlugin extends AbstractFormPlugin implements Before
@Override @Override
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) { public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
String name = beforeF7SelectEvent.getProperty().getName(); // String name = beforeF7SelectEvent.getProperty().getName();
if ("contractparty".equals(name)){ // if ("contractparty".equals(name)){
int row = beforeF7SelectEvent.getRow(); // int row = beforeF7SelectEvent.getRow();
DynamicObjectCollection t_er_contractparty = this.getModel().getEntryEntity("contractpartyentry"); // DynamicObjectCollection t_er_contractparty = this.getModel().getEntryEntity("contractpartyentry");
DynamicObject dynamicObject = t_er_contractparty.get(row);//获取当前行数据 // DynamicObject dynamicObject = t_er_contractparty.get(row);//获取当前行数据
String signcontract = dynamicObject.getString("signcontract");//获取签约方 // String signcontract = dynamicObject.getString("signcontract");//获取签约方
if ("0".equals(signcontract)){//当签约方为甲方时 // if ("0".equals(signcontract)){//当签约方为甲方时
DynamicObject org = (DynamicObject) this.getModel().getValue("org"); // DynamicObject org = (DynamicObject) this.getModel().getValue("org");
if (org != null){ // if (org != null){
Long orgId = org.getLong("id"); // Long orgId = org.getLong("id");
List<Long> allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 // List<Long> allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织
QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); // QFilter numberQF = new QFilter("number", QCP.equals, "16004610");
DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 // DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云
if (yuye != null){ // if (yuye != null){
Long yyId= yuye.getLong("id"); // Long yyId= yuye.getLong("id");
if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 // if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云
//过滤为榆叶飞云下级组织 // //过滤为榆叶飞云下级组织
QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); // QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList);
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); // ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
formShowParameter.getListFilterParameter().setFilter(inNumberQF); // formShowParameter.getListFilterParameter().setFilter(inNumberQF);
}else {// // }else {//
QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); // QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList);
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); // ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
formShowParameter.getListFilterParameter().setFilter(inNumberQF); // formShowParameter.getListFilterParameter().setFilter(inNumberQF);
} // }
} // }
} // }
} // }
} // }
} }
} }