资源简介
2015毕设项目OA系统源码及论文,主要技术及工具:myeclipse,mysql,ssh,activiti5
代码片段和文件信息
package com.oa.action;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONSerializer;
import org.apache.struts2.ServletActionContext;
import com.oa.pojo.Calendar;
import com.oa.service.CalendarService;
import com.oa.util.DateUtil;
import com.opensymphony.xwork2.ActionSupport;
public class CalendarAction extends ActionSupport {
private CalendarService calendarService;
public String index() {
return “index“;
}
public void add() {
HttpServletRequest request = ServletActionContext.getRequest();
String events = request.getParameter(“event“);// 事件内容
String isallday = request.getParameter(“isallday“);// 是否是全天事件
String isend = request.getParameter(“isend“);// 是否有结束时间
String startdate = request.getParameter(“startdate“);
String enddate = request.getParameter(“enddate“);
String s_time = request.getParameter(“s_hour“) + “:“
+ request.getParameter(“s_minute“) + “:00“;
String e_time = request.getParameter(“e_hour“) + “:“
+ request.getParameter(“e_minute“) + “:00“;
String start = ““;
String end = ““;
if (“1“.equals(isallday) && “1“.equals(isend)) {
start = startdate;
end = enddate;
} else if (“1“.equals(isallday) && isend == null) {
start = startdate;
} else if (isallday == null && “1“.equals(isend)) {
start = startdate + “ “ + s_time;
end = enddate + “ “ + e_time;
isallday = “0“;
} else {
start = startdate + “ “ + s_time;
isallday = “0“;
}
String[] colors = { “#360“ “#f30“ “#06c“ };
int index = (int) (Math.random() * colors.length);
Calendar calendar = new Calendar();
calendar.settitle(events);
calendar.setStart(start);
calendar.setEnd(end);
calendar.setAllDay(Integer.parseInt(isallday));
calendar.setColor(colors[index]);
boolean b = calendarService.add(calendar);
PrintWriter out;
try {
out = ServletActionContext.getResponse().getWriter();
if (b) {
out.print(“1“);
} else {
out.print(“写入失败!“);
}
} catch (IOException e) {
e.printStackTrace();
}
}
public void edit() {
HttpServletRequest request = ServletActionContext.getRequest();
Integer id = Integer.parseInt(request.getParameter(“id“));
String events = request.getParameter(“event“);// 事件内容
String isallday = request.getParameter(“isallday“);// 是否是全天事件
String isend = request.getParameter(“isend“);// 是否有结束时间
String startdate = request.getParameter(“startdate“);
String enddate = request.getParameter(“enddate“);
String s_time = request.getParameter(“s_hour“) + “:“
+ request.getParameter(“s_minute“) + “:00“;
String e_time = request.getParameter(“e_hour“) + “:“
+ request.getParameter(“e_minute“) + “:00“;
String start = ““;
String end = ““;
if (“1“.equals(isallday) && “1“.equals(isend)) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 642 2015-03-02 19:39 OA系统\OA\.bpmn\activiti\MyProcess.bpmn2d
文件 9666 2015-05-03 12:21 OA系统\OA\.classpath
文件 1625 2015-03-27 16:21 OA系统\OA\.myeclipse\profiler\Installer.xm
文件 279 2015-03-27 14:27 OA系统\OA\.myme
文件 1745 2015-01-03 17:23 OA系统\OA\.project
文件 500 2015-01-03 14:14 OA系统\OA\.settings\.jsdtscope
文件 247 2015-03-03 00:58 OA系统\OA\.settings\com.genuitec.eclipse.migration.prefs
文件 98 2015-03-25 13:13 OA系统\OA\.settings\org.eclipse.core.resources.prefs
文件 598 2015-03-27 16:41 OA系统\OA\.settings\org.eclipse.jdt.core.prefs
文件 763 2015-03-04 14:42 OA系统\OA\.settings\org.eclipse.wst.common.component
文件 361 2015-03-31 01:00 OA系统\OA\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2015-01-03 14:14 OA系统\OA\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-01-03 14:14 OA系统\OA\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 4258 2015-04-25 18:56 OA系统\OA\activiti\LeaveBill.bpmn
文件 10406 2015-04-25 18:57 OA系统\OA\activiti\LeaveBill.png
文件 1861 2015-02-20 12:28 OA系统\OA\config\activiti-context.xm
文件 4139 2015-02-20 12:26 OA系统\OA\config\applicationContext.xm
文件 6239 2015-04-23 21:42 OA系统\OA\config\applicationContext_beans.xm
文件 336 2015-05-11 00:39 OA系统\OA\config\db.properties
文件 1792 2015-04-25 14:31 OA系统\OA\config\log4j.properties
文件 7145 2015-04-23 21:41 OA系统\OA\config\struts.xm
文件 8410 2015-04-25 14:14 OA系统\OA\src\com\oa\action\CalendarAction.java
文件 4224 2015-04-22 22:05 OA系统\OA\src\com\oa\action\DepartmentAction.java
文件 2009 2015-04-19 17:09 OA系统\OA\src\com\oa\action\ForumAction.java
文件 4098 2015-04-19 23:28 OA系统\OA\src\com\oa\action\ForumManageAction.java
文件 465 2015-03-26 16:47 OA系统\OA\src\com\oa\action\HomeAction.java
文件 12892 2015-04-20 00:03 OA系统\OA\src\com\oa\action\LeaveApplyAction.java
文件 1973 2015-02-15 23:18 OA系统\OA\src\com\oa\action\ReplyAction.java
文件 2893 2015-04-06 17:23 OA系统\OA\src\com\oa\action\RoleAction.java
文件 2842 2015-04-23 20:35 OA系统\OA\src\com\oa\action\SendMailAction.java
............此处省略1104个文件信息
评论
共有 条评论