基于javaweb+springboot的小区物业管理系统(java+Springboot+ssm+mysql+maven)
一、项目简述(+PPT演示文档)
本系统功能包括: 实现了资源管理、收费管理、支出管理、三表管理、投诉 建议、装修管理、车位管理、招商管理、物料管理、设备 管理、人事考勤、安保消防、报事报修、绿化管理、保洁 管理、权限管理等一些功能,还有一些细节功能没有实现需 要大家一起完善,提供给大家学习参考使用。
二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + Mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: JSP +SpringBoot + MyBatis + Json+ Css + JavaScript + JQuery + Ajax + PageHelper+ Maven等等。
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
List<TenderVo> list = tenderService.findByTel(tel);
for (TenderVo t : list) {
System.out.println(t.getTid());
}
model.addAttribute("mylist", list);
return "myjingbiao";
}
@RequestMapping("/savejingbianman")
public String savejingbianman(int bid, Tender tender, Model model, HttpSession session) {
biddingService.updateOne(bid);
try {
Thread.sleep(1000);
tenderService.addOne(tender);
* @category 装修控制器
*
*/
@Controller
public class AdornController {
@Autowired
AdornService adornService;
/**
* 查找所有
*/
@RequestMapping("/adornall")
public String adornAll(Model model) {
List<Adorn> list = adornService.findAll();
model.addAttribute("adornlist", list);
return "adorn";
}
/**
// 将字符串转换为日期对象
Date start = cx.parse(request.getParameter("start"));
Date stop = cx.parse(request.getParameter("stop"));
// System.out.println(request.getParameter("start"));
String name = request.getParameter("username");
// System.out.println(name);
// 账单的时间用于和stop和start比较
Date billdate;
// 开始时间戳
long startTime = start.getTime();
// 结束时间戳
long stopTime = stop.getTime();
long billtime;
// 用该list给owner对象的billlist设值
List<Bill> billlist = new ArrayList<>();
// 查找所有
List<Owner> list1 = billService.findByOwner();
List<Owner> list = new ArrayList<>();
// 生成要返回的list
for (int i = 0; i < list1.size(); i++) {
double total = 0;
return "house";
}
else if(type.equals("x")) {
for (int i = 0; i < list.size(); i++) {
if(list.get(i).getStatus().equals("闲置")) {
list1.add(list.get(i));
}
}
model.addAttribute("can", "x");
model.addAttribute("list", list1);
return "house";
}
else if(type.equals("y")) {
return "unpay";
}
/**
* @category ajax搜索
* @param name
* @return
*/
@RequestMapping("/showname")
public @ResponseBody List<Owner> showname(String name) {
System.out.println("进来了");
List<Owner> list1 = oService.selectByExample();
List<Owner> list = new ArrayList<>();
for (int i = 0; i < list1.size(); i++) {
if (list1.get(i).getOname().contains(name)) {
list.add(list1.get(i));
}
}
return list;
}
@SuppressWarnings("unchecked")
@RequestMapping("/unpayfy")
public String unpayfy(Model model, HttpSession session, int pageSize, int pageNum, String type,
HttpServletRequest request) {
public class BiddingController {
@Autowired
BiddingService biddingService;
@Autowired
TenderService tenderService;
@RequestMapping("/savestorebid")
public String addOne(Model model, Bidding bidding, double price) {
double price1 = bidding.getArea() * price;
Timestamp d = new Timestamp(System.currentTimeMillis());
bidding.setPrice(price1);
bidding.setDate(d);
bidding.setState("正在竞标");
biddingService.addOne(bidding);
return "redirect:biddinging.action";
}
@RequestMapping("/")
public String zhuye() {
return "redirect:jingbiao.action";
}
tenderService.deleteTenderOne(tid);
return "redirect:jingbiao.action";
}
/**
* 通过audit字段查找list
*/
@RequestMapping("/auditingbyaudit")
public String auditingbyaudit(Model model, String audit) {
List<Tender> list = tenderService.findByAudit(audit);
model.addAttribute("adornShowList", list);
return "audit";
}
@RequestMapping("/auditingbyliftstate")
public String auditingbyliftstate(Model model, int liftstate) {
List<Tender> list = tenderService.findByLiftstate(liftstate);
model.addAttribute("adornShowList", list);
@RequestMapping("/savestorebid")
public String addOne(Model model, Bidding bidding, double price) {
double price1 = bidding.getArea() * price;
Timestamp d = new Timestamp(System.currentTimeMillis());
bidding.setPrice(price1);
bidding.setDate(d);
bidding.setState("正在竞标");
biddingService.addOne(bidding);
return "redirect:biddinging.action";
}
stop = cx.format(new Date());
}
if (session.getAttribute("start") != null) {
start = (String) session.getAttribute("start");
} else {
start = "2010-01-01";
}
List<Owner> list1 = new ArrayList<>();
if (session.getAttribute("findList") != null) {
list1 = (List<Owner>) session.getAttribute("findList");
} else {
list1 = billService.findByOwner();
}
double listnum = list1.size();
int totalnum = (int) Math.ceil(listnum / pageSize);
List<Owner> list = FyResult.getOwnerList(pageSize, pageNum, list1, type);
if (type.equals("z")) {
++pageNum;
if (pageNum > totalnum) {
return "redirect:showhouse.action?type="+type;
}
/**
* @category 添加新的闲置房屋
* @param model
* @param house
* @return
*/
@RequestMapping("/addhouse")
public String addhouse(Model model,Housenumber house) {
house.setSaleprice(0);
hService.insert(house);
return "redirect:showhouse.action?type=a";
}
* @param model
* @return
*/
@RequestMapping("/unpay")
public String unpay(Model model) {
// SimpleDateFormat cx = new SimpleDateFormat("yyyy-MM-dd");
String start = "2010-01-01";
String stop = cx.format(new Date());
List<Owner> list = billService.findByOwner();
model.addAttribute("list", list);
model.addAttribute("start", start);
model.addAttribute("stop", stop);
model.addAttribute("inputname", "请输入姓名");
return "unpay";
}
/**
* @category 通过给定时间范围展示和业主模糊姓名联合查询缴费信息
* @param model
* @param request
* @return
* @throws ParseException
model.addAttribute("inputname", name);
model.addAttribute("totalnum", totalnum);
return "unpay";
}
/**
* @category ajax搜索
* @param name
* @return
*/
@RequestMapping("/showname")
public @ResponseBody List<Owner> showname(String name) {
System.out.println("进来了");
List<Owner> list1 = oService.selectByExample();
List<Owner> list = new ArrayList<>();
for (int i = 0; i < list1.size(); i++) {
if (list1.get(i).getOname().contains(name)) {
list.add(list1.get(i));
}
}
return "sfmanage";
}
/**
* @category 添加新的收费项目
* @param model
* @param billitem
* @return
*/
@RequestMapping("/addbillitem")
public String addbillitem(Model model, Billitems billitem) {
// 判断添加的收费项目是否为一次性收费
/**
* 通过audit字段查找list
*/
@RequestMapping("/auditingbyaudit")
public String auditingbyaudit(Model model, String audit) {
List<Tender> list = tenderService.findByAudit(audit);
model.addAttribute("adornShowList", list);
return "audit";
}
@RequestMapping("/auditingbyliftstate")
public String auditingbyliftstate(Model model, int liftstate) {
List<Tender> list = tenderService.findByLiftstate(liftstate);
model.addAttribute("adornShowList", list);
return "audit";
}
/**
* 拒绝竞标控制
*/
@RequestMapping("/refuse")
public String refuse(int tid, String remaker) {
System.out.println("refuse:" + remaker);
tenderService.refuse(tid, remaker);
return "redirect:biddinging.action";
}
*/
@RequestMapping("/addhouse")
public String addhouse(Model model,Housenumber house) {
house.setSaleprice(0);
hService.insert(house);
return "redirect:showhouse.action?type=a";
}
}
装修控制器:
/**
* @category 装修控制器
*
*/
@Controller
public class AdornController {
@Autowired
String stop = cx.format(new Date());
List<Owner> list = billService.findByOwner();
model.addAttribute("list", list);
model.addAttribute("start", start);
model.addAttribute("stop", stop);
model.addAttribute("inputname", "请输入姓名");
return "unpay";
}
/**
* @category 通过给定时间范围展示和业主模糊姓名联合查询缴费信息
* @param model
* @param request
* @return
* @throws ParseException
*/
@RequestMapping("/unpaytime")
public String unpayByTime(Model model, HttpServletRequest request, HttpSession session) throws ParseException {
// 获取分页参数设置每页展示的个数
* @throws ParseException
*/
@RequestMapping("/unpaytime")
public String unpayByTime(Model model, HttpServletRequest request, HttpSession session) throws ParseException {
// 获取分页参数设置每页展示的个数
int pageSize = (int) session.getAttribute("pageSize");
// 获取分页参数设置传进来的页码是多少
int pageNum = (int) session.getAttribute("pageNum");
// 将字符串转换为日期对象
Date start = cx.parse(request.getParameter("start"));
Date stop = cx.parse(request.getParameter("stop"));
// System.out.println(request.getParameter("start"));
String name = request.getParameter("username");
// System.out.println(name);
// 账单的时间用于和stop和start比较
Date billdate;
// 开始时间戳
long startTime = start.getTime();
// 结束时间戳
long stopTime = stop.getTime();
long billtime;
// 用该list给owner对象的billlist设值
List<Bill> billlist = new ArrayList<>();
}
商铺控制器:
/**
* @category 商铺控制器
*
*/
@Controller
public class BiddingController {
@Autowired
BiddingService biddingService;
@Autowired
TenderService tenderService;
*/
@RequestMapping("/showhouse")
public String showhouse(@RequestParam ("type") String type,Model model) {
System.out.println(type);
HousenumberExample example=new HousenumberExample();
List<Housenumber> list=hService.selectByExample(example);
List<Housenumber> list1=new ArrayList<Housenumber>();
if(type.equals("a")) {
model.addAttribute("list", list);
model.addAttribute("can", "a");
return "house";
}
else if(type.equals("x")) {
/**
* @category 添加新的收费项目
* @param model
* @param billitem
* @return
*/
@RequestMapping("/addbillitem")
public String addbillitem(Model model, Billitems billitem) {
// 判断添加的收费项目是否为一次性收费
if (billitem.getBillitemtype().equals("一次性")) {
Date d = new Date();
// 生成一次性收费的时间
// SimpleDateFormat itemtime = new SimpleDateFormat("yyyy-MM-dd");
String time = cx.format(d);
billitem.setBillitemtime(time);
// 添加到数据库
bitemService.insert(billitem);
// 从数据库查刚刚添加的收费项目
Billitems item = bitemService.selectByNameAndTime(billitem.getBillitemname(), time);
// 给所有的业主添加这个费用收费
List<Owner> olist = oService.selectByExample();
int[] all = new int[olist.size()];
// 给数组all赋值业主的id
* @param model
* @param request
* @return
* @throws ParseException
*/
@RequestMapping("/unpaytime")
public String unpayByTime(Model model, HttpServletRequest request, HttpSession session) throws ParseException {
// 获取分页参数设置每页展示的个数
int pageSize = (int) session.getAttribute("pageSize");
// 获取分页参数设置传进来的页码是多少
int pageNum = (int) session.getAttribute("pageNum");
// 将字符串转换为日期对象
Date start = cx.parse(request.getParameter("start"));
Date stop = cx.parse(request.getParameter("stop"));
// System.out.println(request.getParameter("start"));
String name = request.getParameter("username");
// System.out.println(name);
// 账单的时间用于和stop和start比较
Date billdate;
// 开始时间戳
long startTime = start.getTime();
} else {
start = "2010-01-01";
}
List<Owner> list1 = new ArrayList<>();
if (session.getAttribute("findList") != null) {
list1 = (List<Owner>) session.getAttribute("findList");
} else {
list1 = billService.findByOwner();
}
double listnum = list1.size();
int totalnum = (int) Math.ceil(listnum / pageSize);
List<Owner> list = FyResult.getOwnerList(pageSize, pageNum, list1, type);
if (type.equals("z")) {
++pageNum;
if (pageNum > totalnum) {
pageNum = totalnum;
}
}
if (type.equals("j")) {
--pageNum;
if (pageNum < 1) {
pageNum = 1;
model.addAttribute("list", list2);
model.addAttribute("name", name);
model.addAttribute("totalnum", totalnum);
session.setAttribute("pageSize", pageSize);
session.setAttribute("pageNum", pageNum);
session.setAttribute("findList", list);
return "unpay";
}
/**
* @category 收费项目管理界面
* @param model
* @return
*/
@RequestMapping("/sfmanage")
public String shoufeiguanli(Model model) {
BillitemsExample example = new BillitemsExample();
List<Billitems> list = bitemService.selectByExample(example);
model.addAttribute("list", list);
return "sfmanage";
}
/**
bitemService.insert(billitem);
// 从数据库查刚刚添加的收费项目
Billitems item = bitemService.selectByNameAndTime(billitem.getBillitemname(), time);
// 给所有的业主添加这个费用收费
List<Owner> olist = oService.selectByExample();
int[] all = new int[olist.size()];
// 给数组all赋值业主的id
for (int i = 0; i < all.length; i++) {
all[i] = olist.get(i).getOid();
}
Bill bill = new Bill();
bill.setBillitemid(item.getBillitemid());
++pageNum;
if (pageNum > totalnum) {
pageNum = totalnum;
}
}
if (type.equals("j")) {
--pageNum;
if (pageNum < 1) {
pageNum = 1;
}
}
if(type.equals("f")) {
if(pageNum<1) {
pageNum=1;
}
if(pageNum>totalnum) {
pageNum = totalnum;
}
}
model.addAttribute("list", list);
session.setAttribute("stop", stop);
session.setAttribute("start", start);