|
@@ -17,6 +17,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
|
@@ -68,13 +69,15 @@ public class WorkAttendanceController {
|
|
|
@ApiOperation(value="考勤统计列表")
|
|
|
@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 = "subject",value = "subject", required = false,paramType="form")
|
|
|
})
|
|
|
@RequestMapping(value = "statList",method = RequestMethod.POST)
|
|
|
public MessageResult<Map> statList(
|
|
|
- String companyId,
|
|
|
+ String companyId,String name,String jobNumber,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate,
|
|
|
@RequestAttribute String subject){
|
|
@@ -114,7 +117,24 @@ public class WorkAttendanceController {
|
|
|
sortList.add(new Sort("position2_","asc"));
|
|
|
sortList.add(new Sort("position3_","asc"));
|
|
|
|
|
|
- List<PersonInfo> personInfoList = personInfoService.findByCompanyCode(companyInfo.getCode() + "%",sortList);
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(name)) {
|
|
|
+ String[] names = name.split(",");
|
|
|
+ List nameList = new ArrayList();
|
|
|
+ for (String n : names) {
|
|
|
+ nameList.add("%"+ n +"%");
|
|
|
+ }
|
|
|
+ searchParams.put("nameList", nameList);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(jobNumber)) {
|
|
|
+ searchParams.put("jobNumber", "%" + jobNumber + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ searchParams.put("code",companyInfo.getCode() + "%");
|
|
|
+
|
|
|
+ List<PersonInfo> personInfoList = personInfoService.findByCompanyCode(searchParams,sortList);
|
|
|
|
|
|
int days = Days.daysBetween(startTime,endTime).getDays();
|
|
|
|