|
|
@@ -1,5 +1,6 @@
|
|
|
package com.goafanti.order.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.goafanti.common.dao.TOrderNewMapper;
|
|
|
import com.goafanti.common.dao.TOrderTaskMapper;
|
|
|
import com.goafanti.common.dao.TTaskMemberMapper;
|
|
|
@@ -11,8 +12,10 @@ import com.goafanti.order.service.OrderPlusService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class OrderPlusServiceImpl extends BaseMybatisDao<TOrderNewMapper> implements OrderPlusService {
|
|
|
@@ -39,12 +42,30 @@ public class OrderPlusServiceImpl extends BaseMybatisDao<TOrderNewMapper> implem
|
|
|
System.out.println("contractNo = " + contractNo);
|
|
|
String orderNo = (String) map.getOrDefault("orderNo", String.class);
|
|
|
List<TOrderTaskBo> tOrderTaskBos = tOrderTaskMapper.selectOrderTaskAll(orderNo, null);
|
|
|
- for (TOrderTaskBo e : tOrderTaskBos) {
|
|
|
- String commodityName = e.getCommodityName();
|
|
|
-
|
|
|
-
|
|
|
+ String serviceLife = null;
|
|
|
+ List<String> list=new ArrayList<>();
|
|
|
+ int yearSum=0;
|
|
|
+ List<TOrderTaskBo> collect = tOrderTaskBos.stream().filter(e -> e.getSplitStatus() == 1).collect(Collectors.toList());
|
|
|
+ for (TOrderTaskBo e : collect) {
|
|
|
+ if (e.getYearSum()>yearSum){
|
|
|
+ yearSum=e.getYearSum();
|
|
|
+ serviceLife=e.getServiceLife();
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ if (serviceLife!=null){
|
|
|
+ list = JSON.parseArray(serviceLife, String.class);
|
|
|
+ }
|
|
|
+ List<TOrderTaskBo> collect2 = tOrderTaskBos.stream().filter(e -> e.getSplitStatus() == 2).collect(Collectors.toList());
|
|
|
+ List<String> list2=new ArrayList<>();
|
|
|
+ for (TOrderTaskBo e : collect2) {
|
|
|
+ for (String s : list) {
|
|
|
+ if (s.equals(e.getServiceYear())){
|
|
|
+ s=s+" (已派)";
|
|
|
+ }
|
|
|
+ list2.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ System.out.println(list2);
|
|
|
}
|
|
|
return null;
|
|
|
}
|