|
@@ -67,11 +67,12 @@ public class WorkAttendanceController {
|
|
|
@Autowired
|
|
|
private ValueOperations<String, Object> valueOperations;
|
|
|
|
|
|
- private Map<String,Object> pageSearch(String companyId,String name,String jobNumber,
|
|
|
- Date startDate,
|
|
|
- Date endDate,
|
|
|
- int pageIndex,
|
|
|
- int pageSize) throws Exception{
|
|
|
+ private Map<String,Object> pageSearch(String companyId,String name,
|
|
|
+ String position1,String position2,
|
|
|
+ String position3,String position4,
|
|
|
+ String position5,
|
|
|
+ Date startDate,Date endDate,
|
|
|
+ int pageIndex,int pageSize) throws Exception{
|
|
|
Map<String,Object> dataMap = new HashMap<>();
|
|
|
|
|
|
if (startDate==null){
|
|
@@ -112,8 +113,24 @@ public class WorkAttendanceController {
|
|
|
searchParams.put("nameList", nameList);
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(jobNumber)) {
|
|
|
- searchParams.put("position3", "%" + jobNumber + "%");
|
|
|
+ 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 + "%");
|
|
|
}
|
|
|
|
|
|
searchParams.put("companyCode",companyInfo.getCode() + "%");
|
|
@@ -240,14 +257,16 @@ 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 = "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,
|
|
|
+ String position1,String position2,
|
|
|
+ String position3,String position4,
|
|
|
+ String position5,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
@@ -256,7 +275,7 @@ public class WorkAttendanceController {
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
- Map<String,Object> dataMap = pageSearch(companyId,name,jobNumber,startDate,endDate,pageIndex,pageSize);
|
|
|
+ Map<String,Object> dataMap = pageSearch(companyId,name,position1,position2,position3,position4,position5,startDate,endDate,pageIndex,pageSize);
|
|
|
|
|
|
msgResult.setData(dataMap);
|
|
|
msgResult.setResult(true);
|
|
@@ -295,6 +314,9 @@ public class WorkAttendanceController {
|
|
|
})
|
|
|
public MessageResult<String> exportXls(
|
|
|
String companyId,String name,String jobNumber,
|
|
|
+ String position1,String position2,
|
|
|
+ String position3,String position4,
|
|
|
+ String position5,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate,
|
|
|
@RequestAttribute String subject) throws Exception {
|
|
@@ -304,7 +326,7 @@ public class WorkAttendanceController {
|
|
|
DateTime startTime = new DateTime(startDate);
|
|
|
DateTime endTime = new DateTime(endDate);
|
|
|
|
|
|
- Map<String,Object> dataMap = pageSearch(companyId,name,jobNumber,startDate,endDate,1,10000);
|
|
|
+ Map<String,Object> dataMap = pageSearch(companyId,name,position1,position2,position3,position4,position5,startDate,endDate,1,10000);
|
|
|
|
|
|
List<Map> personMapList = (List<Map>)dataMap.get("data");
|
|
|
|