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

📄 update2.java

📁 java 读写EXCEL文件的源码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
	      }//end while
                              TyResult.close();
/*分线盒线缆关联表*/

 	}else if(tabName.equals("FXX_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code   =TyResult.getString("分线盒编码");
                            String Local_dl_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE FXX_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.FXX+MslinkStr;
                            if(Local_code!=null&&Local_dl_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(Local_code==null)frmErrorS=frmErrorS+",无法对应分线盒编码";
                                 if(Local_dl_code==null)frmErrorS=frmErrorS+",无法对应电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_code   =null;
                                Local_dl_code=null;
	      }//end while
                              TyResult.close();
/*电缆线对信息表*/
 	}else if(tabName.equals("DLXD_T")){
	     while(TyResult.next())
                 {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE DLXD_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.DLXD+MslinkStr;
                            if(Local_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(Local_code==null)frmErrorS=frmErrorS+",无法对应电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_code=null;

	      }//end while
                              TyResult.close();
/*电缆段路由表*/
 	}else if(tabName.equals("DLDL_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_dldcode = TyResult.getString("电缆段编码");
                            String Local_dsstype = TyResult.getString("点设施类型");
                            String Local_dsscode = TyResult.getString("点设施编码");
                            SecondSql="UPDATE DLDL_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.DLDL+MslinkStr;
                            if(Local_dldcode!=null&&Local_dsstype!=null&&Local_dsscode!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(Local_dldcode==null)frmErrorS=frmErrorS+",无法对应电缆段编码";
                                 if(Local_dsstype==null)frmErrorS=frmErrorS+",无法找到点设施类型";
                                 if(Local_dsscode==null)frmErrorS=frmErrorS+",无法找到点设施编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_dldcode =null;
                                Local_dsstype =null;
                                Local_dsscode =null;
	      }//end while
                              TyResult.close();
/*充气机气路关联表*/
 	}else if(tabName.equals("CQQL_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code   =TyResult.getString("充气机编码");
                            String Local_dl_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE CQQL_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.CQQL+MslinkStr;
                            if(Local_code!=null&&Local_dl_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(Local_code==null)frmErrorS=frmErrorS+",无法对应充气机编码";
                                 if(Local_dl_code==null)frmErrorS=frmErrorS+",无法对应电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_code   =null;
                                Local_dl_code=null;
	      }//end while
                              TyResult.close();
/*告警器线路关联表*/
 	}else if(tabName.equals("GJXL_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code   =TyResult.getString("告警器编码");
                            String Local_dl_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE GJXL_T SET TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.GJXL+MslinkStr;
                            if(Local_dl_code!=null&&Local_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(IdStr==null)frmErrorS=frmErrorS+"编码为空";
                                 if(Local_dl_code==null)frmErrorS=frmErrorS+",无法对应电缆编码";
                                 if(Local_code==null)frmErrorS=frmErrorS+",无法对应告警器编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_code   =null;
                                Local_dl_code=null;
	      }//end while
                              TyResult.close();
/*ODF端子信息表---ODM编码用ODF编码,框号来匹配*/
 	}else if(tabName.equals("ODFD_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String odm_code=TyResult.getString("ODF编码");
                            SecondSql="UPDATE ODFD_T SET TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.ODFD+MslinkStr;
                            if(odm_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if
                                               else
                                                  successRow++;
                                }
                               else
                                {
                                 if(odm_code==null)frmErrorS=frmErrorS+",无法对应ODF编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                odm_code=null;
	      }//end while
                              TyResult.close();
/*ODF端口与光缆纤芯关联表*/
 	}else if(tabName.equals("ODFX_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String odm_code=TyResult.getString("ODF编码");
                            String Local_gld_code=TyResult.getString("光缆段编码");
                            SecondSql="UPDATE ODFX_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.ODFX+MslinkStr;
                            if(odm_code!=null&&Local_gld_code!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
                                                   WriteErrorExl(suFlag,cell,TyResult,cols);
                                                   cell=null;
                                                   rowindex++;
                                                   rowindex_excel++;
                                                 }//end if

⌨️ 快捷键说明

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