package com.gci.boot.modules.dataview.controller;


import com.gci.boot.common.log.annotation.AddSysLog;
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 com.gci.boot.common.vo.Result;
import com.gci.boot.modules.customer.vo.CustomerFollowVo;
import com.gci.boot.modules.customer.vo.InspectionTaskVo;
import com.gci.boot.modules.dataview.service.ITbBusinessCenterService;
import com.gci.boot.modules.dataview.vo.RepairPayMonthVo;
import com.gci.boot.modules.dataview.vo.VehicleTypeVo;

/**
 * <p>
 *  数据看板-业务中心 前端控制器
 * </p>
 *
 * @author xushuhan
 * @since 2023-09-04
 */
@RestController
@RequestMapping("/dataview/businessCenter")
public class TbBusinessCenterController {

	@Autowired
	private ITbBusinessCenterService tbBusinessCenterService;

	/**
	 * 获取全部租户合同统计
	 * @param item
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-获取全部租户合同统计")
	@GetMapping("/getProjectContractTotal")
	public Result<?> getProjectContractTotal(VehicleTypeVo item) {
		return Result.ok(tbBusinessCenterService.getProjectContractTotal());
	}

	/**
	 * 获取项目合同收支统计
	 * @param item
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-获取项目合同收支统计")
	@GetMapping("/getProjectContractList")
	public Result<?> getProjectContractList() {
		return Result.ok(tbBusinessCenterService.getProjectContractList("1"));
	}

	/**
	 * 获取项目合同业务明细
	 * @param item
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-获取项目合同业务明细")
	@GetMapping("/getProjectContractDetails")
	public Result<?> getProjectContractDetails() {
		return Result.ok(tbBusinessCenterService.getProjectContractList(null));
	}


	/**
	 * 获取维修车务支出
	 * @param item
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-获取维修车务支出")
	@GetMapping("/getRepairPay")
	public Result<?> getRepairPay(RepairPayMonthVo param) {
		return Result.ok(tbBusinessCenterService.getRepairPay(param));
	}
	
	/**
	 * 巡检情况整体统计
	 * @param param
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-巡检情况整体统计")
	@GetMapping("/getInspectionTaskTotalStatis")
	public Result<?> getInspectionTaskTotalStatis(InspectionTaskVo param) {
		return Result.ok(tbBusinessCenterService.getInspectionTaskTotalStatis(param));
	}
	
	/**
	 * 巡检情况项目列表
	 * @param param
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-巡检情况项目列表")
	@GetMapping("/getInspectionTaskStatis")
	public Result<?> getInspectionTaskStatis(InspectionTaskVo param) {
		return Result.ok(tbBusinessCenterService.getInspectionTaskStatis(param));
	}
	

	/**
	 * 客户拜访情况整体统计
	 * @param param
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-客户拜访情况整体统计")
	@GetMapping("/getCustomerFollowTotalStatis")
	public Result<?> getCustomerFollowTotalStatis(CustomerFollowVo param) {
		return Result.ok(tbBusinessCenterService.getCustomerFollowTotalStatis(param));
	}
	
	/**
	 * 客户拜访情况项目列表
	 * @param param
	 * @return
	 */
	@AddSysLog(value = "数据看板-业务中心-客户拜访情况项目列表")
	@GetMapping("/getCustomerFollowStatis")
	public Result<?> getCustomerFollowStatis(CustomerFollowVo param) {
		return Result.ok(tbBusinessCenterService.getCustomerFollowStatis(param));
	}
	
	
}
