赞
踩
作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
本项目为后管系统,分为管理员、业主两种角色;
管理员主要功能为:
社区核心业务处理:车位收费管理、物业收费管理、投诉信息管理、报修信息管理
基础信息管理:楼宇管理、房屋管理、业主管理、车位管理、抄表管理、登录信息管理、修改密码
基础类型管理:投诉类型管理、收费类型管理、报修类型管理
数据统计:报修统计
业主主要功能为:
车位费查询、物业费查询、我的投诉列表、我的报修列表、修改密码等;
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
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 8.0版本;
6.是否Maven项目:是;
1. 后端:SpringBoot+Mybatis
2. 前端:HTML+CSS+JavaScript+LayUI
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,访问地址:http://localhost:8888
管理员账号/密码:admin/123456
业主账号/密码:kappy/123456
业主账号可通过管理员在业主管理模块进行添加,默认密码为123456
运行截图
- @Api(tags = {""})
- @RestController
- @RequestMapping("/house")
- public class HouseController {
-
- private Logger log = LoggerFactory.getLogger(getClass());
-
- @Resource
- private IHouseService houseService;
-
- @RequestMapping("/houseAll")
- public JsonObject queryHouseAll(String numbers,
- @RequestParam(defaultValue = "1") Integer page,
- @RequestParam(defaultValue = "15") Integer limit){
- PageInfo<House> pageInfo=houseService.findHouseAll(page,limit,numbers);
- return new JsonObject(0,"ok",pageInfo.getTotal(),pageInfo.getList());
- }
-
- @RequestMapping("/queryAll")
- public List<House> queryAll(){
- PageInfo<House> pageInfo=houseService.findHouseAll(1,100,null);
- return pageInfo.getList();
- }
-
-
- @ApiOperation(value = "新增")
- @RequestMapping("/add")
- public R add(@RequestBody House house){
- if(house.getIntoDate()!=null){
- house.setStatus(1);
- }else{
- house.setStatus(0);
- }
- int num= houseService.add(house);
- if(num>0){
- return R.ok();
- }else{
- return R.fail("添加失败");
- }
- }
-
- @ApiOperation(value = "删除")
- @RequestMapping("/deleteByIds")
- public R delete(String ids){
- //z转成集合对象
- List<String> list= Arrays.asList(ids.split(","));
- for(String id:list){
- Long idLong=Long.parseLong(id);
- houseService.delete(idLong);
- }
- return R.ok();
- }
-
- @ApiOperation(value = "更新")
- @RequestMapping("/update")
- public R update(@RequestBody House house){
- if(house.getIntoDate()!=null){
- house.setStatus(1);
- }else{
- house.setStatus(0);
- }
- int num= houseService.updateData(house);
- if(num>0){
- return R.ok();
- }else{
- return R.fail("修改失败");
- }
- }
-
- @ApiOperation(value = "查询分页数据")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "page", value = "页码"),
- @ApiImplicitParam(name = "pageCount", value = "每页条数")
- })
- @GetMapping()
- public IPage<House> findListByPage(@RequestParam Integer page,
- @RequestParam Integer pageCount){
- return houseService.findListByPage(page, pageCount);
- }
-
- @ApiOperation(value = "id查询")
- @GetMapping("{id}")
- public House findById(@PathVariable Long id){
- return houseService.findById(id);
- }
-
- }
- @Api(tags = {""})
- @RestController
- @RequestMapping("/notice")
- public class NoticeController {
-
- private Logger log = LoggerFactory.getLogger(getClass());
-
- @Resource
- private INoticeService noticeService;
-
-
- @ApiOperation(value = "新增")
- @PostMapping()
- public int add(@RequestBody Notice notice){
- return noticeService.add(notice);
- }
-
- @ApiOperation(value = "删除")
- @DeleteMapping("{id}")
- public int delete(@PathVariable("id") Long id){
- return noticeService.delete(id);
- }
-
- @ApiOperation(value = "更新")
- @PutMapping()
- public int update(@RequestBody Notice notice){
- return noticeService.updateData(notice);
- }
-
- @ApiOperation(value = "查询分页数据")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "page", value = "页码"),
- @ApiImplicitParam(name = "pageCount", value = "每页条数")
- })
- @GetMapping()
- public IPage<Notice> findListByPage(@RequestParam Integer page,
- @RequestParam Integer pageCount){
- return noticeService.findListByPage(page, pageCount);
- }
-
- @ApiOperation(value = "id查询")
- @GetMapping("{id}")
- public Notice findById(@PathVariable Long id){
- return noticeService.findById(id);
- }
-
- }
- @Api(tags = {""})
- @RestController
- @RequestMapping("/repair")
- public class RepairController {
-
- private Logger log = LoggerFactory.getLogger(getClass());
-
- @Resource
- private IRepairService repairService;
- @Resource
- private IRepairtypeService repairtypeService;
-
- @Resource
- private IOwnerService ownerService;
-
- @RequestMapping("/queryRepairAll")
- public JsonObject queryRepairAll(Repair repair,
- @RequestParam(defaultValue = "1") Integer page,
- @RequestParam(defaultValue = "15") Integer limit){
-
-
- PageInfo<Repair> pageInfo=repairService.findRepairAll(page,limit,repair);
- return new JsonObject(0,"ok",pageInfo.getTotal(),pageInfo.getList());
-
- }
-
- @RequestMapping("/queryRepairAll2")
- public JsonObject queryRepairAll2(Repair repair, HttpServletRequest request,
- @RequestParam(defaultValue = "1") Integer page,
- @RequestParam(defaultValue = "15") Integer limit){
-
-
- //获取当前得登录用户
- Userinfo userinfo= (Userinfo) request.getSession().getAttribute("user");
- String username=userinfo.getUsername();
- //根据username获取登录账号得业主id
- Owner owner=ownerService.queryOwnerByName(username);
- repair.setOwnerId(owner.getId());
- PageInfo<Repair> pageInfo=repairService.findRepairAll(page,limit,repair);
- return new JsonObject(0,"ok",pageInfo.getTotal(),pageInfo.getList());
-
- }
-
- @RequestMapping("/queryAll")
- public List<Repairtype> queryAll(){
- return repairtypeService.findList();
- }
-
-
- @RequestMapping("/deleteByIds")
- public R deleteByIds(String ids){
- List<String> list= Arrays.asList(ids.split(","));
- for(String id:list){
- repairService.delete(Long.parseLong(id));
- }
-
- return R.ok();
- }
-
- @ApiOperation(value = "新增")
- @RequestMapping("/add")
- public R add(@RequestBody Repair repair, HttpServletRequest request)
- {
- //获取当前得登录用户
- Userinfo userinfo= (Userinfo) request.getSession().getAttribute("user");
- //String username=userinfo.getUsername();
- //System.out.println( repair.getRemarks());
- //根据username获取登录账号得业主id
- Owner owner=ownerService.queryOwnerById(userinfo.getId());
- //Repairtype repairtype=repairtypeService.findById(Long.valueOf(repair.getComId()));
- Repair repair1=new Repair();
- repair1.setRemarks(repair.getRemarks());
- repair1.setClr(repair.getClr());
- repair1.setOwnerId(userinfo.getId());
- repair1.setStatus(Integer.valueOf(0));
- repair1.setComDate(new Date());
- repair1.setComId(repair.getComId());
- //repair1.setOwner(owner);
- //repair1.setType(repairtype);
- int num=repairService.add(repair1);
- if(num>0){
- return R.ok();
- }
- return R.fail("失败啦");
- }
-
- @ApiOperation(value = "更新")
- @RequestMapping("/update")
- public R update(Integer id){
- Repair repair=new Repair();
- repair.setId(id);
- repair.setStatus(1);
- repair.setHandleDate(new Date());
- int num=repairService.updateData(repair);
- return R.ok();
- }
-
- /**
- * 统计分析
- */
- @RequestMapping("/queryTongJi")
- public List<Tongji> queryTongji(){
- return repairService.queryTongji();
- }
-
-
- @ApiOperation(value = "删除")
- @RequestMapping("/deleteId")
- public R delete(String ids){
- List<String> list= Arrays.asList(ids.split(","));
- //遍历遍历进行删除
- for(String id:list){
- repairtypeService.delete(Long.parseLong(id));
- }
- return R.ok();
- }
-
- @ApiOperation(value = "更新")
- @RequestMapping("/update1")
- public R update1(@RequestBody Repair repair){
- //System.out.println(repair.getComId());
- int num=repairService .updateData(repair);
- if(num>0){
- return R.ok();
- }else{
- return R.fail("修改失败");
- }
- }
-
-
-
- }
如果也想学习本系统,下面领取。回复:077springboot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。