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

📄 jianzhicunjiben.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.colligate;

import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.ReadAdder;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.SheetItem;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.ReadJianzhicun;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.gpsdata.bianma.PadBianma;
import java.io.File;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.txt.ItemUse;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.txt.Jzcjbqk;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.Property;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.array.JZCControl;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.array.JZCOrderByXiangzhen;

/**
 * <p>Title: </p>
 *
 * <p>Description: 建制村基本信息综合</p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class JianzhicunJiBen {
  private ReadJianzhicun jianzhicun = null;
  private ReadAdder adder = null;
  private int rows = -1;

  private String N = "";

  private Jzcjbqk[] jzc = null;

  public JianzhicunJiBen(String filePath) {
    SheetItem si = new SheetItem();
    si.setJianzhicun(filePath);
    jianzhicun = new ReadJianzhicun(si.getJianzhicunSheet());
    rows = si.getT2_JianzhicunRows() - Property.t2_Jianzhicun_Base_Row;
  }

  public void setAdder(ReadAdder adder){
    this.adder = adder;
  }

  public void readAndTranslate(){
    System.out.println("开始生成建制村基本信息...");
    this.N = this.N + Jzcjbqk.getJZCHeaderString() + "\r\n";
    jzc = new Jzcjbqk[this.rows];
    for (int i = 0; i < this.rows; i++) {
      if (jianzhicun.isEmptyrow()) {
        break;
      }
      jzc[i] = new Jzcjbqk();
      jzc[i].setExcelReadMethod(this.jianzhicun,this.adder);
//      this.N = this.N + jzc[i].toString() + "\r\n";
      jianzhicun.moveNext();
    }

    /**
     * 接着,得到的jzc数组与民政部门比较,并得到唯一并吻合的数组
     */
//    JZCControl control = new JZCControl();
//    control.setReadAdder(this.adder);
//    control.setJZCExcelArrayFile(this.jzc);
//
////    control.compare();
//    this.jzc = control.getJianzhicun();

    /**
     * 将建制村按照乡镇排序
     */
    JZCOrderByXiangzhen order = new JZCOrderByXiangzhen();
    order.setReadAdder(this.adder);
    order.setJZCExcelArrayFile(this.jzc);
    order.toNew();
    this.jzc = order.getJianzhicun();
    /**
     * 在这里填补编码,编码存储在静态公共变量中
     */
//    PadBianma.setJianzhicunFileArray(jzc);
//    this.jzc = PadBianma.getJianzhicunFileArray();

    for (int i = 0; i < jzc.length; i++) {
      if (jzc[i] != null) {
        this.N = this.N + jzc[i].toString() + "\r\n";
      }
    }
  }

  /**
   * 能得到本类生成的Jzcjbqk数组
   * 目的是编码填补好后,可以继续使用在建制村通达上面
   */
  public Jzcjbqk[] getJianzhicunContentArray(){
    return this.jzc;
  }

  public void save(File f){
   ItemUse.saveFile(f,this.N);
 }
}

⌨️ 快捷键说明

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