考勤,出勤津贴数据生成功能中目标津贴项目ids获取逻辑调整,增加通用津贴项目

zm_dev
sy 1 year ago
parent 94b053c848
commit 4f476406c1

@ -33,11 +33,22 @@ public class AllowanceServiceImpl extends Service implements AllowanceService {
//查询考勤方案
String sql = "select * from uf_jcl_kq_kqfa where zt = 0";
List<Map<String,Object>> data = DbTools.getSqlToList(sql);
//获取通用津贴类型考勤项目
List<String> tyAllowanceIds = new ArrayList<>();
String tyAllowanceSql = "select * from uf_jcl_kq_kqxm where tyxm = 1 and xmlx = 7";
List<Map<String,Object>> tyAllowanceData = DbTools.getSqlToList(tyAllowanceSql);
for (Map<String, Object> map : tyAllowanceData) {
tyAllowanceIds.add(map.get("id").toString());
}
bs.writeLog("tyAllowanceIds : " + tyAllowanceIds);
//获取人员和津贴类型考勤项目信息,构建映射关系
Map<String, List<String>> empIdWithAllowanceInfo = new HashMap<>();
List<String> targetEmpIdList = new ArrayList<>();
List<String> targetAllowanceIdList = new ArrayList<>();
List<String> targetBcIdList = new ArrayList<>();
if (tyAllowanceIds.size() > 0) {
targetAllowanceIdList.addAll(tyAllowanceIds);
}
for (Map<String, Object> 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"));

Loading…
Cancel
Save