⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendarmap.java

📁 排产系统
💻 JAVA
字号:
package com.power.pipeengine.DispatchReportMap;import java.util.*;import java.io.*;import java.text.*;import java.net.*;import com.power.util.Message.*;import com.power.pipeengine.Entity.*;import com.power.pipe.*;import com.power.util.Message.*;import com.power.pipeengine.*;import com.power.pipeengine.InputData.*;public class CalendarMap extends InputReader{    static ResourceBundle res = ResourceBundle.getBundle("com.power.pipeengine.Res",                                                          EngineConfig.getInstance().getLocale() );    private Vector _bucketStartDate = new Vector();    private Vector _seqInBucket = new Vector();	private String _fileName = "calendarmap";    private static final CalendarMap INSTANCE =                              new CalendarMap();   // Private constructor supresses   // default public constructor    private CalendarMap( ) {    }    public static CalendarMap getInstance( ) {        return INSTANCE;    }    public Vector getBucketStartDates() {        return _bucketStartDate;    }    public Vector getSeqInBucket() {        return _seqInBucket;    }	protected String getFileName() {		return _fileName;	}	public void readData() throws Exception {		BufferedReader d = super.getReader();        if( null == d ) {          return;        }		String token = GlobalConfig.getInstance().getSeparator();		String aLine = d.readLine();		SimpleDateFormat sdfInput = new SimpleDateFormat( "yyyy-mm-dd" );        sdfInput.setDateFormatSymbols( new DateFormatSymbols( Locale.CHINA ) );        Date lastDate = null;        int cnt = 1;		while( aLine != null ) {            if( aLine.length() <= 1 ) {                aLine = d.readLine();                continue;            }			StringTokenizer st = new StringTokenizer( aLine, token );			int bucketID     = new Integer( st.nextToken() ).intValue();			String startDate = new String( st.nextToken() );			Date date = sdfInput.parse( startDate );            if( null == lastDate ) {                lastDate = date;            } else if( lastDate.compareTo( date ) != 0 ) {                cnt = 1;                lastDate = date;            }            _seqInBucket.add( new Integer(cnt) );            _bucketStartDate.add( date );			aLine = d.readLine();            cnt++;		}        d.close();		super.closeURLConnection();	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -