• 大小: 22.14MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-03
  • 语言: Java
  • 标签:

资源简介

OA办公系统包含了简单的代码设计,流程处理,个人可根据需要添加类似模块, 资源下载后,需要修改hibernate.cfg.xml配置文件,数据库+账号+密码改为个人所用。

资源截图

代码片段和文件信息

package com.fjsdfx.starerp.annoucement.action;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.fjsdfx.starerp.annoucement.model.Annoucement;
import com.fjsdfx.starerp.annoucement.service.AnnoucementService;
import com.fjsdfx.starerp.common.bean.PagerModel;


/**
 * @author Chen_Luqiang
 *
 */
@Controller
@Scope(“prototype“)
public class AnnoucementAction {
private Logger logger=LoggerFactory.getLogger(AnnoucementAction.class);
private  AnnoucementService  annoucementService;
private Annoucement annoucement;
private PagerModel pm;
private Integer annoucementid;
public AnnoucementService getAnnoucementService() {
return annoucementService;
}

@Resource
public void setAnnoucementService(AnnoucementService annoucementService) {
this.annoucementService = annoucementService;
}

public Annoucement getAnnoucement() {
return annoucement;
}

public void setAnnoucement(Annoucement annoucement) {
this.annoucement = annoucement;
}

public PagerModel getPm() {
return pm;
}

public void setPm(PagerModel pm) {
this.pm = pm;
}

public Integer getAnnoucementid() {
return annoucementid;
}

public void setAnnoucementid(Integer annoucementid) {
this.annoucementid = annoucementid;
}


public Logger getLogger() {
return logger;
}

public void setLogger(Logger logger) {
this.logger = logger;
}

/**
 * 列表
 * @return
 * @throws Exception
 */
public String list()  {
// TODO Auto-generated method stub
//items=itemService.getAllItems();
pm=annoucementService.getPagerDesc(Annoucement.class);
return “list“;
}

/**
 * 添加
 * @return
 */
public String add()
{
annoucement.setDate(new Date());
annoucementService.saveAndRefresh(annoucement);
logger.warn(“add id=“+annoucement.getId());
return “return_list“;
}
/**
 * 搜索
 * @return
 */
public String search()
{
//pm=resourceService.findByExample(Resource.class resource);

Map like=new HashMap();
like.put(“title“ annoucement.gettitle());
pm=annoucementService.fuzzyQuery(Annoucement.class like);
return “list“;
}
/**
 * 编辑
 * @return
 */
public String update()
{
annoucementService.update(annoucement);
logger.warn(“update id=“+annoucement.getId());
return “return_list“;
}

public String del()
{
annoucementService.deleteById(Annoucement.class annoucementid);
logger.warn(“del id=“+annoucementid);
return “pub_del_success“;

}
public String show()
{
annoucement=annoucementService.findById(Annoucement.class annoucementid);
return “show“;
}

/*===================================input===========================================

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4538  2011-11-08 21:38  OA_Office_System\.classpath

     文件        589  2011-11-08 21:38  OA_Office_System\.myhibernatedata

     文件        292  2011-11-08 21:41  OA_Office_System\.mymetadata

     文件       1822  2011-11-08 21:40  OA_Office_System\.project

    .......       500  2011-11-08 21:38  OA_Office_System\.settings\.jsdtscope

    .......      1040  2011-11-08 21:38  OA_Office_System\.settings\com.genuitec.eclipse.j2eedt.core.prefs

    .......       109  2011-11-08 21:38  OA_Office_System\.settings\com.genuitec.eclipse.ws.prefs

    .......       769  2011-11-08 21:38  OA_Office_System\.settings\org.eclipse.core.resources.prefs

    .......       629  2011-11-08 21:38  OA_Office_System\.settings\org.eclipse.jdt.core.prefs

    .......       137  2011-11-08 21:38  OA_Office_System\.settings\org.eclipse.ltk.core.refactoring.prefs

    .......        49  2011-11-08 21:38  OA_Office_System\.settings\org.eclipse.wst.jsdt.ui.superType.container

    .......         6  2011-11-08 21:38  OA_Office_System\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        462  2011-11-08 21:38  OA_Office_System\.springBeans

    .......    177471  2011-11-08 21:38  OA_Office_System\sql\baseDB.sql

    .......      1279  2011-11-08 21:38  OA_Office_System\src\.struts.mex

    .......      2476  2011-11-08 21:38  OA_Office_System\src\applicationContext-security.xml

    .......      3461  2011-11-08 21:38  OA_Office_System\src\applicationContext.xml

    .......      3248  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\action\AnnoucementAction.java

    .......      2634  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\conf\struts-annoucement.xml

    .......       264  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\dao\AnnoucementDao.java

    .......       384  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\dao\impl\AnnoucementDaoImpl.java

    .......      1045  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\model\Annoucement.java

    .......       282  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\service\AnnoucementService.java

    .......       494  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\annoucement\service\impl\AnnoucementServiceImpl.java

    .......      2832  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\bean\FileUpload.java

    .......      2823  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\bean\PagerFilter.java

    .......       695  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\bean\PagerInfo.java

    .......       374  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\bean\PagerModel.java

    .......      1663  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\dao\baseDao.java

    .......      6088  2011-11-08 21:38  OA_Office_System\src\com\fjsdfx\starerp\common\dao\baseDaoImpl.java

............此处省略2773个文件信息

评论

共有 条评论