-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
3,675 additions
and
1,088 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/emperorws/hrmanagement/controller/attendance/AttelogdayController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.emperorws.hrmanagement.controller.attendance; | ||
|
||
import com.emperorws.hrmanagement.logger.SystemControllerLog; | ||
import com.emperorws.hrmanagement.model.*; | ||
import com.emperorws.hrmanagement.service.AttelogdayService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* @Author: EmperorWS | ||
* @Date: 2020/3/12 21:21 | ||
* @Description: 每日考勤管理控制层 | ||
**/ | ||
@RestController | ||
@RequestMapping("/attendance/managementofday") | ||
public class AttelogdayController { | ||
@Autowired | ||
AttelogdayService attelogdayService; | ||
|
||
@GetMapping("/") | ||
@SystemControllerLog(description="获取员工的每日考勤数据") | ||
public RespPageBean getAttelogdayByPage(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size, Employee employee, Date[] clockinday) { | ||
return attelogdayService.getAttelogdayByPage(page, size, employee, clockinday); | ||
} | ||
|
||
@PutMapping("/") | ||
@SystemControllerLog(description="修改旧的员工每日考勤数据") | ||
public RespBean updateAttelogday(@RequestBody Attelogday attelogday){ | ||
if (attelogdayService.updateAttelogday(attelogday) == 1) { | ||
return RespBean.ok("修改成功!"); | ||
} | ||
return RespBean.error("修改失败!"); | ||
} | ||
|
||
@DeleteMapping("/{attelogdayid}") | ||
@SystemControllerLog(description="删除旧的员工每日考勤数据") | ||
public RespBean deleteAttelogdayById(@PathVariable Integer attelogdayid){ | ||
if (attelogdayService.deleteAttelogdayById(attelogdayid) == 1) { | ||
return RespBean.ok("删除成功!"); | ||
} | ||
return RespBean.error("删除失败!"); | ||
} | ||
|
||
@PostMapping("/deleteattedays") | ||
@SystemControllerLog(description="批量删除旧的员工每日考勤数据") | ||
public RespBean deleteAttelogdays(@RequestBody List<Attelogday> attelogdays){ | ||
if(attelogdayService.deleteAttelogdays(attelogdays)==attelogdays.size()){ | ||
return RespBean.ok("批量删除成功!"); | ||
} | ||
return RespBean.error("批量删除失败!"); | ||
} | ||
} |
90 changes: 90 additions & 0 deletions
90
src/main/java/com/emperorws/hrmanagement/controller/attendance/AttelogmonController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
package com.emperorws.hrmanagement.controller.attendance; | ||
|
||
import com.emperorws.hrmanagement.logger.SystemControllerLog; | ||
import com.emperorws.hrmanagement.model.*; | ||
import com.emperorws.hrmanagement.service.AttelogmonService; | ||
import com.emperorws.hrmanagement.utils.AttelogmonPOIUtils; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* @Author: EmperorWS | ||
* @Date: 2020/3/10 16:51 | ||
* @Description: 考勤月度统计控制层 | ||
**/ | ||
@RestController | ||
@RequestMapping("/attendance/managementofmonth") | ||
public class AttelogmonController { | ||
@Autowired | ||
AttelogmonService attelogmonService; | ||
|
||
@GetMapping("/") | ||
@SystemControllerLog(description="获取员工的历史月度考勤统计数据") | ||
public RespPageBean getAttelogmonByPage(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size, Employee employee, Date[] caldate) { | ||
return attelogmonService.getAttelogmonByPage(page, size, employee, caldate); | ||
} | ||
|
||
@DeleteMapping("/{attelogmonid}") | ||
@SystemControllerLog(description="删除旧的员工历史月度考勤统计数据") | ||
public RespBean deleteAttelogmonById(@PathVariable Integer attelogmonid){ | ||
if (attelogmonService.deleteAttelogmonById(attelogmonid) == 1) { | ||
return RespBean.ok("删除成功!"); | ||
} | ||
return RespBean.error("删除失败!"); | ||
} | ||
|
||
@PutMapping("/") | ||
@SystemControllerLog(description="修改旧的员工历史月度考勤统计数据") | ||
public RespBean updateAttelogmon(@RequestBody Attelogmon attelogmon){ | ||
if (attelogmonService.updateAttelogmon(attelogmon) == 1) { | ||
return RespBean.ok("更新成功!"); | ||
} | ||
return RespBean.error("更新失败!"); | ||
} | ||
|
||
@PostMapping("/deleteattemons") | ||
@SystemControllerLog(description="批量删除旧的员工历史月度考勤统计数据") | ||
public RespBean deleteAttelogmons(@RequestBody List<Attelogmon> attelogmons){ | ||
if(attelogmonService.deleteAttelogmons(attelogmons)==attelogmons.size()){ | ||
return RespBean.ok("批量删除成功!"); | ||
} | ||
return RespBean.error("批量删除失败!"); | ||
} | ||
|
||
@GetMapping("/calcall") | ||
@SystemControllerLog(description="自动统计所有员工的上月考勤数据") | ||
public RespBean statisticsAll(Date[] monthday){ | ||
if(attelogmonService.statisticsAll(monthday)){ | ||
return RespBean.ok("统计所有员工的考勤数据成功!"); | ||
} | ||
return RespBean.error("统计所有员工的考勤数据失败!"); | ||
} | ||
|
||
@GetMapping("/calcbydepid") | ||
@SystemControllerLog(description="自动统计所选部门的所有员工的上月考勤数据") | ||
public RespBean statisticsByDepid(Integer depid,Date[] monthday){ | ||
if(attelogmonService.statisticsByDepid(depid,monthday)){ | ||
return RespBean.ok("统计所选部门的所有员工的考勤数据成功!"); | ||
} | ||
return RespBean.error("统计所选部门的所有员工的考勤数据失败!"); | ||
} | ||
|
||
@PostMapping("/calcbyworkid") | ||
@SystemControllerLog(description="自动统计所选部门的所有员工的上月考勤数据") | ||
public RespBean statisticsByWorkid(@RequestParam Date[] monthday,@RequestBody List<Employee> employees){ | ||
if(attelogmonService.statisticsByWorkid(employees,monthday)){ | ||
return RespBean.ok("统计所选员工的考勤数据成功!"); | ||
} | ||
return RespBean.error("统计所选员工的考勤数据失败!"); | ||
} | ||
|
||
@PostMapping("/export") | ||
@SystemControllerLog(description="批量导出员工的考勤月度统计信息") | ||
public ResponseEntity<byte[]> exportData(@RequestBody List<Attelogmon> list) { | ||
return AttelogmonPOIUtils.attelogmon2Excel(list); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.