Commit 3e26cadb by wangli

修改

1 parent 11e5ee57
...@@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -36,13 +35,7 @@ interface GroupTag { ...@@ -36,13 +35,7 @@ interface GroupTag {
public class DispatchServiceImpl implements DispatchService { public class DispatchServiceImpl implements DispatchService {
@Autowired @Autowired
private OrderInfoMPDao orderInfoMPDao; private OrderInfoMPDao orderInfoMPDao;
@Autowired
private OrderRequestMPDao orderRequestMPDao;
@Autowired
private OrderAppointmentMPDao orderAppointmentMPDao;
@Autowired @Autowired
private OrgTeamMPDao orgTeamMPDao; private OrgTeamMPDao orgTeamMPDao;
...@@ -163,10 +156,10 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -163,10 +156,10 @@ public class DispatchServiceImpl implements DispatchService {
} }
// 获取服务单/工单列表 // 获取服务单/工单列表
Map<String, List<OrderRequest>> orders = new HashMap<>(); Map<String, List<OrderInfo>> orders = new HashMap<>();
if (!orderIds.isEmpty()) { if (!orderIds.isEmpty()) {
orders = orderRequestMPDao.selectByOrderIds(new ArrayList<>(orderIds)).stream().collect( orders = orderInfoMPDao.selectByDtAndOrderIds(date, new ArrayList<>(orderIds)).stream().collect(
Collectors.groupingBy(OrderRequest::getOrderId)); Collectors.groupingBy(OrderInfo::getOrderId));
} }
// 获取技术员已指派单列表 // 获取技术员已指派单列表
...@@ -182,7 +175,7 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -182,7 +175,7 @@ public class DispatchServiceImpl implements DispatchService {
if (ListUtils.isEmpty(orders.get(r.getOrderId()))) { if (ListUtils.isEmpty(orders.get(r.getOrderId()))) {
continue; continue;
} }
OrderRequest o = orders.get(r.getOrderId()).get(0); OrderInfo o = orders.get(r.getOrderId()).get(0);
DispatchEngineerOrderListResp.OrderInfo item = new DispatchEngineerOrderListResp.OrderInfo(); DispatchEngineerOrderListResp.OrderInfo item = new DispatchEngineerOrderListResp.OrderInfo();
...@@ -271,7 +264,7 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -271,7 +264,7 @@ public class DispatchServiceImpl implements DispatchService {
wrapper.eq(OrderInfo::getDt, localDate); wrapper.eq(OrderInfo::getDt, localDate);
wrapper.in(OrderInfo::getOrderId, orderIds); wrapper.in(OrderInfo::getOrderId, orderIds);
List<OrderInfo> orders = orderInfoMPDao.selectList(wrapper); List<OrderInfo> orders = orderInfoMPDao.selectList(wrapper);
if (ListUtils.isEmpty(orders)){ if (ListUtils.isEmpty(orders)) {
throw new BusinessException("订单不存在"); throw new BusinessException("订单不存在");
} }
...@@ -333,7 +326,7 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -333,7 +326,7 @@ public class DispatchServiceImpl implements DispatchService {
} }
} }
if (ListUtils.isNotEmpty(reqDTO.getEngineerCodes())){ if (ListUtils.isNotEmpty(reqDTO.getEngineerCodes())) {
lqw.and(w -> lqw.and(w ->
w.in(OrderInfo::getEngineerCode, reqDTO.getEngineerCodes()) w.in(OrderInfo::getEngineerCode, reqDTO.getEngineerCodes())
.or() .or()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!