VisualManagementController.java 6.3 KB
Newer Older
苗卫卫 committed
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
package com.boco.nbd.wios.flow.controller;

import com.boco.nbd.framework.common.ResponseMessage2;
import com.boco.nbd.wios.flow.entity.vo.VisualManagementNodeFlagCountVO;
import com.boco.nbd.wios.flow.service.IVisualManagementService;
import com.boco.nbd.wios.flow.util.ProcessUtil;
import com.ihidea.core.support.session.SessionInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: TODO
 * @Author: ZQY
 * @Date: 2022/10/26
 **/
@RestController
@Slf4j
@RequestMapping("VisualManagement")
@Api(tags = "目视化管理")
public class VisualManagementController {

    @Autowired
    private IVisualManagementService visualManagementService;




    @ApiOperation(value = "根据区域查询节点工单统计")
    @GetMapping( value = "/getNodeFlagByArea")
    public ResponseMessage2 getNodeFlagByArea(String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getNodeFlagByArea(startTime,endTime,user.getUserId()));
    }

    @ApiOperation(value = "根据安装服务商查询节点工单统计")
    @GetMapping( value = "/getNodeFlagByInstallSupplierl")
    public ResponseMessage2 getNodeFlagByInstallSupplierl(String startTime,String endTime,String areaId){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getNodeFlagByInstallSupplierl(startTime,endTime,areaId,user.getUserId()));
    }

    @ApiOperation(value = "根据区域查询工单节点超时统计")
    @GetMapping( value = "/getOvertimeNodeFlagByAreaCount")
    public ResponseMessage2 getOvertimeNodeFlagByAreaCount (String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOvertimeNodeFlagByAreaCount(startTime,endTime,user.getUserId()));
    }


    @ApiOperation(value = "根据安装服务商查询工单节点超时统计")
    @GetMapping( value = "/getOvertimeNodeFlagByInstallSupplierl")
    public ResponseMessage2 getOvertimeNodeFlagByInstallSupplierl(String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOvertimeNodeFlagByInstallSupplierl(startTime,endTime,user.getUserId()));
    }

    @ApiOperation(value = "客户首联情况")
    @GetMapping( value = "/getCustomerNode101ByArea")
    public ResponseMessage2 getCustomerNode101ByArea(String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getCustomerNode101ByArea(startTime,endTime,user.getUserId()));
    }

    @ApiOperation(value = "服务商接单情况")
    @GetMapping( value = "/getOrderReceivingBySupplierl")
    public ResponseMessage2 getOrderReceivingBySupplierl(String startTime,String endTime,String id){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOrderReceivingBySupplierl(startTime,endTime,id,user.getUserId()));
    }


    @ApiOperation(value = "根据服务商ID查询区域接单情况")
    @GetMapping( value = "/getOrderReceivingByAreaAndSupplierlId")
    public ResponseMessage2 getOrderReceivingByAreaAndSupplierlId(String startTime,String endTime,String installSupplierId){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOrderReceivingByAreaAndSupplierlId(startTime,endTime,installSupplierId,user.getUserId()));
    }

    @ApiOperation(value = "服务商订单结算情况")
    @GetMapping( value = "/getOrderSettlementBySupplierl")
    public ResponseMessage2 getOrderSettlementBySupplierl(String startTime,String endTime,String id){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOrderSettlementBySupplierl(startTime,endTime,id,user.getUserId()));
    }


    @ApiOperation(value = "根据服务商ID查询区域结算情况")
    @GetMapping( value = "/getOrderSettlementByAreaAndSupplierlId")
    public ResponseMessage2 getOrderSettlementByAreaAndSupplierlId(String startTime,String endTime,String installSupplierId){
        SessionInfo user = ProcessUtil.getUserInfo();
        return ResponseMessage2.Success2(visualManagementService.getOrderSettlementByAreaAndSupplierlId(startTime,endTime,installSupplierId,user.getUserId()));
    }



    @ApiOperation(value = "根据区域查询订单实际情况")
    @GetMapping( value = "/getOrderSituationArea")
    public ResponseMessage2 getOrderSituationArea(String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        Map<String, List<VisualManagementNodeFlagCountVO>> map = new HashMap(3);
        map.put("order",visualManagementService.getNodeFlagByArea(startTime,endTime,user.getUserId()));
        map.put("orderOverTime",visualManagementService.getOvertimeNodeFlagByAreaCount(startTime,endTime,user.getUserId()));
        map.put("orderAboutOverTime",visualManagementService.getAboutOvertimeNodeFlagByAreaCount(startTime,endTime,user.getUserId()));
        return ResponseMessage2.Success2(map);
    }


    @ApiOperation(value = "根据服务商查询订单实际情况")
    @GetMapping( value = "/getOrderSituationSupplierl")
    public ResponseMessage2 getOrderSituationSupplierl(String startTime,String endTime){
        SessionInfo user = ProcessUtil.getUserInfo();
        Map<String, List<VisualManagementNodeFlagCountVO>> map = new HashMap(3);
        map.put("order",visualManagementService.getNodeFlagByInstallSupplierl(startTime,endTime,"",user.getUserId()));
        map.put("orderOverTime",visualManagementService.getOvertimeNodeFlagByInstallSupplierl(startTime,endTime,user.getUserId()));
        map.put("orderAboutOverTime",visualManagementService.getAboutOvertimeNodeFlagByInstallSupplierl(startTime,endTime,user.getUserId()));
        return ResponseMessage2.Success2(map);
    }







}