|
|
@@ -3,13 +3,12 @@ package com.goafanti.common.task;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.Calendar;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.UUID;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import javax.mail.MessagingException;
|
|
|
|
|
|
+import com.goafanti.order.bo.*;
|
|
|
+import com.goafanti.order.service.LegalAffairsService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -37,10 +36,6 @@ import com.goafanti.common.model.TOrderMid;
|
|
|
import com.goafanti.common.model.TOrderNew;
|
|
|
import com.goafanti.common.utils.AsyncUtils;
|
|
|
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.bo.TOrderNewBo;
|
|
|
import com.goafanti.order.enums.OrderDunProjectType;
|
|
|
import com.goafanti.order.service.NewOrderDunService;
|
|
|
import com.goafanti.order.service.OrderNewService;
|
|
|
@@ -64,6 +59,9 @@ public class OrderDunTask {
|
|
|
private PaymentNodeMapper paymentNodeMapper;
|
|
|
@Autowired
|
|
|
private OrderProjectService orderProjectService;
|
|
|
+ @Autowired
|
|
|
+ private LegalAffairsService legalAffairsService;
|
|
|
+
|
|
|
@Value(value = "${dev.name}")
|
|
|
private String devName=null;
|
|
|
@Autowired
|
|
|
@@ -81,11 +79,36 @@ public class OrderDunTask {
|
|
|
public void startTask() throws InterruptedException {
|
|
|
updateNewOrderDun();
|
|
|
Thread.sleep(2000);
|
|
|
-// updateorderDun();
|
|
|
- Thread.sleep(2000);
|
|
|
updatePaymentNode();
|
|
|
+ Thread.sleep(2000);
|
|
|
+ pushLegalAffairs();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 法务订单催款处理
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/open/pushLegalAffairs", method = RequestMethod.GET)
|
|
|
+ public void pushLegalAffairs() {
|
|
|
+ List<OutOrderLegalAffairsListBo> list=legalAffairsService.getLegalAffairsOrder();
|
|
|
+ ArrayList<String> addList = new ArrayList<>();
|
|
|
+ Date now=new Date();
|
|
|
+ for (OutOrderLegalAffairsListBo out : list) {
|
|
|
+ Long l=out.getDunStartTime().getTime()+AFTConstants.DUN_START_LIMIT_MS;
|
|
|
+ if (now.getTime()<l){
|
|
|
+ addList.add(out.getOrderNo());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<String> addList2=new ArrayList<>();
|
|
|
+ if (!addList.isEmpty())
|
|
|
+ for (int i=0;i<addList.size();i++){
|
|
|
+ addList2.add(addList.get(i));
|
|
|
+ if (50 == addList2.size() || i == addList.size() - 1){
|
|
|
+ tOrderMidMapper.updateByList(addList2);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 询处理需要新催款的信息
|
|
|
*/
|