JobController.java 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package com.java110.job.controller;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.java110.core.base.controller.BaseController;
  4. import com.java110.job.Api.HcFtpToFileSystemConfigAction;
  5. import org.slf4j.Logger;
  6. import org.slf4j.LoggerFactory;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Controller;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.ResponseBody;
  11. import org.springframework.web.servlet.ModelAndView;
  12. import javax.servlet.http.HttpServletRequest;
  13. import java.util.Date;
  14. /**
  15. * 首页控制类
  16. * 20190813
  17. * 师延俊
  18. */
  19. @Controller
  20. @RequestMapping(path = "/HcFtpToFileSystemConfigList")
  21. public class JobController extends BaseController {
  22. private static final Logger logger = LoggerFactory.getLogger(JobController.class);
  23. @Autowired
  24. HcFtpToFileSystemConfigAction ftpToFileSystemConfigAction;
  25. /**
  26. * 首页处理方法
  27. *
  28. * @return 页面名称
  29. */
  30. @RequestMapping(path = "/")
  31. public ModelAndView flow() {
  32. logger.debug("请求流程 {},{}", new StringBuffer("首页我进来了"), new Date());
  33. return new ModelAndView("HcFtpToFileSystemConfigList");
  34. }
  35. /**
  36. * 页面载入时加载
  37. * @return
  38. */
  39. @RequestMapping(path = "/queryFtpItems")
  40. @ResponseBody
  41. public String queryFtpItems(HttpServletRequest request) {
  42. logger.debug("请求流程 {},{}", new StringBuffer("queryFtpItems 我看到请求了"), new Date());
  43. JSONObject JSON = ftpToFileSystemConfigAction.queryFtpItems(request);
  44. return JSON.toJSONString();
  45. }
  46. /**
  47. * 点击保存按钮时
  48. * @return
  49. */
  50. @RequestMapping(path = "/addFtpItem")
  51. @ResponseBody
  52. public String addFtpItem(HttpServletRequest request) {
  53. logger.debug("请求流程 {},{}", new StringBuffer("addFtpItem 我看到请求了"), new Date());
  54. JSONObject JSON = ftpToFileSystemConfigAction.addFtpItem(request);
  55. return JSON.toJSONString();
  56. }
  57. /**
  58. * 获取任务属性
  59. * @return
  60. */
  61. @RequestMapping(path = "/questTaskTample")
  62. @ResponseBody
  63. public String questTaskTample(HttpServletRequest request) {
  64. logger.debug("请求流程 {},{}", new StringBuffer("questTaskTample 我看到请求了"), new Date());
  65. JSONObject JSON = ftpToFileSystemConfigAction.questTaskTample(request);
  66. return JSON.toJSONString();
  67. }
  68. /**
  69. * 根据TaskId 获取任务属性
  70. * @return
  71. */
  72. @RequestMapping(path = "/queryTaskAttrs")
  73. @ResponseBody
  74. public String queryTaskAttrs(HttpServletRequest request) {
  75. logger.debug("请求流程 {},{}", new StringBuffer("queryTaskAttrs 我看到请求了"), new Date());
  76. JSONObject JSON = ftpToFileSystemConfigAction.queryTaskAttrs(request);
  77. return JSON.toJSONString();
  78. }
  79. }