package com.www.controller;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import javax.annotation.Resource;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.www.bean.TaskReportBean;
import com.www.entity.Repairtask;
import com.www.service.RepairTaskService;
import com.www.util.DwrService;
import com.www.util.HttpUtil;
import com.www.util.Page;
import com.www.util.Pagination;
@Controller
@RequestMapping("/repairtask")
public class RepairTaskController {
@Resource
private RepairTaskService repairTaskService;
//供维修人员看到的全部维修任务
@RequestMapping(value = "/list")
protected ModelAndView list(HttpServletRequest request,
HttpServletResponse response) throws Exception {
System.out.println("进来了?。。。。。");
HttpUtil util = new HttpUtil(request, response);
int startRow = util.parseInt(Pagination.START_ROW);
Map<String, Object> map = new HashMap<String, Object>();
String name="";
String sql = "from Repairtask where 1=1 order by createtime desc";
List<Repairtask> l = new ArrayList<Repairtask>();
Page page = repairTaskService.findPageByHQL(sql, startRow, 9, null);
if (page != null && page.getList() != null) {
List lists = page.getList();
for (int i = 0; i < lists.size(); i++) {
Repairtask repairtask = (Repairtask) lists.get(i);
l.add(repairtask);
}
}
map.put("list", l);
map.put("page", page);
System.out.println("我到这里了。。。");
return new ModelAndView("repair/repairlist", map);
}
// 维修人员 ======我的维修任务
@RequestMapping(value = "/mylist")
protected ModelAndView mylist(HttpServletRequest request,
HttpServletResponse response) throws Exception {
HttpUtil util = new HttpUtil(request, response);
int startRow = util.parseInt(Pagination.START_ROW);
System.out.println("进来了?。。。。。");
String name = "";
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals("username")) {
name = URLDecoder.decode(cookies[i].getValue(), "utf-8");
System.out.println("登录名" + name
+ "<<<<<<<<<<<======>>>>>>>>>");
}
}
}
Map<String, Object> map = new HashMap<String, Object>();
String reqBody = name;
System.out.println(reqBody + "req....................");
StringBuffer hql = new StringBuffer("from Repairtask where 1=1");
System.out.println(hql + "hql================");
List param = new ArrayList();
if (reqBody != null && !"".equals(reqBody)) {
hql.append(" and workpeople =?");
param.add(reqBody);
System.out.println(param + "param'''''''''''''333===");
}
hql.append(" order by grabtime desc");
List<Repairtask> l = new ArrayList<Repairtask>();
Page page = repairTaskService.findPageByHQL(hql.toString(), startRow,
9, param.toArray());
if (page != null && page.getList() != null) {
List lists = page.getList();
for (int i = 0; i < lists.size(); i++) {
Repairtask repairtask = (Repairtask) lists.get(i);
l.add(repairtask);
}
}
// List list = repairTaskService.findAll(hql.toString(),
// param.toArray());
map.put("list", l);
map.put("page", page);
System.out.println("我到这里了。。。");
return new ModelAndView("repair/myrepairlist", map);
}
// 业主 ======我的报修
@RequestMapping(value = "/ownerlist")
protected ModelAndView ownerlist(HttpServletRequest request,
HttpServletResponse response) throws Exception {
HttpUtil util = new HttpUtil(request, response);
int startRow = util.parseInt(Pagination.START_ROW);
System.out.println("进来了?。。。。。");
String name = "";
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals("username")) {
name = URLDecoder.decode(cookies[i].getValue(), "utf-8");
System.out.println("登录名" + name
+ "<<<<<<<<<<<======>>>>>>>>>");
}
}
}
Map<String, Object> map = new HashMap<String, Object>();
String reqBody = name;
System.out.println(reqBody + "req....................");
StringBuffer hql = new StringBuffer("from Repairtask where 1=1");
System.out.println(hql + "hql================");
List param = new ArrayList();
if (reqBody != null && !"".equals(reqBody)) {
hql.append(" and repairpeople =?");
param.add(reqBody);
System.out.println(param + "param'''''''''''''333===");
}
hql.append(" order by createtime desc");
List<Repairtask> l = new ArrayList<Repairtask>();
Page page = repairTaskService.findPageByHQL(hql.toString(), startRow,
9, param.toArray());
if (page != null && page.getList() != null) {
List lists = page.getList();
for (int i = 0; i < lists.size(); i++) {
Repairtask repairtask = (Repairtask) lists.get(i);
l.add(repairtask);
}
}
// List list = repairTaskService.findAll(hql.toString(),
// param.toArray());
map.put("list", l);
map.put("page", page);
System.out.println("我到这里了。。。");
return new ModelAndView("owner/repairlist", map);
}
//管理员 ======我的报修
@RequestMapping(value = "/adminlist")
protected ModelAndView adminlist(HttpServletRequest request,
HttpServletResponse response) throws Exception {
HttpUtil util = new HttpUtil(request, response);
int startRow = util.parseInt(Pagination.START_ROW);
System.out.println("进来了?。。。。。");
Map<String, Object> map = new HashMap<String, Object>();
StringBuffer hql = new StringBuffer("from Repairtask where 1=1");
System.out.println(hql + "hql================");
List<Repairtask> l = new ArrayList<Repairtask>();
Page page = repairTaskService.findPageByHQL(hql.toString(), startRow,
9, null);
if (page != null && page.getList() != null) {
List lists = page.getList();
for (int i = 0; i < lists.size(); i++) {
Repairtask repairtask = (Repairtask) lists.get(i);
l.add(repairtask);
}
}
// List list = repairTaskService.findAll(hql.toString(),
// param.toArray());
map.put("list", l);
map.put("page", page);
System.out.println("我到这里了。。。");
return new ModelAndView("admin/repairlist", map);
}
@RequestMapping(value = "/listreport")
protected ModelAndView listreport(HttpServletRequest request,
HttpServletResponse response) throws Exception {
HttpUtil util = new HttpUtil(request, response);
Map<String, Object> map = new HashMap<String, Object>();
int startRow = util.parseInt(Pagination.START_ROW);
System.out.println("进来了?。。。。。");
String starttime=request.getParameter("startTime");
Str
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于javaweb的物业管理系统 (270个子文件)
RepairTaskController.class 24KB
DwrService.class 12KB
NoticeController.class 10KB
UserController.class 10KB
Pagination.class 10KB
DateUtil.class 9KB
RepairTaskDaoImpl.class 6KB
Notice.class 6KB
UserDaoImpl.class 6KB
Repairtask.class 5KB
HttpUtil.class 5KB
MessageController.class 5KB
NoticeDaoImpl.class 4KB
MessageDaoImpl.class 4KB
MaintainCategoryDaoImpl.class 4KB
ComplainDaoImpl.class 4KB
ProjectDaoImpl.class 4KB
Complain.class 3KB
Page.class 3KB
User.class 3KB
LoginController.class 3KB
RepairTaskServiceImpl.class 3KB
Message.class 3KB
MaintainCategoryController.class 3KB
ProjectController.class 3KB
TestSSH.class 2KB
UserServiceImpl.class 2KB
NumberUtil.class 2KB
Project.class 2KB
QueryProcessor.class 2KB
MessageServiceImpl.class 2KB
NoticeServiceImpl.class 2KB
MaintainCategoryServiceImpl.class 2KB
ProjectServiceImpl.class 2KB
Maintaincategory.class 2KB
ComplainServiceImpl.class 2KB
RepairReport.class 2KB
TaskReportBean.class 1KB
RepairTaskService.class 888B
RepairTaskDao.class 876B
UserDao.class 861B
UserService.class 792B
NoticeService.class 628B
MessageService.class 623B
NoticeDao.class 616B
MaintainCategoryService.class 614B
MessageDao.class 611B
MaintaincategoryDao.class 602B
ProjectService.class 578B
ComplainDao.class 570B
ProjectDao.class 566B
ComplainService.class 408B
Test.class 381B
.classpath 1KB
org.eclipse.wst.common.component 578B
org.eclipse.wst.jsdt.ui.superType.container 49B
bootstrap.min.css 80KB
style5.css 16KB
font-awesome.css 11KB
bootstrap-responsive.min.css 9KB
adminia.css 9KB
plans.css 5KB
calendar-brown.css 4KB
reset.css 3KB
login.css 3KB
style.css 2KB
faq.css 2KB
dashboard.css 1KB
nav.css 806B
adminia-responsive.css 750B
page.css 527B
fontawesome-webfont.eot 41KB
fontawesome-webfont_162a16fe.eot 41KB
140206113522-0.gif 363KB
load.gif 7KB
hibernate-core-4.2.21.Final.jar 4.48MB
spring-context-4.2.2.RELEASE.jar 1.04MB
spring-core-4.2.2.RELEASE.jar 1.02MB
spring-webmvc-4.2.2.RELEASE.jar 852KB
jackson-mapper-asl-1.9.11.jar 762KB
spring-web-4.2.2.RELEASE.jar 751KB
spring-beans-4.2.2.RELEASE.jar 713KB
javassist-3.18.1-GA.jar 697KB
mysql-connector-java-5.1.7-bin.jar 693KB
mchange-commons-java-0.2.3.4.jar 568KB
spring-test-4.2.2.RELEASE.jar 549KB
spring-orm-4.2.2.RELEASE.jar 455KB
antlr-2.7.7.jar 435KB
c3p0-0.9.2.1.jar 414KB
spring-jdbc-4.2.2.RELEASE.jar 413KB
spring-aop-4.2.2.RELEASE.jar 358KB
dom4j-1.6.1.jar 307KB
spring-tx-4.2.2.RELEASE.jar 259KB
spring-expression-4.2.2.RELEASE.jar 256KB
jackson-core-asl-1.9.11.jar 227KB
gson-2.3.1.jar 206KB
taglibs-standard-impl-1.2.1.jar 196KB
commons-io-2.4.jar 181KB
spring-context-support-4.2.2.RELEASE.jar 173KB
taglibs-standard-jstlel-1.2.1.jar 160KB
共 270 条
- 1
- 2
- 3
资源评论
- king-hero2019-06-03不能 运行?
- MMMMango2020-05-08资源还不错
- Alicebjt2020-05-12运行出来是物业管理之维修系统,我:???
xiaolajiao_jxl
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 单片机其应用技术(C语言版)考试题二.doc
- 狗鼻子检测数据集VOC+YOLO格式3099张1类别.zip
- .arch4位0.36寸共阳数码管(带时钟点、不带小数点)引脚图-请忽略图中尺寸.jpg
- 基于单片机430采集电容极板的电容值,并通过蓝牙传输到安卓端,安卓端负责接收蓝牙数据及可视化显示(OpenGL ES)
- 2,标准例程-HAL库版本.zip
- NVD和CNNVD软件漏洞数据集,漏洞文本预处理,训练算法模型进行漏洞分类.zip
- java 毕业设计之实现的汽车租赁管理系统
- MongoDB数据库及基本操作.txt
- 毕业设计基于Python时空图卷积(ST-GCN)的骨骼动作识别源码(高分项目).zip
- 基于C++面向软件安全的污点数据检测系统源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功