NC6X报表数据加工做语义模型(返回SQL篇)(8)

1970-01-01 08:00

}

ob=Double.valueOf(obstr); xb=Double.valueOf(xbstr); jb=Double.valueOf(jbstr);

/***

* 校验查询条件是否为空(目前所有条件必输项) *

* @author WYR * @since 2017-09-26 * @throws Exception */

private void checkQueryParametersIsNotNull()throws Exception{

if(null==beg_date||\.equals(beg_date)){

ExceptionUtils.wrappBusinessException(\开始日期不能为空,请检

查!\);

}

if(null==end_date||\.equals(end_date)){

ExceptionUtils.wrappBusinessException(\结束日期不能为空,请检

查!\);

}

if(usd<=0){

ExceptionUtils.wrappBusinessException(\美元汇率必须大于0,请检

查!\);

}

if(hkd<=0){

ExceptionUtils.wrappBusinessException(\港币汇率必须大于0,请检

查!\);

}

if(mb<=0){

ExceptionUtils.wrappBusinessException(\马币汇率必须大于0,请检

查!\);

}

if(ob<=0){

ExceptionUtils.wrappBusinessException(\澳元汇率必须大于0,请检

查!\);

}

if(xb<=0){

ExceptionUtils.wrappBusinessException(\新币汇率必须大于0,请检

查!\);

}

if(jb<=0){

ExceptionUtils.wrappBusinessException(\加币汇率必须大于0,请检

查!\);

}

}

/**

* 最外层查询SQL字段部分

* @author WYR * @since 2017-09-26

*/

private void buildSelectSql() {

this.builderSQL=new StringBuilder();

String totalFiled=\+hkd+\+usd+\

\+mb+\+xb+\+jb+\+ob+\ ;

this.builderSQL.append(\);

this.builderSQL.append(\

hkd ,usd/10000 as usd,\);

this.builderSQL.append(\

jb,ob/10000 as ob,\+totalFiled);

} /***

* 查询所有子查询总结果集(9个子查询视图的结果集) * @author WYR

* @since 2017-09-25 * @return

* @throws DAOException */

@SuppressWarnings(\)

private List> getTempTableData() throws DAOException{

List> data = new ArrayList>(); List tempVOList=null; String sql=getubqueryAllSql();

tempVOList=(List)

getDao().executeQuery(sql, new

BeanListProcessor(GpCflowprofileNewTempVO.class));

if(null!=tempVOList&&tempVOList.size()>0){

for (GpCflowprofileNewTempVO tempVO : tempVOList) {

List row = new ArrayList(); row.add( tempVO.getPk_group()); row.add( tempVO.getInoutname()); row.add( tempVO.getCuname()); row.add( tempVO.getMoney()); row.add( tempVO.getTallydate()); row.add( tempVO.getCashflow()); data.add(row);

}

}

}

if(null!=data&&data.size()>0){ }

return data;

return null;

/**获取所有子查询UNION ALL 查询SQL(9个子查询视图的SQL UNION ALL) *

* @author WYR * @since 2017-09-25 * @return */

private String getubqueryAllSql(){

String samePartSql=\

pk_group,inoutname,cuname,nvl(recmoney, 0) - nvl(paymoney, 0) as\ +

\ where \;

String sameWherePartSql=\+beg_date+\tallydate<= '\+end_date+\;

String unionStr=\;

StringBuilder bfSql= new StringBuilder();


NC6X报表数据加工做语义模型(返回SQL篇)(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:小学美术教案

Copyright © 2019-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18

× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: