• 大小: 57.43MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2022-11-04
  • 语言: 其他
  • 标签:

资源简介

这是一个基于ssh的项目,后台技术,前端不太好看,基础功能很不错,有树状结构,权限管理等功能,还可以论坛聊天,附带数据库。可以拿来直接用,是代码。

资源截图

代码片段和文件信息

package cn.itcast.oa.base;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

import javax.annotation.Resource;

import org.apache.struts2.ServletActionContext;

import cn.itcast.oa.domain.User;
import cn.itcast.oa.service.ApplicationService;
import cn.itcast.oa.service.ApplicationTemplateService;
import cn.itcast.oa.service.DepartmentService;
import cn.itcast.oa.service.ForumService;
import cn.itcast.oa.service.PrivilegeService;
import cn.itcast.oa.service.ProcessDefinitionService;
import cn.itcast.oa.service.ReplyService;
import cn.itcast.oa.service.RoleService;
import cn.itcast.oa.service.TopicService;
import cn.itcast.oa.service.UserService;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class baseAction extends ActionSupport {

@Resource
protected RoleService roleService;
@Resource
protected DepartmentService departmentService;
@Resource
protected UserService userService;
@Resource
protected PrivilegeService privilegeService;

@Resource
protected ForumService forumService;
@Resource
protected TopicService topicService;
@Resource
protected ReplyService replyService;

@Resource
protected ProcessDefinitionService processDefinitionService;
@Resource
protected ApplicationTemplateService applicationTemplateService;
@Resource
protected ApplicationService applicationService;

/**
 * 获取当前登录的用户
 * 
 * @return
 */
protected User getCurrentUser() {
return (User) ActionContext.getContext().getSession().get(“user“);
}

// 页码默认为第1页
protected int pageNum = 1;

public int getPageNum() {
return pageNum;
}

public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}

/**
 * 保存上传的文件,并返回文件在服务端的真实存储路径
 * 
 * @param upload
 * @return
 */
protected String saveUploadFile(File upload) {
SimpleDateFormat sdf = new SimpleDateFormat(“/yyyy/MM/dd/“);
// >> 获取路径
String basePath = ServletActionContext.getServletContext().getRealPath(“/WEB-INF/upload_files“);
String subPath = sdf.format(new Date());
// >> 如果文件夹不存在,就创建
File dir = new File(basePath + subPath);
if (!dir.exists()) {
dir.mkdirs(); // 递归的创建不存在的文件夹
}
// >> 拼接路径
String path = basePath + subPath + UUID.randomUUID().toString();
// >> 移动文件
upload.renameTo(new File(path)); // 如果目标文件夹不存在,或是目标文件已存在,就会不成功,返回false,但不报错。
return path;
}

}

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

     文件        816  2017-08-22 16:59  基于ssh的OA系统\ItcastOA\.classpath

     文件       1226  2017-10-24 08:13  基于ssh的OA系统\ItcastOA\.project

     文件        503  2017-08-22 16:52  基于ssh的OA系统\ItcastOA\.settings\.jsdtscope

     文件         94  2017-10-24 08:39  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.core.resources.prefs

     文件        364  2017-08-22 16:52  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.jdt.core.prefs

     文件        628  2017-08-22 16:54  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.wst.common.component

     文件        345  2017-08-22 16:52  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-08-22 16:52  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-08-22 16:52  基于ssh的OA系统\ItcastOA\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件          3  2017-10-18 15:19  基于ssh的OA系统\ItcastOA\.svn\entries

     文件          3  2017-10-18 15:19  基于ssh的OA系统\ItcastOA\.svn\format

     文件         54  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\00\0000d364e021982655b5a3da5d62ccddc54dddf6.svn-base

     文件       2443  2017-10-18 15:27  基于ssh的OA系统\ItcastOA\.svn\pristine\00\0063251e22fc41fe1aa67ff4820fecf78c91f891.svn-base

     文件        273  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\00\009100f22d6f64a9114dde004a8a0d300d5a2b97.svn-base

     文件        144  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\00\00acdfe98367b67a02f92e4a1d1f9270c13eea1d.svn-base

     文件       3535  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\00\00cc1c0430c96c347afd3e4761c8528a6548a2e4.svn-base

     文件      10293  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\01\0112625b1bb6c049a5ac4a90d8118e969ae9496c.svn-base

     文件        704  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\01\011fdc093109322d065ad314c119212ee70af6d8.svn-base

     文件         66  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\01\013cdd730ff53cc7ecd2161ac34d5d37ca062087.svn-base

     文件      11632  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\01\01ce4e4781bbc0a4be1bc1ed175208a39f183454.svn-base

     文件     756074  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\01\01e8d78593b385f79741ca9e0c42020ae6d7aa20.svn-base

     文件      19857  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\02117f0ff68591038c0e5a0c8bdc829f91aac7ed.svn-base

     文件       4467  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8.svn-base

     文件      20141  2017-10-18 15:27  基于ssh的OA系统\ItcastOA\.svn\pristine\02\023963d42b28feb372c638bddc29fc772020540d.svn-base

     文件        132  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\025cfa75b8c6d25ecbd24b2fad6daca077da910b.svn-base

     文件        264  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\02794c07e96fb69e7cf06bc7be222a15d159eaaf.svn-base

     文件        153  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\0295ed7a3cc1092cf3331652335d4beef4156cc3.svn-base

     文件      20810  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\02974a18a5a01bb789bc07d9380d855336809dec.svn-base

     文件       2929  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\02\02c13181c67eedfcd35d07d69559d4ccaffe5c44.svn-base

     文件       2028  2017-10-18 15:26  基于ssh的OA系统\ItcastOA\.svn\pristine\03\036ed339088a97588423fe98e54f447b7df3bf1a.svn-base

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

评论

共有 条评论

相关资源