From 7c15c2ff1bb7370c335c95b289261e27ae2af157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B4=B5=E5=BC=BA?= Date: Mon, 1 Sep 2025 17:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E5=86=B2=E5=87=AD=E8=AF=81=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/operate/RecRedPushOperation.java | 16 ++++-- .../report/BankBalanceSummaryFormPlugin.java | 54 +++++++++---------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/operate/RecRedPushOperation.java b/main/java/shjh/jhzj7/fi/fi/plugin/operate/RecRedPushOperation.java index 249fb75..a5b5513 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/operate/RecRedPushOperation.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/operate/RecRedPushOperation.java @@ -217,11 +217,17 @@ public class RecRedPushOperation extends AbstractOperationServicePlugIn implemen } SimpleDateFormat sdfdate = new SimpleDateFormat("yyyy-MM-dd"); - Date bizDate = recBill.getDate("bizdate"); - if(bizDate == null){ - IT_ITEMS.put("BUDAT",sdfdate.format(new Date()));//凭证中的过帐日期 - }else{ - IT_ITEMS.put("BUDAT",sdfdate.format(bizDate));//凭证中的过帐日期 + //Date bizDate = recBill.getDate("bizdate"); + + QFilter voucherFilters = new QFilter("sourcebill", QCP.equals, recBill.getPkValue()); + DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher", voucherFilters.toArray()); + 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); data.put("IT_ITEM", IT_ITEM); diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/report/BankBalanceSummaryFormPlugin.java b/main/java/shjh/jhzj7/fi/fi/plugin/report/BankBalanceSummaryFormPlugin.java index e410b6f..679085e 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/report/BankBalanceSummaryFormPlugin.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/report/BankBalanceSummaryFormPlugin.java @@ -215,33 +215,33 @@ public class BankBalanceSummaryFormPlugin extends AbstractReportFormPlugin imple //2.计提收益 //购买份数 - BigDecimal buycopies = finsubscribe.getBigDecimal("buycopies"); - //月末单位净值 - QFilter Q1 = new QFilter("entry.finbillno", QCP.equals, finsubscribe.getString("billno"));//理财收益批量预提单根据理财申购单号 - QFilter Q2 = new QFilter("entry.startdate", QCP.less_equals, date);//收益计算开始日 <= 基准等日期 - QFilter Q3 = new QFilter("entry.enddate", QCP.large_equals, date); //收益计算开始日 >= 基准等日期 - QFilter Q4 = new QFilter("shjh_needvoucher", QCP.equals, true); //需要生成凭证 - //理财收益批量预提单(预提收益信息分录,理财申购单号,收益计算开始日,收益计算结束日,需要生成凭证,现值) - BigDecimal ymtotal = new BigDecimal("0");//月末单位净值 - 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"); - if (intbillBatchs.length > 0) { - DynamicObject intbillBatch = intbillBatchs[0]; - if (null != intbillBatch) { - DynamicObjectCollection entrys = intbillBatch.getDynamicObjectCollection("entry"); - for (DynamicObject entry : entrys) { - BigDecimal shjh_nowamount = entry.getBigDecimal("shjh_nowamount"); - if (shjh_nowamount != null) { - ymtotal = ymtotal.add(shjh_nowamount); - } - } - } - //购买时单位净值 - BigDecimal amount = finsubscribe.getBigDecimal("amount"); - // 计算计提收益 - jttotal = jttotal.add(buycopies.multiply(ymtotal.subtract(amount)).divide(new BigDecimal("1000"), 2, RoundingMode.HALF_UP)); - - } +// BigDecimal buycopies = finsubscribe.getBigDecimal("buycopies"); +// //月末单位净值 +// QFilter Q1 = new QFilter("entry.finbillno", QCP.equals, finsubscribe.getString("billno"));//理财收益批量预提单根据理财申购单号 +// QFilter Q2 = new QFilter("entry.startdate", QCP.less_equals, date);//收益计算开始日 <= 基准等日期 +// QFilter Q3 = new QFilter("entry.enddate", QCP.large_equals, date); //收益计算开始日 >= 基准等日期 +// QFilter Q4 = new QFilter("shjh_needvoucher", QCP.equals, true); //需要生成凭证 +// //理财收益批量预提单(预提收益信息分录,理财申购单号,收益计算开始日,收益计算结束日,需要生成凭证,现值) +// BigDecimal ymtotal = new BigDecimal("0");//月末单位净值 +// 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"); +// if (intbillBatchs.length > 0) { +// DynamicObject intbillBatch = intbillBatchs[0]; +// if (null != intbillBatch) { +// DynamicObjectCollection entrys = intbillBatch.getDynamicObjectCollection("entry"); +// for (DynamicObject entry : entrys) { +// BigDecimal shjh_nowamount = entry.getBigDecimal("shjh_nowamount"); +// if (shjh_nowamount != null) { +// ymtotal = ymtotal.add(shjh_nowamount); +// } +// } +// } +// //购买时单位净值 +// BigDecimal amount = finsubscribe.getBigDecimal("amount"); +// // 计算计提收益 +// jttotal = jttotal.add(buycopies.multiply(ymtotal.subtract(amount)).divide(new BigDecimal("1000"), 2, RoundingMode.HALF_UP)); +// +// } } // 根据条件设置值 Map fieldMap = new HashMap<>();