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

📄 update2.java

📁 java 读写EXCEL文件的源码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                                Local_code=null;
                                Dss_type  =null;
                                Dss_code  =null;
	      }//end while
                              TyResult.close();
/*光缆纤芯*/
 	}else if(tabName.equals("GLXX_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code=TyResult.getString("光缆段编码");
                            SecondSql="UPDATE GLXX_T SET TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.GLXX+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();
/*IDF端子信息表*/
 	}else if(tabName.equals("IDFD_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code=TyResult.getString("IDF编码");
                            SecondSql="UPDATE IDFD_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDFD+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+",无法对应IDF编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_code=null;
	      }//end while
                              TyResult.close();
/*IDF电缆端口跳接信息表*/
 	}else if(tabName.equals("IDFT_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_idfcode = TyResult.getString("IDF编码");
                            String Local_rddlcode = TyResult.getString("入端电缆编码");
                            String Local_cddlcode = TyResult.getString("出端电缆编码");
                            SecondSql="UPDATE IDFT_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDFT+MslinkStr;
                            if(Local_idfcode!=null&&Local_rddlcode!=null&&Local_cddlcode!=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_idfcode==null)frmErrorS=frmErrorS+",无法对应IDF编码";
                                 if(Local_rddlcode==null)frmErrorS=frmErrorS+",无法对应入端电缆编码";
                                 if(Local_cddlcode==null)frmErrorS=frmErrorS+",无法对应出端电缆编码";

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

	      }//end while
                              TyResult.close();
/*IDF电缆端口线序关联表*/
 	}else if(tabName.equals("IDFX_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_idfcode = TyResult.getString("IDF编码");
                            String Local_dlcode = TyResult.getString("电缆编码");
                            SecondSql="UPDATE IDFX_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDFX+MslinkStr;
                            if(Local_idfcode!=null&&Local_dlcode!=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_idfcode==null)frmErrorS=frmErrorS+",无法对应IDF编码";
                                 if(Local_dlcode==null)frmErrorS=frmErrorS+",无法对应电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_idfcode =null;
                                Local_dlcode =null;
	      }//end while
                              TyResult.close();
/*IDF光缆端口跳接信息表*/
 	}else if(tabName.equals("IDFJ_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_idfcode = TyResult.getString("IDF编码");
                            String Local_rddlcode = TyResult.getString("入端光缆段编码");
                            String Local_cddlcode = TyResult.getString("出端光缆段编码");
                            SecondSql="UPDATE IDFJ_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDFJ+MslinkStr;
                            if(Local_idfcode!=null&&Local_rddlcode!=null&&Local_cddlcode!=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_idfcode==null)frmErrorS=frmErrorS+",无法对应IDF编码";
                                 if(Local_rddlcode==null)frmErrorS=frmErrorS+",无法对应入端光缆段编码";
                                 if(Local_cddlcode==null)frmErrorS=frmErrorS+",出端光缆段编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_idfcode = null;
                                Local_rddlcode =null;
                                Local_cddlcode =null;
	      }//end while
                              TyResult.close();
/*IDF光缆端口关联表*/
 	}else if(tabName.equals("IDFK_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_idfcode = TyResult.getString("IDF编码");
                            String Local_glcode = TyResult.getString("光缆编码");
                            SecondSql="UPDATE IDFK_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDFK+MslinkStr;
                            if(Local_idfcode!=null&&Local_glcode!=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_idfcode==null)frmErrorS=frmErrorS+",无法对应IDF编码";
                                 if(Local_glcode==null)frmErrorS=frmErrorS+",无法对应光缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_idfcode =null;
                                Local_glcode =null;
	      }//end while
                              TyResult.close();
/*IDF交换机跳接信息表*/
 	}else if(tabName.equals("IDJJ_T")){
	     while(TyResult.next())
              {
                            MslinkStr= TyResult.getString("mslink");
                            String Local_idfcode = TyResult.getString("IDF编码");
                            String Local_glcode = TyResult.getString("交换机编码");
                            SecondSql="UPDATE IDJJ_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.IDJJ+MslinkStr;
                            if(Local_idfcode!=null&&Local_glcode!=null)
                                 {
                                  suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
                                               if(suFlag!=null)
                                                 {
      

⌨️ 快捷键说明

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