智能小区管理系统


智能小区管理系统javaweb+mysql,jdk版本是1.7,如果用1.8的jdk,请添加jar包
资源截图
代码片段和文件信息
package com.jypc.action;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONobject;

import org.apache.struts2.ServletActionContext;

import com.jypc.bean.AssetInfoBean;
import com.jypc.bean.AssetTypeBean;
import com.jypc.bean.PagerView;
import com.jypc.dao.AssetInfoDao;
import com.opensymphony.xwork2.ActionSupport;

public class AssetInfoAction extends ActionSupport {
/**
 * 
 */
private static final long serialVersionUID = 1L;
private List assetInfoList;// 物业费用信息集合
private List assetTypeList;// 费用类型信息
private String id;
private String tips;
private AssetInfoBean model;
private PagerView pager = new PagerView();
AssetInfoDao assetInfoDao;

@Resource(name = “assetInfoDao“)
public void setAssetInfoDao(AssetInfoDao assetInfoDao) {
this.assetInfoDao = assetInfoDao;
}

@Override
public String execute() throws Exception {
initData();
return “success“;
}

/**
 * 初始化数据
 */
public void initData() {

pager.setAllData(assetInfoDao.getDataNum());
assetInfoList = assetInfoDao.getAssetInfoList(pager);
assetTypeList = assetInfoDao.getAssetTypeList();
}

/**
 * 判断主键是否重复
 * 
 * @throws IOException
 */
public void exists() throws IOException {
HttpServletResponse response = ServletActionContext.getResponse();
PrintWriter out = response.getWriter();

int result = assetInfoDao.exists(id) ? 1 : 0;
out.print(result);
out.flush();// 刷新
out.close();// 关闭
}

/**
 * 物业费用信息添加
 * 
 * @return 0[失败] >0[成功]
 */
public String assetAdd() {
int result = 0;
result = assetInfoDao.assetAdd(model);
if (result > 0) {
tips = “添加成功!“;
} else {
tips = “添加失败!“;
}
initData();
return “success“;
}

/**
 * 删除单条信息
 * 
 * @return true:删除成功;false:删除失败
 */
public String delInfo() {
int result = assetInfoDao.delInfo(id);
if (result > 0) {
setTips(“删除成功!“);
} else {
setTips(“删除失败!“);
}
initData();
return “success“;
}

/**
 * 删除所选中的记录
 * 
 * @return
 */
public String deleteAssetLists() {
HttpServletRequest request = ServletActionContext.getRequest();
// 获取所选中的,名字叫delCost的复选框按钮的值
String[] assetInfoList = request.getParameterValues(“delAsset“);
int result = 0;
for (String item : assetInfoList) {
result += assetInfoDao.delInfo(item);
}
this.tips = “成功删除了“ + result + “条记录“;
initData();
return “success“;
}

/**
 * 根据费用编号获取要修改的物业费用信息
 * 
 * @throws IOException
 */
public void getAssetModel() throws IOException {
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(“text/html“);
response.setCharacterEncoding(“UTF-8“);
PrintWriter out = response.getWriter();// 获取out
out.print(JSONobject.f

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-11-02 09:55  Intelligent_Community
     文件        1217  2017-11-02 10:00  Intelligent_Community.classpath
     文件        1346  2016-02-26 10:41  Intelligent_Community.project
     目录           0  2017-11-02 09:55  Intelligent_Community.settings
     文件         522  2016-02-26 10:41  Intelligent_Community.settings.jsdtscope
     文件         251  2016-02-26 10:41  Intelligent_Community.settingscom.genuitec.eclipse.core.prefs
     文件          79  2016-02-26 10:41  Intelligent_Community.settingscom.genuitec.eclipse.migration.prefs
     文件          57  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.core.resources.prefs
     文件         364  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.jdt.core.prefs
     文件         524  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.wst.common.component
     文件         172  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.wst.common.project.facet.core.prefs.xml
     文件         462  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-02-26 10:41  Intelligent_Community.settingsorg.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRoot
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootmeta-INF
     文件          39  2016-02-26 10:41  Intelligent_CommunityWebRootmeta-INFMANIFEST.MF
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootStrutsDtd
     文件        3764  2016-02-26 10:41  Intelligent_CommunityWebRootStrutsDtdstruts-2.3.dtd
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootWEB-INF
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootWEB-INFclasses
     文件        2664  2016-02-26 10:41  Intelligent_CommunityWebRootWEB-INFclasseseans.xml
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootWEB-INFclassescom
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootWEB-INFclassescomjypc
     目录           0  2017-11-02 09:55  Intelligent_CommunityWebRootWEB-INFclassescomjypcaction
     文件        5621  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionAssetInfoAction.class
     文件        5194  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionAssetTypeAction.class
     文件        5852  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionBuildingAction.class
     文件        6686  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionCardAction.class
     文件        5489  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionCommunityInfoAction.class
     文件        6379  2016-02-26 16:07  Intelligent_CommunityWebRootWEB-INFclassescomjypcactionCompleteCostAction.class
............此处省略564个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)