DataPushController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.yihu.hos.datacollect.controller;
  2. import com.yihu.hos.datacollect.service.intf.IDatapushService;
  3. import com.yihu.hos.web.framework.model.Result;
  4. import com.yihu.hos.web.framework.util.controller.BaseController;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.stereotype.Controller;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.ResponseBody;
  9. /**
  10. * 数据采集配置页面
  11. * Created by hzp on 2015/8/12.
  12. */
  13. @RequestMapping("/datapush")
  14. @Controller("dataPushController")
  15. public class DataPushController extends BaseController {
  16. @Autowired
  17. IDatapushService datapushService;
  18. /**************************** 推送数据 ************************************************/
  19. /*
  20. 全流程推数据
  21. */
  22. @RequestMapping("datapush")
  23. @ResponseBody
  24. public Result datapush(String dataset,String data,String orgCode) {
  25. try {
  26. return datapushService.pushData(dataset, data,orgCode);
  27. }
  28. catch (Exception ex)
  29. {
  30. return Result.error(ex.getMessage());
  31. }
  32. }
  33. }