Bootstrap

Java项目:springboot园区管理系统

作者主页:夜未央5788

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

本项目分为管理员与普通用户两种角色;
管理员主要功能包括:
人员管理:业主信息管理;
职员管理:职员信息;
资源管理:所有房间、已出售房间、待处理房间、拦截的订单;
收费管理:待缴费用户列表、收费管理、报表;
报事报修:所有保修内容、已完成工作、未完成工作;
投诉建议:全部投诉、未处理、已处理;
装修管理:全部装修信息、已装修、装修中、未装修;
车位管理:全部车位、已用车位、未用车位、出售车位;
招商管理:全部商铺、已租用、未租用;
物料管理:物料详情;
设备管理:查看设备;
绿化管理:所有绿化区域、已完成区域、未完成区域;
保洁管理:所有保洁内容、已完成工作、未完成工作;
普通用户主要功能包括:
个人信息:我的信息;
投诉建议:我的投诉/建议、添加投诉、维修申报、友情建议、客服咨询;
车位管理:我的车位、购买车位;
缴费管理:我的未支付、已支付账单;
更多信息:商铺招租信息、我们的整改、我们的成员;
我的通知:未读、已读;

由于本程序规模不大,可供课程设计,毕业设计学习演示之用

更多项目源码,请到“源码空间站”,地址:http://www.shuyue.fun/

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
5.数据库:MySql 5.7版本;
6.是否Maven项目:是;

技术栈

1. 后端:SpringBoot+Thymeleaf
2. 前端:Bootstrap、Jquery、JavaScript、JSP、HTML、CSS

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

4. 运行项目,在浏览器中输入http://localhost:8089/garden 登录

运行截图

 

 

 

 

 

 

 

 

 

 

 代码相关

AdornController

@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";
	}

	/**
	 * 按类型删除
	 */
	@RequestMapping("/findbystate")
	public String findByState(Model model, String state) {
		List<Adorn> list = adornService.findByState(state);
		model.addAttribute("adornlist", list);
		return "adorn";
	}

}

绿化的控制器

@Controller
public class AfforestController {

	@Autowired
	AfforestService afforestService;
	/**
	 * 查看所有绿化信息
	 */
	@RequestMapping("/afforestact1")
	public String afforestact(Model model) {
		List<Afforest>list=afforestService.selectByExample();
		model.addAttribute("aflist", list);
		return "showafforest";
	}
	/**
	 * 查看所有绿化信息
	 */
	@RequestMapping("/afforestact2")
	public String afforestact2(Model model,String afplush) {
		List<Afforest>list=afforestService.findAfplushList(afplush);
		model.addAttribute("aflist", list);
		return "showafforest2";
	}
	/**
	 * 保存
	 */
	@RequestMapping("/saveafforest")
	public String save(Afforest afforest,Model model) {
		afforestService.updatesave4(afforest);
		return "redirect:afforestact1.action";
	}
	/**
	 * 根据ID查询所有内容
	 */
	@RequestMapping("/findAfforestByid")
	public String find(Model model,int afid) {
		Afforest afforest=new Afforest();
		afforest=afforestService.findAfforestById(afid);
		model.addAttribute("aflist", afforest);
		return "showafforest";
	}
	/**
	 * 点击更改完成状态
	 */
	@RequestMapping("/updapushaf")
	public String updapushaf(Afforest afforest) {
		afforestService.updaaffomplish(afforest);
		return "redirect:afforestact1.action";
	}
	/**
	   *  添加绿化任务
	 * @param maintain
	 * @return
	 */
	@RequestMapping("/addafforest")
	public String addafforest(Afforest afforest) {
	
		boolean flag = afforestService.insert(afforest);	
		if (flag == true) {
			// 使用重定向,返回登录界面
			return "redirect:afforestact1.action";
		} else {
			return "css";
		}
	}
	/**
	 * 删除一个住户
	 */
	@RequestMapping("/deleteaff")
	public String deleteone(int afid) {
		afforestService.deleteByPrimaryKey(afid);
		return "redirect:afforestact1.action";
	}
	/**
	 * 根据id  完成时间   提交时间 模糊查询
	 * @param model
	 * @param md
	 * @return
	 */
	@RequestMapping("/findaffor")
	public String findclean(Model model,String affname) {
		System.out.println("+++++++++++++");
		System.out.println(affname);
		List<Afforest>list3 = afforestService.findMainAfforest(affname);
		model.addAttribute("aflist", list3);
		
		return "showafforest";
	}
}

商铺控制器

/**
 * @author Leett
 * @category 商铺控制器
 *
 */
@Controller
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";
	}
	@RequestMapping("/biddingshow")
	public String biddingShow(Model model) {
		List<Bidding> list = biddingService.findAll();
		model.addAttribute("biddinglist", list);
		return "bidding";
	}

	@RequestMapping("/deletebiddingone")
	public String deleteOne(int bid) {
		return null;
	}

	@RequestMapping("/biddinging")
	public String biddingIng(Model model) {
		List<Tender> list = tenderService.findAll();
		model.addAttribute("adornShowList", list);
		return "audit";
	}

	@RequestMapping("/mybidding")
	public String mybidding(Model model, HttpSession session) {
		String tel = (String) session.getAttribute("userTel");
		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);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		session.setAttribute("userTel", tender.getTel());
		return "redirect:jingbiao.action";
	}

	@RequestMapping("/jingbiao")
	public String jingbiao(Model model) {
		List<Bidding> list = biddingService.findAll();
		model.addAttribute("biddinglist", list);
		return "jingbiao";
	}

	@RequestMapping("/deletemyjingbiao")
	public String deletemyjingbiao(int tid) {
		System.out.println("deletemyjingbiao:" + tid);
		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);
		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("/yespass")
	public String yespass(int tid) {
		biddingService.yesPass(tid);
		return "redirect:biddinging.action";
	}

	/**
	 * 搜索展示
	 */
	@RequestMapping("/searchjb")
	public String searchjb(String searchtext,Model model) {
		List<Bidding> list = new ArrayList<Bidding>();
		list = biddingService.selectLike(searchtext);
		 if(list.size()==0) {
			 String[] str = searchtext.split("");
			 for (int i = 0; i < str.length; i++) {
				 list = biddingService.selectLike(str[i]);
				 if(list.size()>0) break;
				 if(biddingService.selectLike(str[str.length-1]).size()<=0) {
					 list = biddingService.selectLike("");
					 
				 }
			 }
		 }
		 model.addAttribute("biddinglist", list);
		return "jingbiao";
	}

}

车位控制器

@Controller
public class CarportController {
	@Autowired
	CarportService carportService;

	@RequestMapping("/allcar")
	public String allcar(Model model,@RequestParam(value="num",defaultValue="1")int num) {
		int pageNum1 = (num-1)*5; 
		System.out.println("jinru"+num);
		System.out.println("jinru"+pageNum1);
		List<Carport> list = carportService.findAll(1,pageNum1);
		List<Carport> list1 = carportService.findAll(-1,pageNum1);
		int pageNum =(int) Math.ceil(list1.size()/5);
		model.addAttribute("carportlist", list);
		model.addAttribute("pageNum", pageNum);
		return "carport";
	}
	@RequestMapping("/findcarbyarea")
	public String findCarByArea(Model model,String area) {
		List<Carport> list = carportService.findCarByArea(area);
		model.addAttribute("carportlist", list);
		return "carport";
	}
	@RequestMapping(value="/page1",method=RequestMethod.POST)
	public @ResponseBody List<Carport> page1(int page) {
		int pageNum1 = (page-1)*5; 
		System.out.println("jinru:"+page);
		System.out.println("jinru:"+pageNum1);
		List<Carport> list = carportService.findAll(1,pageNum1);
		return list;
	}
	@RequestMapping("/findcarbystate")
	public String findCarByState(Model model,String state) {
		List<Carport> list = carportService.findCarByState(state);
		model.addAttribute("carportlist", list);
		return "carport";
	}
	@RequestMapping("/updatetime")
	public void updatetime() {
		boolean flag = carportService.updatetime();
		System.out.println("flag:"+flag);
	}
	/**
	 * 购买车个更改状态
	 */
	@RequestMapping("/suresellcar")
	public @ResponseBody boolean suresellcar(int uid,HttpSession session) {
		int owneruid = (int) session.getAttribute("owneruid");
		System.out.println("suresellcar:"+uid);
		Carport carport = new Carport();
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
		Date date = new Date();
		String d = format.format(date);
		String state = "<span style=\"color:red;font-weight: 700\">占用</span>";
		carport.setDate(d);
		carport.setUid(owneruid);
		carport.setCid(uid);
		carport.setState(state);
		boolean flag = carportService.suresellcar(carport);
		return flag;
		
	}
	@RequestMapping(value="/startsellcar",method=RequestMethod.POST)
	public @ResponseBody boolean startsellcar(String time) {
		boolean flag =false;
		List<Carport> list = carportService.findAll(-1, 0);
		 for (Carport c : list) {
			if(c.getDuration().equals(time)) {
				flag = false;
				return flag;
			}else {
				flag = true;
			}
		}
		if(flag) {
			flag =  carportService.sellCar(time);
		}
		return flag;
	}
	@RequestMapping("/sellcar")
	public String sellcar(Model model) {
		List<Carport> list = carportService.findCarByState("未使用");
		int count = list.size();
		List<Carport> list1 = new ArrayList<Carport>();
		list1 = carportService.findCarByArea("A");
		model.addAttribute("A", list1);
		list1 = carportService.findCarByArea("B");
		model.addAttribute("B", list1);
		list1 = carportService.findCarByArea("C");
		model.addAttribute("C", list1);
		list1 = carportService.findCarByArea("D");
		model.addAttribute("D", list1);
		model.addAttribute("count", count);
		return "sellcar";
	}
}

职员控制器

@Controller
public class ClerkController {
	@Autowired
	ClerkService clerkService;

	@RequestMapping("/clerkselectall")
	public String ClerkSelectAll(Model model) {
		List<Clerk> list = clerkService.find();
		System.out.println(list.size());
		model.addAttribute("clerkselectall", list);
		return "clerklist";
	}

	// 进入添加职员页面
	@RequestMapping("/clerkadd")
	public String ClerkAdd() {
		return "clerkadd";
	}

	// 添加页面提交添加数据返回查找控制器
	@RequestMapping("/clerkaddsave")
	public String ClerkAddSave(Clerk clerk) {
		boolean flag = clerkService.insert(clerk);
		return "redirect:findpage2.action";
	}

	// 删除职员
	@RequestMapping("/clerkdelete")
	public String ClerkDelete(int[] clerkids) {
		boolean flag = clerkService.delete(clerkids);
		return "redirect:findpage2.action";
	}

	// 进入更新职员页面
	@RequestMapping("/clerkupdate")
	public String ClerkUpdate(int clerkid, Model model) {
		System.out.println(clerkid + "我进来了!!!!!!");
		Clerk clerk = clerkService.find(clerkid);
		model.addAttribute("clerk", clerk);
		return "updateclerk";
	}

	// 更新页面提交数据返回查找控制器
	@RequestMapping("/clerkupdatesave")
	public String ClerkUpdate(Clerk clerk) {
		boolean flag = clerkService.update(clerk);
		return "redirect:findpage2.action";
	}

	// 分页查询
	@RequestMapping("/findpage")
	public String findPage(int pageSize, int pageNum, Model model, String str, HttpSession session) {
		System.out.println("进来了");
		System.out.println(pageSize);
		System.out.println(str);
		if (str.equals("z")) {
			++pageNum;
		} else if (str.equals("j")) {
			--pageNum;
		}
		session.setAttribute("pageSize", pageSize);
		PageRequest pageQuery = new PageRequest();
		pageQuery.setPageNum(pageNum);
		pageQuery.setPageSize(pageSize);
		PageResult pageResult = clerkService.findPage(pageQuery);
		model.addAttribute("pageResult", pageResult);
		return "clerklist";

	}

	// 分页模糊查询
	@RequestMapping("/clerkselectlike")
	public String ClerkSelectLike(String like, int pageSize, int pageNum, Model model, String str,
			HttpSession session) {
		System.out.println("进来了");
		System.out.println(pageSize);
		System.out.println(str);
		System.out.println(like);
		if (str.equals("z")) {
			++pageNum;
		} else if (str.equals("j")) {
			--pageNum;
		}
		session.setAttribute("like",like);
		session.setAttribute("pageSize", pageSize);
		PageRequest pageQuery = new PageRequest();
		pageQuery.setPageNum(pageNum);
		pageQuery.setPageSize(pageSize);
		PageResult pageResult = clerkService.findPageByLike(like, pageQuery);
		model.addAttribute("pageResult", pageResult);
		return "clerklist2";
	}

	@RequestMapping("/clerkselectlike1")
	public String clerkselectlike1( String like,int pageSize, Model model, HttpSession session) {
		System.out.println("进来了");
		System.out.println(pageSize);
		PageRequest pageQuery = new PageRequest();
		pageQuery.setPageNum(1);
		pageQuery.setPageSize(pageSize);
		session.setAttribute("pageSize", pageSize);
		PageResult pageResult = clerkService.findPageByLike(like, pageQuery);
		model.addAttribute("pageResult", pageResult);
		return "clerklist2";

	}

	@RequestMapping("/findpage1")
	public String findPage1(int pageSize, Model model, HttpSession session) {
		System.out.println("进来了");
		System.out.println(pageSize);
		PageRequest pageQuery = new PageRequest();
		pageQuery.setPageNum(1);
		pageQuery.setPageSize(pageSize);
		session.setAttribute("pageSize", pageSize);
		PageResult pageResult = clerkService.findPage(pageQuery);
		model.addAttribute("pageResult", pageResult);
		return "clerklist";

	}

	@RequestMapping("/findpage2")
	public String findPage2(Model model, HttpSession session) {
		System.out.println("进来了");
		int pageSize = (int) session.getAttribute("pageSize");
		System.out.println(pageSize);
		PageRequest pageQuery = new PageRequest();
		pageQuery.setPageNum(1);
		pageQuery.setPageSize(pageSize);
		session.setAttribute("pageSize", pageSize);
		PageResult pageResult = clerkService.findPage(pageQuery);
		model.addAttribute("pageResult", pageResult);
		return "clerklist";

	}
}

如果也想学习本系统,下面领取。回复:016springboot

;