来个大神指点下我该怎么添加
一朵白小花 2018-08-07 05:05:43 有个需求:YBFZ003 YBFZ012
报表与多张报表校验提交时,自动将两张报表与其他报表分开,单独执行报表校验
public void updateCheckQueue(CheckQueue cq) throws Exception {
CorInfo ci = this.findCorInfo(cq);
if (ci != null) {
if (StringUtils.isBlank(cq.getCqrptlist())) { // 企
Page<IInfoObject> instances = reportService.getWebiReports(SpringSecurityUtils.getStore(),
CrystalEnterpriseUtil.REPORT_TYPE_TEMPLATE, cq.getCqrpnlist(), "", "", "",
1, 1, cq.getCqfolder(), "-1", cq.getYear(), cq.getMonth()); // 分页:模糊查询关键字为keyWord的Webi报表
if (instances == null) {
return;
}
cq.setCqrptlist(instances.getResult().get(0).getID() + ""); // 设置当前企业、会计年度、会计期间的最新实例SI_ID为校验的报表ID
}
String[] reportIds = cq.getCqrptlist().split(",") ;
String[] reportCodes = cq.getCqrpnlist().split(",") ;
int cn = 20;
int fn = reportIds.length/cn;
for(int i=0;i<=fn;i++){
StringBuffer reportId = new StringBuffer();
StringBuffer reportCode = new StringBuffer();
for(int si=i*cn;si<(i+1)*cn;si++ ){
if(reportIds.length>si){
reportId.append(reportIds[si]+",");
reportCode.append(reportCodes[si]+",");
}
}
//reportId = reportId.substring(0, reportId.length()-1);
if(reportId.length()>0){
StringBuffer sql = new StringBuffer();
sql.append("INSERT INTO CHECKQUEUE (CQID, CISCODE, YEAR, MONTH, CQRUN, CQATIME, ");
sql.append("UICODE, CQC, CQISALL, CQFOLDER, CQRPTLIST, CQRPNLIST, CBSERVER) ");
sql.append("VALUES (SEQ_CHECKQUEUE.NEXTVAL, ?, ?, ?, 0, SYSDATE, ?, 0, ?, ?, ?, ?, ?)");
this.getJdbcService().update(
sql.toString(),
new Object[] { ci.getCiscode(), cq.getYear(), cq.getMonth(), cq.getUicode(), cq.getCqisall(),
cq.getCqfolder(), reportId.substring(0, reportId.length()-1), reportCode.substring(0, reportCode.length()-1), cq.getCbserver() });
}
}
}
}