系统预设了 这几种
FSubSystem 为子系统
T_VC_SubSystem 卡片显示的表 字段 FNeedRalteAccount 设置为1的话 ,需要与总账连用系统将去查找 系统状态控制表。 如果系统状态 没有配置这个子系统 将无法显示数据
select sysStaCtr.fid from T_BD_SystemStatusCtrol sysStaCtr,T_BD_SystemStatus sysSta where sysStaCtr.FSystemStatusID=sysSta.FID and sysStaCtr.FCompanyID='8P//7//QMAAAAAAAT8znrtQ=' and sysSta.FName=36 and sysStaCtr.FIsRelAccount=1
T_VC_SubSystem 子系统卡片
insert into t_vc_subsystem(FSEQ, FSUBSYSTEM, FNEEDRALTEACCOUNT)
values
(7, 36, 0);
t_vc_billtype 记账中心单据类型
insert into t_vc_billtype(FSEQ, FWEBUIPK, FPERMISSIONITEM, FNAME_L1, FNAME_L2, FNAME_L3, FBOSOBJECTTYPE, FSUBSYSTEM, FQUERYPK, FID, FWEBEDITUIPK, FMODULE, FISGLSMART, FISSUPPORTMULTIBOTP)
values
(10, N'com.kingdee.eas.custom.zcht.jczl.CFksqList', null, null, '合同付款申请', null, N'CAA8E891', 36, N'com.kingdee.eas.custom.zcht.app.FksqQuery', 'C8/3tXvKMALgZQAAAAAAAY01y6k=', null, 'FSSC_GL', N'1', 0);
T_VC_UnVoucheredBillID 单据过滤注册类
result :
insert into T_VC_UnVoucheredBillID(FSUBSYSTEM, FBOSOBJECTTYPE, FCLASSNAME)
values
(36, N'CAA8E891', N'com.kingdee.eas.custom.zcht.vcsubSystem.FksqCarUnVoucheredBillIDImpl');
获取 卡片 展示单据条数核心方法。 获取注册类,反射
package com.kingdee.eas.custom.zcht.vcsubSystem;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.dao.query.SQLExecutorFactory;
import com.kingdee.eas.basedata.assistant.PeriodInfo;
import com.kingdee.eas.basedata.org.CompanyOrgUnitInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.fi.vc.app.IVCUnVoucheredBillID;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.util.StringUtils;
public class FksqCarUnVoucheredBillIDImpl implements IVCUnVoucheredBillID {
@Override
public String getUnVoucheredBillID(Context ctx, CompanyOrgUnitInfo arg1, PeriodInfo arg2)
throws BOSException, EASBizException {
StringBuffer sql = new StringBuffer();
String periodNumber = String.valueOf(arg2.getPeriodNumber());
String periodYear = String.valueOf(arg2.getPeriodYear());
int periodNumberSize=2;
periodNumber=String.format("%0"+periodNumberSize+"d", Long.parseLong(periodNumber) );
String period=periodYear+periodNumber;
sql.append(" /*dialect*/ select fid from CT_ZCH_Fksq where CFDJZT=3 and CFVOUCHERNUMBER is null and CFFICOMPANYID='"+arg1.getId()+"' and to_char( FBIZDATE , 'yyyyMM') ='"+period+"' ");
IRowSet executeSQL = SQLExecutorFactory.getLocalInstance(ctx, sql.toString()).executeSQL();
StringBuffer ids = new StringBuffer();
try {
while (executeSQL.next()) {
String fid = executeSQL.getString("fid");
ids.append("'").append(fid).append("'").append(",");
}
} catch (SQLException e) {
e.printStackTrace();
}
String[] split = ids.toString().split(",");
String idsList = Arrays.toString(split);
String endSql = idsList.toString().replace("[","").replace("]","");
if(StringUtils.isEmpty(endSql) ) endSql="'xxxx'"; //无数据时返回假sql
endSql=" select fid from CT_ZCH_Fksq where fid in ( "+endSql+" ) "; // 内查询 to_char 返回的sql 执行报错。 自己查询id返回
return endSql.toString();
}
}