commaction.java~1~

来自「一个专门用来快速开发网站的框架」· JAVA~1~ 代码 · 共 134 行

JAVA~1~
134
字号
package com.ksgl.body.ckzx;

import java.util.*;

import org.apache.commons.logging.*;
import com.core.web.*;
import com.ksgl.map.*;

/**
 * <p>Title: literature item </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2007</p>
 * <p>Company: </p>
 * @author whj
 * @version 1.0
 */

public class CommAction
    extends Action {
  public CommAction() {
    try {
      jbInit();
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }

  private static Log log = LogFactory.getLog(CommAction.class);
  T_ckzx objmap = new T_ckzx();
  T_expert expertobj = new T_expert();
  String id;
  String industrySelect;
  private List list;
  UserInfo user;

  public String execute() throws Exception {
    if (new com.ksgl.body.member.BO().checkUser() == false) {
      return ERROR;
    }
    else {
      user = new com.ksgl.body.member.BO().getUse();
      BO bo = new BO();
      com.ksgl.system.industry.BO industrybo = new com.ksgl.system.industry.BO();
      com.ksgl.system.expert.BO expertbo = new com.ksgl.system.expert.BO();
      log.info("condition.condition=" + condition.getCondition());
      if (condition.getActionType().equals("addsub")) {
        industrySelect = industrybo.getIndustrySlect();
        objmap = null;
      }
      else if (condition.getActionType().equals("add")) {
        bo.add(objmap);
        condition.setActionType("");
        list = bo.getList(condition, paging, 20, true, false);
      }
      else if (condition.getActionType().equals("update")) {
        bo.update(objmap, false, false);
        list = bo.getList(condition, paging, 20, true, false);
      }
      else if (condition.getActionType().equals("del")) {
        bo.delete(id);
        condition.setActionType("");
        list = bo.getList(condition, paging, 20, true, false);
      }
      else if (condition.getActionType().equals("expertlist")) {
        bo.delete(id);
        list = expertbo.getList(condition, paging, 20, true);
      }
      else if (condition.getActionType().equals("expertvo")) {
        expertobj = expertbo.getvo(id, true);
      }
      else if (condition.getActionType().equals("all")) {
        list = bo.getList(condition, paging, 20, false, false);
      }
      else {
        list = bo.getList(condition, paging, 20, true, false);
      }
      return SUCCESS;
    }
  }

  public T_ckzx getObjmap() {
    return objmap;
  }

  public void setObjmap(T_ckzx objmap) {
    this.objmap = objmap;
  }

  public String getId() {
    return id;
  }

  public List getList() {
    return list;
  }

  public String getIndustrySelect() {
    return industrySelect;
  }

  public T_expert getExpertobj() {
    return expertobj;
  }

  public UserInfo getUser() {
    return user;
  }

  public void setId(String id) {
    this.id = id;
  }

  public void setList(List list) {
    this.list = list;
  }

  public void setIndustrySelect(String industrySelect) {
    this.industrySelect = industrySelect;
  }

  public void setExpertobj(T_expert expertobj) {
    this.expertobj = expertobj;
  }

  public void setUser(UserInfo user) {
    this.user = user;
  }

  private void jbInit() throws Exception {
  }

}

⌨️ 快捷键说明

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