银行千元表优化
This commit is contained in:
		
							parent
							
								
									12f86885fc
								
							
						
					
					
						commit
						6ee788508a
					
				|  | @ -198,6 +198,7 @@ public class BankBalanceSummaryFormPlugin extends AbstractReportFormPlugin imple | ||||||
|         //理财申购单中购买份数*(<理财收益批量预提单根据理财申购单号+收益日期区间+需要生成凭证为过滤条件,若结果多个,取创建时间降序取第一个> - 理财申购单中理财金额)) |         //理财申购单中购买份数*(<理财收益批量预提单根据理财申购单号+收益日期区间+需要生成凭证为过滤条件,若结果多个,取创建时间降序取第一个> - 理财申购单中理财金额)) | ||||||
| 
 | 
 | ||||||
|         QFilter qFilter = new QFilter("valuedate", QCP.less_equals, date);  //起始日期 <= 基准日期 |         QFilter qFilter = new QFilter("valuedate", QCP.less_equals, date);  //起始日期 <= 基准日期 | ||||||
|  |         qFilter.and("finservicestatus",QCP.equals,"subscribe_done"); | ||||||
| 
 | 
 | ||||||
|         BigDecimal bjtotal = new BigDecimal("0");//理财申购单的本金 |         BigDecimal bjtotal = new BigDecimal("0");//理财申购单的本金 | ||||||
|         BigDecimal jttotal = new BigDecimal("0");//计提收益 |         BigDecimal jttotal = new BigDecimal("0");//计提收益 | ||||||
|  | @ -272,7 +273,7 @@ public class BankBalanceSummaryFormPlugin extends AbstractReportFormPlugin imple | ||||||
| 
 | 
 | ||||||
|         //只考虑存款起息日<=基准等日期 |         //只考虑存款起息日<=基准等日期 | ||||||
|         QFilter qFilter = new QFilter("intdate", QCP.less_equals, date);  //存款起息日 <= 基准等日期 |         QFilter qFilter = new QFilter("intdate", QCP.less_equals, date);  //存款起息日 <= 基准等日期 | ||||||
| 
 |         qFilter.and("bizstatus",QCP.equals,"subscribe_done"); | ||||||
|         BigDecimal bjtotal = new BigDecimal("0");//定期存款处理单中本金总和 |         BigDecimal bjtotal = new BigDecimal("0");//定期存款处理单中本金总和 | ||||||
|         BigDecimal jttotal = new BigDecimal("0");//计提收益 |         BigDecimal jttotal = new BigDecimal("0");//计提收益 | ||||||
|         // 定期存款处理单(存款起息日,存款金额,存款利率(%)) |         // 定期存款处理单(存款起息日,存款金额,存款利率(%)) | ||||||
|  | @ -286,15 +287,15 @@ public class BankBalanceSummaryFormPlugin extends AbstractReportFormPlugin imple | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             //2.计提利息:(金额*定存利率*计提天数)/365 |             //2.计提利息:(金额*定存利率*计提天数)/365 | ||||||
|             BigDecimal amount = finsubscribe.getBigDecimal("amount"); | //            BigDecimal amount = finsubscribe.getBigDecimal("amount"); | ||||||
|             BigDecimal interestrate = finsubscribe.getBigDecimal("interestrate"); | //            BigDecimal interestrate = finsubscribe.getBigDecimal("interestrate"); | ||||||
|             if (amount != null && interestrate != null) { | //            if (amount != null && interestrate != null) { | ||||||
|                 Date intdate = finsubscribe.getDate("intdate"); | //                Date intdate = finsubscribe.getDate("intdate"); | ||||||
|                 int days = (int) ((date.getTime() - intdate.getTime()) / (24 * 60 * 60 * 1000));//计提天数 | //                int days = (int) ((date.getTime() - intdate.getTime()) / (24 * 60 * 60 * 1000));//计提天数 | ||||||
|                 BigDecimal interest = amount.multiply(interestrate).multiply(BigDecimal.valueOf(days)) | //                BigDecimal interest = amount.multiply(interestrate).multiply(BigDecimal.valueOf(days)) | ||||||
|                         .divide(BigDecimal.valueOf(365), 2, RoundingMode.HALF_UP); | //                        .divide(BigDecimal.valueOf(365), 2, RoundingMode.HALF_UP); | ||||||
|                 jttotal = jttotal.add(interest);//汇总计提 | //                jttotal = jttotal.add(interest);//汇总计提 | ||||||
|             } | //            } | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue