public CalcInfo(DBInst dbInst, String table_postfix) {
		
		//初始化数据库表
		this.table_name = (table_postfix.equals("")) ? TABLE_NAME_PRE : TABLE_NAME_PRE + "__" + table_postfix;
		String sql = "create table if not exists " + this.table_name +
				"(`date` date NOT NULL DEFAULT '0000-00-00', " +
				"`szzs` double NOT NULL DEFAULT '0' COMMENT '上证综指', " +
				"`szcz` double NOT NULL DEFAULT '0' COMMENT '深证成指', " +
				"`total` double NOT NULL DEFAULT '0' COMMENT '总资金', " +
				"`position` double NOT NULL DEFAULT '0' COMMENT '股市资金', " +
				"`rate` double NOT NULL DEFAULT '0' COMMENT '仓位百分比，单位%', " +
				"`profit` double NOT NULL DEFAULT '0', " +
				"PRIMARY KEY (`date`) " +
				") ENGINE=MyISAM DEFAULT CHARSET=utf8"; 
		
		dbInst.updateSQL(sql);
		
		spn = new StockPriceNew(dbInst);
		//sp.LoadStockPrice(StockPrice.UPDATE_STOCK_TRANSED_CODE, "", "");
		
		td = new TransDetail(table_postfix, dbInst);
		td.ReadRecordsFromDB();
		
		flag_file = (table_postfix.equals("")) ? flag_file : flag_file + "." + table_postfix;
		
		try {
			FileInputStream fis		= new FileInputStream(FLAG_FILE_DIR + flag_file);
	        InputStreamReader isr	= new InputStreamReader(fis, "utf8");
	        BufferedReader br		= new BufferedReader(isr);
	        
	        Pattern pattern_date = Pattern.compile("^\\d{8}$");

	        String line = br.readLine();
	        
	        br.close();
	        isr.close();
	        fis.close();
	        
	        if (line != null) {
	        	String arrs[] = line.split(" ");
	        	
	        	Matcher matcher = pattern_date.matcher(arrs[0]);
	            if (matcher.matches()) {
	            	this.date_s	= arrs[0];
	            	this.total	= Double.parseDouble(arrs[1]);
	            	this.desc	= arrs[2];
	            	return;
	            }
	            else {
	            	log.error("the date read from " + FLAG_FILE_DIR + flag_file + " incorrect! date:" + this.date_s);
	            }
	        }
	        else {
	        	log.error("read " + FLAG_FILE_DIR + flag_file + " is null!");
	        }
	        
	    	System.exit(0);
		}
		catch (Exception e) {
			log.error("read " + FLAG_FILE_DIR + flag_file + "failed!", e);
			System.exit(0);
		}
	}