fix:收款单报错处理

This commit is contained in:
ljw 2024-09-23 15:50:04 +08:00
parent b866ded5e9
commit 21c883fadf

View File

@ -980,8 +980,16 @@ public class GatheringEcit extends AbstractBillPlugIn implements BeforeF7SelectL
orderplat(key, map.get(key));
}
}
undate_receipt();
}
view.invokeOperation("save");
view.invokeOperation("refresh");
}
private void undate_receipt() {
// 收款单 收款明细
DynamicObjectCollection collection = this.getModel().getEntryEntity("yem_receiptdetail");
if (!collection.isEmpty()) {
for (DynamicObject dynamicObject : collection) {
// 认领明细子单据体
@ -1034,21 +1042,27 @@ public class GatheringEcit extends AbstractBillPlugIn implements BeforeF7SelectL
// 查询配件客商额度申请单
// 财务组织
long orgId =(long) this.getModel().getValue("org.id");
DynamicObject orgId =(DynamicObject) this.getModel().getValue("org");
// 客户名称
long customerId =(long) this.getModel().getValue("yem_comegoman.id");
DynamicObject customerId =(DynamicObject) this.getModel().getValue("yem_comegoman");
// 结算币别
long currency = (long) this.getModel().getValue("yem_currency.id");
// 业务组织 = 财务组织
QFilter qFilters = new QFilter("org.id", QCP.equals, orgId);
// 客户名称 = 客户名称
qFilters.and(new QFilter("yem_client.id", QCP.equals, customerId));
// 产品分类 = 产品分类
qFilters.and(new QFilter("yem_productcategorie", QCP.equals, productsId));
DynamicObject currency = (DynamicObject) this.getModel().getValue("yem_currency");
// 单据状态 = 已审核
qFilters.and(new QFilter("billstatus", QCP.equals, "C"));
QFilter qFilters = new QFilter("billstatus", QCP.equals, "C");
// 业务组织 = 财务组织
if (orgId !=null ){
qFilters.and(new QFilter("org.id", QCP.equals, orgId.getLong("id")));
}
// 客户名称 = 客户名称
if (customerId !=null ){
qFilters.and(new QFilter("yem_client.id", QCP.equals, customerId.getLong("id")));
}
// 产品分类 = 产品分类
if (currency !=null ){
qFilters.and(new QFilter("yem_currency.id", QCP.equals, currency.getLong("id")));
}
// 合同上结算币别 = 额度申请上 额度币别
qFilters.and(new QFilter("yem_currency.id", QCP.equals, currency));
qFilters.and(new QFilter("yem_productcategorie", QCP.equals, productsId));
// 查询配件客商额度申请单
DynamicObject partsmerchant = BusinessDataServiceHelper.loadSingle("yem_im_partsmerchant", qFilters.toArray());
if (partsmerchant != null) {
@ -1086,9 +1100,6 @@ public class GatheringEcit extends AbstractBillPlugIn implements BeforeF7SelectL
}
}
}
view.invokeOperation("save");
view.invokeOperation("refresh");
}
/**
* 生成贷记单