jyy
2021-06-19 756e16e090b15c7fd8648f55f5451367face6abc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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);
 
 
    }
 
}