| package com.matrix.system.hive.action; | 
|   | 
| import com.matrix.core.pojo.AjaxResult; | 
| import com.matrix.system.constance.Dictionary; | 
| import com.matrix.system.hive.bean.Onlinebooking; | 
| import com.matrix.system.hive.bean.SysOrder; | 
| import com.matrix.system.hive.bean.SysProjServices; | 
| import com.matrix.system.hive.service.OnlinebookingService; | 
| import com.matrix.system.hive.service.SysOrderService; | 
| import com.matrix.system.hive.service.SysProjServicesService; | 
| import org.springframework.stereotype.Controller; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.ResponseBody; | 
|   | 
| import javax.annotation.Resource; | 
| import java.util.ArrayList; | 
| import java.util.List; | 
|   | 
| /** | 
|  * @description 显示数据类 | 
|  */ | 
| @RequestMapping(value = "/admin/pcIndex") | 
| @Controller | 
| public class PcIndexController extends BaseController { | 
|   | 
|   | 
|   | 
|     @Resource | 
|     private SysOrderService orderService; | 
|   | 
|     @Resource | 
|     private SysProjServicesService sysProjServicesService; | 
|     @Resource | 
|     private OnlinebookingService onlinebookingService; | 
|   | 
|     /** | 
|      * 查询订单 服务单 预约单待办数量 | 
|      */ | 
|     @RequestMapping(value = "/selectOrderCount") | 
|     public @ResponseBody | 
|     AjaxResult selectOrderCount() { | 
|         List<Integer> list = new ArrayList<Integer>(); | 
|         SysOrder sysOrder = new SysOrder(); | 
|         SysProjServices serviceQuery = new SysProjServices(); | 
|         Onlinebooking onlineQuery = new Onlinebooking(); | 
|   | 
|   | 
|         sysOrder.setShopId(getMe().getShopId()); | 
|         serviceQuery.setShopId(getMe().getShopId()); | 
|         onlineQuery.setShopId(getMe().getShopId()); | 
|   | 
|         sysOrder.setStatu(Dictionary.ORDER_STATU_DFK); | 
|         list.add(orderService.findTotal(sysOrder)); | 
|         // 待预约的服务单 | 
|         serviceQuery.setState(Dictionary.SERVICE_STATU_DYY); | 
|         list.add(sysProjServicesService.findTotal(serviceQuery)); | 
|         // 待处理的网上预约单 | 
|         onlineQuery.setStatus(Dictionary.ONLINEBOOKING_DFW); | 
|         list.add(onlinebookingService.findTotal(onlineQuery)); | 
|         return new AjaxResult(AjaxResult.STATUS_SUCCESS, list, 0); | 
|   | 
|   | 
|     } | 
|   | 
| } |