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

📄 update2.java

📁 java 读写EXCEL文件的源码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                            if(Local_mdf_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_mdf_code==null)frmErrorS=frmErrorS+",无法对应MDF编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_mdf_code=null;
	      }//end while
                              TyResult.close();
/*直列端口与电缆线序关联表*/
        }else if(tabName.equals("ZDLX_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_mdf_code=TyResult.getString("MDF编码");
                            String Local_dl_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE ZDLX_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.ZDLX+MslinkStr;
                            if(Local_mdf_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_mdf_code==null)frmErrorS=frmErrorS+",无法对应MDF编码";
                                 if(Local_dl_code==null)frmErrorS=frmErrorS+",无法对应电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_mdf_code=null;
                                Local_dl_code=null;
	      }//end while
                              TyResult.close();
/*交换机端口号与横列端子--交换机ID使用局站的ID--能否直接使用交换机编码*/
	}else if(tabName.equals("JHHL_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_mdf_code=TyResult.getString("MDF编码");
                            String Local_jz_code=TyResult.getString("交换机所属局站编码");
                            SecondSql="UPDATE JHHL_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.JHHL+MslinkStr;
                            if(Local_mdf_code!=null&&Local_jz_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_mdf_code==null)frmErrorS=frmErrorS+",无法对应MDF编码";
                                 if(Local_jz_code==null)frmErrorS=frmErrorS+",无法对应交换机所属局站编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_mdf_code=null;
                                Local_jz_code=null;
	      }//end while
                              TyResult.close();
/*交接箱跳线信息表*/
 	}else if(tabName.equals("JJTX_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_jjx_code=TyResult.getString("交接箱编码");
                            String Local_jjx_in=TyResult.getString("入端电缆编码");
                            String Local_jjx_out=TyResult.getString("出端电缆编码");
                            SecondSql="UPDATE JJTX_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.JJTX+MslinkStr;
                            if(Local_jjx_code!=null&&Local_jjx_in!=null&&Local_jjx_out!=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_jjx_code==null)frmErrorS=frmErrorS+",无法对应交接箱编码";
                                 if(Local_jjx_in==null)frmErrorS=frmErrorS+",无法对应入端电缆编码";
                                 if(Local_jjx_out==null)frmErrorS=frmErrorS+",无法对应出端电缆编码";

                                  WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_jjx_code=null;
                                Local_jjx_in=null;
                                Local_jjx_out=null;
	      }//end while
                              TyResult.close();
/*交接箱端子信息表*/
 	}else if(tabName.equals("JJDZ_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_jjx_code=TyResult.getString("交接箱编码");
                            SecondSql="UPDATE JJDZ_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.JJDZ+MslinkStr;
                            if(Local_jjx_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_jjx_code==null)frmErrorS=frmErrorS+",无法对应交接箱编码";

                                 WriteErrorExl(frmErrorS,cell,TyResult,cols);
                                 cell=null;
                                 rowindex++;
                                 rowindex_excel++;
                                }//end if
                                frmErrorS="错误类型:";
                                Local_jjx_code=null;
	      }//end while
                              TyResult.close();
/*交接箱端口与电缆关联表*/
 	}else if(tabName.equals("JDDL_T")){
	     while(TyResult.next())
              {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_jjx_code=TyResult.getString("交接箱编码");
                            String Local_dl_code=TyResult.getString("电缆编码");
                            SecondSql="UPDATE JDDL_T SET  TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.JDDL+MslinkStr;
                             if(Local_jjx_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_jjx_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_jjx_code=null;
                               Local_dl_code=null;
	      }//end while
                              TyResult.close();
/*分线盒端子信息表*/
 	}else if(tabName.equals("FXD_T")){
	       while(TyResult.next())
                 {
                            MslinkStr=TyResult.getString("mslink");
                            String Local_code=TyResult.getString("分线盒编码");
                            SecondSql="UPDATE FXD_T SET TFLAG='1' where mslink="+MslinkStr;
                            FouthSql=InsertS.FXD+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;

⌨️ 快捷键说明

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