• 大小: 9.83MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-06
  • 语言: 其他
  • 标签: 个人理财  java  

资源简介

该系统主要记录个人的收入、支出信息,并对每周、月进行统计,以图表形式展示

资源截图

代码片段和文件信息

package com.sanqing.action;

import java.text.SimpleDateFormat;
import java.util.Map;

import com.sanqing.dao.PayOutDAO;
import com.sanqing.dao.UserDAO;
import com.sanqing.po.PayOut;
import com.sanqing.po.User;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class AddPayOutAction  extends ActionSupport{
private String payOutName;
private Double payOutMoney;
private String payOutDate;
private boolean success;
private String msg;
private PayOutDAO payOutDAO;
private UserDAO userDAO;
public String getPayOutName() {
return payOutName;
}
public void setPayOutName(String payOutName) {
this.payOutName = payOutName;
}
public Double getPayOutMoney() {
return payOutMoney;
}
public void setPayOutMoney(Double payOutMoney) {
this.payOutMoney = payOutMoney;
}
public String getPayOutDate() {
return payOutDate;
}
public void setPayOutDate(String payOutDate) {
this.payOutDate = payOutDate;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public PayOutDAO getPayOutDAO() {
return payOutDAO;
}
public void setPayOutDAO(PayOutDAO payOutDAO) {
this.payOutDAO = payOutDAO;
}
public UserDAO getUserDAO() {
return userDAO;
}
public void setUserDAO(UserDAO userDAO) {
this.userDAO = userDAO;
}


public String execute() throws Exception {
//获得当前登陆的用户
Map session = ActionContext.getContext().getSession();
String username = (String) session.get(“username“);
User user = (User) userDAO.findByUsername(username).get(0);

//添加支出记录
PayOut payOut = new PayOut();
payOut.setPayOutName(payOutName);
payOut.setPayOutMoney(payOutMoney);
payOut.setPayOutDate(new SimpleDateFormat(“yyyy年MM月dd日“).parse(payOutDate));
payOut.setUser(user);
payOutDAO.save(payOut);
success = true;
msg = “添加支出记录成功!“;
return this.SUCCESS;
}


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-04-11 22:37  JavaPrj_15\
     文件        2502  2017-02-22 21:50  JavaPrj_15\.classpath
     目录           0  2017-02-22 21:57  JavaPrj_15\.myeclipse\
     文件         529  2009-12-16 10:36  JavaPrj_15\.myhibernatedata
     文件         304  2010-01-31 11:42  JavaPrj_15\.mymetadata
     文件        1955  2017-02-22 21:50  JavaPrj_15\.project
     目录           0  2017-02-22 21:50  JavaPrj_15\.settings\
     文件         522  2017-02-22 21:50  JavaPrj_15\.settings\.jsdtscope
     文件        1040  2009-12-16 10:39  JavaPrj_15\.settings\com.genuitec.eclipse.j2eedt.core.prefs
     文件         434  2017-02-22 21:50  JavaPrj_15\.settings\com.genuitec.eclipse.migration.prefs
     文件         116  2017-02-22 21:50  JavaPrj_15\.settings\com.genuitec.runtime.libraries.xml
     文件         364  2017-02-22 21:50  JavaPrj_15\.settings\org.eclipse.jdt.core.prefs
     文件         556  2017-02-22 21:50  JavaPrj_15\.settings\org.eclipse.wst.common.component
     文件         463  2017-02-22 21:50  JavaPrj_15\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-02-22 21:50  JavaPrj_15\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-02-22 21:50  JavaPrj_15\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-04-11 22:37  JavaPrj_15\WebRoot\
     目录           0  2016-04-11 22:37  JavaPrj_15\WebRoot\Ext\
     文件       11548  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\CHANGES.html
     文件         893  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\INCLUDE_ORDER.txt
     目录           0  2013-07-22 11:17  JavaPrj_15\WebRoot\Ext\adapter\
     目录           0  2016-04-11 22:37  JavaPrj_15\WebRoot\Ext\adapter\ext\
     文件       35849  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\ext\ext-base.js
     目录           0  2016-04-11 22:37  JavaPrj_15\WebRoot\Ext\adapter\jquery\
     文件       15551  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\jquery\ext-jquery-adapter.js
     文件       96763  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\jquery\jquery.js
     目录           0  2016-04-11 22:37  JavaPrj_15\WebRoot\Ext\adapter\prototype\
     文件       38986  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\prototype\effects.js
     文件       16135  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\prototype\ext-prototype-adapter.js
     文件      130347  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\prototype\prototype.js
     文件        2654  2009-05-15 16:39  JavaPrj_15\WebRoot\Ext\adapter\prototype\scriptaculous.js
............此处省略1315个文件信息

评论

共有 条评论