|
@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.google.common.collect.Sets;
|
|
|
|
|
@@ -253,7 +254,21 @@ public class SapCheckService extends BaseService {
|
|
|
pd.put("departId", departId);
|
|
|
pd.put("name", name);
|
|
|
pd.put("reportDaySql", getReportDaySql(startDate, endDate));
|
|
|
- return (List<Map<String, Object>>) findList("SapCheckMapper.selectReportDayList", pd);
|
|
|
+
|
|
|
+// 公司 部门 工号 姓名5月25日 5月26日 5月27日 5月28日 5月29日
|
|
|
+ List<String> days = DateUtil.getSubDateList(startDate, endDate);
|
|
|
+ Map<String, Object> headerMap = Maps.newHashMap();
|
|
|
+ headerMap.put("A", "公司");
|
|
|
+ headerMap.put("A", "部门");
|
|
|
+ headerMap.put("A", "工号");
|
|
|
+ headerMap.put("A", "姓名");
|
|
|
+ for (String day : days) {
|
|
|
+ headerMap.put(day, day);
|
|
|
+ }
|
|
|
+ List<Map<String, Object>> result = Lists.newArrayList(headerMap);
|
|
|
+ List<Map<String, Object>> list = (List<Map<String, Object>>) findList("SapCheckMapper.selectReportDayList", pd);
|
|
|
+ list.stream().forEach(check -> result.add(check));
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
private String getReportDaySql(String startDate, String endDate) throws Exception {
|