GetController.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package com.galaxis.manatee.controller;
  2. import com.galaxis.manatee.service.ChuanyunService;
  3. import com.galaxis.manatee.task.ChuanyunHumanResourceScheduledTask;
  4. import org.springframework.web.bind.annotation.GetMapping;
  5. import org.springframework.web.bind.annotation.RestController;
  6. /**
  7. * 提供手工触发更新氚云数据的接口
  8. * @author zcj
  9. * @version 0.1
  10. * @date 2020/6/7 10:26 上午
  11. */
  12. @RestController
  13. public class GetController {
  14. private final ChuanyunHumanResourceScheduledTask chuanyunHumanResourceScheduledTask;
  15. private final ChuanyunService chuanyunService;
  16. public GetController(ChuanyunHumanResourceScheduledTask chuanyunHumanResourceScheduledTask, ChuanyunService chuanyunService) {
  17. this.chuanyunHumanResourceScheduledTask = chuanyunHumanResourceScheduledTask;
  18. this.chuanyunService = chuanyunService;
  19. }
  20. /**
  21. * 手动更新chuanyunPayRoll
  22. * @return 提示信息
  23. */
  24. @GetMapping("/test/getChuanyunPayroll")
  25. public String getChuanyunPayroll(){
  26. chuanyunHumanResourceScheduledTask.getPayrollManually();
  27. return "开始更新薪资数据";
  28. }
  29. /**
  30. * 手动更新日志
  31. * @return
  32. */
  33. @GetMapping("/test/getUpdateLog")
  34. public String getUpdateLog() {
  35. chuanyunHumanResourceScheduledTask.getUpdateLog();
  36. return "开始更新日志";
  37. }
  38. /**
  39. * 手动更新项目组成员
  40. * @return
  41. */
  42. @GetMapping("/test/getProjectMember")
  43. public String getProjectMember() {
  44. chuanyunService.updateProjectMember();
  45. return "开始更新项目组成员";
  46. }
  47. }