|
@@ -70,14 +70,24 @@ public class WorkAttendanceController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name="companyId",value = "单位编号",required = true,paramType = "form"),
|
|
|
@ApiImplicitParam(name="name",value = "用户姓名",required = true,paramType = "form"),
|
|
|
- @ApiImplicitParam(name="jobNumber",value = "工号",required = true,paramType = "form"),
|
|
|
@ApiImplicitParam(name = "startDate",value = "开始时间", required = true,paramType="form"),
|
|
|
@ApiImplicitParam(name = "endDate",value = "截止时间", required = true,paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "position1",value = "一级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "position2",value = "二级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "position3",value = "三级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "position4",value = "四级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "position5",value = "五级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "faceBound",value = "是否同步", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "subject",value = "subject", required = false,paramType="form")
|
|
|
})
|
|
|
@RequestMapping(value = "statList",method = RequestMethod.POST)
|
|
|
public MessageResult<Map> statList(
|
|
|
- String companyId,String name,String jobNumber,
|
|
|
+ String companyId,String name,
|
|
|
+ @RequestParam(value="position1",defaultValue="") String position1,
|
|
|
+ @RequestParam(value="position2",defaultValue="") String position2,
|
|
|
+ @RequestParam(value="position3",defaultValue="") String position3,
|
|
|
+ @RequestParam(value="position4",defaultValue="") String position4,
|
|
|
+ @RequestParam(value="position5",defaultValue="") String position5,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate,
|
|
|
@RequestAttribute String subject){
|
|
@@ -127,13 +137,25 @@ public class WorkAttendanceController {
|
|
|
}
|
|
|
searchParams.put("nameList", nameList);
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(jobNumber)) {
|
|
|
- searchParams.put("jobNumber", "%" + jobNumber + "%");
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
searchParams.put("code",companyInfo.getCode() + "%");
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(position1)) {
|
|
|
+ searchParams.put("position1","%" + position1 + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(position2)) {
|
|
|
+ searchParams.put("position2","%" + position2 + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(position3)) {
|
|
|
+ searchParams.put("position3","%" + position3 + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(position4)) {
|
|
|
+ searchParams.put("position4","%" + position4 + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(position5)) {
|
|
|
+ searchParams.put("position5","%" + position5 + "%");
|
|
|
+ }
|
|
|
+
|
|
|
List<PersonInfo> personInfoList = personInfoService.findByCompanyCode(searchParams,sortList);
|
|
|
|
|
|
int days = Days.daysBetween(startTime,endTime).getDays();
|
|
@@ -219,9 +241,11 @@ public class WorkAttendanceController {
|
|
|
}
|
|
|
|
|
|
personMap.put("name",personInfo.getName());
|
|
|
- personMap.put("company",personInfo.getPosition1());
|
|
|
- personMap.put("department",personInfo.getPosition2());
|
|
|
- personMap.put("jobNumber",personInfo.getPosition3());
|
|
|
+ personMap.put("position1",personInfo.getPosition1());
|
|
|
+ personMap.put("position2",personInfo.getPosition2());
|
|
|
+ personMap.put("position3",personInfo.getPosition3());
|
|
|
+ personMap.put("position4",personInfo.getPosition4());
|
|
|
+ personMap.put("position5",personInfo.getPosition5());
|
|
|
personMap.put("workDays",workDays);
|
|
|
personMap.put("restDays",restDays);
|
|
|
personMap.put("lateNum",lateNum);
|
|
@@ -339,35 +363,41 @@ public class WorkAttendanceController {
|
|
|
String name = (String) personMap.get("name");
|
|
|
row.createCell(0).setCellValue(name);
|
|
|
|
|
|
- String companyName = (String) personMap.get("company");
|
|
|
- row.createCell(1).setCellValue(companyName);
|
|
|
+ String position1 = (String) personMap.get("position1");
|
|
|
+ row.createCell(1).setCellValue(position1);
|
|
|
+
|
|
|
+ String position2 = (String) personMap.get("position2");
|
|
|
+ row.createCell(2).setCellValue(position2);
|
|
|
+
|
|
|
+ String position3 = (String) personMap.get("position3");
|
|
|
+ row.createCell(3).setCellValue(position3);
|
|
|
|
|
|
- String department = (String) personMap.get("department");
|
|
|
- row.createCell(2).setCellValue(department);
|
|
|
+ String position4 = (String) personMap.get("position4");
|
|
|
+ row.createCell(4).setCellValue(position4);
|
|
|
|
|
|
- String jobNumber = (String) personMap.get("jobNumber");
|
|
|
- row.createCell(3).setCellValue(jobNumber);
|
|
|
+ String position5 = (String) personMap.get("position5");
|
|
|
+ row.createCell(5).setCellValue(position5);
|
|
|
|
|
|
Integer workDays = Integer.valueOf(personMap.get("workDays").toString());
|
|
|
- row.createCell(4).setCellValue(workDays);
|
|
|
+ row.createCell(6).setCellValue(workDays);
|
|
|
|
|
|
Integer restDays = Integer.valueOf(personMap.get("restDays").toString());
|
|
|
- row.createCell(5).setCellValue(restDays);
|
|
|
+ row.createCell(7).setCellValue(restDays);
|
|
|
|
|
|
Integer lateNum = Integer.valueOf(personMap.get("lateNum").toString());
|
|
|
- row.createCell(6).setCellValue(lateNum);
|
|
|
+ row.createCell(8).setCellValue(lateNum);
|
|
|
|
|
|
Integer leaveNum = Integer.valueOf(personMap.get("leaveNum").toString());
|
|
|
- row.createCell(7).setCellValue(leaveNum);
|
|
|
+ row.createCell(9).setCellValue(leaveNum);
|
|
|
|
|
|
Integer missCardOnWorkCount = Integer.valueOf(personMap.get("missCardOnWorkCount").toString());
|
|
|
- row.createCell(8).setCellValue(missCardOnWorkCount);
|
|
|
+ row.createCell(10).setCellValue(missCardOnWorkCount);
|
|
|
|
|
|
Integer missCardOffWorkCount = Integer.valueOf(personMap.get("missCardOffWorkCount").toString());
|
|
|
- row.createCell(9).setCellValue(missCardOffWorkCount);
|
|
|
+ row.createCell(11).setCellValue(missCardOffWorkCount);
|
|
|
|
|
|
Integer missCardAllDayCount = Integer.valueOf(personMap.get("missCardAllDayCount").toString());
|
|
|
- row.createCell(10).setCellValue(missCardAllDayCount);
|
|
|
+ row.createCell(12).setCellValue(missCardAllDayCount);
|
|
|
|
|
|
Map<String, List> workAttendanceMap = (Map<String, List>) personMap.get("workAttendanceMap");
|
|
|
|