合同打开报错修复

This commit is contained in:
ptt 2025-04-25 11:58:22 +08:00
parent b9def6b44d
commit fe424557f5
1 changed files with 23 additions and 19 deletions

View File

@ -102,33 +102,37 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn {
}
private void setRenovationProjectByOrg(DynamicObject org) {
// 采购项目
DynamicObject[] projectbills = BusinessDataServiceHelper.load("rebm_purproject", "id",
new QFilter[]{new QFilter("org.id", QCP.equals, org.getPkValue())});
try {
// 采购项目
DynamicObject[] projectbills = BusinessDataServiceHelper.load("rebm_purproject", "id",
new QFilter[]{new QFilter("org.id", QCP.equals, org.getPkValue())});
DynamicObject projectbill = null;
DynamicObject projectbill = null;
if (projectbills.length > 0) {
DynamicObject projectbill1 = projectbills[0];
if (projectbill1 != null) {
//项目建立F7
if (projectbills.length > 0) {
DynamicObject projectbill1 = projectbills[0];
if (projectbill1 != null) {
//项目建立F7
DynamicObject add = BusinessDataServiceHelper.loadSingle("repmd_project_f7",
new QFilter[]{new QFilter("number", QCP.equals, projectbill1.getString("number"))});
if (add != null) {
projectbill = add;
}
}
} else {
DynamicObject add = BusinessDataServiceHelper.loadSingle("repmd_project_f7",
new QFilter[]{new QFilter("number", QCP.equals, projectbill1.getString("number"))});
new QFilter[]{new QFilter("number", QCP.equals, "XM-202412-008")});
if (add != null) {
projectbill = add;
}
}
} else {
DynamicObject add = BusinessDataServiceHelper.loadSingle("repmd_project_f7",
new QFilter[]{new QFilter("number", QCP.equals, "XM-202412-008")});
if (add != null) {
projectbill = add;
}
}
// 设置项目并更新视图
this.getModel().setValue("project", projectbill);
this.getView().updateView("project");
// 设置项目并更新视图
this.getModel().setValue("project", projectbill);
this.getView().updateView("project");
}catch (Exception e){
}
}
}