红冲凭证日期变更
This commit is contained in:
		
							parent
							
								
									6ee788508a
								
							
						
					
					
						commit
						7c15c2ff1b
					
				|  | @ -217,11 +217,17 @@ public class RecRedPushOperation extends AbstractOperationServicePlugIn implemen | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             SimpleDateFormat sdfdate = new SimpleDateFormat("yyyy-MM-dd"); |             SimpleDateFormat sdfdate = new SimpleDateFormat("yyyy-MM-dd"); | ||||||
|             Date bizDate = recBill.getDate("bizdate"); |             //Date bizDate = recBill.getDate("bizdate"); | ||||||
|             if(bizDate == null){ | 
 | ||||||
|                 IT_ITEMS.put("BUDAT",sdfdate.format(new Date()));//凭证中的过帐日期 |             QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, recBill.getPkValue()); | ||||||
|             }else{ |             DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher", voucherFilters.toArray()); | ||||||
|                 IT_ITEMS.put("BUDAT",sdfdate.format(bizDate));//凭证中的过帐日期 |             if (gl_voucher != null) { | ||||||
|  |                 Date bizDate = gl_voucher.getDate("bizdate"); | ||||||
|  |                 if(bizDate == null){ | ||||||
|  |                     IT_ITEMS.put("BUDAT",sdfdate.format(new Date()));//凭证中的过帐日期 | ||||||
|  |                 }else{ | ||||||
|  |                     IT_ITEMS.put("BUDAT",sdfdate.format(bizDate));//凭证中的过帐日期 | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|             IT_ITEM.add(IT_ITEMS); |             IT_ITEM.add(IT_ITEMS); | ||||||
|             data.put("IT_ITEM", IT_ITEM); |             data.put("IT_ITEM", IT_ITEM); | ||||||
|  |  | ||||||
|  | @ -215,33 +215,33 @@ public class BankBalanceSummaryFormPlugin extends AbstractReportFormPlugin imple | ||||||
| 
 | 
 | ||||||
|             //2.计提收益 |             //2.计提收益 | ||||||
|             //购买份数 |             //购买份数 | ||||||
|             BigDecimal buycopies = finsubscribe.getBigDecimal("buycopies"); | //            BigDecimal buycopies = finsubscribe.getBigDecimal("buycopies"); | ||||||
|             //月末单位净值 | //            //月末单位净值 | ||||||
|             QFilter Q1 = new QFilter("entry.finbillno", QCP.equals, finsubscribe.getString("billno"));//理财收益批量预提单根据理财申购单号 | //            QFilter Q1 = new QFilter("entry.finbillno", QCP.equals, finsubscribe.getString("billno"));//理财收益批量预提单根据理财申购单号 | ||||||
|             QFilter Q2 = new QFilter("entry.startdate", QCP.less_equals, date);//收益计算开始日 <= 基准等日期 | //            QFilter Q2 = new QFilter("entry.startdate", QCP.less_equals, date);//收益计算开始日 <= 基准等日期 | ||||||
|             QFilter Q3 = new QFilter("entry.enddate", QCP.large_equals, date); //收益计算开始日 >= 基准等日期 | //            QFilter Q3 = new QFilter("entry.enddate", QCP.large_equals, date); //收益计算开始日 >= 基准等日期 | ||||||
|             QFilter Q4 = new QFilter("shjh_needvoucher", QCP.equals, true);   //需要生成凭证 | //            QFilter Q4 = new QFilter("shjh_needvoucher", QCP.equals, true);   //需要生成凭证 | ||||||
|             //理财收益批量预提单(预提收益信息分录,理财申购单号,收益计算开始日,收益计算结束日,需要生成凭证,现值) | //            //理财收益批量预提单(预提收益信息分录,理财申购单号,收益计算开始日,收益计算结束日,需要生成凭证,现值) | ||||||
|             BigDecimal ymtotal = new BigDecimal("0");//月末单位净值 | //            BigDecimal ymtotal = new BigDecimal("0");//月末单位净值 | ||||||
|             DynamicObject[] intbillBatchs = BusinessDataServiceHelper.load(CIM_INTBILL_BATCH, | //            DynamicObject[] intbillBatchs = BusinessDataServiceHelper.load(CIM_INTBILL_BATCH, | ||||||
|                     "entry,entry.finbillno,entry.startdate,entry.enddate,shjh_needvoucher,entry.shjh_nowamount", new QFilter[]{Q1, Q2, Q3, Q4},"createtime desc"); | //                    "entry,entry.finbillno,entry.startdate,entry.enddate,shjh_needvoucher,entry.shjh_nowamount", new QFilter[]{Q1, Q2, Q3, Q4},"createtime desc"); | ||||||
|             if (intbillBatchs.length > 0) { | //            if (intbillBatchs.length > 0) { | ||||||
|                 DynamicObject intbillBatch = intbillBatchs[0]; | //                DynamicObject intbillBatch = intbillBatchs[0]; | ||||||
|                 if (null != intbillBatch) { | //                if (null != intbillBatch) { | ||||||
|                     DynamicObjectCollection entrys = intbillBatch.getDynamicObjectCollection("entry"); | //                    DynamicObjectCollection entrys = intbillBatch.getDynamicObjectCollection("entry"); | ||||||
|                     for (DynamicObject entry : entrys) { | //                    for (DynamicObject entry : entrys) { | ||||||
|                         BigDecimal shjh_nowamount = entry.getBigDecimal("shjh_nowamount"); | //                        BigDecimal shjh_nowamount = entry.getBigDecimal("shjh_nowamount"); | ||||||
|                         if (shjh_nowamount != null) { | //                        if (shjh_nowamount != null) { | ||||||
|                             ymtotal = ymtotal.add(shjh_nowamount); | //                            ymtotal = ymtotal.add(shjh_nowamount); | ||||||
|                         } | //                        } | ||||||
|                     } | //                    } | ||||||
|                 } | //                } | ||||||
|                 //购买时单位净值 | //                //购买时单位净值 | ||||||
|                 BigDecimal amount = finsubscribe.getBigDecimal("amount"); | //                BigDecimal amount = finsubscribe.getBigDecimal("amount"); | ||||||
|                 // 计算计提收益 | //                // 计算计提收益 | ||||||
|                 jttotal = jttotal.add(buycopies.multiply(ymtotal.subtract(amount)).divide(new BigDecimal("1000"), 2, RoundingMode.HALF_UP)); | //                jttotal = jttotal.add(buycopies.multiply(ymtotal.subtract(amount)).divide(new BigDecimal("1000"), 2, RoundingMode.HALF_UP)); | ||||||
| 
 | // | ||||||
|             } | //            } | ||||||
|         } |         } | ||||||
|         // 根据条件设置值 |         // 根据条件设置值 | ||||||
|         Map<String, String> fieldMap = new HashMap<>(); |         Map<String, String> fieldMap = new HashMap<>(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue