package com.controller.report;

import com.config.BaseController;
import com.config.ControllerInterface;
import com.jfinal.aop.Clear;
import com.service.report.CancellationStatisticsService;

@ControllerInterface(path="/cancellationStatistics")
public class CancellationStatisticsController extends BaseController {
    CancellationStatisticsService service = CancellationStatisticsService.me;

    public void bookCancellationStatistics() {

        int orgid = this.getParaToInt("orgid");
        if(orgid == 0) {
            fail(1,"请求参数不完整!");
            return;
        }
        String kssj = this.getPara("kssj");
        String jssj = this.getPara("jssj");
        String reason = this.getPara("reason");
        success(service.bookCancellationStatistics(orgid,kssj,jssj,reason));
    }

    /*
    柱状图
    * */
    public void bookCancellationStatistics_z() {

        int orgid = this.getParaToInt("orgid");
        if(orgid == 0) {
            fail(1,"请求参数不完整!");
            return;
        }
        String kssj = this.getPara("kssj");
        String jssj = this.getPara("jssj");
        String reason = this.getPara("reason");
        success(service.bookCancellationStatistics_z(orgid,kssj,jssj,reason));
    }
}
