📄 updatet.java
字号:
CodeStr = TyResult.getString("交换机编码");
String Local_jzcode = TyResult.getString("所属局站编码");
SecondSql="UPDATE WLJ_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.WLJ+MslinkStr;
if(Local_jzcode!=null&&CodeStr!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
if(Local_jzcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
frmErrorS="错误类型:";
Local_jzcode=null;
}//end while
TyResult.close();
/*出局管道闸*/
}else if(tabName.equals("CJGZ_T")){
while(TyResult.next())
{
MslinkStr = TyResult.getString("mslink");
CodeStr = TyResult.getString("管道闸编码");
String Local_jzcode = TyResult.getString("所属局站编码");
SecondSql="UPDATE CJGZ_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.CJGZ+MslinkStr;
if(Local_jzcode!=null&&CodeStr!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
if(Local_jzcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
frmErrorS="错误类型:";
Local_jzcode=null;
}//end while
TyResult.close();
}else if(tabName.equals("YSD_T")){
while(TyResult.next())
{
MslinkStr = TyResult.getString("mslink");
CodeStr = TyResult.getString("引上点编码");
String Local_jzcode = TyResult.getString("所属局站编码");
// String dw_code = TyResult.getString("所属单位编码");
SecondSql="UPDATE YSD_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.YSD+MslinkStr;
if(CodeStr!=null&&Local_jzcode!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
if(Local_jzcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
// if(dw_code==null)frmErrorS=frmErrorS+",无法对应所属单位编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
frmErrorS="错误类型:";
Local_jzcode=null;
// dw_code=null;
}//end while
/*吊线段*/
}else if(tabName.equals("DXD_T")){
while(TyResult.next())
{
MslinkStr= TyResult.getString("mslink");
CodeStr= TyResult.getString("吊线段编码");
// String Local_zjcode = TyResult.getString("所属局站编码");
String Local_dxcode = TyResult.getString("所属吊线编码");
String Local_stcode = TyResult.getString("起始设施编码");
String Local_edcode = TyResult.getString("终止设施编码");
SecondSql="UPDATE DXD_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.DXD+MslinkStr;
if(Local_stcode!=null&&Local_edcode!=null&&CodeStr!=null&&Local_dxcode!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
// if(Local_zjcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
if(Local_stcode==null)frmErrorS=frmErrorS+",无法找到起始设施的类型或编码";
if(Local_dxcode==null)frmErrorS=frmErrorS+",无法找到所属吊线编码";
if(Local_edcode==null)frmErrorS=frmErrorS+",无法找到终止设施的类型或编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
frmErrorS="错误类型:";
// Local_zjcode=null;
Local_stcode=null;
Local_edcode=null;
Local_dxcode=null;
}//end while
TyResult.close();
/*交接箱-mdf可以为空*/
}else if(tabName.equals("JJX_T")){
while(TyResult.next())
{
MslinkStr = TyResult.getString("mslink");
CodeStr = TyResult.getString("交接箱编码");
String Local_mdfcode= TyResult.getString("所属MDF编码");
String Local_jzcode = TyResult.getString("所属局站编码");
/*唯一约束判断*/
SecondSql="UPDATE JJX_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.JJX+MslinkStr;
if(Local_jzcode!=null&&CodeStr!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
if(Local_jzcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
Local_jzcode=null;
Local_mdfcode=null;
frmErrorS="错误类型:";
}//end while
TyResult.close();
/*直线DP*/
}else if(tabName.equals("ZXDP_T")){
String mdf_id =null;
while(TyResult.next())
{
MslinkStr = TyResult.getString("mslink");
CodeStr = TyResult.getString("直线DP编码");
// String Local_mdfcode= TyResult.getString("所属MDF编码");
String Local_jzcode = TyResult.getString("所属局站编码");
SecondSql="UPDATE ZXDP_T SET TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.ZXDP+MslinkStr;
if(Local_jzcode!=null&&CodeStr!=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(CodeStr==null)frmErrorS=frmErrorS+"编码为空";
if(Local_jzcode==null)frmErrorS=frmErrorS+",无法对应所属局站编码";
// if(Local_mdfcode==null)frmErrorS=frmErrorS+",无法对应所属MDF编码";
WriteErrorExl(frmErrorS,cell,TyResult,cols);
cell=null;
rowindex++;
rowindex_excel++;
}//end if
Local_jzcode=null;
// Local_mdfcode=null;
frmErrorS="错误类型:";
}//end while
TyResult.close();
/*分线盒--无*/
}else if(tabName.equals("FXH_T")){
while(TyResult.next())
{
MslinkStr = TyResult.getString("mslink");
CodeStr = TyResult.getString("分线盒编码");
String Local_jzcode = TyResult.getString("所属局站编码");
/*拆分得到交接箱编码*/
String Local_jjxcode=BuildSimpleCode.getJjxCode(conn,MslinkStr,CodeStr);
SecondSql="UPDATE FXH_T SET JJX_ID='"+Local_jjxcode+"',TFLAG='1' where mslink="+MslinkStr;
FouthSql=InsertS.FXH+MslinkStr;
if(Local_jzcode!=null&&Local_jjxcode!=null&&CodeStr!=null)
{
suFlag=execuUpdate(conn,SecondSql,FouthSql,jLabel1);
if(suFlag!=null)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -