📄 sjwhallnsrmbean.java
字号:
outcome = "success";
} else {
String alertMsg = "XXSJWH-002:保存失败!";
output.append(
"<script language=\"javascript\" type=\"text/javascript\">");
output.append("alert('")
.append(alertMsg).append("')");
output.append("</script>");
this.tips = new String(output);
outcome = "failure";
}
} catch (Exception e) {
e.printStackTrace();
outcome = "failure";
}
}
return outcome;
}
public String reload() {
try {
allCjsj = getAllData(nsrnbm);
} catch (Exception ex) {
ex.printStackTrace();
}
return "success";
}
/**
* 读取纳税人的所有指标数据
* @param nsrnbm BigDecimal
* @return List
* @throws Exception
*/
private List getAllData(BigDecimal nsrnbm) throws Exception {
// System.out.println("----mbean before get alldata :" + System.currentTimeMillis());
SJWHcjsjReqEvent cjsjReq = new SJWHcjsjReqEvent();
cjsjReq.setNsrnbm(nsrnbm);
cjsjReq.setDealMethod("getAllLastCjsj");
// cjsjReq.setDealMethod("getAllZbsj");
List packList = new ArrayList();
int length = 0;
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(cjsjReq);
SJWHcjsjResEvent cjsjResp = (SJWHcjsjResEvent) resp;
List cjsjList = cjsjResp.getCjsj();
for (int i = 0; i < cjsjList.size(); i++) {
List zlbList = new ArrayList();
SJWHcjsjVO cjsjvo = (SJWHcjsjVO) cjsjList.get(i);
if ("0".equals(cjsjvo.getLr_bj())) {
cjsjvo.setReadOnly(true);
if (cjsjvo.isCheckBoxFlag() && cjsjvo.getZbz().equals("1")) {
cjsjvo.setZbz("是");
} else if (cjsjvo.isCheckBoxFlag() &&
cjsjvo.getZbz().equals("0")) {
cjsjvo.setZbz("否");
}
}
if (cjsjvo.isCheckBoxFlag()) {
if (cjsjvo.getZbz().equals("1")) {
cjsjvo.setZbzFlag(true);
} else {
cjsjvo.setZbzFlag(false);
}
}
List tempzlb = cjsjvo.getZbzList();
if (cjsjvo.isSelectManyFlag()) {
length = length + 3;
}
if (tempzlb != null) {
HashMap hm = new HashMap();
for (int j = 0; j < tempzlb.size(); j++) {
SJWHzbzVO zbz = (SJWHzbzVO) tempzlb.get(j);
zlbList.add(new SelectItem(zbz.getDml_mc(), zbz.getMc()));
// hm.put(zbz.getDml_mc(),zbz.getMc());
}
// if (cjsjvo.isReadOnly()){ //只读字段有代码表时使用
// String tempZbz = cjsjvo.getZbz();
// String temp=(String) hm.get(tempZbz);
// cjsjvo.setZbz(temp);
// }
cjsjvo.setZbzList(zlbList);
}
length++;
packList.add(cjsjvo);
}
if (length > 1) {
half_rows = length / 2;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
// System.out.println("----mbean after get alldata :" + System.currentTimeMillis());
return packList;
}
}
public String resetAction() throws Exception {
System.out.println("-------mbean start force update------");
SJWHcjsjReqEvent cjsjReq = new SJWHcjsjReqEvent();
cjsjReq.setNsrnbm(nsrnbm);
cjsjReq.setDealMethod("forceUpdate");
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(cjsjReq);
SJWHcjsjResEvent cjsjResp = (SJWHcjsjResEvent) resp;
// getAllData(nsrnbm);
} catch (Exception e) {
throw new Exception(e.getMessage());
}
System.out.println("-------mbean end force update------");
return "success";
}
public void setLrry_dm(String lrry_dm) {
this.lrry_dm = lrry_dm;
}
public void setNsrvo(FLGLnsrflxxVO nsrvo) {
this.nsrvo = nsrvo;
}
public void setNsrnbm(BigDecimal nsrnbm) {
this.nsrnbm = nsrnbm;
}
public void setCjsjvo(SJWHcjsjVO cjsjvo) {
this.cjsjvo = cjsjvo;
}
public void setAllCjsj(List allCjsj) {
this.allCjsj = allCjsj;
}
public void setOutcome(String outcome) {
this.outcome = outcome;
}
public void setOutputFlag(boolean outputFlag) {
this.outputFlag = outputFlag;
}
public void setZlb(List zlb) {
this.zlb = zlb;
}
public void setTips(String tips) {
this.tips = tips;
}
public void setKeyWords(String keyWords) {
this.keyWords = keyWords;
}
public void setNow(String now) {
this.now = now;
}
public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
}
public void setHalf_rows(int half_rows) {
this.half_rows = half_rows;
}
public String getLrry_dm() {
return lrry_dm;
}
public FLGLnsrflxxVO getNsrvo() {
return nsrvo;
}
public BigDecimal getNsrnbm() {
return nsrnbm;
}
public SJWHcjsjVO getCjsjvo() {
return cjsjvo;
}
public List getAllCjsj() throws Exception {
if (allCjsj == null || allCjsj.isEmpty()) {
if (nsrnbm == null) {
String temp = WebUtil.getParameterFromContextMap("nsrnbm");
//System.out.println("temp = " + temp);
if (temp != null) {
if (temp.trim().length() > 0) {
nsrnbm = new BigDecimal(temp);
allCjsj = getAllData(nsrnbm);
}
}
}
}
return allCjsj;
}
public String getOutcome() {
return outcome;
}
public boolean isOutputFlag() {
return outputFlag;
}
public List getZlb() {
return zlb;
}
public String getTips() {
return tips;
}
public String getNsr_mc() {
return nsr_mc;
}
public String getNsrbm() {
return nsrbm;
}
public String getKeyWords() {
return keyWords;
}
public ArrayList getNsrxxList() {
return nsrxxList;
}
public String getNow() {
return now;
}
public boolean isReadOnly() {
return readOnly;
}
public int getHalf_rows() {
return half_rows;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -