栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于javaweb+jsp的仓库进销存管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于javaweb+jsp的仓库进销存管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

基于javaweb+jsp的仓库进销存管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

                `chuku_name` = #{chukuName},
                `chuku_suliang` = #{chukuSuliang},
                `chuku_clientname` = #{chukuClientname},
                `chuku_tel` = #{chukuTel},
                `chuku_man` = #{chukuMan},
                `chuku_text` = #{chukuText}
        
        WHERe `id` = #{id}
    

    
    
        SELECT  FROM `t_chuku`
        
            
                ${searchColumn} LIKE CONCAt('%',#{keyword},'%')  AND
            
            1=1
                
                
import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping
public class ChukuController {

    @Autowired
    private ChukuService chukuService;

    
public class Chuku implements Serializable {
    private Long id;//主键
    private String chukuHuohao;//货号
    private String chukuName;//货物名称
    private String chukuSuliang;//数量
    private String chukuClientname;//客户名
    private String chukuTel;//联系方式
    private String chukuMan;//操作员
    private String chukuText;//备注

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
     * 根据条件查询入库的列表并跳转回页面
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("rukuList")
    public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
        this.redirectList(request, response);
    }

    
    private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //查询列和关键字
        String searchColumn = Util.decode(request, "searchColumn");
        String keyword = Util.decode(request, "keyword");
        Map params = new HashMap();//用来保存控制层传进来的参数(查询条件)
        params.put("searchColumn", searchColumn);//要查询的列
        params.put("keyword", keyword);//查询的关键字
        Map map = rukuService.list(params);
        request.getSession().setAttribute("list", map.get("list"));

     * 编辑出库
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("chukuEdit")
    public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Chuku vo = new Chuku();
        vo.setId(Long.valueOf(Util.decode(request, "id")));
        vo.setChukuHuohao(Util.decode(request, "chukuHuohao"));
        vo.setChukuName(Util.decode(request, "chukuName"));
        vo.setChukuSuliang(Util.decode(request, "chukuSuliang"));
        vo.setChukuClientname(Util.decode(request, "chukuClientname"));
        vo.setChukuTel(Util.decode(request, "chukuTel"));
        vo.setChukuMan(Util.decode(request, "chukuMan"));
            
        request.getSession().setAttribute("vo", vo);
        String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面
        response.sendRedirect("ruku_" + to + ".jsp");
    }

    
    @RequestMapping("rukuList")
    public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
        this.redirectList(request, response);
    }

    /**
     * 跳转到列表页面
     *
            alert("采购单号不能为空!");
            return false;
        }
        if (document.getElementById("rukuName").value.trim().length == 0) {
            alert("货物名称不能为空!");
            return false;
        }
        if (document.getElementById("rukuSuliang").value.trim().length == 0) {
            alert("数量不能为空!");
            return false;
        }
        if (document.getElementById("rukuTime").value.trim().length == 0) {
            alert("入库时间不能为空!");
            return false;
        }
        if (document.getElementById("rukuRen").value.trim().length == 0) {
            alert("操作员不能为空!");
            return false;
        }
        return true;
    }


        ImageIO.write(image, "JPEG", os);// 以JPEG格式向客户端发送图形验证码
    }

    @RequestMapping("authResetPassword")
    public void resetPassword(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {
        String msg;
        User loginUser = (User) request.getSession().getAttribute("loginUser");
        String oldPassword = Util.decode(request, "oldPassword");
        if (!loginUser.getPassword().equals(oldPassword)) {
            msg = "原密码错误!";
        } else {
            String newPassword = Util.decode(request, "newPassword");
            loginUser.setPassword(newPassword);
            this.userService.update(loginUser);
            msg = "修改成功!";
        }
        request.getSession().setAttribute("alert_msg", msg);
        request.getRequestDispatcher("reset_password.jsp").forward(request, response);
    }

    // 返回一个随机颜色(Color对象)
    private Color getRandomColor(int minColor, int maxColor) {
        Random random = new Random();
        // 保存minColor最大不会超过255
    private String servlet;//查询时要请求的接口
    private String searchColumn;//待模糊查询的列
    private String keyword;//待模糊查询的关键字

    //通过pageNum,pageSize,totalRecord计算得来tatalPage和startIndex,构造方法中将pageNum,pageSize,totalRecord获得
    public PageBean(int pageNum, int totalRecord) {
        this.pageNum = (pageNum = Math.max(pageNum, 1));
        this.pageSize = 10;//默认为10
        this.totalRecord = totalRecord;
        //totalPage 总页数
        if (totalRecord % pageSize == 0) {
            //说明整除,正好每页显示pageSize条数据,没有多余一页要显示少于pageSize条数据的
            this.totalPage = totalRecord / pageSize;

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、出库模块、库存模块、入库模块的增删改查管理

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/830801.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号