package com.fgkj.services; import java.io.File; import java.util.Calendar; import java.util.Date; import java.util.List; import javax.servlet.http.HttpSession; import com.fgkj.actions.ActionUtil; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.dao.impl.Battresdata_infDAOImpl; import com.fgkj.dao.impl.Batttestdata_infDAOImpl; import com.fgkj.dao.impl.ResDataUploadImpl; import com.fgkj.dto.BattInf; import com.fgkj.dto.Battresdata_inf; import com.fgkj.dto.Batttestdata_inf; import com.fgkj.dto.DLG_Progress; import com.fgkj.dto.ServiceModel; import com.fgkj.dto.User_inf; import com.fgkj.fbo.CsvData; import com.fgkj.fbo.FboDataInf; public class ResDataUploadService extends Thread{ private ServiceModel model; private User_inf uinf; private int bg_id; private String[][] tableRowData; private File[] file; private HttpSession session; private DLG_Progress progress; public ResDataUploadService( User_inf uinf, int bg_id, String[][] tableRowData, File[] file, HttpSession session) { this.model = new ServiceModel(); this.uinf = uinf; this.bg_id = bg_id; this.tableRowData=tableRowData; this.file=file; this.session=session; progress=new DLG_Progress(true,false); progress.setTableData(tableRowData); progress.setTotal(file.length); session.setAttribute("Resprogress", progress); } public void run(){ for(int n=0; n listB=dao.serchByCondition(binf); if(listB!=null&&listB.size()>0){ batt_cap = listB.get(0).getMonCapStd(); mon_count = listB.get(0).getMonCount(); mon_vol = listB.get(0).getMonVolStd(); } List listR=((Battresdata_infDAOImpl)daoAgain).serchTest_record_count(rinf); if(listR!=null&&listR.size()>0){ int test_record_count = listR.get(0).getTest_record_count(); data_reason_type = 1; } //******************************************************************// if(bg_id < 1) { data_reason_type = 6; } else if(mon_count != csv_data.m_BattSum) { data_reason_type = 3; } else if(mon_vol != csv_data.m_MonomerVol) { data_reason_type = 4; } } if(data_reason_type > 0) { data_ok = false; } return data_ok; } }