public void RecordParse(String record_info) {
        
		log.info("start parse " + record_info + " for " + table_name);
		
        String[] arrs	= null;
        
        Pattern pattern_date = Pattern.compile("^\\d{8}$");
        
        arrs = record_info.split(",");
        
        if (arrs.length > 4 || arrs.length < 3) {
        	log.error("record items error! record:" + record_info);
        	System.exit(0);
        }
        
        Matcher matcher = pattern_date.matcher(arrs[0]);
        if (! matcher.matches()) {
        	log.error("date format error! date:" + arrs[0]);
        	return;
        }
        
        TransDetailRecord record = new TransDetailRecord();
        
        record.date 	= arrs[0];
        record.code 	= arrs[1];
        record.opt		= Integer.parseInt(arrs[2]);
        
        if (arrs.length == 4) {
        	record.market	= arrs[3];
        }
        else {
	        if (Double.parseDouble(record.code) >= 600000) {
	        	record.market = TransDetailRecord.MARKET_SH;
	        }
	        else {
	        	record.market = TransDetailRecord.MARKET_SZ;
	        }
        }
        
        StockPriceNew spn = new StockPriceNew(dbInst);
        PriceRecord pr = null;
        pr = spn.GetStockPriceFromDB(record.market, record.code, record.date);
        if (pr == null) {
        	log.error("get stock price failed! code:" + record.code + " date:" + record.date);
        	System.exit(0);
        }
        //record.deal_price	= Double.parseDouble(arrs[4]);
        
        if (record.opt == TransDetailRecord.OPT_IN) {
        	record.deal_amount	= 20000;
        	record.deal_price	= pr.open;
        	//record.deal_amount	= Double.parseDouble(arrs[5]);
            record.num			= (int)(record.deal_amount / record.deal_price);
        }
        else if (record.opt == TransDetailRecord.OPT_OUT) {
        	ReadRecordsFromDB();
        	String key = record.market + "\005" + record.code;
        	ArrayList<TransDetailRecord> trans_list = trans_map.get(key);
        	TransDetailRecord tran = trans_list.get(trans_list.size() - 1);
        	if (tran.opt != TransDetailRecord.OPT_IN) {
        		log.error("trans opt in db error! code:" + record.code + " date:" + tran.date);
            	System.exit(0);
        	}
        	record.num			= tran.num;
        	record.deal_price	= pr.close;
        	//record.num	= Integer.parseInt(arrs[5]);
        	record.deal_amount	= record.num * record.deal_price;
        }
        else {
        	log.error("record opt error! opt:" + record.opt);
        	System.exit(0);
        }
        
        record.name 			= "";
        record.deal_fee_comm	= 0;
        record.deal_fee_tax		= 0;
        record.deal_fee_trans	= 0;
        record.deal_fee_other	= 0;
        record.deal_total		= record.deal_amount; 
        
        String keyowrd = record.code + "\005" + String.valueOf(record.opt);
        record_map.put(keyowrd, record);
	}