?? nszx.java
字號(hào):
package app.controller.internet.nszx;
import frame.llfx.*;
import frame.config.*;
import java.sql.*;
import java.util.*;
//import org.apache.log4j.*;
import frame.log.*;
import app.model.internet.*;
import frame.db.*;
import frame.tran.*;
import frame.action.*;
import frame.logic.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class NszxNew extends BasicTran {
// static Category cat = Category.getInstance("SsltNew.class.getName()");
/**
*
* 完成主要功能
* @param input Config 從頁(yè)面的到的打包信息。
* @return Config 把需要返回的信息打包返回。
*/
public static Config execute(Config input) {
// BasicConfigurator.configure();
// HttpServletRequest request = null;
// HttpServletRequest response = null;
Connection conn=null;
// 聲明所有 T* 類
TNszx nszxInfo = null;
Config Nszxcfg = null;
//定義輸出 Config
Config output = new XMLConfig("szsat", "");
// Vector result = null;
output.addKey("result", "0");
try {
Log.init();
//cat.info("處理啟動(dòng)");
Nszxcfg = input.getConfig("yj");
String pZz = nullToEmpty( Nszxcfg.getValue( "zz" ) ); //發(fā)言人
String pSubject = nullToEmpty( Nszxcfg.getValue( "subject" ) ); //主題
String pLb = nullToEmpty( Nszxcfg.getValue( "lb" ) ); //文章類別
System.out.println( "文章正文開始" );
String pNr = nullToEmpty( Nszxcfg.getValue( "nr" ) ); //文章內(nèi)容
System.out.println(pNr);
System.out.println( "文章正文結(jié)束" );
String pNsrsbh=nullToEmpty(Nszxcfg.getValue("nsrsbh"));
// String pMm=nullToEmpty(Nszxcfg.getValue("mm"));
System.out.println(pZz);
Connection conn1 = DBConnection.getConnection( Const.IS_INTERNET, Const.IS_AUTOCOMMIT);
/* 注釋掉納稅人識(shí)別號(hào)校驗(yàn)
String mm="";
try{
TWbyh twbyh=new TWbyh(conn1);
mm=twbyh.getYhmmfromNsrsbh(pNsrsbh);
}
catch(DBException e){
errorExit(output,"納稅人識(shí)別號(hào)不存在或者密碼不匹配!");
}
if(!mm.equals(pMm)){
errorExit(output,"納稅人識(shí)別號(hào)不存在或者密碼不匹配!");
}
*/
// Statement stmt = conn1.createStatement();
Nszx_sjbh nszx_sjbh = new Nszx_sjbh();
String pSjbh = nszx_sjbh.getSjbh();
// ResultSet rs = stmt.executeQuery( "select Max( to_number(SJBH ) + 1 ) from NSZX");
// String pSjbh="";
// if( rs.next())
// pSjbh =rs.getString( 1 );//數(shù)據(jù)編號(hào)
// else
// pSjbh = "1";
// if(pSjbh == null || pSjbh.equals(""))
// pSjbh = "1";
System.out.println( "數(shù)據(jù)編號(hào)" + pSjbh );
// rs.close();
// stmt.close();
// conn1.close();
CurrDate currDate = new CurrDate();
BeanNszx beanNszx=new BeanNszx(pSjbh);
beanNszx.setBt(pSubject);//標(biāo)題
beanNszx.setZxnsr(pZz);//發(fā)言人
//clob beanNszx.setZxzw(pNr);//咨詢正文
beanNszx.setLmbh(pLb);//欄目編號(hào)
beanNszx.setWzgjz(pSubject);//發(fā)文關(guān)鍵字
// beanNszx.setUrl(" ");//發(fā)布路徑
beanNszx.setZtbz("02" );//狀態(tài)標(biāo)志
//更新數(shù)據(jù)庫(kù) 創(chuàng)建數(shù)據(jù)庫(kù)連接
conn = DBConnection.getConnection( Const.IS_INTERNET, Const.IS_NOT_AUTOCOMMIT);
beanNszx.insert(conn);
conn.commit();
//***updateclob
nszxInfo = new TNszx(conn);
Hashtable zw_where=new Hashtable();
zw_where.put("SJBH",pSjbh);
System.out.println(zw_where);
nszxInfo.update("zxzw",pNr,zw_where);
conn.commit();
//****
}
catch (ConfigNotFoundException e) {
errorExit(output, e.toString());
}
catch (DBException e) {
errorExit(output, conn, e.toString());
}
catch (Exception e) {
errorExit(output, conn, e.toString());
}
finally {
//關(guān)閉數(shù)據(jù)庫(kù)連接
try {
if (conn != null) {
conn.close();
}
}
catch (Exception e) {
}
}
System.out.println( "納稅咨詢提交" );
return output;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -