From dd9a29bb6208c9b9663f8650c3c0a79414026aa2 Mon Sep 17 00:00:00 2001 From: zhangzhiguo Date: Thu, 2 Jan 2025 18:44:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E8=81=8C=E5=91=98=E5=87=BA?= =?UTF-8?q?=E5=B7=AE=E5=A4=A9=E6=95=B0=E7=BB=9F=E8=AE=A1=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fs/plugin/form/AutoCalWorkingDaysPlugin.java | 11 ++++++----- .../fs/plugin/report/EmpTravelRptQueryPlugin.java | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AutoCalWorkingDaysPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AutoCalWorkingDaysPlugin.java index 424a1b8..0e0f901 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AutoCalWorkingDaysPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AutoCalWorkingDaysPlugin.java @@ -16,6 +16,9 @@ import java.util.Calendar; import java.util.Date; import java.util.EventObject; +/** + * 往返家居工作日天数自动计算插件 + */ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plugin { @Override @@ -40,24 +43,23 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug }else{ dynamicObject.set("zcgj_kccbdaycount",0); } - getView().updateView(); int allHomeCount = 0; for (DynamicObject entry : dynamicObjectCollection) { allHomeCount += entry.getInt("zcgj_kccbdaycount"); } this.getModel().setValue("zcgj_kccbdays",allHomeCount); - getView().updateView(); + this.getView().updateView("zcgj_homeentity"); } } super.propertyChanged(e); + } @Override public void registerListener(EventObject e) { super.registerListener(e); //监听工具栏按钮点击事件 - this.addItemClickListeners("zcgj_hometoolbarap"); - this.addClickListeners("advcontoolbarap"); + //this.addItemClickListeners("zcgj_hometoolbarap"); } @Override @@ -67,7 +69,6 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug //获取分录 DynamicObject dataEntity = this.getModel().getDataEntity(); DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity"); - getView().updateView(); int allHomeCount = 0; for (DynamicObject entry : dynamicObjectCollection) { allHomeCount += entry.getInt("zcgj_kccbdaycount"); diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/EmpTravelRptQueryPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/EmpTravelRptQueryPlugin.java index 6e40875..2ff30d2 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/EmpTravelRptQueryPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/EmpTravelRptQueryPlugin.java @@ -143,7 +143,6 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin { monthDaysMap.getOrDefault(bxmonth.getMonth().getValue(), 0) + homedaycount); } - System.out.println(); } for (Long userId : userMonthDaysMap.keySet()) { @@ -151,7 +150,6 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin { Map userInfoByID = UserServiceHelper.getUserInfoByID(userId); String username = String.valueOf(userInfoByID.get("name"));//报销人 Object [] tempData = new Object [FIELDS.length]; - coll.add(tempData); tempData[0] = userId; tempData[1] = username; @@ -162,8 +160,10 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin { tempData[index] = integerIntegerMap.get(i) == 0 ?null:integerIntegerMap.get(i)+""; index++; } + //如果总天数不为0的 if(totalDays!=0){ tempData[14] = totalDays; + coll.add(tempData); } } @@ -203,7 +203,7 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin { "er_tripreimbursebill", "id,billno,zcgj_kccbdays as kccbdays,zcgj_homeentity,zcgj_homeentity.zcgj_bxmonth as bxmonth," + "zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate," + - "zcgj_homeentity.zcgj_homebz as homebz,zcgj_homedaycount as homedaycount", + "zcgj_homeentity.zcgj_homebz as homebz,zcgj_homeentity.zcgj_homedaycount as homedaycount", searchFilterList.toArray(new QFilter [] {}), null ); return dateSet; @@ -242,7 +242,7 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin { "er_dailyreimbursebill", "id,billno,zcgj_kccbdays as kccbdays,zcgj_homeentity,zcgj_homeentity.zcgj_bxmonth as bxmonth," + "zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate," + - "zcgj_homeentity.zcgj_homebz as homebz,zcgj_homedaycount as homedaycount", + "zcgj_homeentity.zcgj_homebz as homebz,zcgj_homeentity.zcgj_homedaycount as homedaycount", searchFilterList.toArray(new QFilter [] {}), null ); return dateSet;