package com.ruoyi.project.production.service.impl;

import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;
import java.util.List;

import com.ruoyi.project.production.controller.vo.DailyAnalysisDataVO;
import com.ruoyi.project.production.mapper.TMonthlyProductionReportMapper;
import com.ruoyi.project.production.service.impl.thread.SyncAfterDailyUpdateThread;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.production.mapper.TDailyProductionReportMapper;
import com.ruoyi.project.production.domain.TDailyProductionReport;
import com.ruoyi.project.production.service.ITDailyProductionReportService;
import org.springframework.web.multipart.MultipartFile;

/**
 * 每日生产报告Service业务层处理
 *
 * @author ruoyi
 * @date 2022-08-23
 */
@Service
public class TDailyProductionReportServiceImpl implements ITDailyProductionReportService {

    @Autowired
    private TDailyProductionReportMapper tDailyProductionReportMapper;

    @Autowired
    private TMonthlyProductionReportMapper tMonthlyProductionReportMapper;

    /**
     * 查询日期最新的每日生产报告
     *
     * @return 每日生产报告
     */
    @Override
    public TDailyProductionReport selectTDailyProductionReportByMaxDate() {
        return tDailyProductionReportMapper.selectTDailyProductionReportByMaxDate();
    }

    /**
     * 查询每日生产报告
     *
     * @param id 每日生产报告ID
     * @return 每日生产报告
     */
    @Override
    public TDailyProductionReport selectTDailyProductionReportById(Long id) {
        return tDailyProductionReportMapper.selectTDailyProductionReportById(id);
    }

    /**
     * 查询每日生产报告列表
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 每日生产报告
     */
    @Override
    public List<TDailyProductionReport> selectTDailyProductionReportList(TDailyProductionReport tDailyProductionReport) {
        return tDailyProductionReportMapper.selectTDailyProductionReportList(tDailyProductionReport);
    }

    /**
     * 查询每日生产报告列表
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 每日生产报告
     */
    @Override
    public List<TDailyProductionReport> selectTDailyProductionReportListMonthly(TDailyProductionReport tDailyProductionReport) {
        return tDailyProductionReportMapper.selectTDailyProductionReportListMonthly(tDailyProductionReport);
    }

    /**
     * 新增每日生产报告
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 结果
     */
    @Override
    public int insertTDailyProductionReport(TDailyProductionReport tDailyProductionReport) {
        return tDailyProductionReportMapper.insertTDailyProductionReport(tDailyProductionReport);
    }

    /**
     * 修改每日生产报告
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 结果
     */
    @Override
    public int updateTDailyProductionReport(TDailyProductionReport tDailyProductionReport) {
        int result = tDailyProductionReportMapper.updateTDailyProductionReport(tDailyProductionReport);
        if (result > 0) {
            // 同步更新月报数据
            SyncAfterDailyUpdateThread syncAfterDailyUpdateThread = new SyncAfterDailyUpdateThread(
                    tDailyProductionReport.getReportDate(),
                    this.tDailyProductionReportMapper,
                    this.tMonthlyProductionReportMapper
            );
            syncAfterDailyUpdateThread.run();
        }
        return result;
    }

    /**
     * 批量删除每日生产报告
     *
     * @param ids 需要删除的每日生产报告ID
     * @return 结果
     */
    @Override
    public int deleteTDailyProductionReportByIds(Long[] ids) {
        return tDailyProductionReportMapper.deleteTDailyProductionReportByIds(ids);
    }

    /**
     * 删除每日生产报告信息
     *
     * @param id 每日生产报告ID
     * @return 结果
     */
    @Override
    public int deleteTDailyProductionReportById(Long id) {
        return tDailyProductionReportMapper.deleteTDailyProductionReportById(id);
    }

    /**
     * 小数四舍五入
     *
     * @param raw 原始数据
     * @param scale 精确到小数点后几位
     * @return
     */
    private String roundDecimal(String raw, int scale) {
        if (raw.trim().equals("")) {
            return "";
        }
        return new BigDecimal(raw)
                .setScale(scale + 3, RoundingMode.HALF_EVEN)
                .toString();
    }

    /**
     * 百分比四舍五入
     *
     * @param raw 原始数据
     * @param scale 精确到小数点后几位
     * @return
     */
    private String roundPercentage(String raw, int scale) {
        if (raw.trim().equals("")) {
            return "";
        }
        return new BigDecimal(raw)
                .multiply(new BigDecimal("100"))
                .setScale(scale + 3, RoundingMode.HALF_EVEN)
                .toString() + "%";
    }

    /**
     * 导入每日生产报告数据
     *
     * @param file 用户上传的文件
     * @return 结果
     */
    @Override
    public String importData(MultipartFile file) throws IOException {
        // 用户提示信息
        String message = "";
        try {
            // 获取用户上传的excel
            Workbook wb = WorkbookFactory.create(file.getInputStream());
            // 获取第一个sheet
            Sheet sheet = wb.getSheetAt(0);
            // 用户上传的生产日报
            TDailyProductionReport tDailyProductionReport = new TDailyProductionReport();
            // rowIndex = 1
            tDailyProductionReport.setFromDate(this.getCellDataDate(sheet, 1, 10));
            // rowIndex = 2
            tDailyProductionReport.setToDate(this.getCellDataDate(sheet, 1, 12));
            tDailyProductionReport.setReportDate(this.getCellDataDate(sheet, 2, 21));
            // rowIndex = 4
            tDailyProductionReport.setNap(this.roundDecimal(this.getCellDataString(sheet, 4, 0), 0));
            // rowIndex = 5
            tDailyProductionReport.setH2YieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 5, 6), 2));
            tDailyProductionReport.setH2Produced(this.roundDecimal(this.getCellDataString(sheet, 5, 7), 0));
            tDailyProductionReport.setH2Inventory(this.roundDecimal(this.getCellDataString(sheet, 5, 8), 0));
            tDailyProductionReport.setH2Change(this.roundDecimal(this.getCellDataString(sheet, 5, 9), 0));
            tDailyProductionReport.setH2Import(this.roundDecimal(this.getCellDataString(sheet, 5, 10), 0));
            tDailyProductionReport.setH2Export(this.roundDecimal(this.getCellDataString(sheet, 5, 11), 0));
            tDailyProductionReport.setH2ToPgu(this.roundDecimal(this.getCellDataString(sheet, 5, 12), 0));
            tDailyProductionReport.setH2ToYpc(this.roundDecimal(this.getCellDataString(sheet, 5, 13), 0));
            tDailyProductionReport.setH2ToOxo(this.roundDecimal(this.getCellDataString(sheet, 5, 14), 0));
            tDailyProductionReport.setH2FrSyngasToSub(this.roundDecimal(this.getCellDataString(sheet, 5, 15), 0));
            // rowIndex = 6
            tDailyProductionReport.setC5(this.roundDecimal(this.getCellDataString(sheet, 6, 0), 0));
            // rowIndex = 7
            tDailyProductionReport.setEthylenYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 7, 6), 2));
            tDailyProductionReport.setEthylenProduced(this.roundDecimal(this.getCellDataString(sheet, 7, 7), 0));
            tDailyProductionReport.setEthylenInventory(this.roundDecimal(this.getCellDataString(sheet, 7, 8), 0));
            tDailyProductionReport.setEthylenChange(this.roundDecimal(this.getCellDataString(sheet, 7, 9), 0));
            tDailyProductionReport.setEthylenImport(this.roundDecimal(this.getCellDataString(sheet, 7, 10), 0));
            tDailyProductionReport.setEthylenExport(this.roundDecimal(this.getCellDataString(sheet, 7, 11), 0));
            tDailyProductionReport.setEthylenToTm(this.roundDecimal(this.getCellDataString(sheet, 7, 12), 0));
            tDailyProductionReport.setEthylenToTs(this.roundDecimal(this.getCellDataString(sheet, 7, 13), 0));
            tDailyProductionReport.setEthylenToEoEg(this.roundDecimal(this.getCellDataString(sheet, 7, 14), 0));
            tDailyProductionReport.setEthylenToOxo(this.roundDecimal(this.getCellDataString(sheet, 7, 15), 0));
            tDailyProductionReport.setEthylenToYbs(this.roundDecimal(this.getCellDataString(sheet, 7, 16), 0));
            tDailyProductionReport.setEthylenToYpc(this.roundDecimal(this.getCellDataString(sheet, 7, 17), 0));
            tDailyProductionReport.setEthylenToWacker(this.roundDecimal(this.getCellDataString(sheet, 7, 18), 0));
            tDailyProductionReport.setEthylenToDyna(this.roundDecimal(this.getCellDataString(sheet, 7, 19), 0));
            tDailyProductionReport.setEthylenToCelanLongx(this.roundDecimal(this.getCellDataString(sheet, 7, 20), 0));
            tDailyProductionReport.setEthylenFrYpc(this.roundDecimal(this.getCellDataString(sheet, 7, 21), 0));
            tDailyProductionReport.setEthylenFrLongxiang(this.roundDecimal(this.getCellDataString(sheet, 7, 22), 0));
            // rowIndex = 8
            tDailyProductionReport.setC6C8Na(this.roundDecimal(this.getCellDataString(sheet, 8, 0), 0));
            // rowIndex = 9
            tDailyProductionReport.setPropyleneYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 9, 6), 2));
            tDailyProductionReport.setPropyleneProduced(this.roundDecimal(this.getCellDataString(sheet, 9, 7), 0));
            tDailyProductionReport.setPropyleneInventory(this.roundDecimal(this.getCellDataString(sheet, 9, 8), 0));
            tDailyProductionReport.setPropyleneChange(this.roundDecimal(this.getCellDataString(sheet, 9, 9), 0));
            tDailyProductionReport.setPropyleneImport(this.roundDecimal(this.getCellDataString(sheet, 9, 10), 0));
            tDailyProductionReport.setPropyleneExport(this.roundDecimal(this.getCellDataString(sheet, 9, 11), 0));
            tDailyProductionReport.setPropyleneToAaAe(this.roundDecimal(this.getCellDataString(sheet, 9, 12), 0));
            tDailyProductionReport.setPropyleneToGaa(this.roundDecimal(this.getCellDataString(sheet, 9, 13), 0));
            tDailyProductionReport.setPropyleneToOxo(this.roundDecimal(this.getCellDataString(sheet, 9, 14), 0));
            tDailyProductionReport.setPropyleneToLdpe(this.roundDecimal(this.getCellDataString(sheet, 9, 15), 0));
            tDailyProductionReport.setPropyleneToYpc(this.roundDecimal(this.getCellDataString(sheet, 9, 16), 0));
            tDailyProductionReport.setPropyleneToRoad(this.roundDecimal(this.getCellDataString(sheet, 9, 17), 0));
            tDailyProductionReport.setPropyleneToShip(this.roundDecimal(this.getCellDataString(sheet, 9, 18), 0));
            tDailyProductionReport.setPropyleneFrYpc(this.roundDecimal(this.getCellDataString(sheet, 9, 19), 0));
            tDailyProductionReport.setPropyleneFrShip(this.roundDecimal(this.getCellDataString(sheet, 9, 20), 0));
            tDailyProductionReport.setPropyleneFrChengzhi(this.roundDecimal(this.getCellDataString(sheet, 9, 21), 0));
            // rowIndex = 10
            tDailyProductionReport.setWisonEthane(this.roundDecimal(this.getCellDataString(sheet, 10, 0), 0));
            tDailyProductionReport.setC3LpgYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 10, 6), 2));
            tDailyProductionReport.setC3LpgProduced(this.roundDecimal(this.getCellDataString(sheet, 10, 7), 0));
            // rowIndex = 11
            tDailyProductionReport.setC4LpgYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 11, 6), 2));
            tDailyProductionReport.setC4LpgProduced(this.roundDecimal(this.getCellDataString(sheet, 11, 7), 0));
            tDailyProductionReport.setC3C4Inventory(this.roundDecimal(this.getCellDataString(sheet, 11, 8), 0));
            tDailyProductionReport.setC3C4Change(this.roundDecimal(this.getCellDataString(sheet, 11, 9), 0));
            tDailyProductionReport.setC3C4Import(this.roundDecimal(this.getCellDataString(sheet, 11, 10), 0));
            tDailyProductionReport.setC3C4Export(this.roundDecimal(this.getCellDataString(sheet, 11, 11), 0));
            tDailyProductionReport.setC3C4ToSub(this.roundDecimal(this.getCellDataString(sheet, 11, 12), 0));
            tDailyProductionReport.setC3C4ToFurAsFule(this.roundDecimal(this.getCellDataString(sheet, 11, 13), 0));
            tDailyProductionReport.setC3C4AsFeed(this.roundDecimal(this.getCellDataString(sheet, 11, 14), 0));
            tDailyProductionReport.setC3C4FrYpc(this.roundDecimal(this.getCellDataString(sheet, 11, 15), 0));
            tDailyProductionReport.setC3C4FrTruck(this.roundDecimal(this.getCellDataString(sheet, 11, 16), 0));
            // rowIndex = 12
            tDailyProductionReport.setLpgToFurnace(this.roundDecimal(this.getCellDataString(sheet, 12, 0), 0));
            // rowIndex = 13
            tDailyProductionReport.setMixedC4sYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 13, 6), 2));
            tDailyProductionReport.setMixedC4sProduced(this.roundDecimal(this.getCellDataString(sheet, 13, 7), 0));
            tDailyProductionReport.setMixedC4sInventory(this.roundDecimal(this.getCellDataString(sheet, 13, 8), 0));
            tDailyProductionReport.setMixedC4sChange(this.roundDecimal(this.getCellDataString(sheet, 13, 9), 0));
            tDailyProductionReport.setMixedC4sImport(this.roundDecimal(this.getCellDataString(sheet, 13, 10), 0));
            tDailyProductionReport.setMixedC4sExport(this.roundDecimal(this.getCellDataString(sheet, 13, 11), 0));
            tDailyProductionReport.setMixedC4sToBd(this.roundDecimal(this.getCellDataString(sheet, 13, 12), 0));
            tDailyProductionReport.setMixedC4sToYpc(this.roundDecimal(this.getCellDataString(sheet, 13, 13), 0));
            tDailyProductionReport.setMixedC4sToTruck(this.roundDecimal(this.getCellDataString(sheet, 13, 14), 0));
            tDailyProductionReport.setMixedC4sToShip(this.roundDecimal(this.getCellDataString(sheet, 13, 15), 0));
            tDailyProductionReport.setMixedC4sFrYpc(this.roundDecimal(this.getCellDataString(sheet, 13, 16), 0));
            tDailyProductionReport.setMixedC4sFrTruck(this.roundDecimal(this.getCellDataString(sheet, 13, 17), 0));
            tDailyProductionReport.setMixedC4sFrShip(this.roundDecimal(this.getCellDataString(sheet, 13, 18), 0));
            tDailyProductionReport.setMixedC4sFrBdR1(this.roundDecimal(this.getCellDataString(sheet, 13, 19), 0));
            tDailyProductionReport.setMixedC4sToR800(this.roundDecimal(this.getCellDataString(sheet, 13, 20), 0));
            // rowIndex = 14
            tDailyProductionReport.setRaff1FrBd(this.roundDecimal(this.getCellDataString(sheet, 14, 0), 0));
            // rowIndex = 15
            tDailyProductionReport.setEboYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 15, 6), 2));
            tDailyProductionReport.setEboProduced(this.roundDecimal(this.getCellDataString(sheet, 15, 7), 0));
            tDailyProductionReport.setEboInventory(this.roundDecimal(this.getCellDataString(sheet, 15, 8), 0));
            tDailyProductionReport.setEboChange(this.roundDecimal(this.getCellDataString(sheet, 15, 9), 0));
            tDailyProductionReport.setEboImport(this.roundDecimal(this.getCellDataString(sheet, 15, 10), 0));
            tDailyProductionReport.setEboExport(this.roundDecimal(this.getCellDataString(sheet, 15, 11), 0));
            tDailyProductionReport.setEboToShip(this.roundDecimal(this.getCellDataString(sheet, 15, 12), 0));
            tDailyProductionReport.setEboToRttf(this.roundDecimal(this.getCellDataString(sheet, 15, 13), 0));
            tDailyProductionReport.setEboToTrain(this.roundDecimal(this.getCellDataString(sheet, 15, 14), 0));
            tDailyProductionReport.setEboFrBd(this.roundDecimal(this.getCellDataString(sheet, 15, 15), 0));
            // rowIndex = 16
            tDailyProductionReport.setRaff2FrIb(this.roundDecimal(this.getCellDataString(sheet, 16, 0), 0));
            // rowIndex = 17
            tDailyProductionReport.setNaphthaleneYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 17, 6), 2));
            tDailyProductionReport.setNaphthaleneProduced(this.roundDecimal(this.getCellDataString(sheet, 17, 7), 0));
            tDailyProductionReport.setNaphthaleneInventory(this.roundDecimal(this.getCellDataString(sheet, 17, 8), 0));
            tDailyProductionReport.setNaphthaleneChange(this.roundDecimal(this.getCellDataString(sheet, 17, 9), 0));
            tDailyProductionReport.setNaphthaleneImport(this.roundDecimal(this.getCellDataString(sheet, 17, 10), 0));
            tDailyProductionReport.setNaphthaleneExport(this.roundDecimal(this.getCellDataString(sheet, 17, 11), 0));
            tDailyProductionReport.setNaphthaleneToTruck(this.roundDecimal(this.getCellDataString(sheet, 17, 12), 0));
            // rowIndex = 18
            tDailyProductionReport.setRaff3FrBd(this.roundDecimal(this.getCellDataString(sheet, 18, 0), 0));
            tDailyProductionReport.setAeuBenzeneToShip(this.roundDecimal(this.getCellDataString(sheet, 18, 20), 0));
            tDailyProductionReport.setAeuBenzeneFrShip(this.roundDecimal(this.getCellDataString(sheet, 18, 21), 0));
            // rowIndex = 19
            tDailyProductionReport.setPoFluxOilYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 19, 6), 2));
            tDailyProductionReport.setPoFluxOilProduced(this.roundDecimal(this.getCellDataString(sheet, 19, 7), 0));
            tDailyProductionReport.setPoFluxOilInventory(this.roundDecimal(this.getCellDataString(sheet, 19, 8), 0));
            tDailyProductionReport.setPoFluxOilChange(this.roundDecimal(this.getCellDataString(sheet, 19, 9), 0));
            tDailyProductionReport.setPoFluxOilImport(this.roundDecimal(this.getCellDataString(sheet, 19, 10), 0));
            tDailyProductionReport.setPoFluxOilExport(this.roundDecimal(this.getCellDataString(sheet, 19, 11), 0));
            tDailyProductionReport.setPoFluxOilToBd(this.roundDecimal(this.getCellDataString(sheet, 19, 12), 0));
            tDailyProductionReport.setOffgasToGaaCaa(this.roundDecimal(this.getCellDataString(sheet, 19, 18), 0));
            // rowIndex = 20
            tDailyProductionReport.setRaffinate2pFr2ph(this.roundDecimal(this.getCellDataString(sheet, 20, 0), 0));
            tDailyProductionReport.setAeuBenzeneToYbs(this.roundDecimal(this.getCellDataString(sheet, 20, 20), 0));
            // rowIndex = 21
            tDailyProductionReport.setOffgasYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 21, 6), 2));
            tDailyProductionReport.setOffgasProduced(this.roundDecimal(this.getCellDataString(sheet, 21, 7), 0));
            tDailyProductionReport.setOffgasInventory(this.roundDecimal(this.getCellDataString(sheet, 21, 8), 0));
            tDailyProductionReport.setOffgasChange(this.roundDecimal(this.getCellDataString(sheet, 21, 9), 0));
            tDailyProductionReport.setOffgasImport(this.roundDecimal(this.getCellDataString(sheet, 21, 10), 0));
            tDailyProductionReport.setOffgasExport(this.roundDecimal(this.getCellDataString(sheet, 21, 11), 0));
            tDailyProductionReport.setOffgasToFurnance(this.roundDecimal(this.getCellDataString(sheet, 21, 12), 0));
            tDailyProductionReport.setOffgasToYbs(this.roundDecimal(this.getCellDataString(sheet, 21, 13), 0));
            tDailyProductionReport.setOffgasToCEru(this.roundDecimal(this.getCellDataString(sheet, 21, 14), 0));
            tDailyProductionReport.setOffgasSubInCloseU2(this.roundDecimal(this.getCellDataString(sheet, 21, 15), 0));
            tDailyProductionReport.setOffgasFlareSctu(this.roundDecimal(this.getCellDataString(sheet, 21, 16), 0));
            tDailyProductionReport.setOffgasToU2Nm3(this.roundDecimal(this.getCellDataString(sheet, 21, 17), 0));
            tDailyProductionReport.setOffgasFlareLossT(this.roundDecimal(this.getCellDataString(sheet, 21, 18), 0));
            // rowIndex = 22
            tDailyProductionReport.setC2FrLdpe(this.roundDecimal(this.getCellDataString(sheet, 22, 0), 0));
            tDailyProductionReport.setAeuBenzeneToRttf(this.roundDecimal(this.getCellDataString(sheet, 22, 20), 1));
            tDailyProductionReport.setAeuBenzeneToTrain(this.roundDecimal(this.getCellDataString(sheet, 22, 21), 0));
            // rowIndex = 23
            tDailyProductionReport.setRpgYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 23, 6), 2));
            tDailyProductionReport.setRpgProduced(this.roundDecimal(this.getCellDataString(sheet, 23, 7), 0));
            tDailyProductionReport.setRpgInventory(this.roundDecimal(this.getCellDataString(sheet, 23, 8), 0));
            tDailyProductionReport.setRpgChange(this.roundDecimal(this.getCellDataString(sheet, 23, 9), 0));
            tDailyProductionReport.setRpgImport(this.roundDecimal(this.getCellDataString(sheet, 23, 10), 0));
            tDailyProductionReport.setRpgExport(this.roundDecimal(this.getCellDataString(sheet, 23, 11), 0));
            tDailyProductionReport.setRpgToPgu(this.roundDecimal(this.getCellDataString(sheet, 23, 12), 0));
            tDailyProductionReport.setRpgFrYfcc(this.roundDecimal(this.getCellDataString(sheet, 23, 13), 0));
            // rowIndex = 24
            tDailyProductionReport.setC3FrOxo(this.roundDecimal(this.getCellDataString(sheet, 24, 0), 0));
            // rowIndex = 25
            tDailyProductionReport.setMethaneYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 25, 6), 2));
            tDailyProductionReport.setMethaneProduced(this.roundDecimal(this.getCellDataString(sheet, 25, 7), 3));
            tDailyProductionReport.setMethaneToEoEg(this.roundDecimal(this.getCellDataString(sheet, 25, 8), 0));
            tDailyProductionReport.setAeuTolueneToShip(this.roundDecimal(this.getCellDataString(sheet, 25, 20), 0));
            tDailyProductionReport.setAeuTolueneFrShip(this.roundDecimal(this.getCellDataString(sheet, 25, 21), 0));
            // rowIndex = 26
            tDailyProductionReport.setMixedC3C4(this.roundDecimal(this.getCellDataString(sheet, 26, 0), 0));
            tDailyProductionReport.setAeuBenzeneYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 26, 17), 0));
            tDailyProductionReport.setAeuBenzeneInventory(this.roundDecimal(this.getCellDataString(sheet, 26, 18), 0));
            // rowIndex = 27
            tDailyProductionReport.setResidueOilYieldPercentage(this.roundPercentage(this.getCellDataString(sheet, 27, 6), 2));
            tDailyProductionReport.setResidueOilProduced(this.roundDecimal(this.getCellDataString(sheet, 27, 7), 0));
            tDailyProductionReport.setAeuBenzeneProduced(this.roundDecimal(this.getCellDataString(sheet, 27, 17), 0));
            tDailyProductionReport.setAeuBenzeneChange(this.roundDecimal(this.getCellDataString(sheet, 27, 18), 0));
            tDailyProductionReport.setAeuTolueneToYpc(this.roundDecimal(this.getCellDataString(sheet, 27, 20), 0));
            tDailyProductionReport.setAeuTolueneFrYpc(this.roundDecimal(this.getCellDataString(sheet, 27, 21), 2));
            // rowIndex = 28
            tDailyProductionReport.setHyC9(this.roundDecimal(this.getCellDataString(sheet, 28, 0), 0));
            tDailyProductionReport.setAeuTolueneYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 28, 17), 0));
            tDailyProductionReport.setAeuTolueneInventory(this.roundDecimal(this.getCellDataString(sheet, 28, 18), 0));
            // rowIndex = 29
            tDailyProductionReport.setAeuTolueneProduced(this.roundDecimal(this.getCellDataString(sheet, 29, 17), 0));
            tDailyProductionReport.setAeuTolueneChange(this.roundDecimal(this.getCellDataString(sheet, 29, 18), 0));
            tDailyProductionReport.setAeuTolueneToRttf(this.roundDecimal(this.getCellDataString(sheet, 29, 20), 0));
            tDailyProductionReport.setAeuTolueneFrYbs(this.roundDecimal(this.getCellDataString(sheet, 29, 21), 0));
            // rowIndex = 30
            tDailyProductionReport.setPguOffgas(this.roundDecimal(this.getCellDataString(sheet, 30, 0), 0));
            tDailyProductionReport.setPguAeuTH(this.roundDecimal(this.getCellDataString(sheet, 30, 13), 0));
            tDailyProductionReport.setAeuXyleneYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 30, 17), 0));
            tDailyProductionReport.setAeuXyleneInventory(this.roundDecimal(this.getCellDataString(sheet, 30, 18), 0));
            // rowIndex = 31
            tDailyProductionReport.setAeuXyleneProduced(this.roundDecimal(this.getCellDataString(sheet, 31, 17), 0));
            tDailyProductionReport.setAeuXyleneChange(this.roundDecimal(this.getCellDataString(sheet, 31, 18), 0));
            tDailyProductionReport.setAeuTolueneToEu(this.roundDecimal(this.getCellDataString(sheet, 31, 20), 0));
            // rowIndex = 32
            tDailyProductionReport.setWashOil(this.roundDecimal(this.getCellDataString(sheet, 32, 0), 0));
            tDailyProductionReport.setPguToAeu(this.roundDecimal(this.getCellDataString(sheet, 32, 13), 0));
            tDailyProductionReport.setAeuC6C8NaYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 32, 17), 1));
            tDailyProductionReport.setAeuC6C8NaInventory(this.roundDecimal(this.getCellDataString(sheet, 32, 18), 0));
            // rowIndex = 33
            tDailyProductionReport.setPguRpgTH(this.roundDecimal(this.getCellDataString(sheet, 33, 6), 0));
            tDailyProductionReport.setPguBtxYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 33, 10), 2));
            tDailyProductionReport.setPguBtxInventory(this.roundDecimal(this.getCellDataString(sheet, 33, 11), 0));
            tDailyProductionReport.setPguBtxExport(this.roundDecimal(this.getCellDataString(sheet, 33, 12), 0));
            tDailyProductionReport.setAeuC6C8NaProduced(this.roundDecimal(this.getCellDataString(sheet, 33, 17), 0));
            tDailyProductionReport.setAeuC6C8NaChange(this.roundDecimal(this.getCellDataString(sheet, 33, 18), 0));
            // rowIndex = 34
            tDailyProductionReport.setToluene(this.roundDecimal(this.getCellDataString(sheet, 34, 0), 0));
            tDailyProductionReport.setRpgToPgu2(this.roundDecimal(this.getCellDataString(sheet, 34, 6), 0));
            tDailyProductionReport.setPguBtxProduced(this.roundDecimal(this.getCellDataString(sheet, 34, 10), 0));
            tDailyProductionReport.setPguBtxChange(this.roundDecimal(this.getCellDataString(sheet, 34, 11), 0));
            tDailyProductionReport.setPguBtxToAeu(this.roundDecimal(this.getCellDataString(sheet, 34, 12), 0));
            tDailyProductionReport.setAeuToPgu(this.roundPercentage(this.getCellDataString(sheet, 34, 13), 2));
            tDailyProductionReport.setAeuXyleneToShip(this.roundDecimal(this.getCellDataString(sheet, 34, 20), 0));
            tDailyProductionReport.setAeuXyleneFrShip(this.roundDecimal(this.getCellDataString(sheet, 34, 21), 0));
            // rowIndex = 35
            tDailyProductionReport.setPguRpg1(this.roundDecimal(this.getCellDataString(sheet, 35, 5), 0));
            // rowIndex = 36
            tDailyProductionReport.setHyC4FrR800(this.roundDecimal(this.getCellDataString(sheet, 36, 0), 0));
            tDailyProductionReport.setPguRpg2(this.roundDecimal(this.getCellDataString(sheet, 36, 5), 0));
            tDailyProductionReport.setPguToRpg(this.roundDecimal(this.getCellDataString(sheet, 36, 6), 0));
            tDailyProductionReport.setAeuTotalFeed(this.roundDecimal(this.getCellDataString(sheet, 36, 17), 0));
            tDailyProductionReport.setPguAeuTotalFeed(this.roundDecimal(this.getCellDataString(sheet, 36, 18), 0));
            tDailyProductionReport.setAeuXyleneToYpc(this.roundDecimal(this.getCellDataString(sheet, 36, 20), 0));
            tDailyProductionReport.setAeuXyleneFrYpc(this.roundDecimal(this.getCellDataString(sheet, 36, 21), 0));
            // rowIndex = 37
            tDailyProductionReport.setPguWashoilYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 37, 10), 2));
            tDailyProductionReport.setPguWashoilInventory(this.roundDecimal(this.getCellDataString(sheet, 37, 11), 0));
            tDailyProductionReport.setAeuOutput(this.roundDecimal(this.getCellDataString(sheet, 37, 17), 0));
            tDailyProductionReport.setPguAeuOutput(this.roundDecimal(this.getCellDataString(sheet, 37, 18), 0));
            // rowIndex = 38
            tDailyProductionReport.setTotalInput(this.roundDecimal(this.getCellDataString(sheet, 38, 2), 0));
            tDailyProductionReport.setPguWashoilProduced(this.roundDecimal(this.getCellDataString(sheet, 38, 10), 0));
            tDailyProductionReport.setPguWashoilChange(this.roundDecimal(this.getCellDataString(sheet, 38, 11), 0));
            tDailyProductionReport.setPguWashoilToEu(this.roundDecimal(this.getCellDataString(sheet, 38, 12), 0));
            tDailyProductionReport.setAeuTotalLoss(this.roundDecimal(this.getCellDataString(sheet, 38, 17), 1));
            tDailyProductionReport.setPguAeuTotalLoss(this.roundDecimal(this.getCellDataString(sheet, 38, 18), 1));
            tDailyProductionReport.setAeuXyleneToRttf(this.roundDecimal(this.getCellDataString(sheet, 38, 20), 2));
            // rowIndex = 39
            tDailyProductionReport.setTotalOutput(this.roundDecimal(this.getCellDataString(sheet, 39, 2), 0));
            tDailyProductionReport.setPguH2(this.roundDecimal(this.getCellDataString(sheet, 39, 5), 0));
            tDailyProductionReport.setPguOffgasYeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 39, 10), 2));
            tDailyProductionReport.setPguOffgasInventory(this.roundDecimal(this.getCellDataString(sheet, 39, 11), 0));
            tDailyProductionReport.setAeuLossPercentage(this.roundDecimal(this.getCellDataString(sheet, 39, 17), 2));
            tDailyProductionReport.setPguAeuLossPercentage(this.roundDecimal(this.getCellDataString(sheet, 39, 18), 2));
            // rowIndex = 40
            String totalLoss = this.roundDecimal(this.getCellDataString(sheet, 40, 2), 0);
//            if (totalLoss.indexOf("-") != -1) {
//                totalLoss = totalLoss.substring(1);
//            }
            tDailyProductionReport.setTotalLoss(totalLoss);
            tDailyProductionReport.setPguOffgasProduced(this.roundDecimal(this.getCellDataString(sheet, 40, 10), 0));
            tDailyProductionReport.setPguOffgasChange(this.roundDecimal(this.getCellDataString(sheet, 40, 11), 0));
            tDailyProductionReport.setPguOffgasToEu(this.roundDecimal(this.getCellDataString(sheet, 40, 12), 0));
            tDailyProductionReport.setAeuFeedLoadPercentage(this.roundPercentage(this.getCellDataString(sheet, 40, 17), 2));
            tDailyProductionReport.setPguAeuFeedLoadPercentage(this.roundPercentage(this.getCellDataString(sheet, 40, 18), 2));
            // rowIndex = 41
            String lossPercentage = this.roundDecimal(this.getCellDataString(sheet, 41, 2), 3);
//            if (lossPercentage.indexOf("-") != -1) {
//                lossPercentage = lossPercentage.substring(1);
//            }
            tDailyProductionReport.setLossPercentage(lossPercentage);
            tDailyProductionReport.setPguTotalFeed(this.roundDecimal(this.getCellDataString(sheet, 41, 6), 0));
            tDailyProductionReport.setPguC5YeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 41, 10), 2));
            tDailyProductionReport.setPguC5Export(this.roundDecimal(this.getCellDataString(sheet, 41, 12), 0));
            tDailyProductionReport.setAeuC6C8NaToEu(this.roundDecimal(this.getCellDataString(sheet, 41, 20), 0));
            tDailyProductionReport.setAeuC6C8NaToYpc(this.roundDecimal(this.getCellDataString(sheet, 41, 21), 0));
            // rowIndex = 42
            tDailyProductionReport.setTotalFurnanceFeed(this.roundDecimal(this.getCellDataString(sheet, 42, 2), 0));
            tDailyProductionReport.setPguOutput(this.roundDecimal(this.getCellDataString(sheet, 42, 6), 0));
            tDailyProductionReport.setPguC5Produced(this.roundDecimal(this.getCellDataString(sheet, 42, 10), 0));
            tDailyProductionReport.setPguC5RaffInput(this.roundDecimal(this.getCellDataString(sheet, 42, 11), 0));
            tDailyProductionReport.setPguC5ToAeu(this.roundDecimal(this.getCellDataString(sheet, 42, 12), 0));
            tDailyProductionReport.setPguC5ToEu(this.roundDecimal(this.getCellDataString(sheet, 42, 13), 0));
            tDailyProductionReport.setPguC5ToYuanguan(this.roundDecimal(this.getCellDataString(sheet, 42, 14), 0));
            // rowIndex = 43
            tDailyProductionReport.setNapFrCltf(this.roundDecimal(this.getCellDataString(sheet, 43, 2), 0));
            tDailyProductionReport.setPguTotalLoss(this.roundDecimal(this.getCellDataString(sheet, 43, 6), 0));
            tDailyProductionReport.setPguC9YeildPercentage(this.roundDecimal(this.getCellDataString(sheet, 43, 10), 2));
            tDailyProductionReport.setPguC9Inventory(this.roundPercentage(this.getCellDataString(sheet, 43, 11), 2));
            tDailyProductionReport.setPguC9Export(this.roundDecimal(this.getCellDataString(sheet, 43, 12), 0));
            // rowIndex = 44
            tDailyProductionReport.setTotalPE(this.roundDecimal(this.getCellDataString(sheet, 44, 2), 3));
            tDailyProductionReport.setPguLossPercentage(this.roundDecimal(this.getCellDataString(sheet, 44, 6), 2));
            tDailyProductionReport.setPguC9Produced(this.roundDecimal(this.getCellDataString(sheet, 44, 10), 0));
            tDailyProductionReport.setPguC9Change(this.roundDecimal(this.getCellDataString(sheet, 44, 11), 0));
            tDailyProductionReport.setPguC9ToAeu(this.roundDecimal(this.getCellDataString(sheet, 44, 12), 0));
            tDailyProductionReport.setPguC9ToRttf(this.roundDecimal(this.getCellDataString(sheet, 44, 13), 0));
            tDailyProductionReport.setPguC9ToShip(this.roundDecimal(this.getCellDataString(sheet, 44, 14), 0));
            tDailyProductionReport.setPguC9ToYfcc(this.roundDecimal(this.getCellDataString(sheet, 44, 15), 0));
            // rowIndex = 45
            tDailyProductionReport.setPlantModeIs(this.getCellDataString(sheet, 45, 2));
            tDailyProductionReport.setPguFeedLoadPercentage(this.roundPercentage(this.getCellDataString(sheet, 45, 6), 2));
            // rowIndex = 46
            tDailyProductionReport.setPlantLoad3495tD(this.roundPercentage(this.getCellDataString(sheet, 46, 2), 2));
            // rowIndex = 47
            tDailyProductionReport.setAvgFurnanceFeedTH(this.roundDecimal(this.getCellDataString(sheet, 47, 2), 0));
            // rowIndex = 48
            tDailyProductionReport.setFeedingRatioPercentage(this.roundPercentage(this.getCellDataString(sheet, 48, 2), 2));
            // rowIndex = 50
            tDailyProductionReport.setSctfStorageTotalC2(this.roundDecimal(this.getCellDataString(sheet, 50, 16), 3));
            tDailyProductionReport.setSctfStorageTk1061(this.roundDecimal(this.getCellDataString(sheet, 50, 17), 3));
            tDailyProductionReport.setSctfStorageTk1062(this.roundDecimal(this.getCellDataString(sheet, 50, 18), 3));
            tDailyProductionReport.setSctfStorageTk1063(this.roundDecimal(this.getCellDataString(sheet, 50, 19), 3));
            tDailyProductionReport.setSctfStorageTk1064(this.roundDecimal(this.getCellDataString(sheet, 50, 20), 3));
            tDailyProductionReport.setSctfStorageTk1065Off(this.roundDecimal(this.getCellDataString(sheet, 50, 21), 3));
            // rowIndex = 52
            tDailyProductionReport.setHhpToe(this.roundDecimal(this.getCellDataString(sheet, 52, 2), 4));
            tDailyProductionReport.setHhpTce(this.roundDecimal(this.getCellDataString(sheet, 52, 3), 4));
            tDailyProductionReport.setHhpPre(this.roundDecimal(this.getCellDataString(sheet, 52, 4), 4));
            tDailyProductionReport.setHhpCracker(this.roundDecimal(this.getCellDataString(sheet, 52, 5), 0));
            tDailyProductionReport.setHhpCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 52, 6), 3));
            tDailyProductionReport.setHhpCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 52, 7), 1));
            tDailyProductionReport.setHhpCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 52, 8), 1));
            tDailyProductionReport.setHhpPguAeu(this.roundDecimal(this.getCellDataString(sheet, 52, 9), 0));
            tDailyProductionReport.setHhpPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 52, 10), 3));
            tDailyProductionReport.setHhpPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 52, 11), 1));
            tDailyProductionReport.setHhpPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 52, 12), 1));
            tDailyProductionReport.setHhpSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 52, 13), 0));
            tDailyProductionReport.setHhpSub(this.roundDecimal(this.getCellDataString(sheet, 52, 14), 0));
            tDailyProductionReport.setHhpBcc(this.roundDecimal(this.getCellDataString(sheet, 52, 15), 0));
            tDailyProductionReport.setSctfStorageTotalC3(this.roundDecimal(this.getCellDataString(sheet, 52, 16), 3));
            tDailyProductionReport.setSctfStorageTk1011(this.roundDecimal(this.getCellDataString(sheet, 52, 17), 3));
            tDailyProductionReport.setSctfStorageTk1012(this.roundDecimal(this.getCellDataString(sheet, 52, 18), 3));
            tDailyProductionReport.setSctfStorageTk1013(this.roundDecimal(this.getCellDataString(sheet, 52, 19), 3));
            tDailyProductionReport.setSctfStorageTk1014(this.roundDecimal(this.getCellDataString(sheet, 52, 20), 3));
            tDailyProductionReport.setSctfStorageTk1040Off(this.roundDecimal(this.getCellDataString(sheet, 52, 21), 3));
            // rowIndex = 53
            tDailyProductionReport.setNgToe(this.roundDecimal(this.getCellDataString(sheet, 53, 2), 4));
            tDailyProductionReport.setNgTce(this.roundDecimal(this.getCellDataString(sheet, 53, 3), 4));
            tDailyProductionReport.setNgPre(this.roundDecimal(this.getCellDataString(sheet, 53, 4), 4));
            tDailyProductionReport.setNgCracker(this.roundDecimal(this.getCellDataString(sheet, 53, 5), 0));
            tDailyProductionReport.setNgCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 53, 6), 3));
            tDailyProductionReport.setNgCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 53, 7), 1));
            tDailyProductionReport.setNgCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 53, 8), 1));
            tDailyProductionReport.setNgPguAeu(this.roundDecimal(this.getCellDataString(sheet, 53, 9), 0));
            tDailyProductionReport.setNgPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 53, 10), 3));
            tDailyProductionReport.setNgPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 53, 11), 1));
            tDailyProductionReport.setNgPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 53, 12), 1));
            tDailyProductionReport.setNgSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 53, 13), 0));
            tDailyProductionReport.setNgSub(this.roundDecimal(this.getCellDataString(sheet, 53, 14), 2));
            tDailyProductionReport.setNgBcc(this.roundDecimal(this.getCellDataString(sheet, 53, 15), 0));
            // rowIndex = 54
            tDailyProductionReport.setFuelGasOffgasToe(this.roundDecimal(this.getCellDataString(sheet, 54, 2), 4));
            tDailyProductionReport.setFuelGasOffgasTce(this.roundDecimal(this.getCellDataString(sheet, 54, 3), 4));
            tDailyProductionReport.setFuelGasOffgasPre(this.roundDecimal(this.getCellDataString(sheet, 54, 4), 4));
            tDailyProductionReport.setFuelGasOffgasCracker(this.roundDecimal(this.getCellDataString(sheet, 54, 5), 0));
            tDailyProductionReport.setFuelGasOffgasCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 54, 6), 3));
            tDailyProductionReport.setFuelGasOffgasCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 54, 7), 1));
            tDailyProductionReport.setFuelGasOffgasCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 54, 8), 1));
            tDailyProductionReport.setFuelGasOffgasPguAeu(this.roundDecimal(this.getCellDataString(sheet, 54, 9), 0));
            tDailyProductionReport.setFuelGasOffgasPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 54, 10), 3));
            tDailyProductionReport.setFuelGasOffgasPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 54, 11), 1));
            tDailyProductionReport.setFuelGasOffgasPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 54, 12), 1));
            tDailyProductionReport.setFuelGasOffgasSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 54, 13), 0));
            tDailyProductionReport.setFuelGasOffgasSub(this.roundDecimal(this.getCellDataString(sheet, 54, 14), 0));
            tDailyProductionReport.setFuelGasOffgasBcc(this.roundDecimal(this.getCellDataString(sheet, 54, 15), 0));
            tDailyProductionReport.setSctfStorageTk1020Lpg(this.roundDecimal(this.getCellDataString(sheet, 54, 16), 3));
            tDailyProductionReport.setSctfStorageTk1111C4s(this.roundDecimal(this.getCellDataString(sheet, 54, 17), 3));
            tDailyProductionReport.setSctfStorageTk1520Rpg(this.roundDecimal(this.getCellDataString(sheet, 54, 18), 3));
            tDailyProductionReport.setSctfStorageTk1350Po(this.roundDecimal(this.getCellDataString(sheet, 54, 19), 3));
            tDailyProductionReport.setSctfStorageTk1310Btx(this.roundDecimal(this.getCellDataString(sheet, 54, 20), 3));
            tDailyProductionReport.setSctfStorageTk1330Ebo(this.roundDecimal(this.getCellDataString(sheet, 54, 21), 3));
            // rowIndex = 55
            tDailyProductionReport.setShpToe(this.roundDecimal(this.getCellDataString(sheet, 55, 2), 4));
            tDailyProductionReport.setShpTce(this.roundDecimal(this.getCellDataString(sheet, 55, 3), 4));
            tDailyProductionReport.setShpPre(this.roundDecimal(this.getCellDataString(sheet, 55, 4), 4));
            tDailyProductionReport.setShpCracker(this.roundDecimal(this.getCellDataString(sheet, 55, 5), 0));
            tDailyProductionReport.setShpCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 55, 6), 3));
            tDailyProductionReport.setShpCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 55, 7), 1));
            tDailyProductionReport.setShpCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 55, 8), 1));
            tDailyProductionReport.setShpPguAeu(this.roundDecimal(this.getCellDataString(sheet, 55, 9), 0));
            tDailyProductionReport.setShpPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 55, 10), 3));
            tDailyProductionReport.setShpPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 55, 11), 1));
            tDailyProductionReport.setShpPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 55, 12), 1));
            tDailyProductionReport.setShpSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 55, 13), 0));
            tDailyProductionReport.setShpSub(this.roundDecimal(this.getCellDataString(sheet, 55, 14), 0));
            tDailyProductionReport.setShpBcc(this.roundDecimal(this.getCellDataString(sheet, 55, 15), 0));
            // rowIndex = 56
            tDailyProductionReport.setHpToe(this.roundDecimal(this.getCellDataString(sheet, 56, 2), 4));
            tDailyProductionReport.setHpTce(this.roundDecimal(this.getCellDataString(sheet, 56, 3), 4));
            tDailyProductionReport.setHpPre(this.roundDecimal(this.getCellDataString(sheet, 56, 4), 4));
            tDailyProductionReport.setHpCracker(this.roundDecimal(this.getCellDataString(sheet, 56, 5), 0));
            tDailyProductionReport.setHpCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 56, 6), 3));
            tDailyProductionReport.setHpCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 56, 7), 1));
            tDailyProductionReport.setHpCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 56, 8), 1));
            tDailyProductionReport.setHpPguAeu(this.roundDecimal(this.getCellDataString(sheet, 56, 9), 0));
            tDailyProductionReport.setHpPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 56, 10), 3));
            tDailyProductionReport.setHpPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 56, 11), 1));
            tDailyProductionReport.setHpPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 56, 12), 1));
            tDailyProductionReport.setHpSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 56, 13), 0));
            tDailyProductionReport.setHpSub(this.roundDecimal(this.getCellDataString(sheet, 56, 14), 0));
            tDailyProductionReport.setHpBcc(this.roundDecimal(this.getCellDataString(sheet, 56, 15), 0));
            tDailyProductionReport.setSctfStorageTk1430Lfo(this.roundDecimal(this.getCellDataString(sheet, 56, 16), 3));
            tDailyProductionReport.setSctfStorageTk1320OffBtx(this.roundDecimal(this.getCellDataString(sheet, 56, 17), 3));
            tDailyProductionReport.setSctfStorageT201Btx(this.roundDecimal(this.getCellDataString(sheet, 56, 18), 3));
            tDailyProductionReport.setSctfStorageTk1340C9(this.roundDecimal(this.getCellDataString(sheet, 56, 19), 3));
            tDailyProductionReport.setSctfStorageClt1350C9(this.roundDecimal(this.getCellDataString(sheet, 56, 20), 3));
            tDailyProductionReport.setSctfStorageTk1160Nh3(this.roundDecimal(this.getCellDataString(sheet, 56, 21), 3));
            // rowIndex = 57
            tDailyProductionReport.setMpToe(this.roundDecimal(this.getCellDataString(sheet, 57, 2), 4));
            tDailyProductionReport.setMpTce(this.roundDecimal(this.getCellDataString(sheet, 57, 3), 4));
            tDailyProductionReport.setMpPre(this.roundDecimal(this.getCellDataString(sheet, 57, 4), 4));
            tDailyProductionReport.setMpCracker(this.roundDecimal(this.getCellDataString(sheet, 57, 5), 0));
            tDailyProductionReport.setMpCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 57, 6), 3));
            tDailyProductionReport.setMpCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 57, 7), 1));
            tDailyProductionReport.setMpCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 57, 8), 1));
            tDailyProductionReport.setMpPguAeu(this.roundDecimal(this.getCellDataString(sheet, 57, 9), 0));
            tDailyProductionReport.setMpPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 57, 10), 3));
            tDailyProductionReport.setMpPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 57, 11), 1));
            tDailyProductionReport.setMpPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 57, 12), 1));
            tDailyProductionReport.setMpSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 57, 13), 0));
            tDailyProductionReport.setMpSub(this.roundDecimal(this.getCellDataString(sheet, 57, 14), 0));
            tDailyProductionReport.setMpBcc(this.roundDecimal(this.getCellDataString(sheet, 57, 15), 0));
            // rowIndex = 58
            tDailyProductionReport.setLpToe(this.roundDecimal(this.getCellDataString(sheet, 58, 2), 4));
            tDailyProductionReport.setLpTce(this.roundDecimal(this.getCellDataString(sheet, 58, 3), 4));
            tDailyProductionReport.setLpPre(this.roundDecimal(this.getCellDataString(sheet, 58, 4), 4));
            tDailyProductionReport.setLpCracker(this.roundDecimal(this.getCellDataString(sheet, 58, 5), 0));
            tDailyProductionReport.setLpCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 58, 6), 3));
            tDailyProductionReport.setLpCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 58, 7), 1));
            tDailyProductionReport.setLpCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 58, 8), 1));
            tDailyProductionReport.setLpPguAeu(this.roundDecimal(this.getCellDataString(sheet, 58, 9), 1));
            tDailyProductionReport.setLpPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 58, 10), 3));
            tDailyProductionReport.setLpPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 58, 11), 1));
            tDailyProductionReport.setLpPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 58, 12), 1));
            tDailyProductionReport.setLpSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 58, 13), 0));
            tDailyProductionReport.setLpSub(this.roundDecimal(this.getCellDataString(sheet, 58, 14), 0));
            tDailyProductionReport.setLpBcc(this.roundDecimal(this.getCellDataString(sheet, 58, 15), 0));
            tDailyProductionReport.setSctfStorageTk1510B(this.roundDecimal(this.getCellDataString(sheet, 58, 17), 3));
            tDailyProductionReport.setSctfStorageClt1370B(this.roundDecimal(this.getCellDataString(sheet, 58, 18), 3));
            tDailyProductionReport.setSctfStorageTk1360T(this.roundDecimal(this.getCellDataString(sheet, 58, 19), 3));
            tDailyProductionReport.setSctfStorageTk1410X(this.roundDecimal(this.getCellDataString(sheet, 58, 20), 3));
            tDailyProductionReport.setSctfStorageClt1380X(this.roundDecimal(this.getCellDataString(sheet, 58, 21), 3));
            // rowIndex = 59
            tDailyProductionReport.setElectricityToe(this.roundDecimal(this.getCellDataString(sheet, 59, 2), 4));
            tDailyProductionReport.setElectricityTce(this.roundDecimal(this.getCellDataString(sheet, 59, 3), 4));
            tDailyProductionReport.setElectricityPre(this.roundDecimal(this.getCellDataString(sheet, 59, 4), 4));
            tDailyProductionReport.setElectricityCracker(this.roundDecimal(this.getCellDataString(sheet, 59, 5), 0));
            tDailyProductionReport.setElectricityCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 59, 6), 3));
            tDailyProductionReport.setElectricityCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 59, 7), 1));
            tDailyProductionReport.setElectricityCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 59, 8), 1));
            tDailyProductionReport.setElectricityPguAeu(this.roundDecimal(this.getCellDataString(sheet, 59, 9), 0));
            tDailyProductionReport.setElectricityPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 59, 10), 3));
            tDailyProductionReport.setElectricityPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 59, 11), 1));
            tDailyProductionReport.setElectricityPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 59, 12), 1));
            tDailyProductionReport.setElectricitySctuFlare(this.roundDecimal(this.getCellDataString(sheet, 59, 13), 3));
            tDailyProductionReport.setElectricitySub(this.roundDecimal(this.getCellDataString(sheet, 59, 14), 2));
            tDailyProductionReport.setElectricityBcc(this.roundDecimal(this.getCellDataString(sheet, 59, 15), 0));
            // rowIndex = 60
            tDailyProductionReport.setCoolingWaterToe(this.roundDecimal(this.getCellDataString(sheet, 60, 2), 4));
            tDailyProductionReport.setCoolingWaterTce(this.roundDecimal(this.getCellDataString(sheet, 60, 3), 4));
            tDailyProductionReport.setCoolingWaterPre(this.roundDecimal(this.getCellDataString(sheet, 60, 4), 4));
            tDailyProductionReport.setCoolingWaterCracker(this.roundDecimal(this.getCellDataString(sheet, 60, 5), 0));
            tDailyProductionReport.setCoolingWaterCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 60, 6), 3));
            tDailyProductionReport.setCoolingWaterCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 60, 7), 1));
            tDailyProductionReport.setCoolingWaterCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 60, 8), 1));
            tDailyProductionReport.setCoolingWaterPguAeu(this.roundDecimal(this.getCellDataString(sheet, 60, 9), 0));
            tDailyProductionReport.setCoolingWaterPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 60, 10), 3));
            tDailyProductionReport.setCoolingWaterPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 60, 11), 1));
            tDailyProductionReport.setCoolingWaterPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 60, 12), 1));
            tDailyProductionReport.setCoolingWaterSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 60, 13), 0));
            tDailyProductionReport.setCoolingWaterSub(this.roundDecimal(this.getCellDataString(sheet, 60, 14), 4));
            tDailyProductionReport.setCoolingWaterBcc(this.roundDecimal(this.getCellDataString(sheet, 60, 15), 0));
            tDailyProductionReport.setSctfStorageTk1420Dimer(this.roundDecimal(this.getCellDataString(sheet, 60, 18), 3));
            tDailyProductionReport.setSctfStorageTk1110R1(this.roundDecimal(this.getCellDataString(sheet, 60, 19), 3));
            tDailyProductionReport.setSctfStorageTk1130Ib(this.roundDecimal(this.getCellDataString(sheet, 60, 20), 3));
            tDailyProductionReport.setSctfStorageTk1150R3(this.roundDecimal(this.getCellDataString(sheet, 60, 21), 3));
            // rowIndex = 61
            tDailyProductionReport.setPolishedConToe(this.roundDecimal(this.getCellDataString(sheet, 61, 2), 4));
            tDailyProductionReport.setPolishedConTce(this.roundDecimal(this.getCellDataString(sheet, 61, 3), 4));
            tDailyProductionReport.setPolishedConPre(this.roundDecimal(this.getCellDataString(sheet, 61, 4), 4));
            tDailyProductionReport.setPolishedConCracker(this.roundDecimal(this.getCellDataString(sheet, 61, 5), 0));
            tDailyProductionReport.setPolishedConCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 61, 6), 3));
            tDailyProductionReport.setPolishedConCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 61, 7), 1));
            tDailyProductionReport.setPolishedConCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 61, 8), 1));
            tDailyProductionReport.setPolishedConPguAeu(this.roundDecimal(this.getCellDataString(sheet, 61, 9), 0));
            tDailyProductionReport.setPolishedConPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 61, 10), 3));
            tDailyProductionReport.setPolishedConPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 61, 11), 1));
            tDailyProductionReport.setPolishedConPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 61, 12), 1));
            tDailyProductionReport.setPolishedConSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 61, 13), 0));
            tDailyProductionReport.setPolishedConSub(this.roundDecimal(this.getCellDataString(sheet, 61, 14), 2));
            tDailyProductionReport.setPolishedConBcc(this.roundDecimal(this.getCellDataString(sheet, 61, 15), 0));
            // rowIndex = 62
            tDailyProductionReport.setHpBfwToe(this.roundDecimal(this.getCellDataString(sheet, 62, 2), 4));
            tDailyProductionReport.setHpBfwTce(this.roundDecimal(this.getCellDataString(sheet, 62, 3), 4));
            tDailyProductionReport.setHpBfwPre(this.roundDecimal(this.getCellDataString(sheet, 62, 4), 4));
            tDailyProductionReport.setHpBfwCracker(this.roundDecimal(this.getCellDataString(sheet, 62, 5), 0));
            tDailyProductionReport.setHpBfwCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 62, 6), 3));
            tDailyProductionReport.setHpBfwCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 62, 7), 1));
            tDailyProductionReport.setHpBfwCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 62, 8), 1));
            tDailyProductionReport.setHpBfwPguAeu(this.roundDecimal(this.getCellDataString(sheet, 62, 9), 0));
            tDailyProductionReport.setHpBfwPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 62, 10), 3));
            tDailyProductionReport.setHpBfwPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 62, 11), 1));
            tDailyProductionReport.setHpBfwPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 62, 12), 1));
            tDailyProductionReport.setHpBfwSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 62, 13), 0));
            tDailyProductionReport.setHpBfwSub(this.roundDecimal(this.getCellDataString(sheet, 62, 14), 2));
            tDailyProductionReport.setHpBfwBcc(this.roundDecimal(this.getCellDataString(sheet, 62, 15), 0));
            tDailyProductionReport.setSctfStorageTk1140Bd(this.roundDecimal(this.getCellDataString(sheet, 62, 19), 3));
            tDailyProductionReport.setSctfStorageTk1141Bd(this.roundDecimal(this.getCellDataString(sheet, 62, 20), 3));
            tDailyProductionReport.setSctfStorageTk1142Bd(this.roundDecimal(this.getCellDataString(sheet, 62, 21), 3));
            // rowIndex = 63
            tDailyProductionReport.setProdWaterToe(this.roundDecimal(this.getCellDataString(sheet, 63, 2), 4));
            tDailyProductionReport.setProdWaterTce(this.roundDecimal(this.getCellDataString(sheet, 63, 3), 4));
            tDailyProductionReport.setProdWaterPre(this.roundDecimal(this.getCellDataString(sheet, 63, 4), 4));
            tDailyProductionReport.setProdWaterCracker(this.roundDecimal(this.getCellDataString(sheet, 63, 5), 0));
            tDailyProductionReport.setProdWaterCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 63, 6), 3));
            tDailyProductionReport.setProdWaterCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 63, 7), 1));
            tDailyProductionReport.setProdWaterCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 63, 8), 1));
            tDailyProductionReport.setProdWaterPguAeu(this.roundDecimal(this.getCellDataString(sheet, 63, 9), 0));
            tDailyProductionReport.setProdWaterPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 63, 10), 3));
            tDailyProductionReport.setProdWaterPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 63, 11), 1));
            tDailyProductionReport.setProdWaterPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 63, 12), 1));
            tDailyProductionReport.setProdWaterSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 63, 13), 0));
            tDailyProductionReport.setProdWaterSub(this.roundDecimal(this.getCellDataString(sheet, 63, 14), 2));
            tDailyProductionReport.setProdWaterBcc(this.roundDecimal(this.getCellDataString(sheet, 63, 15), 0));
            // rowIndex = 64
            tDailyProductionReport.setTurbineConToe(this.roundDecimal(this.getCellDataString(sheet, 64, 2), 4));
            tDailyProductionReport.setTurbineConTce(this.roundDecimal(this.getCellDataString(sheet, 64, 3), 4));
            tDailyProductionReport.setTurbineConPre(this.roundDecimal(this.getCellDataString(sheet, 64, 4), 4));
            tDailyProductionReport.setTurbineConCracker(this.roundDecimal(this.getCellDataString(sheet, 64, 5), 0));
            tDailyProductionReport.setTurbineConCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 64, 6), 3));
            tDailyProductionReport.setTurbineConCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 64, 7), 1));
            tDailyProductionReport.setTurbineConCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 64, 8), 1));
            tDailyProductionReport.setTurbineConPguAeu(this.roundDecimal(this.getCellDataString(sheet, 64, 9), 0));
            tDailyProductionReport.setTurbineConPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 64, 10), 3));
            tDailyProductionReport.setTurbineConPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 64, 11), 1));
            tDailyProductionReport.setTurbineConPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 64, 12), 1));
            tDailyProductionReport.setTurbineConSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 64, 13), 0));
            tDailyProductionReport.setTurbineConSub(this.roundDecimal(this.getCellDataString(sheet, 64, 14), 2));
            tDailyProductionReport.setTurbineConBcc(this.roundDecimal(this.getCellDataString(sheet, 64, 15), 0));
            tDailyProductionReport.setSctfStorageTotalNap(this.roundDecimal(this.getCellDataString(sheet, 64, 18), 0));
            tDailyProductionReport.setSctfStorageCltf1621(this.roundDecimal(this.getCellDataString(sheet, 64, 19), 0));
            tDailyProductionReport.setSctfStorageCltf1622(this.roundDecimal(this.getCellDataString(sheet, 64, 20), 0));
            tDailyProductionReport.setSctfStorageCltf1623(this.roundDecimal(this.getCellDataString(sheet, 64, 21), 0));
            // rowIndex = 65
            tDailyProductionReport.setPaIaToe(this.roundDecimal(this.getCellDataString(sheet, 65, 2), 4));
            tDailyProductionReport.setPaIaTce(this.roundDecimal(this.getCellDataString(sheet, 65, 3), 4));
            tDailyProductionReport.setPaIaPre(this.roundDecimal(this.getCellDataString(sheet, 65, 4), 4));
            tDailyProductionReport.setPaIaCracker(this.roundDecimal(this.getCellDataString(sheet, 65, 5), 0));
            tDailyProductionReport.setPaIaCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 65, 6), 3));
            tDailyProductionReport.setPaIaCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 65, 7), 1));
            tDailyProductionReport.setPaIaCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 65, 8), 1));
            tDailyProductionReport.setPaIaPguAeu(this.roundDecimal(this.getCellDataString(sheet, 65, 9), 0));
            tDailyProductionReport.setPaIaPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 65, 10), 3));
            tDailyProductionReport.setPaIaPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 65, 11), 1));
            tDailyProductionReport.setPaIaPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 65, 12), 1));
            tDailyProductionReport.setPaIaSctuFlare(this.roundDecimal(this.getCellDataString(sheet, 65, 13), 0));
            tDailyProductionReport.setPaIaSub(this.roundDecimal(this.getCellDataString(sheet, 65, 14), 2));
            tDailyProductionReport.setPaIaBcc(this.roundDecimal(this.getCellDataString(sheet, 65, 15), 0));
            // rowIndex = 66
            tDailyProductionReport.setN2Toe(this.roundDecimal(this.getCellDataString(sheet, 66, 2), 4));
            tDailyProductionReport.setN2Tce(this.roundDecimal(this.getCellDataString(sheet, 66, 3), 4));
            tDailyProductionReport.setN2Pre(this.roundDecimal(this.getCellDataString(sheet, 66, 4), 4));
            tDailyProductionReport.setN2Cracker(this.roundDecimal(this.getCellDataString(sheet, 66, 5), 0));
            tDailyProductionReport.setN2CrackerTT(this.roundDecimal(this.getCellDataString(sheet, 66, 6), 3));
            tDailyProductionReport.setN2CrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 66, 7), 1));
            tDailyProductionReport.setN2CrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 66, 8), 1));
            tDailyProductionReport.setN2PguAeu(this.roundDecimal(this.getCellDataString(sheet, 66, 9), 0));
            tDailyProductionReport.setN2PguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 66, 10), 3));
            tDailyProductionReport.setN2PguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 66, 11), 1));
            tDailyProductionReport.setN2PguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 66, 12), 1));
            tDailyProductionReport.setN2SctuFlare(this.roundDecimal(this.getCellDataString(sheet, 66, 13), 0));
            tDailyProductionReport.setN2Sub(this.roundDecimal(this.getCellDataString(sheet, 66, 14), 2));
            tDailyProductionReport.setN2Bcc(this.roundDecimal(this.getCellDataString(sheet, 66, 15), 0));
            // rowIndex = 67
            tDailyProductionReport.setTotalToe(this.roundDecimal(this.getCellDataString(sheet, 67, 2), 4));
            tDailyProductionReport.setTotalTce(this.roundDecimal(this.getCellDataString(sheet, 67, 3), 4));
            tDailyProductionReport.setTotalPre(this.roundDecimal(this.getCellDataString(sheet, 67, 4), 4));
            tDailyProductionReport.setTotalCracker(this.roundDecimal(this.getCellDataString(sheet, 67, 5), 0));
            tDailyProductionReport.setTotalCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 67, 6), 3));
            tDailyProductionReport.setTotalCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 67, 7), 1));
            tDailyProductionReport.setTotalCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 67, 8), 1));
            tDailyProductionReport.setTotalPguAeu(this.roundDecimal(this.getCellDataString(sheet, 67, 9), 0));
            tDailyProductionReport.setTotalPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 67, 10), 3));
            tDailyProductionReport.setTotalPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 67, 11), 1));
            tDailyProductionReport.setTotalPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 67, 12), 1));
            tDailyProductionReport.setFrEoEg(this.roundDecimal(this.getCellDataString(sheet, 67, 14), 0));
            // rowIndex = 68
            tDailyProductionReport.setTargetToe(this.roundDecimal(this.getCellDataString(sheet, 68, 2), 4));
            tDailyProductionReport.setTargetTce(this.roundDecimal(this.getCellDataString(sheet, 68, 3), 4));
            tDailyProductionReport.setTargetPre(this.roundDecimal(this.getCellDataString(sheet, 68, 4), 4));
            tDailyProductionReport.setTargetCracker(this.roundDecimal(this.getCellDataString(sheet, 68, 5), 0));
            tDailyProductionReport.setTargetCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 68, 6), 3));
            tDailyProductionReport.setTargetCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 68, 7), 1));
            tDailyProductionReport.setTargetCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 68, 8), 1));
            tDailyProductionReport.setTargetPguAeu(this.roundDecimal(this.getCellDataString(sheet, 68, 9), 0));
            tDailyProductionReport.setTargetPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 68, 10), 3));
            tDailyProductionReport.setTargetPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 68, 11), 1));
            tDailyProductionReport.setTargetPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 68, 12), 1));
            tDailyProductionReport.setLoadPercentage(this.roundPercentage(this.getCellDataString(sheet, 68, 14), 2));
            tDailyProductionReport.setCol320fc2161(this.roundDecimal(this.getCellDataString(sheet, 68, 16), 0));
            tDailyProductionReport.setC210pdi(this.roundDecimal(this.getCellDataString(sheet, 68, 17), 2));
            tDailyProductionReport.setTemperature(this.roundDecimal(this.getCellDataString(sheet, 68, 18), 0));
            tDailyProductionReport.setCrackingFurnaceBurn(this.roundDecimal(this.getCellDataString(sheet, 68, 19), 0));
            // rowIndex = 69
            tDailyProductionReport.setProducedToe(this.roundDecimal(this.getCellDataString(sheet, 69, 2), 4));
            tDailyProductionReport.setProducedTce(this.roundDecimal(this.getCellDataString(sheet, 69, 3), 4));
            tDailyProductionReport.setProducedPre(this.roundDecimal(this.getCellDataString(sheet, 69, 4), 4));
            tDailyProductionReport.setProducedCracker(this.roundDecimal(this.getCellDataString(sheet, 69, 5), 0));
            tDailyProductionReport.setProducedCrackerTT(this.roundDecimal(this.getCellDataString(sheet, 69, 6), 3));
            tDailyProductionReport.setProducedCrackerKgoe(this.roundDecimal(this.getCellDataString(sheet, 69, 7), 1));
            tDailyProductionReport.setProducedCrackerKgce(this.roundDecimal(this.getCellDataString(sheet, 69, 8), 1));
            tDailyProductionReport.setProducedPguAeu(this.roundDecimal(this.getCellDataString(sheet, 69, 9), 0));
            tDailyProductionReport.setProducedPguAeuTT(this.roundDecimal(this.getCellDataString(sheet, 69, 10), 3));
            tDailyProductionReport.setProducedPguAeuKgoe(this.roundDecimal(this.getCellDataString(sheet, 69, 11), 1));
            tDailyProductionReport.setProducedPguAeuKgce(this.roundDecimal(this.getCellDataString(sheet, 69, 12), 1));
            tDailyProductionReport.setHsProducet(this.roundDecimal(this.getCellDataString(sheet, 69, 14), 0));
            // 修改小时
            Date reportDate = tDailyProductionReport.getReportDate();
            Date fromDate = tDailyProductionReport.getFromDate();
            Date toDate = tDailyProductionReport.getToDate();
            reportDate.setHours(0);
            fromDate.setHours(0);
            toDate.setHours(0);
            reportDate.setMinutes(0);
            fromDate.setMinutes(0);
            toDate.setMinutes(0);
            reportDate.setSeconds(0);
            fromDate.setSeconds(0);
            toDate.setSeconds(0);
            tDailyProductionReport.setReportDate(reportDate);
            tDailyProductionReport.setFromDate(fromDate);
            tDailyProductionReport.setToDate(toDate);
            // 根据日期查询条数
            // 如果list size不等于零，说明该日已上传，进行修改操作
            // 否则，说明该日未上传，进行新增操作
            TDailyProductionReport queryObject = new TDailyProductionReport();
            queryObject.setReportDate(tDailyProductionReport.getReportDate());
            List<TDailyProductionReport> list = tDailyProductionReportMapper.selectTDailyProductionReportList(queryObject);
            if (list.size() > 0) {
                tDailyProductionReportMapper.updateTDailyProductionReportByReportDate(tDailyProductionReport);
                message = this.reportDateFormatter(tDailyProductionReport.getReportDate()) + "生产日报已更新！";
                // 同步更新月报数据
                SyncAfterDailyUpdateThread syncAfterDailyUpdateThread = new SyncAfterDailyUpdateThread(
                        tDailyProductionReport.getReportDate(),
                        this.tDailyProductionReportMapper,
                        this.tMonthlyProductionReportMapper
                );
                syncAfterDailyUpdateThread.run();
            } else {
                tDailyProductionReportMapper.insertTDailyProductionReport(tDailyProductionReport);
                message = this.reportDateFormatter(tDailyProductionReport.getReportDate()) + "生产日报已上传！";
                // 同步更新月报数据
                SyncAfterDailyUpdateThread syncAfterDailyUpdateThread = new SyncAfterDailyUpdateThread(
                        tDailyProductionReport.getReportDate(),
                        this.tDailyProductionReportMapper,
                        this.tMonthlyProductionReportMapper
                );
                syncAfterDailyUpdateThread.run();
            }
        } catch (Exception e) {
            message = "导入失败，请联系管理员！";
            e.printStackTrace();
        } finally {
            return message;
        }
    }

    @Override
    public List<DailyAnalysisDataVO> selectAnalysisData(String fieldName, String startDate, String endDate) {
        return tDailyProductionReportMapper.selectAnalysisData(fieldName, startDate, endDate);
    }

    /**
     * 把日期格式化为xxxx年xx月xx日
     *
     * @param date reportDate
     * @return 格式化后的reportDate
     */
    private String reportDateFormatter(Date date) {
        StringBuffer dateString = new StringBuffer();
        dateString.append(date.getYear() + 1900);
        dateString.append("年");
        dateString.append(date.getMonth() + 1);
        dateString.append("月");
        dateString.append(date.getDate());
        dateString.append("日");
        return dateString.toString();
    }

    /**
     * 获取excel单元数据（字符串）
     *
     * @param sheet sheet
     * @param rowIndex 行索引
     * @param cellIndex 单元索引
     * @return 获取excel单元数据（字符串）
     */
    private String getCellDataString(Sheet sheet, int rowIndex, int cellIndex) {
        String cellData = "";
        // 根据行下标，获取行对象
        Row row = sheet.getRow(rowIndex);
        // 根据列下表，获取单元格对象，如果单元格的值为空，则返回null
        Cell cell = row.getCell(cellIndex, Row.MissingCellPolicy.RETURN_BLANK_AS_NULL);
        if (cell != null) {
            cell.setCellType(CellType.STRING);
            String cellValue = cell.getStringCellValue();
            if ("false".equalsIgnoreCase(cellValue)) {
                cellValue = "0";
            }
            cellData = cellValue;
        }
        return cellData;
    }

    /**
     * 获取excel单元数据（日期）
     *
     * @param sheet sheet
     * @param rowIndex 行索引
     * @param cellIndex 单元索引
     * @return 获取excel单元数据（日期）
     */
    private Date getCellDataDate(Sheet sheet, int rowIndex, int cellIndex) {
            // 根据行下标，获取行对象
            Row row = sheet.getRow(rowIndex);
            // 根据列下表，获取单元格对象，如果单元格的值为空，则返回null
            Cell cell = row.getCell(cellIndex, Row.MissingCellPolicy.RETURN_BLANK_AS_NULL);
            // 获取单元格数据
            return cell.getDateCellValue();
    }
}
