cashmerewip.java

来自「著名IT公司ILog的APS高级排产优化引擎」· Java 代码 · 共 84 行

JAVA
84
字号
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 CashmereWip
    extends InputReader {
  static ResourceBundle res = ResourceBundle.getBundle(
      "com.power.pipeengine.Res",
      EngineConfig.getInstance().getLocale());
  private Vector wips = new Vector();
  private String _fileName = "cashmerewip";

  private static final CashmereWip INSTANCE =
      new CashmereWip();

  // Private constructor supresses
  // default public constructor
  private CashmereWip() {
  }

  public static CashmereWip getInstance() {
    return INSTANCE;
  }


  protected String getFileName() {
    return _fileName;
  }

  public Vector getWIPs() {
    return wips;
  }

  public void readData() throws Exception {
    BufferedReader d = super.getReader();

    if (null == d) {
      return;
    }

    String token = GlobalConfig.getInstance().getSeparator();
    String aLine = d.readLine();

    while (aLine != null) {
      if (aLine.length() <= 1) {
        aLine = d.readLine();
        continue;
      }
System.out.println(aLine);
      StringTokenizer st = new StringTokenizer(aLine, token);

      Object[] hldr = new Object[4];

      String orderID = new String(st.nextToken());
      String styleID = new String(st.nextToken());
      Integer nextRteID = new Integer(st.nextToken());
      Integer qty = new Integer(st.nextToken());

      hldr[0] = orderID;
      hldr[1] = styleID;
      hldr[2] = nextRteID;
      hldr[3] = qty;

      wips.add( hldr );
      System.out.println("finished adding");

      aLine = d.readLine();
    }

    d.close();
    super.closeURLConnection();
  }

}

⌨️ 快捷键说明

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