Commit a16c7bb3 authored by nie'hong's avatar nie'hong

完善工时统计

parent 147cadae
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
from work_time_order t join work_type ty on t.type = ty.id from work_time_order t join work_type ty on t.type = ty.id
where user_id = #{userId} AND work_day >= #{currentMonthFirstDay} AND t.status != 3 where user_id = #{userId} AND work_day >= #{currentMonthFirstDay} AND t.status != 3
group by type group by type
order by filed(ty.id, 1, 2, 5, 6, 7, 3, 4) order by field(ty.id, 1, 2, 5, 6, 7, 3, 4)
</select> </select>
<select id="listByDateAndUserId" resultMap="dayWorkTimeAndType"> <select id="listByDateAndUserId" resultMap="dayWorkTimeAndType">
......
...@@ -923,6 +923,10 @@ public class StatisticsServiceImpl implements StatisticsService { ...@@ -923,6 +923,10 @@ public class StatisticsServiceImpl implements StatisticsService {
log.info("StatisticsServiceImpl[]exportProjectStatistics[]param{}" + userId + year + projectIds); log.info("StatisticsServiceImpl[]exportProjectStatistics[]param{}" + userId + year + projectIds);
// 将项目主键解析出来 // 将项目主键解析出来
List<Integer> projectIdList = Arrays.asList(projectIds.split(",")).stream().map(s -> Integer.parseInt(s.trim())).collect(Collectors.toList()); List<Integer> projectIdList = Arrays.asList(projectIds.split(",")).stream().map(s -> Integer.parseInt(s.trim())).collect(Collectors.toList());
// year为空,为今年
if (year == null) {
year = DateUtil.getYear(new Date());
}
// 查询条件 // 查询条件
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("year", year); map.put("year", year);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment