package com.controller.report;

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

@ControllerInterface(path="/comprehensiveStatistics")
public class ComprehensiveStatisticsController extends BaseController {
    ComprehensiveStatisticsService service = ComprehensiveStatisticsService.me;

    /**
     * 基本统计
     */
    public void basicStatistics() {
        int orgid = this.getParaToInt("orgid");
        if(orgid == 0) {
            fail(1,"请求参数不完整!");
            return;
        }
        success(service.basicStatistics(orgid));
    }
    public void briefingToday() {
        int orgid = this.getParaToInt("orgid");
        if(orgid == 0) {
            fail(1,"请求参数不完整!");
            return;
        }
        success(service.briefingToday(orgid));
    }
    public void circulationStatistics() {
        int orgid = this.getParaToInt("orgid");
        String kssj = this.getPara("kssj");
        String jssj = this.getPara("jssj");
        if(orgid == 0) {
            fail(1,"请求参数不完整!");
            return;
        }
        success(service.circulationStatistics(orgid,kssj,jssj));
    }

}
