package com.nantian.cloud.jljc.service;

import com.nantian.cloud.jljc.entity.TDualcontrolProgress;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nantian.cloud.jljc.entity.TDualcontrolProgressLog;
import com.nantian.sc.cloud.common.security.service.ScUser;
import io.swagger.models.auth.In;

import java.text.DecimalFormat;
import java.util.List;
import java.util.Map;

/**
 * 能耗双控-完成情况填报 服务类
 */
public interface TDualcontrolProgressService extends IService<TDualcontrolProgress> {

    TDualcontrolProgressLog getLogById(Long id);

    //新增或修改完成情况
    int saveOrUpdateProgress(TDualcontrolProgress progress, ScUser u, DecimalFormat df);

    //四个季度已填，系统计算整个年度的值
    TDualcontrolProgress getProgressByQuarter(TDualcontrolProgress progress);

    //本级及下级的完成情况查看
    List<TDualcontrolProgress> listByIndex(TDualcontrolProgress progress);

    //州市、区县获取合计值
    TDualcontrolProgress sumByIndex(TDualcontrolProgress progress);

    Map<String,Object> visualizationList(String type, String planYear, String year, String quarter, String region) throws InterruptedException;
}
