Commit 3e26cadb by wangli

修改

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