diff --git a/src/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.java b/src/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.java index 9a3f158..98c8a92 100644 --- a/src/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.java +++ b/src/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.java @@ -70,13 +70,13 @@ public class AttendanceSummaryServiceImpl extends Service implements AttendanceS addList.addAll(cqAddList); } //补打卡表 - List> bdkAddList = getBdkAddList(mainId, startDate, endDate); + List> bdkAddList = getBdkAddList(mainId, subCompanyListStr, startDate, endDate); bs.writeLog("bdkAddList_size : " + bdkAddList.size()); if (bdkAddList.size() > 0) { addList.addAll(bdkAddList); } //出勤津贴表 - List> cqjtAddList = getCqjtAddList(mainId, startDate, endDate); + List> cqjtAddList = getCqjtAddList(mainId, subCompanyListStr, startDate, endDate); bs.writeLog("cqjtAddList_size : " + cqjtAddList.size()); if (cqjtAddList.size() > 0) { addList.addAll(cqjtAddList); @@ -703,8 +703,8 @@ public class AttendanceSummaryServiceImpl extends Service implements AttendanceS } //汇总补打卡表 - public List> getBdkAddList(String mainId, String startDate, String endDate) { - String bdkSql = "select a.*, b.fbid, b.bm from uf_jcl_kq_bdkjl a left join uf_jcl_kq_cqjg b on a.bdkry = b.ygid and a.dkrq = b.rq where a.dkrq >= '" + startDate +"'" + " and a.dkrq <= '" + endDate +"'"; + public List> getBdkAddList(String mainId, String subCompanyListStr, String startDate, String endDate) { + String bdkSql = "select a.*, b.fbid, b.bm from uf_jcl_kq_bdkjl a left join uf_jcl_kq_cqjg b on a.bdkry = b.ygid and a.dkrq = b.rq where b.fbid in (" + subCompanyListStr + ") and a.dkrq >= '" + startDate +"'" + " and a.dkrq <= '" + endDate +"'"; List> bdkDates = DbTools.getSqlToList(bdkSql); //先根据分部、部门、人员、项目分组 Map>> toDealBdkDataWithGroup = new HashMap<>(); @@ -749,8 +749,8 @@ public class AttendanceSummaryServiceImpl extends Service implements AttendanceS } //汇总出勤津贴表 - public List> getCqjtAddList(String mainId, String startDate, String endDate) { - String cqjtSql = "select a.*, b.fbid, b.bm from uf_jcl_kq_cqjt a left join uf_jcl_kq_cqjg b on a.yg = b.ygid and a.rq = b.rq where a.rq >= '" + startDate +"'" + " and a.rq <= '" + endDate+"'"; + public List> getCqjtAddList(String mainId, String subCompanyListStr, String startDate, String endDate) { + String cqjtSql = "select a.*, b.fbid, b.bm from uf_jcl_kq_cqjt a left join uf_jcl_kq_cqjg b on a.yg = b.ygid and a.rq = b.rq where b.fbid in (" + subCompanyListStr + ") and a.rq >= '" + startDate +"'" + " and a.rq <= '" + endDate+"'"; List> cqjtDates = DbTools.getSqlToList(cqjtSql); //先根据分部、部门、人员、项目分组 Map>> toDealCqjtDataWithGroup = new HashMap<>();