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.Guihuantushu;
import com.server.GuihuantushuServer;
import com.util.PageBean;
import net.sf.json.JSONObject;
import com.util.db;
import java.sql.SQLException;
import java.sql.*;
@Controller
public class GuihuantushuController {
@Resource
private GuihuantushuServer guihuantushuService;
@RequestMapping("addGuihuantushu.do")
public String addGuihuantushu(HttpServletRequest request,Guihuantushu guihuantushu,HttpSession session) throws SQLException{
Timestamp time=new Timestamp(System.currentTimeMillis());
guihuantushu.setAddtime(time.toString().substring(0, 19));
guihuantushuService.add(guihuantushu);
db dbo = new db();
dbo.hsgexecute("update jieyuetushu set kucun=kucun+"+guihuantushu.getGuihuanshuliang()+" where tushubianhao='"+guihuantushu.getTushubianhao()+"'");
db dbo1 = new db();
dbo1.hsgexecute("update jieyuetushu set issh='是'where tushubianhao='"+guihuantushu.getTushubianhao()+"'");
//kuabiaogaizhi
session.setAttribute("backxx", "添加成功");
session.setAttribute("backurl", request.getHeader("Referer"));
//session.setAttribute("backurl", "guihuantushuList.do");
return "redirect:postback.jsp";
//return "redirect:guihuantushuList.do";
}
// 处理编辑
@RequestMapping("doUpdateGuihuantushu.do")
public String doUpdateGuihuantushu(int id,ModelMap map,Guihuantushu guihuantushu){
guihuantushu=guihuantushuService.getById(id);
map.put("guihuantushu", guihuantushu);
return "guihuantushu_updt";
}
@RequestMapping("doUpdateGuihuantushulb.do")
public String doUpdateGuihuantushulb(int id,ModelMap map,Guihuantushu guihuantushu){
guihuantushu=guihuantushuService.getById(id);
map.put("guihuantushu", guihuantushu);
return "guihuantushu_updtlb";
}
@RequestMapping("updateGuihuantushulb.do")
public String updateGuihuantushulb(int id,ModelMap map,Guihuantushu guihuantushu){
guihuantushuService.updatelb(guihuantushu);
return "redirect:guihuantushuList.do";
}
// 后台详细
@RequestMapping("guihuantushuDetail.do")
public String guihuantushuDetail(int id,ModelMap map,Guihuantushu guihuantushu){
guihuantushu=guihuantushuService.getById(id);
map.put("guihuantushu", guihuantushu);
return "guihuantushu_detail";
}
// 前台详细
@RequestMapping("ghtsDetail.do")
public String ghtsDetail(int id,ModelMap map,Guihuantushu guihuantushu){
guihuantushu=guihuantushuService.getById(id);
map.put("guihuantushu", guihuantushu);
return "guihuantushudetail";
}
//
@RequestMapping("updateGuihuantushu.do")
public String updateGuihuantushu(int id,ModelMap map,Guihuantushu guihuantushu,HttpServletRequest request,HttpSession session){
guihuantushuService.update(guihuantushu);
session.setAttribute("backxx", "修改成功");
session.setAttribute("backurl", request.getHeader("Referer"));
return "redirect:postback.jsp";
//String url = request.getHeader("Referer");
//return "redirect:"+url;
//return "redirect:guihuantushuList.do";
}
// 分页查询
@RequestMapping("guihuantushuList.do")
public String guihuantushuList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Guihuantushu guihuantushu, String tushubianhao, String tushumingcheng, String tushuleibie, String kucun, String jieyueshuliang, String jieyueriqi, String guihuanshuliang1,String guihuanshuliang2, String duzhe, String shifouguihuan, 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(tushubianhao==null||tushubianhao.equals("")){pmap.put("tushubianhao", null);}else{pmap.put("tushubianhao", tushubianhao);}
if(tushumingcheng==null||tushumingcheng.equals("")){pmap.put("tushumingcheng", null);}else{pmap.put("tushumingcheng", tushumingcheng);}
if(tushuleibie==null||tushuleibie.equals("")){pmap.put("tushuleibie", null);}else{pmap.put("tushuleibie", tushuleibie);}
if(kucun==null||kucun.equals("")){pmap.put("kucun", null);}else{pmap.put("kucun", kucun);}
if(jieyueshuliang==null||jieyueshuliang.equals("")){pmap.put("jieyueshuliang", null);}else{pmap.put("jieyueshuliang", jieyueshuliang);}
if(jieyueriqi==null||jieyueriqi.equals("")){pmap.put("jieyueriqi", null);}else{pmap.put("jieyueriqi", jieyueriqi);}
if(guihuanshuliang1==null||guihuanshuliang1.equals("")){pmap.put("guihuanshuliang1", null);}else{pmap.put("guihuanshuliang1", guihuanshuliang1);}
if(guihuanshuliang2==null||guihuanshuliang2.equals("")){pmap.put("guihuanshuliang2", null);}else{pmap.put("guihuanshuliang2", guihuanshuliang2);}
if(duzhe==null||duzhe.equals("")){pmap.put("duzhe", null);}else{pmap.put("duzhe", duzhe);}
if(shifouguihuan==null||shifouguihuan.equals("")){pmap.put("shifouguihuan", null);}else{pmap.put("shifouguihuan", shifouguihuan);}
int total=guihuantushuService.getCount(pmap);
pageBean.setTotal(total);
List<Guihuantushu> list=guihuantushuService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "guihuantushu_list";
}
@RequestMapping("guihuantushu_yanben1.do")
public String guihuantushu_yanben1(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Guihuantushu guihuantushu, String tushubianhao, String tushumingcheng, String tushuleibie, String kucun, String jieyueshuliang, String jieyueriqi, String guihuanshuliang1,String guihuanshuliang2, String duzhe, String shifouguihuan, 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(tushubianhao==null||tushubianhao.equals("")){pmap.put("tushubianhao", null);}else{pmap.put("tushubianhao", tushubianhao);}
if(tushumingcheng==null||tushumingcheng.equals("")){pmap.put("tushumingcheng", null);}else{pmap.put("tushumingcheng", tushumingcheng);}
if(tushuleibie==null||tushuleibie.equals("")){pmap.put("tushuleibie", null);}else{pmap.put("tushuleibie", tushuleibie);}
if(kucun==null||kucun.equals("")){pmap.put("kucun", null);}else{pmap.put("kucun", kucun);}
if(jieyueshuliang==null||jieyueshuliang.equals("")){pmap.put("jieyueshuliang", null);}else{pmap.put("jieyueshuliang", jieyueshuliang);}
if(jieyueriqi==null||jieyueriqi.equals("")){pmap.put("jieyueriqi", null);}else{pmap.put("jieyueriqi", jieyueriqi);}
if(guihuanshuliang1==null||guihuanshuliang1.equals("")){pmap.put("guihuanshuliang1", null);}else{pmap.put("guihuanshuliang1", guihuanshuliang1);}
if(guihuanshuliang2==null||guihuanshuliang2.equals("")){pmap.put("guihuanshuliang2", null);}else{pmap.put("guihuanshuliang2", guihuanshuliang2);}
if(duzhe==null||duzhe.equals("")){pmap.put("duzhe", null);}else{pmap.put("duzhe", duzhe);}
if(shifouguihuan==null||shifouguihuan.equals("")){pmap.put("shifouguihuan", null);}else{pmap.put("shifouguihuan", shifouguihuan);}
int total=guihuantushuService.getCount(pmap);
pageBean.setTotal(total)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经过本地编译可运行的,下载完成之后配置相应环境即可使用。源码功能都是经过老师肯定的,都能满足要求,有需要放心下载即可。源码是经
资源推荐
资源详情
资源评论
收起资源包目录
基于ssm+mysql的书籍借阅系统源码数据库.zip (556个子文件)
VeDate.class 9KB
GuihuantushuController.class 6KB
JieyuetushuController.class 5KB
XujietushuController.class 5KB
DuzheController.class 5KB
TushuxinxiController.class 5KB
GonggaoController.class 4KB
ShujiaController.class 4KB
TushuleibieController.class 4KB
YonghuzhuceController.class 4KB
Info.class 4KB
Yonghuzhuce.class 4KB
ShoucangjiluController.class 4KB
StrUtil.class 4KB
LiuyanbanController.class 3KB
AllusersController.class 3KB
YouqinglianjieController.class 3KB
Guihuantushu.class 3KB
db.class 3KB
XinwentongzhiController.class 3KB
Tushuxinxi.class 3KB
PinglunController.class 3KB
GuihuantushuServerImpi.class 3KB
LiuyanbanServerImpi.class 3KB
YouqinglianjieServerImpi.class 3KB
Jieyuetushu.class 3KB
TushuleibieServerImpi.class 3KB
JieyuetushuServerImpi.class 3KB
YonghuzhuceServerImpi.class 3KB
XujietushuServerImpi.class 3KB
TushuxinxiServerImpi.class 3KB
Duzhe.class 3KB
GonggaoServerImpi.class 3KB
XinwentongzhiServerImpi.class 3KB
ShujiaServerImpi.class 3KB
DuzheServerImpi.class 3KB
AllusersServerImpi.class 3KB
SetChar.class 3KB
Xinwentongzhi.class 2KB
Liuyanban.class 2KB
ShoucangjiluServerImpi.class 2KB
Xujietushu.class 2KB
PinglunServerImpi.class 2KB
Shujia.class 2KB
Pinglun.class 2KB
Shoucangjilu.class 2KB
testFilter.class 2KB
Md5.class 2KB
Youqinglianjie.class 2KB
Allusers.class 2KB
Gonggao.class 1KB
PageBean.class 1KB
PageInfo.class 1KB
hsgloginController.class 1KB
Tushuleibie.class 1KB
GuihuantushuMapper.class 1KB
YouqinglianjieMapper.class 1KB
IndexController.class 1KB
XinwentongzhiMapper.class 1020B
LiuyanbanMapper.class 1016B
TushuleibieMapper.class 998B
JieyuetushuMapper.class 998B
YonghuzhuceMapper.class 998B
TushuxinxiMapper.class 987B
XujietushuMapper.class 987B
GonggaoMapper.class 954B
ShujiaMapper.class 943B
DuzheMapper.class 932B
CheckCode.class 922B
ShoucangjiluMapper.class 898B
AllusersMapper.class 898B
YouqinglianjieServer.class 896B
GuihuantushuServer.class 893B
YonghuzhuceServer.class 863B
TushuleibieServer.class 863B
JieyuetushuServer.class 863B
LiuyanbanServer.class 860B
PinglunMapper.class 858B
XujietushuServer.class 852B
TushuxinxiServer.class 852B
GonggaoServer.class 819B
ShujiaServer.class 808B
DuzheServer.class 797B
XinwentongzhiServer.class 796B
ShoucangjiluServer.class 763B
AllusersServer.class 763B
PinglunServer.class 723B
Constant.class 674B
.classpath 1KB
org.eclipse.wst.common.component 592B
org.eclipse.wst.jsdt.ui.superType.container 49B
common.css 136KB
common.css 136KB
bootstrap.min.css 119KB
common.css 118KB
style.css 19KB
datepicker.css 4KB
div.css 4KB
div.css 4KB
div.css 4KB
共 556 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
知一NN
- 粉丝: 42
- 资源: 3827
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- js基础但是这个烂怂东西要求标题不能少于10个字才能上传然后我其实还没有写完之后再修订吧.md
- electron-tabs-master
- Unity3D 布朗运动算法插件 Brownian Motion
- 鼎微R16中控升级包R16-4.5.10-20170221及强制升级方法
- 鼎微R16中控升级包公版UI 2015及强制升级方法,救砖包
- 基于CSS与JavaScript的积分系统设计源码
- 生物化学作业_1_生物化学作业资料.pdf
- 基于libgdx引擎的Java开发连连看游戏设计源码
- 基于MobileNetV3的SSD目标检测算法PyTorch实现设计源码
- 基于Java JDK的全面框架设计源码学习项目
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功