|
|
@@ -21,17 +21,20 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.TOrderNewMapper;
|
|
|
+import com.goafanti.common.enums.NoticeStatus;
|
|
|
+import com.goafanti.common.model.TOrderDun;
|
|
|
import com.goafanti.common.model.TOrderNew;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
import com.goafanti.order.bo.InputNewOrderDunBo;
|
|
|
+import com.goafanti.order.bo.OrderDunTaskBo;
|
|
|
import com.goafanti.order.bo.OutNewOrderDunBo;
|
|
|
import com.goafanti.order.enums.OrderDunProjectType;
|
|
|
import com.goafanti.order.service.NewOrderDunService;
|
|
|
import com.goafanti.order.service.OrderNewService;
|
|
|
|
|
|
-//@Component
|
|
|
-@Controller
|
|
|
+@Component
|
|
|
+//@Controller
|
|
|
public class OrderDunTask {
|
|
|
@Autowired
|
|
|
private OrderNewService orderNewService;
|
|
|
@@ -45,15 +48,15 @@ public class OrderDunTask {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 每天凌晨2点轮询处理需要催款的信息
|
|
|
+ * 每天凌晨3点轮询处理需要新催款的信息
|
|
|
*/
|
|
|
- @RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
|
|
|
- @ResponseBody
|
|
|
-// @Scheduled(cron = "0 0 2 * * ?")
|
|
|
- @Transactional(rollbackFor=Exception.class)
|
|
|
- public void updateorderDun(){
|
|
|
+// @RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
|
|
|
+// @ResponseBody
|
|
|
+ @Scheduled(cron = "0 0 3 * * ?")
|
|
|
+ @Transactional(rollbackFor=Exception.class)
|
|
|
+ public void updateNewOrderDun(){
|
|
|
try {
|
|
|
- LoggerUtils.debug(logger, "======================催款任务轮询启动===================");
|
|
|
+ LoggerUtils.debug(logger, "======================新催款任务轮询启动===================");
|
|
|
|
|
|
List<OutNewOrderDunBo> list= newOrderDunService.selectAllOrderDun();
|
|
|
Calendar calendar=Calendar.getInstance();
|
|
|
@@ -93,10 +96,10 @@ public class OrderDunTask {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- LoggerUtils.debug(logger, "======================催款任务轮询结束===================");
|
|
|
+ LoggerUtils.debug(logger, "======================新催款任务轮询结束===================");
|
|
|
} catch (Exception e) {
|
|
|
LoggerUtils.error(getClass(), "=============================================");
|
|
|
- LoggerUtils.error(getClass(), "催款的信息处理失败", e);
|
|
|
+ LoggerUtils.error(getClass(), "新催款的信息处理失败", e);
|
|
|
LoggerUtils.error(getClass(), "=============================================");
|
|
|
}
|
|
|
|
|
|
@@ -123,9 +126,10 @@ public class OrderDunTask {
|
|
|
|
|
|
/**
|
|
|
* 每天凌晨2点轮询处理需要催款的信息
|
|
|
-
|
|
|
- @Scheduled(cron = "0 0 2 * * ?")
|
|
|
+ *
|
|
|
+ */
|
|
|
//@RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
|
|
|
+ @Scheduled(cron = "0 0 2 * * ?")
|
|
|
@Transactional(rollbackFor=Exception.class)
|
|
|
public void updateorderDun(){
|
|
|
try {
|
|
|
@@ -163,5 +167,5 @@ public class OrderDunTask {
|
|
|
orderNewService.updateOrderDun(tDun);
|
|
|
orderNewService.addNoticAndSendEmail(t.getOrderNo(),t,NoticeStatus.ORDER_DUN.getCode());
|
|
|
}
|
|
|
- */
|
|
|
+
|
|
|
}
|