From 4f476406c10bb1415a7a387b8568527636f4ce7e Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 11 Apr 2024 14:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=EF=BC=8C=E5=87=BA=E5=8B=A4?= =?UTF-8?q?=E6=B4=A5=E8=B4=B4=E6=95=B0=E6=8D=AE=E7=94=9F=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=B8=AD=E7=9B=AE=E6=A0=87=E6=B4=A5=E8=B4=B4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AEids=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=80=9A=E7=94=A8=E6=B4=A5?= =?UTF-8?q?=E8=B4=B4=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AllowanceServiceImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java b/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java index 4e86120..2aa0da1 100644 --- a/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java +++ b/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java @@ -33,11 +33,22 @@ public class AllowanceServiceImpl extends Service implements AllowanceService { //查询考勤方案 String sql = "select * from uf_jcl_kq_kqfa where zt = 0"; List> data = DbTools.getSqlToList(sql); + //获取通用津贴类型考勤项目 + List tyAllowanceIds = new ArrayList<>(); + String tyAllowanceSql = "select * from uf_jcl_kq_kqxm where tyxm = 1 and xmlx = 7"; + List> tyAllowanceData = DbTools.getSqlToList(tyAllowanceSql); + for (Map map : tyAllowanceData) { + tyAllowanceIds.add(map.get("id").toString()); + } + bs.writeLog("tyAllowanceIds : " + tyAllowanceIds); //获取人员和津贴类型考勤项目信息,构建映射关系 Map> empIdWithAllowanceInfo = new HashMap<>(); List targetEmpIdList = new ArrayList<>(); List targetAllowanceIdList = new ArrayList<>(); List targetBcIdList = new ArrayList<>(); + if (tyAllowanceIds.size() > 0) { + targetAllowanceIdList.addAll(tyAllowanceIds); + } for (Map map : data) { String dataId = map.get("id").toString(); //获取方案适用的人员id列表 @@ -58,6 +69,9 @@ public class AllowanceServiceImpl extends Service implements AllowanceService { empIdList.forEach(f -> { if (empIdWithAllowanceInfo.get(f) == null) { empIdWithAllowanceInfo.put(f, allowanceIdList); + if (tyAllowanceIds.size() > 0) { + empIdWithAllowanceInfo.get(f).addAll(tyAllowanceIds); + } } else { empIdWithAllowanceInfo.get(f).addAll(allowanceIdList); } @@ -88,6 +102,10 @@ public class AllowanceServiceImpl extends Service implements AllowanceService { } } + bs.writeLog("targetEmpIdList : " + targetEmpIdList); + bs.writeLog("targetAllowanceIdList : " + targetAllowanceIdList); + bs.writeLog("targetBcIdList : " + targetBcIdList); + //获取出勤结果,遍历处理津贴信息 String startDate = Util.null2String(params.get("startDate")); String endDate = Util.null2String(params.get("endDate"));