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

📄 wptxzcnocomp.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.our.auto.check.Integritywpt;

import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
import net.aetherial.gis.dataType.WptType;

/**
 * <p>Title: </p>
 *
 * <p>Description: 行政村名称,人口总额,经济状况,人均收入填写不完整</p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author 王爱国
 * @version 1.0
 */
public class WptXZCNoComp {
  Node[] allwpt = null;
  private String n = "";
  private int dataCount = 0;

  private int errorCount = 0;
  private String errorMessage = "";

  public WptXZCNoComp() {
  }

  public void checkAll() {
    allwpt = ItemValue.getWaypoint();
    if (allwpt != null) {
      for (int i = 0; i < allwpt.length; i++) {
        this.checkOne(allwpt[i],(i+1));
      }
    }
    if (this.errorCount >0) {
      this.n = this.n + "\"\",\"\",\"\",\"\",文件<" + ItemValue.fileName + ">里" + this.errorMessage + "\r\n";
    }
    this.errorMessage ="";
    this.errorCount = 0;
  }

  private void checkOne(Node wpt,int i) {
    String kp = ItemValue.getWaypointKP(wpt);
    if (kp.equals(WptType.W1XingZhengCun)) {
      this.isXZCSelected(wpt,i);
    }else if(kp.equals(WptType.W3QiaoLiang)){
      this.isQiaoliang_Comp(wpt,i);
    }else if(kp.equals(WptType.W4SuiDao)){
      this.isSuidao_Comp(wpt,i);
    }else if(kp.equals(WptType.W6DuKou)){
      this.isDukou_Comp(wpt,i);
    }
  }

  /**
   * 行政村未选择
   */
  private void isXZCSelected(Node wpt,int i){
    String[] array = ItemValue.getWaypointXZC(wpt);
    String name = ItemValue.getWaypointName(wpt).trim();
    if (array == null) {
      this.errorMessage = this.errorMessage + "航点:[" + i + "]" + name + ".<没有选择行政村>。";
      this.errorCount++;
    }
  }
  /**
   * 桥梁属性未填写完整
   */
  private void isQiaoliang_Comp(Node wpt,int i){
    int qlCount = 0;
    String qlError = "";
    String[] array = ItemValue.getWaypointQiaoliang(wpt);
    String name = ItemValue.getWaypointName(wpt).trim();
    if (array == null) {
      qlError = qlError + "<没有填写桥梁属性>";
      qlCount ++;
    }else{
      if (array[0].equals("")) {
        qlError = qlError + "<没有填写桥梁名称>";
        qlCount ++;
      }
      if (array[1].equals("")) {
        qlError = qlError + "<没有填写桥梁孔数>";
        qlCount ++;
      }
      if (array[2].equals("")) {
        qlError = qlError + "<没有填写桥梁跨度>";
        qlCount ++;
      }
    }
    if (qlCount>0) {
      this.errorMessage = this.errorMessage + "航点:[" + i + "]" + name + qlError + "。";
      this.errorCount++;
    }
  }
  /**
   * 隧道属性未填写完整
   */
  private void isSuidao_Comp(Node wpt,int i){
    int qlCount = 0;
    String qlError = "";
    String[] array = ItemValue.getWaypointSuidao(wpt);
    String name = ItemValue.getWaypointName(wpt).trim();
    if (array == null) {
      qlError = qlError + "<没有填写隧道属性>";
      qlCount ++;
    }else{
      if (array[0].equals("")) {
        qlError = qlError + "<没有填写隧道名称>";
        qlCount ++;
      }
      if (array[1].equals("")) {
        qlError = qlError + "<没有填写隧道长度>";
        qlCount ++;
      }
    }
    if (qlCount>0) {
      this.errorMessage = this.errorMessage + "航点:[" + i + "]" + name + qlError + "。";
      this.errorCount++;
    }
  }

  /**
 * 渡口属性未填写完整
 */
private void isDukou_Comp(Node wpt,int i){
  int qlCount = 0;
  String qlError = "";
  String[] array = ItemValue.getWaypointDukou(wpt);
  String name = ItemValue.getWaypointName(wpt).trim();
  if (array == null) {
    qlError = qlError + "<没有填写渡口属性>";
    qlCount ++;
  }else{
    if (array[0].equals("")) {
      qlError = qlError + "<没有填写渡口名称>";
      qlCount ++;
    }
    if (array[1].equals("")) {
      qlError = qlError + "<没有填写渡口类型>";
      qlCount ++;
    }
  }
  if (qlCount>0) {
    this.errorMessage = this.errorMessage + "航点:[" + i + "]" + name + qlError + "。";
    this.errorCount++;
  }
}

//  /**
//   * 判断行政村名称
//   */
//  private void isXZC_name_no_comp(Node wpt) {
//    String name = ItemValue.getWaypointName(wpt).trim();
//    if (name.equals("")) {
//      this.errorMessage = this.errorMessage + "<行政村名称为空>";
//      this.errorCount++;
//    }
//  }
//
//  /**
//   * 判断行政村人口
//   */
//  private void isXZC_renkou_no_comp(Node wpt) {
//    String renkou = ItemValue.getWaypoint_renkou(wpt).trim();
//    if (renkou.equals("")) {
//      this.errorMessage = this.errorMessage + "<人口数量为空>";
//      this.errorCount++;
//    }
//  }
//
//  /**
//   * 判断行政村收入
//   */
//  private void isXZC_shouru_no_comp(Node wpt) {
//    String shouru = ItemValue.getWaypoint_shouru(wpt).trim();
//    if (shouru.equals("")) {
//      this.errorMessage = this.errorMessage + "<人均收入为空>";
//      this.errorCount++;
//    }
//  }
//
//  /**
//   * 判断行政村经济
//   */
//  private void isXZC_jingji_no_comp(Node wpt) {
//    String jingji = ItemValue.getWaypoint_jingji(wpt).trim();
//    if (jingji.equals("")) {
//      this.errorMessage = this.errorMessage + "<行政村经济作物为空>";
//      this.errorCount++;
//    }
//  }

  public String getN() {
    return this.n;
  }

  public void reset() {
    this.n = "";
    this.dataCount = 0;
  }

}

⌨️ 快捷键说明

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