当前位置: 首页 > 编程日记 > 正文

Java项目:房屋租赁管理系统(java+SSM+Layui+Maven+Mysql+Jsp)

源码获取:博客首页 "资源" 里下载!

一、项目简述


功能包括:
房屋租赁管理系统是一款方便快捷,易操作的租房和各种物业收费的管理系统,该系统官网包含着用户和管理员分类登录,减少了为使用管理员系统的开支,用户分别支持手机网上或电脑网页快捷的查找可出租的房子,并在网上在线支付,并还包含有故障报修,缴租提醒,极大符合现代人们不想出门又快捷办事的需求,管理员也只需在网上提醒用户缴费即可,并有着查看用户信息,查看报障,租金信息,合同信息,日常提醒,添加删除或修改房屋的功能。

二、项目运行

环境配置:

Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:

JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等

用户控制器:

/*** 用户控制器* * @author yy**/
@Controller
@RequestMapping("/userlistmvc")
public class UserListController {private static final long serialVersionUID = -884689940866074733L;@Resourceprivate UserlistService userlistService;@Resourceprivate AdminListService adminListService;@Resourceprivate HeadPortraitImgService headPortraitImgService;@Resourceprivate CheckoutapplicationService checkoutapplicationService;/*** 登录*/@RequestMapping("/userpwd")public String userpwd(String username, String pwd, String[] identity, HttpServletRequest request) {HttpSession session = request.getSession();if (username.equals("") || pwd.equals("")) {request.setAttribute("erorr", "输入账号密码不能为空!");return "login";}String tempstr = null;try {if (identity[0].equals("user")) {userlist temp = new userlist();temp.setUsercall(username);temp.setUserpwd(pwd);userlist userlist = userlistService.queryAllUserPwd(temp);try {tempstr = userlist.getUsercall();if (tempstr != null) {session.setAttribute("user", tempstr);headportraitimg headportraitimg = headPortraitImgService.selectheadportrait(tempstr);if (headportraitimg.getHeadportraitimgaddress() != null) {session.setAttribute("headportraitimg", headportraitimg.getHeadportraitimgaddress());}return "official";}} catch (NullPointerException e) {if (tempstr == null) {request.setAttribute("erorr", "输入账号密码有误!");return "login";} else {return "official";}}}if (identity[0].equals("admin")) {adminlist temp = new adminlist();temp.setAdminname(username);temp.setAdminpwd(pwd);adminlist adminlist = adminListService.findAllAdminPwd(temp);try {tempstr = adminlist.getAdminname();if (tempstr != null) {session.setAttribute("admin", tempstr);return "BackgroundHome";}} catch (NullPointerException e) {request.setAttribute("erorr", "输入账号密码有误!");return "login";}}} catch (NullPointerException e) {request.setAttribute("erorr", "选择登录方式!");e.printStackTrace();return "login";}return "login";}/*** 注册*/@RequestMapping("/register")public String register(String usercall, String userpwd, String userphone, HttpServletRequest request) {if (usercall.equals("") || userpwd.equals("") || userphone.equals("")) {request.setAttribute("erorr", "输入账号密码不能为空!");return "register";}userlist user = new userlist();user.setUsercall(usercall);user.setUserphone(userphone);user.setUserpwd(userpwd);userlistService.insert(user);headportraitimg userimg = new headportraitimg();userimg.setHeadportraitimgusername(usercall);headPortraitImgService.insertuserimg(userimg);return "login";}/*** 获取手机验证码**/@RequestMapping("/getcode")public void getcode(String userphone, HttpServletResponse response, HttpServletRequest request) {response.setCharacterEncoding("UTF-8");try {HttpSession session = request.getSession();String code = "123456";
//			String code = Code.getNum(userphone);System.out.println(code);session.setAttribute("code", code);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}}/*** 判断验证码输入后登陆**/@RequestMapping("/phonecod")public String phonecod(String userphone, String code, HttpServletRequest request) {HttpSession session = request.getSession();if (userphone.equals("") || code.equals("")) {request.setAttribute("erorr", "手机号或者验证码为空!");return "login";}System.out.println(code);if (code.equals(session.getAttribute("code"))) {userlist user = userlistService.selectUserPhone(userphone);if (user != null) {String tempstr = null;userlist userlist = userlistService.selectUserPhone(userphone);tempstr = userlist.getUsercall();if (tempstr != null) {session.setAttribute("user", tempstr);headportraitimg headportraitimg = headPortraitImgService.selectheadportrait(tempstr);if (headportraitimg.getHeadportraitimgaddress() != null) {session.setAttribute("headportraitimg", headportraitimg.getHeadportraitimgaddress());}return "official";}} else {request.setAttribute("erorr", "该手机号未注册!");return "login";}} else {request.setAttribute("erorr", "验证码错误!");return "login";}return "login";}/*** 修改密码*/@RequestMapping("/updatepwd")public String updatepwd(String code, String userphone, String userpwd, HttpServletRequest request) {if (code.equals("") || userphone.equals("") || userpwd.equals("")) {request.setAttribute("erorr", "手机号,验证码,新密码不能为空!");return "updatepwd";}HttpSession session = request.getSession();if (code.equals(session.getAttribute("code"))) {userlist userlist = userlistService.selectUserPhone(userphone);userlist.setUserpwd(userpwd);userlistService.updatepwd(userlist);return "login";}return userpwd;}/*** 注销*/@RequestMapping("/cancellation")public String cancellation(HttpServletRequest request) {HttpSession session = request.getSession();session.removeAttribute("user");System.out.println("注销成功");return "official";}/*** 申请看房*/@RequestMapping("/apply")@ResponseBodypublic ModelAndView apply(HttpSession session, HttpServletRequest request, String housemoney, String housecall,String houseaddress,String housesize) {ModelAndView mav = new ModelAndView("official");//令牌验证if(!new Koken().kokenid(request, session)) {return mav;	}mav.addObject("news", "official");if ((String) session.getAttribute("user") == null) {mav.addObject("apply", "请先登录!");return mav;}// 查询所有数据userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));if (user.getUsername() == null) {// 判断真实姓名是否为空mav.addObject("apply", "请绑定真实姓名后再租赁房屋!");return mav;} else {checkoutapplication coa = new checkoutapplication();coa.setCoausername(user.getUsername());coa.setCoauserid(user.getUserid());coa.setCoauserphone(user.getUserphone());coa.setCoahouseid(housecall);coa.setCoahouseaddress(houseaddress);coa.setCoahouseprice(Double.parseDouble(housemoney));coa.setCoahousesize(Double.parseDouble(housesize));coa.setCoastate("看房申请中");String temp=checkoutapplicationService.insertApply(coa);mav.addObject("apply", temp);}return mav;}}

管理员控制层:

@Controller
@RequestMapping("/admin")
public class Adminfunctioncontroller {@Resourceprivate RentwithdrawnService rentwithdrawnService;@Resourceprivate LeaseinformationService leaseinformationService;@Resourceprivate CheckoutapplicationService checkoutapplicationService;@Resourceprivate MydailylifeService mydailylifeService;@Resourceprivate RentcollectionService rentcollectionService;@Resourceprivate FaultService faultService;@Resourceprivate UserlistService userlistService;@Resourceprivate LeaseimgService leaseimgService;@Resourceprivate HeadPortraitImgService headPortraitImgService;/*** 注销*/@RequestMapping("/admincancel")public String cancellation(HttpServletRequest request) {HttpSession session = request.getSession();session.removeAttribute("admin");System.out.println("注销成功");return "official";}@RequestMapping("/details")public ModelAndView listCategory(@RequestParam int pn) {ModelAndView mav = new ModelAndView("rentingdel");// 设置分页传输PageHelper.startPage(pn, 10);// 查询所有数据List<rentwithdrawn> list = rentwithdrawnService.selectRwState("已退租");// 使用PageInFo封装查询结果PageInfo<rentwithdrawn> pageInfo = new PageInfo<rentwithdrawn>(list, 5);// 放入转发参数mav.addObject("cs", pageInfo);return mav;}@RequestMapping("/delect")public ModelAndView delect(@RequestParam int id) {ModelAndView mav = new ModelAndView("rentingdel");rentwithdrawnService.deleteByPrimaryKey(id);return mav;}@RequestMapping("/rentinglist")public ModelAndView listHouseState(@RequestParam int pn) {ModelAndView mav = new ModelAndView("rentinglist");// 设置分页传输PageHelper.startPage(pn, 10);// 查询所有数据List<leaseinformation> list = leaseinformationService.selecthousteaseWith("出租中");// 使用PageInFo封装查询结果PageInfo<leaseinformation> pageInfo = new PageInfo<leaseinformation>(list, 5);// 放入转发参数mav.addObject("cs", pageInfo);return mav;}@RequestMapping("/delectcontract")public ModelAndView delectcontract(@RequestParam int id) {ModelAndView mav = new ModelAndView("rentinglist");leaseinformationService.updacontract(id);return mav;}/*** 看房申请列表*/@RequestMapping("/houseapply")public ModelAndView kanfansqing(@RequestParam int pn) {ModelAndView mav = new ModelAndView("houseapply");// 设置分页传输PageHelper.startPage(pn, 10);// 查询所有数据List<checkoutapplication> list = checkoutapplicationService.selectCoaState();// 使用PageInFo封装查询结果PageInfo<checkoutapplication> pageInfo = new PageInfo<checkoutapplication>(list, 5);// 放入转发参数mav.addObject("cs", pageInfo);return mav;}/*** 预约看房申请*/@RequestMapping("/tonyizp")public ModelAndView tonyizp(@RequestParam int id, String housecall, String name) throws ParseException {ModelAndView mav = new ModelAndView("houseapply");checkoutapplicationService.xgaiCoaState("已同意", id);leaseinformation house = leaseinformationService.selectHouseCall(housecall).get(0);SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");// 设置日期格式Calendar c = Calendar.getInstance();c.add(Calendar.DATE, 30);// 计算30天后的时间String t1 = df.format(new Date());String t2 = df.format(c.getTime());// 格式转换date格式Date date1 = df.parse(t1);Date date2 = df.parse(t2);house.setHousestartingdate(date1);house.setHouseclosingdate(date2);house.setHousestate("出租中");house.setUsername(name);leaseinformationService.updateByPrimaryKey(house);return mav;}@RequestMapping("/jujzp")public ModelAndView jujzp(@RequestParam int id) {ModelAndView mav = new ModelAndView("houseapply");checkoutapplicationService.xgaiCoaState("已拒绝", id);return mav;}/***	退房申请*/@RequestMapping("/tzshenqing")public ModelAndView tzshenqing(@RequestParam int pn) {ModelAndView mav = new ModelAndView("housedel");// 设置分页传输PageHelper.startPage(pn, 10);// 查询所有数据List<checkoutapplication> list = checkoutapplicationService.selectCoaState1();// 使用PageInFo封装查询结果PageInfo<checkoutapplication> pageInfo = new PageInfo<checkoutapplication>(list, 5);// 放入转发参数mav.addObject("cs", pageInfo);return mav;}/*** 删除退房记录*/@RequestMapping("/delecttzsq")public ModelAndView delecttzsq(@RequestParam int id) {ModelAndView mav = new ModelAndView("housedel");checkoutapplicationService.deleteByPrimaryKey(id);return mav;}/*** 同意退房*/@RequestMapping("/checkoutmvc")public ModelAndView checkoutmvc(@RequestParam int id,String housecall) {ModelAndView mav = new ModelAndView("housedel");String news=checkoutapplicationService.updateState("已同意", id);if(news.equals("同意退租成功!")) {System.out.println(news);System.out.println(leaseinformationService.updateCancelForeignKey(housecall));}return mav;}/*** 拒绝退房*/@RequestMapping("/refusemvc")public ModelAndView refusemvc(@RequestParam int id) {ModelAndView mav = new ModelAndView("housedel");System.out.println(checkoutapplicationService.updateState("已拒绝", id));return mav;}/*** 分页查找所有用户*/@RequestMapping("/pagingselectuser")public String pagingselectuser(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,@RequestParam(required = false, defaultValue = "6") Integer pageSize) {PageHelper.startPage(pn, 10);List<userlist> userlist = userlistService.selectAll();PageInfo<userlist> p = new PageInfo<userlist>(userlist, 3);model.addAttribute("p", p);return "account";}/*** 删除用户信息*/@RequestMapping("/deletuser")public String deletuser(int id,String username,HttpServletRequest request) {userlistService.updateJointTabledelete(username);headPortraitImgService.deletuserimg(userlistService.selectUserId(id).getUsercall());userlistService.deleteByPrimaryKey(id);return "redirect:pagingselectuser.do";}/*** 添加房源* * @throws IOException* @throws IllegalStateException*/@RequestMapping("/addhouse")public String addhouse(String housecall, String address, String area, String rent, String housetype, String[] state,@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request)throws IllegalStateException, IOException {if (housecall.equals("") || address.equals("") || area.equals("") || rent.equals("") || state.equals("")|| housetype.equals("")) {request.setAttribute("erro", "输入房源信息不能缺少任意一项!");return "housingadd";}List<leaseinformation> list = leaseinformationService.queryAll();for (leaseinformation leaseinformation : list) {if (housecall.equals(leaseinformation.getHousecall())) {request.setAttribute("erro", "该房源编号已存在");return "housingadd";}}String path = "";String imgname = "";if (!file.isEmpty()) {// 生成uuid作为文件名称String uuid = UUID.randomUUID().toString().replaceAll("-", "");// 获得文件类型(可以判断如果不是图片,禁止上传)String contentType = file.getContentType();// 获得文件后缀名称String imageName = contentType.substring(contentType.indexOf("/") + 1);path = "C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/leaseimg/" + uuid + "." + imageName;file.transferTo(new File(path));imgname = uuid + "." + imageName;}leaseimg img = new leaseimg();img.setImgname(address);img.setImgroute(imgname);leaseimgService.insert(img);int id = leaseimgService.selectAll().get(leaseimgService.selectAll().size() - 1).getId();leaseinformation house = new leaseinformation();house.setHouseaddress(address);house.setHousesize(Double.valueOf(area));house.setHousemoney(rent);house.setHousestate(state[0]);house.setHousecall(housecall);//获取当前时间和一个月后的时间Date date = new Date();SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");String HouseStartingDate=sdf.format(date);Calendar cal = Calendar.getInstance();cal.setTime(date);cal.add(Calendar.DATE, 30);String HouseClosingDate=sdf.format(cal.getTime());house.setHousestartingdate(date);house.setHouseclosingdate(cal.getTime());house.setHousestartingdatetemp(HouseStartingDate);house.setHouseclosingdatetemp(HouseClosingDate);house.setId(id);house.setHousetype(housetype);house.setHouserecommend("未设置");leaseinformationService.addHouse(house);request.setAttribute("sessce", "添加成功");return "housingadd";}/*** 分页展示房源信息*/@RequestMapping("/pagingselecthouse")public String pagingselecthouse(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,@RequestParam(required = false, defaultValue = "6") Integer pageSize) {PageHelper.startPage(pn, 10);List<leaseinformation> leaseinformation = leaseinformationService.queryAll();PageInfo<leaseinformation> p = new PageInfo<leaseinformation>(leaseinformation, 3);model.addAttribute("p", p);return "housinglist";}/*** 获取修改房源信息*/@RequestMapping("/getupdatehouse")public String getupdatehouse(int houseid, HttpServletRequest request) {List<leaseinformation> house = leaseinformationService.queryID(houseid);request.setAttribute("uphouse", house);return "houseupdate";}/*** 修改房源信息*/@RequestMapping("/updatehouse")public String updatehouse(Integer houseid, String housetype, String address, String area, String rent, String state,HttpServletRequest request) {leaseinformation house = leaseinformationService.queryID(houseid).get(0);request.removeAttribute("uphouse");house.setHouseaddress(address);house.setHousemoney(rent);house.setHousetype(housetype);house.setHousesize(Double.valueOf(area));house.setHousestate(state);house.setHouseid(houseid);leaseinformationService.updateByPrimaryKey(house);request.setAttribute("sessce", "修改成功");request.setAttribute("newhouse", house);return "houseupdate";}/*** 删除房源信息*/@RequestMapping("/delethouse")public String delethouse(int houseid, HttpServletRequest request) {if (houseid >= 0) {int id = leaseinformationService.queryID(houseid).get(0).getId();leaseinformationService.deleteByPrimaryKey(houseid);leaseimgService.deleteByPrimaryKey(id);}return "redirect:pagingselecthouse.do";}/** 推荐房屋列表*/@RequestMapping("/recommendlist")public String recommendlist(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,@RequestParam(required = false, defaultValue = "6") Integer pageSize) {PageHelper.startPage(pn, 10);List<leaseinformation> leaseinformation = leaseinformationService.selectAllLeasable();PageInfo<leaseinformation> p = new PageInfo<leaseinformation>(leaseinformation, 3);model.addAttribute("p", p);return "recommendhouse";}/*** 修改推荐信息*/@RequestMapping("/updaterecommend")public String updatehouse(Integer houseid) {leaseinformation house = leaseinformationService.queryID(houseid).get(0);if (house.getHouserecommend().equals("未推荐")) {house.setHouserecommend("已推荐");} else {house.setHouserecommend("未推荐");}leaseinformationService.updateByPrimaryKey(house);return "redirect:recommendlist.do?";}/*** 分页查询日程信息*/@RequestMapping("/schedulelist")public String mydailylifelist(@RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<mydailylife> mydailylifes = mydailylifeService.selectAll();PageInfo<mydailylife> page = new PageInfo<mydailylife>(mydailylifes, 3);model.addAttribute("p", page);return "schedulelist";}/*** 添加日程*/@RequestMapping("/addmydailylife")public String mydailylifeadd(mydailylife mydailylife) {mydailylifeService.insert(mydailylife);return "redirect:/admin/schedulelist.do";}/*** 修改日程*/@RequestMapping("/updatemydailylife")public String mydailylifeupdate1(Integer id, HttpServletRequest request) {mydailylife mydailylife = mydailylifeService.selectByPrimaryKey(id);request.setAttribute("mydailylife", mydailylife);return "scheduleupdate";}@RequestMapping("/toupdate")public String mydailylifeupdate2(mydailylife mydailylife) {mydailylifeService.updateByPrimaryKey(mydailylife);return "redirect:/admin/schedulelist.do";}/*** 删除日程*/@RequestMapping("/delmydailylife")public String mydailylifedel(Integer id) {mydailylifeService.deleteByPrimaryKey(id);return "redirect:/admin/schedulelist.do";}// 报障/*** 查询待处理报障*/@RequestMapping("/Adminselectrepairwait")public String selectrepairwait(String state, @RequestParam(value = "pn", defaultValue = "1") Integer pn,Model model) {state = "未处理";// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<fault> faultlist = faultService.AdminSelectStateAll(state);PageInfo<fault> page = new PageInfo<fault>(faultlist, 3);model.addAttribute("p", page);return "repairwait";}/*** 已完成全部报障*/@RequestMapping("/Adminselectrepairdone")public String selectrepairdone(String state, @RequestParam(value = "pn", defaultValue = "1") Integer pn,Model model) {state = "已处理";// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<fault> faultdone = faultService.AdminSelectStateAll(state);PageInfo<fault> page = new PageInfo<fault>(faultdone, 3);model.addAttribute("p", page);return "repairdone";}/*** 报障状态修改*/@RequestMapping("/adminrepairwait")public String updaterepairwait(Integer id) {fault fault = faultService.selectByPrimaryKey(id);String fhouseid = fault.getFhouseid();String fhouseaddress = fault.getFhouseaddress();Double fprice = fault.getFprice();Date fdate = fault.getFdate();String fcontent = fault.getFcontent();String fusername = fault.getFusername();String fuserid = fault.getFuserid();String fuserphone = fault.getFuserphone();String fstate = "已处理";fault f = new fault(fhouseid, fhouseaddress, fprice, fdate, fcontent, fusername, fuserid, fuserphone, fstate,id);faultService.updateByPrimaryKey(f);return "redirect:/admin/Adminselectrepairwait.do";}/*** 报障删除*/@RequestMapping("/adminrepairdone")public String delrepair(Integer id) {faultService.deleteByPrimaryKey(id);return "redirect:/admin/Adminselectrepairdone.do";}/*** 搜索报障*/@RequestMapping("/repairselect")public String repairselect(QueryVo vo, @RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<fault> faultdone = faultService.repairselect(vo);for (fault temp : faultdone) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");String date = sdf.format(temp.getFdate());temp.setFdatetemp(date);}PageInfo<fault> page = new PageInfo<fault>(faultdone, 3);model.addAttribute("p", page);model.addAttribute("vo", vo);return "repairdone";}/*** 我要收租*/@RequestMapping("/adminrentshou")public String rentshou(@RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<userlist> userlists = userlistService.rentSelectAll();PageInfo<userlist> page = new PageInfo<userlist>(userlists, 3);model.addAttribute("rent", page);return "rentshou";}/*** 获取收租信息*/@RequestMapping("/adminrentselect")public String rentadd(String housecall, Model model) {userlist userlist = userlistService.selectUserCallWith(housecall);model.addAttribute("addrent", userlist);return "rentadd";}/*** 添加代缴租金*/@RequestMapping("/adminrentadd")public String rentaddwait(rentcollection rentcollection) {rentcollectionService.insert(rentcollection);return "redirect:/admin/adminrentshou.do";}/*** 代缴租金*/@RequestMapping("/adminrentwait")public String rentwait(String rcstate, @RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {rcstate = "未缴纳";// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<rentcollection> rentlists = rentcollectionService.selectPaidStateAll(rcstate);PageInfo<rentcollection> page = new PageInfo<rentcollection>(rentlists, 3);model.addAttribute("rent", page);return "rentwait";}/*** 删除租金缴纳记录*/@RequestMapping("/admindelrent")public String delrent(Integer id) {rentcollectionService.deleteByPrimaryKey(id);return "redirect:/admin/adminselectPaidAll.do";}/*** 搜索查询*/@RequestMapping("/adminselectPaidAll")public String adminselectPaidAll(QueryVo vo, @RequestParam(value = "pn", defaultValue = "1") Integer pn,Model model) {// 引用PageHelper分页插件PageHelper.startPage(pn, 10);List<rentcollection> rentlists = rentcollectionService.selectPaidAll(vo);for (rentcollection temp : rentlists) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");String date = sdf.format(temp.getRcdate());temp.setRcdatetemp(date);if(temp.getRcpaiddate()!=null) {String Rcpaiddate = sdf.format(temp.getRcpaiddate());temp.setRcpaiddatetemp(Rcpaiddate);}}PageInfo<rentcollection> page = new PageInfo<rentcollection>(rentlists, 3);model.addAttribute("rent", page);model.addAttribute("vo", vo);return "rentdone";}/*** 查看合同*/@RequestMapping("/viewcontractadmin")public ModelAndView viewcontractadmin(String username, String userid, String houseaddress,String housestartingdatetemp, String houseclosingdatetemp, String housemoney, String userphone,String houseid, HttpServletRequest request, HttpSession session) {ModelAndView mav = new ModelAndView("rentinglist");String arraytemp[] = { username, userid, houseaddress, housestartingdatetemp, houseclosingdatetemp, housemoney,userphone, houseid };System.out.println(Arrays.toString(arraytemp));String temp = arraytemp[7] + "pdf.pdf";File filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);if (!filetemp.exists()) {System.out.println(new DocumentConversion().DocumentGeneration(arraytemp));new DocumentConversion().PdfGeneration(arraytemp[7]);filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);}String pdf = filetemp.getName();// 放入转发参数mav.addObject("pdftemp", pdf);return mav;}
}

房屋信息控制器:

/*** 房屋信息控制器* @author yy**/@Controller
@RequestMapping("/leaseinformationmvc")
public class LeaseinformationController {@AutowiredLeaseinformationService leaseinformationService;@RequestMapping("/details")public ModelAndView listCategory(@RequestParam int id){ModelAndView mav = new ModelAndView("details");List<leaseinformation> cs= leaseinformationService.allANDimg1(id);for (leaseinformation leaseinformation : cs) {System.out.println(leaseinformation.getLeaseimg().getImgroute());}// 放入转发参数mav.addObject("cs", cs);return mav;}}

 源码获取:博客首页 "资源" 里下载!

相关文章:

sdtz技术组成

发送短信数据库表到第二天就删除前一天的的内容重新建表是用触发器功能实现的 回款、发标、发短信一些核心功能是用windows服务运行在服务器上自动运行的 sql管理中的维护计划就能设置自动备份数据库转载于:https://www.cnblogs.com/zheng510ke/p/4562812.html

13个 ASP.NET MVC 的扩展

ASP.NET MVC设计的主要原则之一是可扩展性。处理管线&#xff08;processing pipeline&#xff09;上的所有&#xff08;或大多数&#xff09;东西都是可替换的。因此&#xff0c;如果您不喜欢ASP.NET MVC所使用的约定&#xff08;或缺乏某些约定&#xff09;&#xff0c;您可以…

javascript实例

数组排序 ①冒泡排序 思路&#xff1a; 比较相邻的元素。如果第一个比第二个大&#xff0c;就交换他们两个。对每一对相邻元素作同样的工作&#xff0c;从开始第一对到结尾的最后一对。在这一点&#xff0c;最后的元素应该会是最大的数。针对所有的元素重复以上的步骤&#xff…

Ubuntu10.04安装Flash插件

1. 从Adobe下载Flash安装程序&#xff0c;并且解压。 tar -xzvf install_flash_player_10_linux.tar.gz 2. 把解压出来的“libflashplayer.so” 复制到 /usr/lib/mozilla/plugins 目录下。 sudo cp libflashplayer.so /usr/lib/mozilla/plugins 3. 执行以下命令&#x…

Java项目:健身俱乐部管理系统(java+SSM+Mysql+Jsp)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 项目介绍&#xff1a; 基于jspmysqlSpringmybatis的SSM健身房管理系统 运行环境: jdk 1.8 IDE环境&#xff1a; Eclipse,Myeclipse,IDEA都可以 tomcat环境&#xff1a; Tomcat 7.x,8.x,9.x版本均可&#xf…

通过代理进行页面传值

A 页面跳转到 B页面&#xff0c;在关闭B页面的时候想将B页面的某些内容回传给A页面 在B页面写代理的相关方法 protocol 控制器的名称 Delegate <NSObject> optional -(void) xxxxxx:(控制器 *) control end interface 控制器 : UIViewController property (weak,nonatom…

Linux系统下如何安装软件包

现在一般是使用 RPM &#xff0c;YUM 和 APT 来管理软件包。软件包常用的也就是&#xff0c;查找软件包&#xff0c;安装&#xff0c;卸载&#xff0c;升级。这几个功能。RPM 比较经典&#xff0c;但是也比较麻烦&#xff0c;尤其是在软件依赖关系上面&#xff0c;有的时…

自己设计大学排名-数据库实践

今天我们来学习以下有关于数据提取以及数据库的一些知识&#xff0c; 我们知道其实数据库是一个非常神奇的存在&#xff0c;它是是按照 数据结构来组织、 存储和管理数据的仓库 我们可以使用它对数据进行储存和管理&#xff01; 下面是有关于sqlite3的学习&#xff0c;SQLite3 …

Windows 和 Linux 应用程序从上到下调用层次比较

刚毕业的时候&#xff0c;做了将近一年的Window下的程序开发&#xff0c;主要用MFC&#xff0c;那是也不明白程序在操作系统角度从上到下的整个调用层次。遇到调用库函数&#xff0c;不明白&#xff0c;就查MSDN&#xff0c;每个月1500行代码左右&#xff0c;那时以为这就是软件…

Java项目:药品管理系统(java+swing+Gui+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a;用户管理、药品库存管理、进销管理、营销管理、药品购入、药品售出、药市信息 系统主页&#xff1a; SuppressWarnings("serial") public class SystemMainView extends JFr…

WEBSHELL跳板REDUH使用说明

原文链接: http://www.fendou.info/network/webshell-proxy-reduh.html reDuh是可以把内网服务器的端口通过http或https隧道转发到本机&#xff0c;形成一个TCP连通回路&#xff0c;用于目标服务器在内网或做了端口策略的情况下连接目标服务器内部端口的工具。 reDuh和LCX类似&…

站立会议(三)

一、会议时间&#xff1a;2014年4月13日 二、会议目的&#xff1a;统计项目进度以及每个人的进度、计划以及问题 三、会议内容&#xff1a; 党云龙&#xff1a; 今天内容 查阅资料&#xff0c;上网搜索&#xff0c;完成API调用&#xff1b; 遇到问题 还是在实现的时候无法阻止…

python celery

celery 一般用于做异步 和定时任务 不过听网上说 celery 坑还是蛮多的&#xff0c;特别定时任务&#xff0c;我们一般用来做定时任务&#xff0c;还有数据导入导出。celery 不支持 redis cluster 集群模式uWSGI 自带了一个简单的 Spooler 可以处理大部分异步任务和周期运行的任…

c语言实现memcpy

今天到I 公司去面试&#xff0c;面试方式比较特殊&#xff0c;没有笔试&#xff0c;就是2 个面试官&#xff0c;一人一句轮番发问&#xff0c;涉及面很广&#xff0c;涉及到操作系统(MMU 、page out 、process/thread 、semaphore 、interrupt), OOP( 多态、design pattern) 、…

Java项目:图书管理系统(java+swing+Gui+Mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a;借阅列表、图书类别管理、图书馆里、用户管理、借阅管理、关于我们 登录服务类&#xff1a; WebServlet("/LoginServlet") public class LoginServlet extends HttpServlet …

十五天精通WCF——第三天 client如何知道server提供的功能清单

通常我们去大保健的时候&#xff0c;都会找姑娘问一下这里能提供什么服务&#xff0c;什么价格&#xff0c;这时候可能姑娘会跟你口述一些服务或者提供一份服务清单&#xff0c;这样的话大 家就可以做到童嫂无欺&#xff0c;这样一份活生生的例子&#xff0c;在wcf中同样是一个…

MySQL Cluster 日常维护

在前面几篇文章已经详细介绍了MySQL Cluster的搭建&#xff0c;配置讲解。而且相信大家都掌握了基本用法。现在我们来看看Cluster的日常维护。熟悉日常维护&#xff0c;将有助于工作中更好的管理和使用Cluster。 一. 数据备份 相信大家都熟悉mysql的日常备份工具&#xff0c;比…

20165219王彦博《基于Cortex-M4的虚拟机制作与测试》课程设计个人报告

20165219王彦博《基于Cortex-M4的虚拟机制作与测试》课程设计个人报告 一、个人贡献 参与课设题目讨论及完成全过程&#xff1b; 资料收集&#xff1b; 负责环境搭建&#xff0c;代码运行下载&#xff1b; 撰写小组结题报告。 二、设计中遇到的问题及解决方法 1 实验六以太网服…

extern数组与extern指针

数组名代表了存放该数组的那块内存&#xff0c;它是这块内存的首地址。这就说明了数组名 是一个地址&#xff0c;而且&#xff0c;还是一个不可修改的常量&#xff0c;完整地说&#xff0c;就是一个地址常量。数组名 跟枚举常量一样&#xff0c;都属于符号常量。数组名 这个符号…

Java项目:医院管理系统(java+javaweb+jdbc+Mysql+lw)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 登录、注册、用户/管理员(角色)、用户信息管理、科系信息管理、查看所有科系、新增科系信息、删除指定科系、修改科系信息、病房信息管理、病人信息管理、医生类型管理、病人手术管理…

Mongodb地理空间索引

1、索引&#xff1a; 建立索引既耗时也费力&#xff0c;还需要消耗很多资源。使用{"bakckground":true}选项可以使这个过程在后台完成&#xff0c;同时正常处理请求。如果不包括background 这个选项&#xff0c;数据库会阻塞建立索引期间的所有请求。阻塞的做法会让索…

Juniper的路由器、防火墙、交换机如何恢复出厂配置

Juniper的路由器、防火墙、交换机如何恢复出厂配置有些时候&#xff0c;在正常的业务使用中&#xff0c;逐条删除配置的内容很繁琐&#xff0c;我们可以使用恢复出厂配置&#xff0c;清空设备中的配置&#xff1b;还有的时候&#xff0c;由于设备配置异常&#xff0c;可以使用恢…

【转载】标准输入输出、错误输出、重定向标准输出

【转载】标准输入输出、错误输出、重定向标准输出 原文&#xff1a;标准输入输出、错误输出、重定向标准输出 再来看看 >& 操作符&#xff1a; 重定向操作符描述 > 将命令输出写入到文件或设备&#xff08;如打印机&#xff09;&#xff0c;而不是命令提示符窗口或…

(Interrupt Latency) 中断延迟

中断延迟 (Interrupt Latency) 中断延迟 是指从硬件中断发生到开始执行中断处理程序第一条指令之间的这段时间。 也就是&#xff1a; 计算机接收到中断信号到操作系统作出响应&#xff0c;并完成换到转入中断服务程序的时间。 不严格地&#xff0c;也可以表述为&#xff1a…

Java项目:干活管理系统(java+SSM+Jsp+Mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 前台用户和后台管理员两种角色&#xff1a; 前台用户功能有&#xff1a;发布兼职、发布帖子、查看公告、个人中心、投诉等。 后台管理员功能有&#xff1a;用户管理、兼职管理、帖子管理、聊天管理、广告管…

20135234mqy 实验四

北京电子科技学院&#xff08;BESTI&#xff09; 实 验 报 告 课程&#xff1a;java程序设计 班级&#xff1a;1352 姓名&#xff1a;mqy 学号&#xff1a;20135234 成绩&#xff1a; 指导教师&#xff1a;娄嘉鹏 实验日期&#xff1a;2015.6…

我的第一张地图报表

一直以来对于地图都很陌生&#xff0c;感觉好强大&#xff0c;可以根据地理位置去分析数据&#xff0c;下面我简单的做了一张地图展示数据的报表。 接下来就简单的说一下设计过程和应该注意的地方 效果&#xff1a;&#xff08;鼠标放在省份区域上&#xff0c;显示该省的数据&a…

SpringBoot第十篇:thymeleaf详解

作者&#xff1a;追梦1819 原文&#xff1a;https://www.cnblogs.com/yanfei1819/p/10931435.html 版权声明&#xff1a;本文为博主原创文章&#xff0c;转载请附上博文链接&#xff01; 引言 SpringBoot 对 Web 的支持&#xff0c;官方推荐的是模板引擎 thymelaf。本章中&…

嵌入式系统开发过程中遇到的——volatile

嵌入式 系统开发过程中遇到的—— volatile 对于不同的计算机体系结构&#xff0c;设备可能是端口映射&#xff0c;也可能是内存映射的 。如果系统结构支持独立的 I/O 地址空间&#xff0c;并且是端口映射&#xff0c;就必须使用汇编语言完成实际对设备的控制&#xff…

薏米红豆粥的功效和实践演示

熬薏米红豆粥有很多技巧和讲究。薏米很硬&#xff0c;红豆也很硬&#xff0c;假设已经煮在锅里&#xff0c;大概熬一个多小时不坏&#xff0c;这是一种浪费火灾或电力&#xff0c;它甚至可以把水烧开&#xff0c;原因症结。我建议的方法有两种&#xff1a;第一种方法是在锅里加…