?? flglcxflxxblh.java
字號:
package gov.gdlt.ssgly.taxcore.taxblh.flgl;
import gov.gdlt.ssgly.taxcore.comm.blh.BaseBizLogicHandler;
import gov.gdlt.ssgly.taxcore.comm.event.ResponseEvent;
import gov.gdlt.ssgly.taxcore.comm.event.RequestEvent;
import gov.gdlt.ssgly.taxcore.comm.exception.TaxBaseSystemException;
import gov.gdlt.ssgly.taxcore.comm.exception.TaxBaseBizException;
import gov.gdlt.ssgly.taxcore.taxevent.flgl.FLGLcxflxxReqEvent;
import gov.gdlt.ssgly.taxcore.comm.log.LogWritter;
import gov.gdlt.ssgly.taxcore.taxevent.flgl.FLGLcxflxxResEvent;
import gov.gdlt.ssgly.taxcore.taxevent.flgl.*;
import gov.gdlt.ssgly.taxcore.taxdao.flgl.*;
import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
import java.sql.SQLException;
/**
* <p>Title:查詢分類信息BLH </p>
*
* <p>Description: 對用戶信息、自定義分類信息進行查詢</p>
*
* <p>Copyright: Copyright (c) 2005 廣東省地方稅務局,廣州市地方稅務局</p>
*
* <p>Company: 廣州地稅</p>
*
* @author CZZ
*
* @version 1.0
*/
public class FLGLcxflxxBLH extends BaseBizLogicHandler {
public FLGLcxflxxBLH() {
}
protected ResponseEvent validateData(RequestEvent req) throws
Exception {
return null;
}
protected ResponseEvent performTask(RequestEvent req) throws
TaxBaseSystemException, TaxBaseBizException {
String dealMethod = req.getDealMethod(); //業務處理標志
ResponseEvent resEvn = new ResponseEvent(); //創建ResponseEvent對象resEvn
//強制造型轉換
FLGLcxflxxReqEvent reqEvent = (FLGLcxflxxReqEvent) req;
try {
if ("cxNsrFlxx".equals(dealMethod)) {
resEvn = this.cxNsrFlxx(reqEvent);
} else if ("cxFlxx".equals(dealMethod)) {
resEvn = this.cxFlxx(reqEvent);
} else if ("cxAllNsr".equals(dealMethod)) {
resEvn = this.cxAllNsr(reqEvent);
} else if ("cxZdyfl".equals(dealMethod)) {
resEvn = this.cxZdyfl(reqEvent);
} else {
throw new TaxBaseBizException("YCFLGL01011:沒有 " +
dealMethod +
" 方法!");
}
} catch (TaxBaseBizException e) {
throw new TaxBaseBizException(e.getMessage());
}
return resEvn;
}
/**
* 查詢某一管理員的所有分類
* @param req FLGLcxflxxReqEvent
* @return ResponseEvent
*/
private ResponseEvent cxFlxx(FLGLcxflxxReqEvent req) throws
TaxBaseBizException {
FLGLflxxDAO flxxdao = new FLGLflxxDAO();
FLGLcxflxxReqEvent cxReqEvent = (FLGLcxflxxReqEvent) req; //定義設置條件ReqEvent
String lrry_dm = cxReqEvent.getGly_dm();
HashMap flht = new HashMap();
List flList = new ArrayList();
FLGLcxflxxResEvent res = new FLGLcxflxxResEvent(); //生成一個resEvent對象
try {
flList = flxxdao.findAllFlBylrry(lrry_dm);
if (flList != null) {
for (int count = 0; count < flList.size(); count++) {
FLGLflxxVO flxx = (FLGLflxxVO) flList.get(count);
flht.put(flxx.getFl_xh(), flxx.getFl_mc());
}
res.setRepCode("0");
} else
res.setRepCode("-1");
} catch (SQLException e) {
res.setRepCode("-1");
throw new TaxBaseBizException("YCFLGL01001:查詢分類信息異常!");
}
res.setFlmap(flht);
res.setFlList(flList);
return res;
}
private ResponseEvent cxZdyfl(FLGLcxflxxReqEvent req) throws
TaxBaseBizException {
FLGLflxxDAO flxxdao = new FLGLflxxDAO();
FLGLcxflxxReqEvent cxReqEvent = (FLGLcxflxxReqEvent) req; //定義設置條件ReqEvent
String lrry_dm = cxReqEvent.getGly_dm();
HashMap flht = new HashMap();
List flList = new ArrayList();
FLGLcxflxxResEvent res = new FLGLcxflxxResEvent(); //生成一個resEvent對象
try {
flList = flxxdao.findZdyflFlBylrry(lrry_dm);
if (flList!=null){
for (int count = 0; count < flList.size(); count++) {
FLGLflxxVO flxx = (FLGLflxxVO) flList.get(count);
flht.put(flxx.getFl_xh(), flxx.getFl_mc());
res.setRepCode("0");
}
}else res.setRepCode("-1");
} catch (SQLException e) {
res.setRepCode("-1");
throw new TaxBaseBizException("YCFLGL010011:查詢自定義分類信息異常!");
}
res.setFlmap(flht);
res.setFlList(flList);
return res;
}
/**
* 查詢某一分類的所有納稅人
* @param req FLGLcxflxxReqEvent
* @return ResponseEvent
*/
private ResponseEvent cxNsrFlxx(FLGLcxflxxReqEvent req) throws
TaxBaseBizException {
FLGLflxxDAO flxxdao = new FLGLflxxDAO();
FLGLnsrflxxVO nsrflxx = new FLGLnsrflxxVO();
FLGLcxflxxReqEvent cxReqEvent = (FLGLcxflxxReqEvent) req; //定義設置條件ReqEvent
BigDecimal fl_xh = cxReqEvent.getFl_xh();
List flList = new ArrayList();
HashMap flht = new HashMap();
StringBuffer sb = new StringBuffer();
//生成一個resEvent對象
FLGLcxflxxResEvent res = new FLGLcxflxxResEvent();
try {
//System.out.println("----before try-----YCFLGL01002:cxNsr-------------");
flList = flxxdao.findAllNsrByFlxh(fl_xh);
//System.out.println("-----after dao----YCFLGL01002:cxNsr-------------");
if (flList!=null){
for (int count = 0; count < flList.size(); count++) {
nsrflxx = (FLGLnsrflxxVO) flList.get(count);
flht.put(nsrflxx.getFl_xh(), nsrflxx.getFl_mc());
}
res.setRepCode("0");
}else res.setRepCode("-1");
} catch (SQLException e) {
res.setRepCode("-1");
throw new TaxBaseBizException("YCFLGL01002:查詢納稅人分類信息異常!");
}
res.setFlmap(flht); //返回hashMap(fl_xh,fl_mc)
res.setNsrflxxList(flList);
res.setRetMsg(sb.toString());
return res;
}
/**
* 讀取某一管理員“我的管戶”納稅人列表
* @param req FLGLcxflxxReqEvent 傳入管理員代碼
* @return ResponseEvent 返回納稅人分類信息列表
*/
private ResponseEvent cxAllNsr(FLGLcxflxxReqEvent req) throws
TaxBaseBizException {
FLGLflxxDAO flxxdao = new FLGLflxxDAO();
FLGLnsrflxxVO nsrflxx = new FLGLnsrflxxVO();
FLGLcxflxxReqEvent cxReqEvent = (FLGLcxflxxReqEvent) req; //定義設置條件ReqEvent
//LogWritter.testDebug("set lrry_dm---");
String lrry_dm = cxReqEvent.getGly_dm();
// LogWritter.testDebug("find All NsrBylrry_dm");
FLGLcxflxxResEvent res = new FLGLcxflxxResEvent(); //生成一個resEvent對象
HashMap flhm = new HashMap();
StringBuffer sb = new StringBuffer();
List flList = new ArrayList();
try {
flList = flxxdao.findAllNsrBylrry(lrry_dm);
// LogWritter.testDebug("get flList.size()=" + flList.size());
if (flList!=null){
for (int count = 0; count < flList.size(); count++) {
nsrflxx = (FLGLnsrflxxVO) flList.get(count);
flhm.put(nsrflxx.getFl_xh(), nsrflxx.getFl_mc());
}
res.setRepCode("0");
}else res.setRepCode("-1");
} catch (SQLException e) {
res.setRepCode("-1");
throw new TaxBaseBizException("YCFLGL01003:查詢所有納稅人BLH異常!");
}
res.setFlmap(flhm); //返回hashMap(fl_xh,fl_mc)
res.setNsrflxxList(flList);
res.setRetMsg(sb.toString());
return res;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -