Commit 98c28f8d authored by zhkwei's avatar zhkwei

预提公式及EAM预览导出功能

parent 19c33697
...@@ -134,7 +134,42 @@ public class CitPreviewDataServiceImpl extends BaseService { ...@@ -134,7 +134,42 @@ public class CitPreviewDataServiceImpl extends BaseService {
//第二种导出方式 //第二种导出方式
CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample(); CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample();
List<CitEAMAssetsDisposal> list = citEAMAssetsDisposalMapper.selectByCondition(citEAMAssetsDisposalDto); CitEAMAssetsDisposalExample.Criteria criteria = example.createCriteria();
Integer periodStart = null;
Integer periodEnd = null;
if(citEAMAssetsDisposalDto.getPeriodStart() != null && !"".equals(citEAMAssetsDisposalDto.getPeriodStart())){
periodStart = Integer.parseInt(citEAMAssetsDisposalDto.getPeriodStart());
}
if(citEAMAssetsDisposalDto.getPeriodEnd() != null &&!"".equals(citEAMAssetsDisposalDto.getPeriodEnd())){
periodEnd = Integer.parseInt(citEAMAssetsDisposalDto.getPeriodEnd());
}
if(citEAMAssetsDisposalDto.getAssetLabelNumber() != null && !"".equals(citEAMAssetsDisposalDto.getAssetLabelNumber())){
criteria.andAssetLabelNumberEqualTo(citEAMAssetsDisposalDto.getAssetLabelNumber());
}
if(citEAMAssetsDisposalDto.getCompensationSaleAmount() != null && !"".equals(citEAMAssetsDisposalDto.getCompensationSaleAmount())){
criteria.andCompensationSaleAmountEqualTo(citEAMAssetsDisposalDto.getCompensationSaleAmount());
}
if(periodEnd != null && periodStart!= null){
criteria.andPeriodBetween(periodStart, periodEnd);
}
if(periodStart == null && periodEnd!= null){
criteria.andPeriodLessThanOrEqualTo(periodEnd);
}
if(periodStart != null && periodEnd == null ){
criteria.andPeriodGreaterThanOrEqualTo(periodStart);
}
/*if(citEAMAssetsDisposalDto.getOrganizationId() != null){
criteria.andOrganizationIdEqualTo(citEAMAssetsDisposalDto.getOrganizationId());
}
*/
if(citEAMAssetsDisposalDto.getPeriod() != null && !"".equals(citEAMAssetsDisposalDto.getPeriod())){
criteria.andPeriodEqualTo(citEAMAssetsDisposalDto.getPeriod());
}
List<CitEAMAssetsDisposal> list = citEAMAssetsDisposalMapper.selectByExample(example);
if(list.size()==0){ if(list.size()==0){
return 0; return 0;
} }
......
...@@ -64,7 +64,7 @@ public class CitReportServiceImpl extends BaseService { ...@@ -64,7 +64,7 @@ public class CitReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(CitReportServiceImpl.class); private final static Logger logger = LoggerFactory.getLogger(CitReportServiceImpl.class);
//报表公式 //报表公式
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX", private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE", "ZC"}; "JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE", "ZC","YT"};
//生成总分机构分配表时取营业收入时所要用的条件 //生成总分机构分配表时取营业收入时所要用的条件
private final static String[] attributeArr = {"主营业务收入-销售商品收入","主营业务收入-提供劳务收入","其他业务收入-其他"}; private final static String[] attributeArr = {"主营业务收入-销售商品收入","主营业务收入-提供劳务收入","其他业务收入-其他"};
......
...@@ -871,13 +871,13 @@ public class ReportGeneratorImpl { ...@@ -871,13 +871,13 @@ public class ReportGeneratorImpl {
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext) new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext), , new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext)}; //为CIT复制的一份注册自定义公式 new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext),new YT(formulaContext)}; //为CIT复制的一份注册自定义公式
} else { } else {
functionImpls = new FreeRefFunction[]{new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext), functionImpls = new FreeRefFunction[]{new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new pwc.taxtech.atms.vat.service.impl.report.functions.validation.BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext) new pwc.taxtech.atms.vat.service.impl.report.functions.validation.BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext), , new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext)}; //为CIT复制的一份注册自定义公式 new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext),new YT(formulaContext)}; //为CIT复制的一份注册自定义公式
} }
//**************************** 为CIT复制的一份注册自定义公式 **************************** //**************************** 为CIT复制的一份注册自定义公式 ****************************
......
...@@ -39,7 +39,11 @@ public class YT extends FunctionBase implements FreeRefFunction { ...@@ -39,7 +39,11 @@ public class YT extends FunctionBase implements FreeRefFunction {
FormulaDataSourceDetailType.AssetDetailDataSourceDto, FormulaDataSourceDetailType.AssetDetailDataSourceDto,
value, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId()); value, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId());
saveFormulaBlock(0, ec, formulaExpression, value, dataSourceId, formulaContext.getProjectId()); saveFormulaBlock(0, ec, formulaExpression, value, dataSourceId, formulaContext.getProjectId());
if(value.intValue()>0){
return new NumberEval(value.doubleValue()); return new NumberEval(value.doubleValue());
}else{
return new NumberEval(0.00);
}
}catch (Exception e){ }catch (Exception e){
return new NumberEval(0.00); return new NumberEval(0.00);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment