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"));