一、项目简述
功能包括: 分为管理员及普通业主角色,业主信息,社区房屋,维护 管理,社区车辆,社区投诉,社区缴费,社区业务信息维 护等等功能。
二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + maven等等。
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
/**
* @category 搜索后展示缴费
* @param model
* @param request
* @return
*/
@RequestMapping("/showbyname")
public String showbyname(Model model, HttpServletRequest request, HttpSession session) {
int pageSize = (int) session.getAttribute("pageSize");
int pageNum = (int) session.getAttribute("pageNum");
String name = request.getParameter("username");
// System.out.println(name);
List<Owner> list1 = billService.findByOwner();
List<Owner> list2 = FyResult.getOwnerList(pageSize, pageNum, list1, "f");
// System.out.println(list1.size());
List<Owner> list = new ArrayList<>();
for (int i = 0; i < list2.size(); i++) {
// System.out.println(list1.get(i).getOname());
return "updateowner";
}
// 分页查询
@RequestMapping("/findpagess")
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 = ownerService.findPage(pageQuery);
model.addAttribute("pageResult", pageResult);
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);
System.out.println("mycarseat:"+uid);
List<Carport> list = carportService.findMyCarSeat(uid);
model.addAttribute("carport1", list);
for (Carport c : list) {
System.out.println(c.getDate());
}
return "mycarseat";
}
/**
* 展示用户
*/
@RequestMapping("/showoerme")
public String showownerme(Model model,HttpSession session){
System.out.println("============");
* @param house
* @return
*/
@RequestMapping("/addhouse")
public String addhouse(Model model,Housenumber house) {
house.setSaleprice(0);
hService.insert(house);
return "redirect:showhouse.action?type=a";
}
}
业主控制层:
@Controller
public class OwnerController {
@Autowired
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;
// 循环遍历得到的所有owner对象
for (int j = 0; j < list1.get(i).getBill().size(); j++) {
//获得owner单个订单的时间戳
billdate = cx.parse(list1.get(i).getBill().get(j).getBilltime());
billtime = billdate.getTime();
//判断订单的时间戳是否在指定的范围内,并且该owner的姓名要包含指定的字符串
try {
if (billtime >= startTime && billtime <= stopTime && list1.get(i).getOname().contains(name)) {
return "test";
}
}
未缴费账单控制器:
/**
* @category 未缴费账单控制器
*
*/
@Controller
public class BillController {
@Autowired
private BillService billService;
@Autowired
private BillitemsService bitemService;
@Autowired
private OwnerService oService;
private SimpleDateFormat cx = new SimpleDateFormat("yyyy-MM-dd");
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;
// 循环遍历得到的所有owner对象
for (int j = 0; j < list1.get(i).getBill().size(); j++) {
//获得owner单个订单的时间戳
billdate = cx.parse(list1.get(i).getBill().get(j).getBilltime());
billtime = billdate.getTime();
//判断订单的时间戳是否在指定的范围内,并且该owner的姓名要包含指定的字符串
try {
if (billtime >= startTime && billtime <= stopTime && list1.get(i).getOname().contains(name)) {
* @category 通过给定时间范围展示和业主模糊姓名联合查询缴费信息
* @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");
// 将字符串转换为日期对象
}
/**
* @category 跟新房屋信息
* @param model
* @param house
* @return
*/
@RequestMapping("/updatehouse1")
public String updatehouse1(Model model, Housenumber house) {
String type=house.getStatus();
if(type.equals("闲置")) {
type="x";
}else if(type.equals("已出售")) {
return "redirect:sfmanage.action";
}
/**
* @category 搜索后展示缴费
* @param model
* @param request
* @return
*/
@RequestMapping("/showbyname")
public String showbyname(Model model, HttpServletRequest request, HttpSession session) {
int pageSize = (int) session.getAttribute("pageSize");
int pageNum = (int) session.getAttribute("pageNum");
String name = request.getParameter("username");
// System.out.println(name);
List<Owner> list1 = billService.findByOwner();
List<Owner> list2 = FyResult.getOwnerList(pageSize, pageNum, list1, "f");
@RequestMapping("/save")
public String save(Owner owner, Model model) {
ownerService.updatesave(owner);
return "redirect:findpagess.action?pageSize=5&pageNum=1&str=n";
}
/**
* 删除一个住户
*/
@RequestMapping("/deleteone")
public String deleteone(int oid) {
ownerService.deleteByPrimaryKey(oid);
return "redirect:findpagess.action?pageSize=5&pageNum=1&str=n";
}
/**
* 批量删除用户
*/
@RequestMapping("/deleteAll")
}
业主控制层:
@Controller
public class OwnerController {
@Autowired
OwnerService ownerService;
@Autowired
private MessageService messService;
@Autowired
CarportService carportService;
@Autowired
SessionContentService sessionContentService;
private BillService billService;
// 登录控制器
@RequestMapping("/login")
public String login() {
return "login";
}
// 登录判断控制器
@RequestMapping("/loginjudge")