|
|
|
@ -13,11 +13,13 @@ import com.op.energy.base.utils.ExportExcelUtil;
|
|
|
|
import com.op.energy.base.utils.SpringUtils;
|
|
|
|
import com.op.energy.base.utils.SpringUtils;
|
|
|
|
import com.op.energy.report.domain.ExportReport;
|
|
|
|
import com.op.energy.report.domain.ExportReport;
|
|
|
|
import com.op.energy.report.domain.ReportOrderEnergyDTO;
|
|
|
|
import com.op.energy.report.domain.ReportOrderEnergyDTO;
|
|
|
|
|
|
|
|
import com.op.energy.report.domain.ReportPointDnb;
|
|
|
|
import com.op.energy.report.service.IDataAnalysisService;
|
|
|
|
import com.op.energy.report.service.IDataAnalysisService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -280,4 +282,24 @@ public class dataAnalysisController extends BaseController {
|
|
|
|
util.exportExcel(response, orderEnergyList, "单耗统计数据");
|
|
|
|
util.exportExcel(response, orderEnergyList, "单耗统计数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 能耗补录模版
|
|
|
|
|
|
|
|
* **/
|
|
|
|
|
|
|
|
@PostMapping("/energyTemplate")
|
|
|
|
|
|
|
|
public void energyTemplate(HttpServletResponse response) {
|
|
|
|
|
|
|
|
ExcelUtil<ReportPointDnb> util = new ExcelUtil<>(ReportPointDnb.class);
|
|
|
|
|
|
|
|
util.importTemplateExcel(response, "能耗补录-导入模板");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 能耗补录
|
|
|
|
|
|
|
|
* **/
|
|
|
|
|
|
|
|
@PostMapping("/energyImport")
|
|
|
|
|
|
|
|
public AjaxResult energyImport(MultipartFile file) throws Exception {
|
|
|
|
|
|
|
|
ExcelUtil<ReportPointDnb> util = new ExcelUtil<>(ReportPointDnb.class);
|
|
|
|
|
|
|
|
List<ReportPointDnb> list = util.importExcel(file.getInputStream());
|
|
|
|
|
|
|
|
return AjaxResult.success(dataAnalysisService.importReportPointDnb(list));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|