|
@@ -5889,10 +5889,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
public HttpRespMsg exportReport(@RequestParam String startDate, @RequestParam String endDate,Integer exportType, Integer projectId,Integer stateKey,String departmentIds, HttpServletRequest request) {
|
|
public HttpRespMsg exportReport(@RequestParam String startDate, @RequestParam String endDate,Integer exportType, Integer projectId,Integer stateKey,String departmentIds, HttpServletRequest request) {
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
DateFormat timeDf = new SimpleDateFormat("yyyy-MM-dd");
|
|
DateFormat timeDf = new SimpleDateFormat("yyyy-MM-dd");
|
|
- long t0 = System.currentTimeMillis();
|
|
|
|
- long fetchDataTime = 0;
|
|
|
|
try {
|
|
try {
|
|
- long downloadCountStart = System.currentTimeMillis();
|
|
|
|
String userId = request.getHeader("Token");
|
|
String userId = request.getHeader("Token");
|
|
User user = userMapper.selectById(userId);
|
|
User user = userMapper.selectById(userId);
|
|
//检查模式,是否是一个项目多个工作事项的情况
|
|
//检查模式,是否是一个项目多个工作事项的情况
|
|
@@ -6096,15 +6093,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
//看公司所有人的
|
|
//看公司所有人的
|
|
- long t1 = System.currentTimeMillis();
|
|
|
|
if (exportType == 0 && timeType.getShowFillauditTime() == 1) {
|
|
if (exportType == 0 && timeType.getShowFillauditTime() == 1) {
|
|
allReportByDate = reportMapper.getAllReportByDateWithReportLog(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
allReportByDate = reportMapper.getAllReportByDateWithReportLog(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
} else {
|
|
} else {
|
|
allReportByDate = reportMapper.getAllReportByDate(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
allReportByDate = reportMapper.getAllReportByDate(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
}
|
|
}
|
|
- long t2 = System.currentTimeMillis();
|
|
|
|
- fetchDataTime = (t2-t1);
|
|
|
|
- System.out.println("查数据库耗时:"+(t2-t1)/1000+"s");
|
|
|
|
}
|
|
}
|
|
//获取企业微信考勤数据
|
|
//获取企业微信考勤数据
|
|
List<UserCorpwxTime> userCorpwxTimeList = new ArrayList<>();
|
|
List<UserCorpwxTime> userCorpwxTimeList = new ArrayList<>();
|
|
@@ -6191,7 +6184,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
if (companyId == 4281) {
|
|
if (companyId == 4281) {
|
|
//苏州博海,需要导出未填写的记录
|
|
//苏州博海,需要导出未填写的记录
|
|
//allReportByDate针对每一个员工,列表中没有的工作日要补上
|
|
//allReportByDate针对每一个员工,列表中没有的工作日要补上
|
|
- HttpRespMsg noReportMsg = getNoReportUserList(request, startDate, endDate, null);
|
|
|
|
|
|
+ HttpRespMsg noReportMsg = getNoReportUserList(request, startDate, endDate, null, 0);
|
|
List<UserDailyWorkItem> noReportUserList = (List<UserDailyWorkItem>)noReportMsg.data;
|
|
List<UserDailyWorkItem> noReportUserList = (List<UserDailyWorkItem>)noReportMsg.data;
|
|
//追加到最后
|
|
//追加到最后
|
|
for (UserDailyWorkItem item : noReportUserList) {
|
|
for (UserDailyWorkItem item : noReportUserList) {
|
|
@@ -6815,7 +6808,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public HttpRespMsg getNoReportUserList(HttpServletRequest request, String startDate, String endDate,Integer noReportDeptId) {
|
|
|
|
|
|
+ public HttpRespMsg getNoReportUserList(HttpServletRequest request, String startDate, String endDate,Integer noReportDeptId, Integer onlyHaveAttendance) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
User user = userMapper.selectById(request.getHeader("TOKEN"));
|
|
User user = userMapper.selectById(request.getHeader("TOKEN"));
|
|
List<User> allRangeUserList = new ArrayList<>();
|
|
List<User> allRangeUserList = new ArrayList<>();
|
|
@@ -6987,8 +6980,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- //如果开启也企业微信考勤同步,没有企微考勤打卡记录的就不算未提交
|
|
|
|
- if (timeType.getSyncCorpwxTime() == 1) {
|
|
|
|
|
|
+ //如果开启也企业微信考勤同步,仅仅显示有考勤记录的人员
|
|
|
|
+ if (timeType.getSyncCorpwxTime() == 1 && onlyHaveAttendance == 1) {
|
|
noReportDataList = noReportDataList.stream().filter(item -> !(item.cardTime == null && item.status.equals(MessageUtils.message("leave.notFill")))).collect(Collectors.toList());
|
|
noReportDataList = noReportDataList.stream().filter(item -> !(item.cardTime == null && item.status.equals(MessageUtils.message("leave.notFill")))).collect(Collectors.toList());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -7086,8 +7079,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public HttpRespMsg exportNoReportUserList(HttpServletRequest request, String startDate, String endDate,Integer noReportDeptId) {
|
|
|
|
- HttpRespMsg msg = getNoReportUserList(request, startDate, endDate,noReportDeptId);
|
|
|
|
|
|
+ public HttpRespMsg exportNoReportUserList(HttpServletRequest request, String startDate, String endDate,Integer noReportDeptId, Integer onlyHaveAttendance) {
|
|
|
|
+ HttpRespMsg msg = getNoReportUserList(request, startDate, endDate,noReportDeptId, onlyHaveAttendance);
|
|
String token = request.getHeader("TOKEN");
|
|
String token = request.getHeader("TOKEN");
|
|
TimeType timeType = timeTypeMapper.selectById(userMapper.selectById(token).getCompanyId());
|
|
TimeType timeType = timeTypeMapper.selectById(userMapper.selectById(token).getCompanyId());
|
|
Integer companyId = userMapper.selectById(token).getCompanyId();
|
|
Integer companyId = userMapper.selectById(token).getCompanyId();
|