TestGroovyScript.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package cn.com.ctop.check.script;
  2. import cn.com.ctop.check.component.execute.GroovyScriptExecutor;
  3. import cn.com.ctop.check.service.ICtopCheckTaskListService;
  4. import cn.com.ctop.common.module.entity.UserAllocation;
  5. import cn.com.ctop.common.module.service.ICtopOauthTokenService;
  6. import cn.com.ctop.common.module.service.ICustomDataByAccountService;
  7. import cn.com.ctop.common.module.service.IUReportExportService;
  8. import cn.com.ctop.common.module.service.IUserAllocationService;
  9. import cn.com.ctop.common.module.service.impl.CustomDataByAccountImpl;
  10. import cn.com.ctop.common.module.service.impl.UserAllocationServiceImpl;
  11. import cn.com.ctop.notice.handler.SendWeChatHandle;
  12. import com.alibaba.fastjson.JSONObject;
  13. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  14. import org.checkerframework.checker.units.qual.A;
  15. import org.jeecg.common.api.vo.Result;
  16. import org.jeecg.common.constant.SystemDateConstant;
  17. import org.jeecg.common.util.DateUtils;
  18. import org.springframework.beans.factory.annotation.Autowired;
  19. import org.springframework.web.bind.annotation.GetMapping;
  20. import org.springframework.web.bind.annotation.RequestMapping;
  21. import org.springframework.web.bind.annotation.RestController;
  22. import java.util.List;
  23. @RestController
  24. @RequestMapping("/rest/script")
  25. public class TestGroovyScript {
  26. @Autowired
  27. ICtopCheckTaskListService checkTaskListService;
  28. @Autowired
  29. ICtopOauthTokenService ctopOauthTokenService;
  30. @Autowired
  31. GroovyScriptExecutor groovyScriptExecutor;
  32. @Autowired
  33. SendWeChatHandle sendWeChatHandle;
  34. @Autowired
  35. IUserAllocationService userAllocationService;
  36. @Autowired
  37. ICustomDataByAccountService customDataByAccountService;
  38. @Autowired
  39. IUReportExportService iuReportExportService;
  40. @GetMapping("/test")
  41. public Result testGroovy(){
  42. //groovyScriptExecutor.execute(2,"CheckAccountStatusScript");
  43. //groovyScriptExecutor.execute(13,"CheckKsDataDiffScript");
  44. //groovyScriptExecutor.execute(14,"CheckByDataDiffScript");
  45. iuReportExportService.exportExcel("file:2048球球大作战-日报.ureport.xml ");
  46. return Result.ok();
  47. }
  48. }