Time.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package com.malk.taisen.Timers;
  2. import java.time.LocalDateTime;
  3. import com.alibaba.fastjson.JSON;
  4. import com.malk.server.aliwork.YDConf;
  5. import com.malk.server.aliwork.YDParam;
  6. import com.malk.service.aliwork.YDClient;
  7. import com.malk.taisen.service.NonPoServer;
  8. import com.malk.utils.UtilMap;
  9. import lombok.extern.slf4j.Slf4j;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.beans.factory.annotation.Value;
  12. import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
  13. import org.springframework.context.annotation.Configuration;
  14. import org.springframework.scheduling.annotation.EnableScheduling;
  15. import org.springframework.scheduling.annotation.Scheduled;
  16. import java.util.ArrayList;
  17. import java.util.Arrays;
  18. import java.util.List;
  19. import java.util.Map;
  20. @Slf4j
  21. @Configuration
  22. @EnableScheduling
  23. @ConditionalOnProperty(name = {"npo.scheduling"}, havingValue = "true")
  24. public class Time {
  25. private YDClient ydClient;
  26. @Autowired
  27. private NonPoServer nonPoServer;
  28. /**
  29. * 每5分钟时查询下 NPO 流程结束待推送的数据
  30. */
  31. //暂不开启
  32. //
  33. @Value(value = "${sap.QA_sapUrl_Poc}")
  34. private String QA_sapUrl;
  35. // @Scheduled(fixedRate = 1000 * 1800)
  36. @Scheduled(fixedRate = 1000 * 60 * 5) //05 10 15 25 30 35 40 45 50 55 60
  37. public void JX() throws Exception {
  38. System.out.println("每5分钟时查询下NPO流程结束待推送的数据进行处理----开始 QA_sapUrl:" + QA_sapUrl);
  39. nonPoServer.NonPoinsetSAP0005list();
  40. // nonPoServer.FPGX("095ea634-826a-43c8-b348-ae940c8fd18f", "1920000001", "NP6900260017");
  41. // nonPoServer.NPOCX( "18dd8ecb-8605-4a10-8594-b861eba91d5b", "FORM-7E5114C1793141E086D9E0B13F7DFD568AYM");
  42. System.out.println("NPO流程结束待推送的数据-结束");
  43. }
  44. }