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

📄 inventoryparse.java

📁 SAP这个系统的一个转换器
💻 JAVA
字号:
package com.idoc.logic;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Vector;
import javax.swing.JOptionPane;
import com.idoc.util.Operate;
import com.idoc.face.InterfaceParse;

/**
 * <p>Title: IDOC Interface</p>
 * <p>Description: IDOC 转换器</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: SiChuan XinHua</p>
 * @author zjc
 * @version 1.0
 */
/**
 *<p>盘点解析类</p>
 */
public class InventoryParse
    implements InterfaceParse {
  Vector Tv = new Vector();
  public InventoryParse() {
  }

  public boolean parseData(File file) {
    int Count = 0;
    String stype = "";
    String Tsql = "";
    FileReader fr = null;
    BufferedReader br = null;
    try {
      fr = new FileReader(file);
      br = new BufferedReader(fr);
      while ( (stype = br.readLine()) != null) {
        stype = stype.trim();
        Tsql =
            "insert into T_SAPIN_SY_CheckList_Down(Check_voucher_Code,Check_year,"
            + "Check_SAP_No,STORECODE,Storage_Site,Merch_CODE,Merch_type,Stock_Amount,COMP_UNIT) values(" +
            stype + ")";
        Tv.addElement(Tsql);
      }
    }
    catch (FileNotFoundException e) {
      System.out.println("Inventory's FileNotFoundException");
      e.printStackTrace();
      return false;
    }
    catch (IOException e) {
      System.out.println("Inventory's IOException");
      e.printStackTrace();
      return false;
    }
    catch (Exception e) {
      System.out.println("Inventory's Exception");
      e.printStackTrace();
      return false;
    } finally {
      try {
        if (br!=null)
          br.close();
        if (fr!=null)
          fr.close();
      }catch(Exception ex) {
        ex.printStackTrace();
      System.out.println("Inventory's finally");
        return false;
      }
    }
    return true;
  }

  public boolean disposeData(File file) {

    boolean flag1 = false;
    flag1 = parseData(file);
    if (flag1) {
      TempTableDispose TTDINVEN = new TempTableDispose();
      flag1 = TTDINVEN.disposeData(Tv, file, "inventory");
    }
    return flag1;
  }

}

⌨️ 快捷键说明

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