RyTask.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. package com.dgtly.quartz.task;
  2. import com.dgtly.common.utils.StringUtils;
  3. import com.dgtly.sync.service.AnalysisDiyCustomerComponent;
  4. import com.dgtly.sync.service.HanaOrderComponent;
  5. import com.dgtly.sync.service.RelationCustomerOnlineComponent;
  6. import com.dgtly.system.service.ISysUserOrderAuthorService;
  7. import com.dgtly.system.service.HanaSalesOrderService;
  8. import com.dgtly.wxportal.service.IWxSendMessageService;
  9. import lombok.extern.slf4j.Slf4j;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.stereotype.Component;
  12. /**
  13. * 定时任务调度测试
  14. *
  15. * @author dgtly
  16. */
  17. @Component("ryTask")
  18. @Slf4j
  19. public class RyTask
  20. {
  21. @Autowired
  22. private AnalysisDiyCustomerComponent analysisDiyCustomerComponent;
  23. @Autowired
  24. private HanaOrderComponent hanaOrderComponent;
  25. @Autowired
  26. private RelationCustomerOnlineComponent relationCustomerOnlineComponent;
  27. @Autowired
  28. private ISysUserOrderAuthorService sysUserOrderAuthorService;
  29. @Autowired
  30. private IWxSendMessageService wxSendMessageService;
  31. @Autowired
  32. private HanaSalesOrderService HanaSalesOrderService;
  33. // private static RyTask ryTask;
  34. // @PostConstruct
  35. // public void init() {
  36. // ryTask = this;
  37. // ryTask.analysisDiyCustomerComponent = this.analysisDiyCustomerComponent;
  38. // }
  39. public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
  40. {
  41. log.info(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
  42. }
  43. public void ryParams(String params)
  44. {
  45. log.info("执行有参方法:" + params);
  46. }
  47. public void ryNoParams()
  48. {
  49. log.info("执行无参方法");
  50. }
  51. /*立邦DIY人员定时同步*/
  52. public void analyDiyCustomer(){
  53. analysisDiyCustomerComponent.analyDiyCustomer();
  54. }
  55. /*立邦DIY人员定时同步*/
  56. /* public void analyCwCustomer(){
  57. analysisDiyCustomerComponent.analyCwCustomer();
  58. }*/
  59. /*HANA订单数据定时同步*/
  60. public void hanaSalesOrderSync() throws Exception {
  61. hanaOrderComponent.hanaSalesOrderSync();
  62. }
  63. /*HANA交货单数据定时同步*/
  64. public void hanaDeliverOrderSync() throws Exception {
  65. hanaOrderComponent.hanaDeliverOrderSync();
  66. }
  67. /**HANA已复核线下月底手动过账的交货单仍需自提同步*/
  68. public void hanaSelfReviewedDeliverOrderSync()throws Exception{
  69. hanaOrderComponent.hanaSelfReviewedDeliverOrderSync();
  70. }
  71. /*关联经销商上线定时任务*/
  72. public void relationCustomerOnlineSync() throws Exception {
  73. relationCustomerOnlineComponent.relationCustomerOnlineSync();
  74. }
  75. /*初始化用户权限*/
  76. public void initUserAuthor() throws Exception {
  77. sysUserOrderAuthorService.initUserAuthor();
  78. }
  79. /**
  80. *
  81. * 离职用户标识
  82. * **/
  83. public void quitUser()throws Exception {
  84. sysUserOrderAuthorService.quitUser();
  85. }
  86. /**
  87. *
  88. * 维护经销商表
  89. * **/
  90. public void updateCustomers()throws Exception {
  91. sysUserOrderAuthorService.updateCustomers();
  92. }
  93. /**
  94. * 用户账号重复通知邮件
  95. * **/
  96. public void sendmailUnionUser()throws Exception{
  97. sysUserOrderAuthorService.sendmailUnionUser();
  98. }
  99. /**
  100. * 有道接口经销商用户账号重复进行业务处理
  101. * **/
  102. public void unionCustomerUser(){
  103. sysUserOrderAuthorService.unionCustomerUser();
  104. }
  105. /**
  106. * @description: 无tms工厂的交货单更新状态和订单
  107. * @param: []
  108. * @return: void
  109. * @author: njs
  110. * @date: 2023/2/23 13:16
  111. */
  112. public void tmsPlantByOrder(){
  113. sysUserOrderAuthorService.tmsPlantByOrder();
  114. }
  115. /**
  116. * @description: 经销商自动上线
  117. * @param:
  118. * @return:
  119. * @author: njs
  120. * @date: 2023/2/23 13:16
  121. */
  122. public void customersStart(){
  123. sysUserOrderAuthorService.customersStart();
  124. }
  125. /**
  126. * @description: 自提未提货企微消息通知提醒
  127. * @param:
  128. * @return:
  129. * @author: njs
  130. * @date: 2023/5/15 11:29
  131. */
  132. public void sendWxTmsMessage(){
  133. wxSendMessageService.sendWxTmsMessage();
  134. }
  135. /**
  136. * @description: 未过信的经销商订单的要货记录id(做逻辑删除,重新要货)
  137. * @param: []
  138. * @return: void
  139. * @author: njs
  140. * @date: 2023/6/16 10:26
  141. */
  142. public void salesOrderBaseByCreditStatus(){
  143. HanaSalesOrderService.updateSalesOrderBaseNoCrditStatus();
  144. }
  145. }