Commit 1b09a8d7 by wangli

切换到order_info表

1 parent 0accb61e
......@@ -7,6 +7,7 @@ import com.dituhui.pea.order.dao.*;
import com.dituhui.pea.order.dto.OrderChangeListDTO;
import com.dituhui.pea.order.dto.WorkbenchSummaryResp;
import com.dituhui.pea.order.entity.OrderEventEntity;
import com.dituhui.pea.order.entity.OrderInfo;
import com.dituhui.pea.order.entity.OrderRequest;
import com.dituhui.pea.order.entity.OrderRequestEntity;
import com.dituhui.pea.order.service.WorkbenchService;
......@@ -40,7 +41,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
private OrderEventDao orderEventDao;
@Autowired
private OrderRequestMPDao orderRequestMPDao;
private OrderInfoMPDao orderInfoMPDao;
@Override
public Result<?> getOrderChangeList(OrderChangeListDTO.Request reqDTO) {
......@@ -98,27 +99,27 @@ public class WorkbenchServiceImpl implements WorkbenchService {
}
private List<Map<String, Object>> queryCountByAppointmentMethod(String levelType, String levelValue, LocalDate dt) {
QueryWrapper<OrderRequest> wrapper = new QueryWrapper<>();
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
wrapper.select("appointment_method, appointment_status, COUNT(*) as count")
.lambda()
.eq(OrderRequest::getDt, dt)
.eq(levelType.equals("cluster"), OrderRequest::getOrgClusterId, levelValue)
.eq(levelType.equals("branch"), OrderRequest::getOrgBranchId, levelValue)
.eq(levelType.equals("group"), OrderRequest::getOrgGroupId, levelValue)
.groupBy(OrderRequest::getAppointmentMethod, OrderRequest::getAppointmentStatus);
return orderRequestMPDao.selectMaps(wrapper);
.eq(OrderInfo::getDt, dt)
.eq(levelType.equals("cluster"), OrderInfo::getOrgClusterId, levelValue)
.eq(levelType.equals("branch"), OrderInfo::getOrgBranchId, levelValue)
.eq(levelType.equals("group"), OrderInfo::getOrgGroupId, levelValue)
.groupBy(OrderInfo::getAppointmentMethod, OrderInfo::getAppointmentStatus);
return orderInfoMPDao.selectMaps(wrapper);
}
private List<Map<String, Object>> queryCountByOrderStatus(String levelType, String levelValue, LocalDate dt) {
QueryWrapper<OrderRequest> wrapper = new QueryWrapper<>();
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
wrapper.select("appointment_status, COUNT(*) as count")
.lambda()
.eq(OrderRequest::getDt, dt)
.eq(levelType.equals("cluster"), OrderRequest::getOrgClusterId, levelValue)
.eq(levelType.equals("branch"), OrderRequest::getOrgBranchId, levelValue)
.eq(levelType.equals("group"), OrderRequest::getOrgGroupId, levelValue)
.groupBy(OrderRequest::getAppointmentStatus);
return orderRequestMPDao.selectMaps(wrapper);
.eq(OrderInfo::getDt, dt)
.eq(levelType.equals("cluster"), OrderInfo::getOrgClusterId, levelValue)
.eq(levelType.equals("branch"), OrderInfo::getOrgBranchId, levelValue)
.eq(levelType.equals("group"), OrderInfo::getOrgGroupId, levelValue)
.groupBy(OrderInfo::getAppointmentStatus);
return orderInfoMPDao.selectMaps(wrapper);
}
private HashMap<String, Long> transAppointmentMethod(List<Map<String, Object>> results) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!