package com.controller;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.entity.Tichu;
import com.server.TichuServer;
import com.util.PageBean;
import net.sf.json.JSONObject;
import com.util.db;
import java.sql.SQLException;
import java.sql.*;
@Controller
public class TichuController {
@Resource
private TichuServer tichuService;
@RequestMapping("addTichu.do")
public String addTichu(HttpServletRequest request,Tichu tichu,HttpSession session) throws SQLException{
Timestamp time=new Timestamp(System.currentTimeMillis());
tichu.setAddtime(time.toString().substring(0, 19));
tichuService.add(tichu);
db dbo = new db();
dbo.hsgexecute("update chakan set issh='是'where xiangmubianhao='"+tichu.getXiangmubianhao()+"'");
//kuabiaogaizhi
session.setAttribute("backxx", "添加成功");
session.setAttribute("backurl", request.getHeader("Referer"));
//session.setAttribute("backurl", "tichuList.do");
return "redirect:postback.jsp";
//return "redirect:tichuList.do";
}
// 处理编辑
@RequestMapping("doUpdateTichu.do")
public String doUpdateTichu(int id,ModelMap map,Tichu tichu){
tichu=tichuService.getById(id);
map.put("tichu", tichu);
return "tichu_updt";
}
// 后台详细
@RequestMapping("tichuDetail.do")
public String tichuDetail(int id,ModelMap map,Tichu tichu){
tichu=tichuService.getById(id);
map.put("tichu", tichu);
return "tichu_detail";
}
// 前台详细
@RequestMapping("tcDetail.do")
public String tcDetail(int id,ModelMap map,Tichu tichu){
tichu=tichuService.getById(id);
map.put("tichu", tichu);
return "tichudetail";
}
//
@RequestMapping("updateTichu.do")
public String updateTichu(int id,ModelMap map,Tichu tichu,HttpServletRequest request,HttpSession session){
tichuService.update(tichu);
session.setAttribute("backxx", "修改成功");
session.setAttribute("backurl", request.getHeader("Referer"));
return "redirect:postback.jsp";
//String url = request.getHeader("Referer");
//return "redirect:"+url;
//return "redirect:tichuList.do";
}
// 分页查询
@RequestMapping("tichuList.do")
public String tichuList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Tichu tichu, String xiangmubianhao, String xiangmumingcheng, String xiangmuleibie, String diaoshiyuan, String xiangmuriqi, String xiangmujingli, String fanganrenyuan, String jiejuefangan, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 15);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 15);
pmap.put("issh", "否");
if(xiangmubianhao==null||xiangmubianhao.equals("")){pmap.put("xiangmubianhao", null);}else{pmap.put("xiangmubianhao", xiangmubianhao);}
if(xiangmumingcheng==null||xiangmumingcheng.equals("")){pmap.put("xiangmumingcheng", null);}else{pmap.put("xiangmumingcheng", xiangmumingcheng);}
if(xiangmuleibie==null||xiangmuleibie.equals("")){pmap.put("xiangmuleibie", null);}else{pmap.put("xiangmuleibie", xiangmuleibie);}
if(diaoshiyuan==null||diaoshiyuan.equals("")){pmap.put("diaoshiyuan", null);}else{pmap.put("diaoshiyuan", diaoshiyuan);}
if(xiangmuriqi==null||xiangmuriqi.equals("")){pmap.put("xiangmuriqi", null);}else{pmap.put("xiangmuriqi", xiangmuriqi);}
if(xiangmujingli==null||xiangmujingli.equals("")){pmap.put("xiangmujingli", null);}else{pmap.put("xiangmujingli", xiangmujingli);}
if(fanganrenyuan==null||fanganrenyuan.equals("")){pmap.put("fanganrenyuan", null);}else{pmap.put("fanganrenyuan", fanganrenyuan);}
if(jiejuefangan==null||jiejuefangan.equals("")){pmap.put("jiejuefangan", null);}else{pmap.put("jiejuefangan", jiejuefangan);}
int total=tichuService.getCount(pmap);
pageBean.setTotal(total);
List<Tichu> list=tichuService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "tichu_list";
}
@RequestMapping("tichu_yanben1.do")
public String tichu_yanben1(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Tichu tichu, String xiangmubianhao, String xiangmumingcheng, String xiangmuleibie, String diaoshiyuan, String xiangmuriqi, String xiangmujingli, String fanganrenyuan, String jiejuefangan, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 15);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 15);
if(xiangmubianhao==null||xiangmubianhao.equals("")){pmap.put("xiangmubianhao", null);}else{pmap.put("xiangmubianhao", xiangmubianhao);}
if(xiangmumingcheng==null||xiangmumingcheng.equals("")){pmap.put("xiangmumingcheng", null);}else{pmap.put("xiangmumingcheng", xiangmumingcheng);}
if(xiangmuleibie==null||xiangmuleibie.equals("")){pmap.put("xiangmuleibie", null);}else{pmap.put("xiangmuleibie", xiangmuleibie);}
if(diaoshiyuan==null||diaoshiyuan.equals("")){pmap.put("diaoshiyuan", null);}else{pmap.put("diaoshiyuan", diaoshiyuan);}
if(xiangmuriqi==null||xiangmuriqi.equals("")){pmap.put("xiangmuriqi", null);}else{pmap.put("xiangmuriqi", xiangmuriqi);}
if(xiangmujingli==null||xiangmujingli.equals("")){pmap.put("xiangmujingli", null);}else{pmap.put("xiangmujingli", xiangmujingli);}
if(fanganrenyuan==null||fanganrenyuan.equals("")){pmap.put("fanganrenyuan", null);}else{pmap.put("fanganrenyuan", fanganrenyuan);}
if(jiejuefangan==null||jiejuefangan.equals("")){pmap.put("jiejuefangan", null);}else{pmap.put("jiejuefangan", jiejuefangan);}
int total=tichuService.getCount(pmap);
pageBean.setTotal(total);
List<Tichu> list=tichuService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "tichu_yanben1";
}
@RequestMapping("tichu_yanben2.do")
public String tichu_yanben2(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Tichu tichu, String xiangmubianhao, String xiangmumingcheng, String xiangmuleibie, String diaoshiyuan, String xiangmuriqi, String xiangmujingli, String fanganrenyuan, String jiejuefangan, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 15);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 15);
if(xiangmubianhao==null||xiangmubianhao.equals("")){pmap.put("xiangmubianhao", null);}else{pmap.put("xiangmubianhao", xiangmubianhao);}
if(xiangmumingcheng==null||xiangmumingcheng.equals("")){pmap.put("xiangmumingcheng", null);}else{pmap.put("xiangmumingcheng", xiangmumingcheng);}
if(xiangmuleibie==null||xiangmuleibie.equals("")){pmap.put("xiangmuleibie", null);}else{pmap.put("xiangmuleibie", xiangmuleibie);}
if(diaoshiyuan==null||diaoshiyuan.equals("")){pmap.put("diaoshiyuan", null);}else{pmap.put("diaoshiyuan", diaoshiyuan);}
if(xiangmuriqi==null||xiangmuriqi.equals("")){pmap.put("xiangmuriqi", null);}else{pmap.put("xiangmuriqi", xiangmuriqi);}
if(xiangmujingli==null||xiangmujingli.equals("")){pmap.put("xia
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于ssm+mysql的软件bug管理系统源码数据库.zip (594个子文件)
Info.class 18KB
TichuController.class 15KB
XiangmuxinxiController.class 15KB
ChakanController.class 15KB
WanchengController.class 14KB
db.class 14KB
ChanshengBUGController.class 14KB
XiangmujingliController.class 14KB
FanganrenyuanController.class 14KB
DiaoshiyuanController.class 14KB
XiangmuwanchengController.class 13KB
YonghuzhuceController.class 9KB
VeDate.class 9KB
XiangmuleibieController.class 9KB
AllusersController.class 7KB
ShoucangjiluController.class 7KB
LiuyanbanController.class 7KB
XinwentongzhiController.class 6KB
YouqinglianjieController.class 6KB
PinglunController.class 6KB
Yonghuzhuce.class 4KB
StrUtil.class 4KB
Tichu.class 3KB
Xiangmuxinxi.class 3KB
ChanshengBUG.class 3KB
LiuyanbanServerImpi.class 3KB
Chakan.class 3KB
XiangmuwanchengServerImpi.class 3KB
YouqinglianjieServerImpi.class 3KB
XiangmuleibieServerImpi.class 3KB
FanganrenyuanServerImpi.class 3KB
XiangmujingliServerImpi.class 3KB
ChanshengBUGServerImpi.class 3KB
XiangmuxinxiServerImpi.class 3KB
DiaoshiyuanServerImpi.class 3KB
YonghuzhuceServerImpi.class 3KB
WanchengServerImpi.class 3KB
XinwentongzhiServerImpi.class 3KB
ChakanServerImpi.class 3KB
TichuServerImpi.class 3KB
Wancheng.class 3KB
AllusersServerImpi.class 3KB
Xiangmujingli.class 2KB
Fanganrenyuan.class 2KB
Diaoshiyuan.class 2KB
Xinwentongzhi.class 2KB
Liuyanban.class 2KB
Xiangmuwancheng.class 2KB
ShoucangjiluServerImpi.class 2KB
PinglunServerImpi.class 2KB
hsgloginController.class 2KB
Pinglun.class 2KB
Shoucangjilu.class 2KB
Md5.class 2KB
SetChar.class 2KB
IndexController.class 2KB
Youqinglianjie.class 2KB
Allusers.class 2KB
PageBean.class 1KB
PageInfo.class 1KB
testFilter.class 1KB
Xiangmuleibie.class 1KB
XiangmuwanchengMapper.class 1KB
YouqinglianjieMapper.class 1KB
XiangmujingliMapper.class 1020B
XiangmuleibieMapper.class 1020B
FanganrenyuanMapper.class 1020B
XinwentongzhiMapper.class 1020B
LiuyanbanMapper.class 1016B
XiangmuxinxiMapper.class 1009B
ChanshengBUGMapper.class 1009B
DiaoshiyuanMapper.class 998B
YonghuzhuceMapper.class 998B
WanchengMapper.class 965B
ChakanMapper.class 943B
TichuMapper.class 932B
CheckCode.class 922B
XiangmuwanchengServer.class 907B
ShoucangjiluMapper.class 898B
AllusersMapper.class 898B
YouqinglianjieServer.class 896B
FanganrenyuanServer.class 885B
XiangmujingliServer.class 885B
XiangmuleibieServer.class 885B
ChanshengBUGServer.class 874B
XiangmuxinxiServer.class 874B
YonghuzhuceServer.class 863B
DiaoshiyuanServer.class 863B
LiuyanbanServer.class 860B
PinglunMapper.class 858B
WanchengServer.class 830B
ChakanServer.class 808B
TichuServer.class 797B
XinwentongzhiServer.class 796B
ShoucangjiluServer.class 763B
AllusersServer.class 763B
PinglunServer.class 723B
Constant.class 674B
.classpath 1KB
org.eclipse.wst.common.component 595B
共 594 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- m0_522189482024-03-10资源有一定的参考价值,与资源描述一致,很实用,能够借鉴的部分挺多的,值得下载。
入伍击寇
- 粉丝: 129
- 资源: 4706
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功