⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queryaction.java

📁 一个专门用来快速开发网站的框架
💻 JAVA
字号:
package com.ksgl.body.index;

import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionContext;
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 hj
 * @version 1.0
 */

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

  private static Log log = LogFactory.getLog(QueryAction.class);
  private List list,list1,list2,list3,list4,list5,list6,list7,list8,list9,list10,list11,list12,list13,list14,list15,list16,list17,list18,list19,list20,list21,list22,list23;
  private UserInfo user;
  private com.ksgl.body.member.GlyCountVO vo;

  public String execute() throws Exception {
    BO bo = new BO();
    user = new com.ksgl.body.member.BO().getUse();

     //list23 = bo.queryListindexCg(condition,0,9);

    //特色产业
    list = bo.queryListindex(condition,"10",0,6);

    //专业协会
    list1 = bo.queryListindex(condition,"19",0,6);

    //专家指导
    list3 = bo.queryListindex(condition,"17",0,5);
    //实用技术
    list4 = bo.queryListindex(condition,"15",0,6);

    //市场预测
    list5 = bo.queryListindex(condition,"21",0,5);
    //科技示范户
    list6 = bo.queryListindex(condition,"12",0,5);
    //企业数据库
    list7 = bo.queryListindex(condition,"16",0,10);
    //政策法规
    list8 = bo.queryListindex(condition,"14",0,5);
    //农业项目
    list9 = bo.queryListindex(condition,"11",0,5);
    //产业标准
    list10 = bo.queryListindex(condition,"13",0,5);
    //产业标准
    list11 = bo.queryListindex(condition,"18",0,5);
    //粮油
    list12 = bo.queryListindex(condition,"2",0,5);
    //新闻动态
    list14 = bo.queryListindex(condition,"22,23",0,6);

    //最新动态
    list16 = bo.queryListindex(condition,"24",0,5);
    //柏林科技队伍
    list17 = bo.queryListindex(condition,"20",0,5);

    //图片新闻(图片)
    list2 = bo.queryListindextp(condition);

   list20=bo.queryListindex1(condition,0,5);
    StringBuffer str=new StringBuffer();
    int i = 0;
      if(list20.size()>=5)
      {
       i = 1;
      }else if(list20.size()==4)
      {
       i=2;
       str.append("imgUrl" + 1 + "='image/nopic.gif';\n").append("imgtext" + 1 + "='" +
                          "暂无照片" + "'\n")
           .append("imgLink" + 1 + "=escape(' index.action ');\n");

     }else if(list20.size()==3)
     {
      i=3;
      str.append("imgUrl" + 1 + "='image/nopic.gif';\n").append("imgtext" + 1 + "='" +
                          "暂无照片" + "'\n")
           .append("imgLink" + 1 + "=escape(' index.action ');\n");
       str.append("imgUrl" +2 + "='image/nopic.gif';\n").append("imgtext" + 2 + "='" +
                          "暂无照片" + "'\n")
           .append("imgLink" +2 + "=escape(' index.action ');\n");


    }else if(list20.size()==2)
    {
     i=4;
     str.append("imgUrl" + 1 + "='image/nopic.gif';\n").append("imgtext" + 1 + "='" +
                          "暂无照片" + "'\n")
           .append("imgLink" + 1 + "=escape(' index.action ');\n");
       str.append("imgUrl" +2 + "='image/nopic.gif';\n").append("imgtext" + 2 + "='" +
                          "暂无照片" + "'\n")
           .append("imgLink" +2 + "=escape(' index.action ');\n");
       str.append("imgUrl" +3 + "='image/nopic.gif';\n").append("imgtext" + 3 + "='" +
                         "暂无照片" + "'\n")
          .append("imgLink" +3 + "=escape(' index.action ');\n");


   }else if(list20.size()==1)
   {
    i=5;
    str.append("imgUrl" + 1 + "='image/nopic.gif';\n").append("imgtext" + 1 + "='" +
                         "暂无照片" + "'\n")
          .append("imgLink" + 1 + "=escape(' index.action ');\n");
      str.append("imgUrl" +2 + "='image/nopic.gif';\n").append("imgtext" + 2 + "='" +
                         "暂无照片" + "'\n")
          .append("imgLink" +2 + "=escape(' index.action ');\n");
      str.append("imgUrl" +3 + "='image/nopic.gif';\n").append("imgtext" + 3 + "='" +
                        "暂无照片" + "'\n")
         .append("imgLink" +3 + "=escape(' index.action ');\n");
     str.append("imgUrl" +4 + "='image/nopic.gif';\n").append("imgtext" + 4 + "='" +
                        "暂无照片" + "'\n")
         .append("imgLink" +4 + "=escape(' index.action ');\n");


   }else if(list20.size()==0)
   {
    i= 6;
    str.append("imgUrl" + 1 + "='image/nopic.gif';\n").append("imgtext" + 1 + "='" +
                         "暂无照片" + "'\n")
          .append("imgLink" + 1 + "=escape(' index.action ');\n");
      str.append("imgUrl" +2 + "='image/nopic.gif';\n").append("imgtext" + 2 + "='" +
                         "暂无照片" + "'\n")
          .append("imgLink" +2 + "=escape(' index.action ');\n");
      str.append("imgUrl" +3 + "='image/nopic.gif';\n").append("imgtext" + 3 + "='" +
                        "暂无照片" + "'\n")
         .append("imgLink" +3 + "=escape(' index.action ');\n");
     str.append("imgUrl" +4 + "='image/nopic.gif';\n").append("imgtext" + 4 + "='" +
                        "暂无照片" + "'\n")
         .append("imgLink" +4 + "=escape(' index.action ');\n");
     str.append("imgUrl" +5 + "='image/nopic.gif';\n").append("imgtext" + 5 + "='" +
                            "暂无照片" + "'\n")
         .append("imgLink" +5 + "=escape(' index.action ');\n");

   }




      for (Iterator it = list20.iterator(); it.hasNext(); ) {
        T_sys_news obj = (T_sys_news) it.next();

        str.append("imgUrl" + i + "='upload/" + obj.getImage() +
            "';\n").append("imgtext" + i + "='" +
                           obj.getTitle().substring(19, 30) + "'\n")
            .append("imgLink" + i + "=escape('QueryOne.action?id=" +
                    obj.getId() + "');\n");

        //zxOneLisrt.action?id=<ksgl:property name='id'/>&&so=<ksgl:property name='st'/>&&stid=<ksgl:property name='mkid'/>  target=_blank"
        //str.append("imgLink"+i+"=escape('zxOneLisrt.action?id="+obj.getId()+"&&stid="+obj.getMkid()+"&&so=so=<ksgl:property name='st'/> target=_blank');\n");
        i++;


    }

    ActionContext ctx = ActionContext.getContext();
    HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);

    request.setAttribute("a",str.toString());
     /*
    list11 = bo.queryListindex(condition,"1",0,4);
    list12 = bo.queryListindex(condition,"2",0,4);
    list13 = bo.queryListindex(condition,"3",0,4);
    list14 = bo.queryListindex(condition,"4",0,8);
    list22 = bo.queryListindex(condition,"5",0,3);
    //member---->数据!
    list16 = bo.queryListindex(condition,"17",0,6);
    list17 = bo.queryListindex(condition,"18",0,6);
    list18 = bo.queryListindex(condition,"1",0,6);
    list19 = bo.queryListindex(condition,"2",0,6);
    list20 = bo.queryListindex(condition,"16",0,6);
    list21 = bo.queryListindex(condition,"13",0,6);
*/


//    vo = new com.ksgl.body.member.BO().queryCount();

    return SUCCESS;
  }

  public List getList() {
    return list;
  }

    public UserInfo getUser() {
        return user;
    }

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

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

    public List getList1() {
      return list1;
    }

    public void setList1(List list1) {
      this.list1 = list1;
    }
  public com.ksgl.body.member.GlyCountVO getVo() {
    return vo;
  }
  public void setVo(com.ksgl.body.member.GlyCountVO vo) {
    this.vo = vo;
  }
  public List getList2() {
    return list2;
  }
  public void setList2(List list2) {
    this.list2 = list2;
  }
  public List getList3() {
    return list3;
  }
  public List getList4() {
    return list4;
  }
  public List getList5() {
    return list5;
  }
  public List getList6() {
    return list6;
  }
  public List getList7() {
    return list7;
  }
  public List getList8() {
    return list8;
  }
  public List getList23()
  {
    return list23;
  }
  public void setList8(List list8) {
    this.list8 = list8;
  }
  public void setList7(List list7) {
    this.list7 = list7;
  }
  public void setList6(List list6) {
    this.list6 = list6;
  }
  public void setList5(List list5) {
    this.list5 = list5;
  }
  public void setList4(List list4) {
    this.list4 = list4;
  }
  public void setList3(List list3) {
    this.list3 = list3;
  }
  public List getList10() {
    return list10;
  }
  public List getList11() {
    return list11;
  }
  public List getList12() {
    return list12;
  }
  public List getList13() {
    return list13;
  }
  public List getList14() {
    return list14;
  }
  public void setList14(List list14) {
    this.list14 = list14;
  }
  public void setList13(List list13) {
    this.list13 = list13;
  }
  public void setList12(List list12) {
    this.list12 = list12;
  }
  public void setList11(List list11) {
    this.list11 = list11;
  }
  public void setList10(List list10) {
    this.list10 = list10;
  }
  public List getList9() {
    return list9;
  }
  public void setList9(List list9) {
    this.list9 = list9;
  }
  public List getList15() {
    return list15;
  }

  public List getList16() {
    return list16;
  }

  public List getList17() {
    return list17;
  }

  public List getList18() {
    return list18;
  }

  public List getList19() {
    return list19;
  }

  public List getList20() {
    return list20;
  }

  public List getList21() {
    return list21;
  }

  public List getList22() {
    return list22;
  }

  public void setList15(List list15) {
    this.list15 = list15;
  }

  public void setList21(List list21) {
    this.list21 = list21;
  }

  public void setList20(List list20) {
    this.list20 = list20;
  }

  public void setList19(List list19) {
    this.list19 = list19;
  }

  public void setList18(List list18) {
    this.list18 = list18;
  }

  public void setList17(List list17) {
    this.list17 = list17;
  }

  public void setList16(List list16) {
    this.list16 = list16;
  }

  public void setList22(List list22) {
    this.list22 = list22;
  }

  public void setList23(List list23)
  {
    this.list23=list23;
  }

  private void jbInit() throws Exception {
  }

}

⌨️ 快捷键说明

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