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

📄 trknocomp.java

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

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

/**
 * <p>Title: </p>
 *
 * <p>Description: 航迹信息没有填充完毕</p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author 王爱国
 * @version 1.0
 */
public class TrkNoComp {
  Node[] alltrk = null;
  private String n = "";

  private int dataCount = 0;
  private int errorCount = 0;
  private String errorMessage = "";
  public TrkNoComp() {
  }

  public void checkAll() {
    alltrk = ItemValue.getTracks();
    if (alltrk != null) {
      for (int i = 0; i < alltrk.length; i++) {
        this.is_Infor_no_comp(alltrk[i],i);
      }
    }
    this.errorMessage ="";
    this.errorCount = 0;
  }

  /**
   * 如果市\县\乡没有填写情况下,包括下面的判断乡道\村道
   * 返回true
   */
  private void  is_Infor_no_comp(Node trk,int i) {
   this.isShi_no_comp(trk);
   this.isXian_no_comp(trk);
   this.is_Xiang_no_comp(trk);
   this.is_Name_no_comp(trk);
   this.is_Number_no_comp(trk);
   this.is_Grade_no_comp(trk);
   this.is_Jishu_no_comp(trk);
   this.is_Type_no_comp(trk);
   this.is_Width_no_comp(trk);
   this.is_luji_no_comp(trk);
   this.is_Yanghu_no_comp(trk);
   this.is_ConStructPlan_no_comp(trk);

   this.isFindError(trk,i);
   if (this.errorCount>0) {
     this.n = this.n + this.errorMessage + "\r\n";
   }

   this.errorMessage ="";
   this.errorCount = 0;
  }
  /**
   * 判断市
   */
  private void isShi_no_comp(Node trk){
    String shi = ItemValue.getTracksT1(trk).trim();
    if (shi.equals("")) {
      errorCount ++;
      this.errorMessage = errorMessage + "<市未填写>";
    }
  }
  /**
   * 判断县
   */
  private void isXian_no_comp(Node trk){
    String shi = ItemValue.getTracksT1(trk).trim();
    if (shi.equals("")) {
      errorCount ++;
      this.errorMessage = errorMessage + "<县未填写>";
    }
  }

  /**
   * 判断乡
   *
   */
  private void is_Xiang_no_comp(Node trk) {
    String xiang = ItemValue.getTracksT2(trk).trim();
    String grade = (ItemValue.getTracksGrade(trk)).trim();
    if ((grade.equals(TrackType.Grade_CUN))||(grade.equals(TrackType.Grade_XIANG))) {
      if (xiang.equals("")) {
        errorCount++;
        this.errorMessage = errorMessage + "<乡未填写>";
      }
    }
  }
  /**
   * 判断路线名称
   */
  private void is_Name_no_comp(Node trk){
    String name = ItemValue.getTracksName(trk).trim();
    if (name.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<路线名称未填写>";
    }
  }

  /**
   * 判断路线编号
   */
  private void is_Number_no_comp(Node trk){
    String number = ItemValue.getTracksNumber(trk).trim();
    String grade = (ItemValue.getTracksGrade(trk)).trim();
    if ((grade.equals(TrackType.Grade_GUO))||(grade.equals(TrackType.Grade_SHEN))||(grade.equals(TrackType.Grade_XIAN))) {
      if (number.equals("")) {
        errorCount++;
        this.errorMessage = errorMessage + "<路线编号未填写>";
      }
    }
  }

  /**
   * 判断路线行政等级
   */
  private void is_Grade_no_comp(Node trk){
    String name = ItemValue.getTracksGrade(trk).trim();
    if (name.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<行政等级未填写>";
    }
  }

  /**
   * 判断路线技术等级
   */
  private void is_Jishu_no_comp(Node trk){
    String jishu = ItemValue.getTracksT5(trk).trim();
    if (jishu.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<技术等级未填写>";
    }
  }

  /**
   * 判断路线路面类型
   */
  private void is_Type_no_comp(Node trk){
    String type = ItemValue.getTracksType(trk).trim();
    if (type.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<路面类型未填写>";
    }
  }

  /**
   * 判断路线路面宽度
   */
  private void is_Width_no_comp(Node trk){
    String width = ItemValue.getTracksWidth(trk).trim();
    if (width.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<路面宽度未填写>";
    }
  }

  /**
   * 判断路线路基宽度
   */
  private void is_luji_no_comp(Node trk){
    String width = ItemValue.getTracks_jitongbu_luji_With(trk).trim();
    if (width.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<路基宽度未填写>";
    }
  }


  /**
   * 判断路线养护质量
   */
  private void is_Yanghu_no_comp(Node trk){
    String yanghu = ItemValue.getTracks_jitongbu_yanghu(trk).trim();
    if (yanghu.equals("")) {
      errorCount++;
      this.errorMessage = errorMessage + "<养护质量未填写>";
    }
  }

  /**
   * 判断路线建设类型
   */
  private void is_ConStructPlan_no_comp(Node trk){
    String grade = (ItemValue.getTracksGrade(trk)).trim();
    if ((grade.equals(TrackType.Grade_XIAN))||(grade.equals(TrackType.Grade_XIANG))||(grade.equals(TrackType.Grade_CUN))) {
      String type = ItemValue.getTracksType(trk).trim();
      if ((type.equals(TrackType.RS_C_type))||(type.equals(TrackType.RS_D_bad))) {
        String plan  = ItemValue.getTracks_construct(trk);
        if (plan.equals("")) {
          errorCount++;
          this.errorMessage = errorMessage + "<建设类型未填写>";
        }
      }
    }
  }

  /**
   * 如果本航迹有错误的话
   */
  private void isFindError(Node trk,int i) {
    if (this.errorCount >0) {
      this.n = n + "\"\",\"\",\"\",\"\",文件<" + ItemValue.fileName + ">里.航迹<" +
          ItemValue.getTracksName(trk) + ">["+(i+1)+"] 未填写项:";

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

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

}

⌨️ 快捷键说明

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