关联预付款的带科目问题修复

This commit is contained in:
yuxueliang0813 2025-06-19 11:25:10 +08:00
parent 1d09f07205
commit f1ff3dff9b
1 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package shjh.jhzj7.fi.fi.plugin.form;
import kd.bos.context.RequestContext;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.datamodel.IDataModel;
@ -224,7 +225,12 @@ public class ClaimBillButtonAssPlugin extends AbstractFormPlugin implements Plug
DynamicObject orginfo = (DynamicObject) this.getModel().getValue("org");//当前公司ID
QFilter qFilter = new QFilter("number", QCP.equals, accountCode);//科目编号
qFilter.and("createorg.id", QCP.equals, orginfo.getPkValue());//当前公司ID
qFilter.and("accounttable.id", QCP.equals, EsbUtils.ACCTABLE);//科目表
//如果当前数据中心是测试的则使用测试库科目表ID否则用正式的
if("2162562979827025920".equals(RequestContext.get().getAccountId())){
qFilter.and("accounttable.id", QCP.equals, 2125524820924832768L);//测试科目表
}else{
qFilter.and("accounttable.id", QCP.equals, EsbUtils.ACCTABLE);//正式科目表
}
DynamicObject accountinfo = BusinessDataServiceHelper.loadSingle("bd_accountview", qFilter.toArray());
if (null != accountinfo){
this.getModel().setValue("shjh_coaitemcode", accountinfo, i);