package cn.com.ty.lift.batch.applet.controller;

import cn.com.ty.lift.batch.applet.dao.model.request.ContractDataRequest;
import cn.com.ty.lift.batch.applet.service.ContractDataService;
import cn.com.xwy.boot.web.dto.RestResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author huangyuan
 * @date 2020/2/3
 * @description 小程序合同数据统计
 */
@RestController
@RequestMapping("/applet/contract")
public class ContractDataStatisticsController {
    @Resource
    private ContractDataService contractDataService;

    /**
     * @param
     * @return
     * @description 合同总览
     * @date 2020/2/5 4:35 下午
     */
    @RequestMapping("/contractOverView")
    public RestResponse contractOverView(@RequestBody ContractDataRequest contractDataRequest) {
        return contractDataService.contractOverView(contractDataRequest);
    }

    /**
     * @param
     * @return
     * @description 丢失合同统计
     * @date 2020/2/5 4:39 下午
     */
    @RequestMapping("/lostContract")
    public RestResponse lostContract(@RequestBody ContractDataRequest contractDataRequest) {
        return contractDataService.lostContract(contractDataRequest);
    }

    /**
     * @param
     * @return
     * @description 到期预警
     * @date 2020/2/5 4:42 下午
     */
    @RequestMapping("/dueToWarn")
    public RestResponse dueToWarn(@RequestBody ContractDataRequest contractDataRequest) {
        return contractDataService.dueToWarn(contractDataRequest);
    }

}
