基于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等均可配置运行

适用

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

        request.getSession().setAttribute("vo", vo);
        String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面
        response.sendRedirect("xiaoshou_" + to + ".jsp");
    }

    /**
     * 根据条件查询销售的列表并跳转回页面
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("xiaoshouList")
    public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
        this.redirectList(request, response);
    }

    /**
     * 跳转到列表页面
     *
     * @param request
     * @param response
     */
    private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //查询列和关键字
            <result column="user_type" property="userType" />
    </resultMap>

    <sql id="Base_Column_List">
        `id`,`username`,`password`,`real_name`,`user_sex`,`user_phone`,`user_text`,`user_type`
    </sql>

    <!--新增-->
    <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.User">
        INSERT INTO `t_user`
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>`id`,</if>
                    <if test ='username != null'>`username`,</if>
                    <if test ='password != null'>`password`,</if>
                    <if test ='realName != null'>`real_name`,</if>
                    <if test ='userSex != null'>`user_sex`,</if>
                    <if test ='userPhone != null'>`user_phone`,</if>
                    <if test ='userText != null'>`user_text`,</if>
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping
public class KuchunController {

    @Autowired
    private KuchunService kuchunService;

    /**
     * 增加库存
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("kuchunAdd")
    public void add(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Kuchun vo = new Kuchun();
        //取出页面传进来的参数
        vo.setKuchunName(Util.decode(request, "kuchunName"));
    public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
        this.redirectList(request, response);
    }

    /**
     * 跳转到列表页面
     *
     * @param request
     * @param response
     */
    private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //查询列和关键字
        String searchColumn = Util.decode(request, "searchColumn");
        String keyword = Util.decode(request, "keyword");
        Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)
        params.put("searchColumn", searchColumn);//要查询的列
        params.put("keyword", keyword);//查询的关键字
        Map<String, Object> map = xiaoshouService.list(params);
        request.getSession().setAttribute("list", map.get("list"));
        kuchunService.update(vo);
        this.redirectList(request, response);
    }

    /**
     * 获取库存的详细信息(详情页面与编辑页面要显示该库存的详情)并跳转回页面
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping({"kuchunGet", "kuchunEditPre"})
    public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Serializable id = Util.decode(request, "id");//取出主键id
        Kuchun vo = kuchunService.get(id);
        request.getSession().setAttribute("vo", vo);
        String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面
        response.sendRedirect("kuchun_" + to + ".jsp");
    }

    /**
     * 根据条件查询库存的列表并跳转回页面
     *
     * @param response
     * @param request
        String searchColumn = Util.decode(request, "searchColumn");
        String keyword = Util.decode(request, "keyword");
        Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)
        params.put("searchColumn", searchColumn);//要查询的列
        params.put("keyword", keyword);//查询的关键字
        Map<String, Object> map = goodService.list(params);
        request.getSession().setAttribute("list", map.get("list"));

        Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
        String pageNum = Util.decode(request, "pageNum");//封装分页参数
        com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
        params.put("startIndex", pb.getStartIndex());
        params.put("pageSize", pb.getPageSize());
        List list = (List) goodService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
        pb.setServlet("goodList");
        pb.setSearchColumn(searchColumn);
        pb.setKeyword(keyword);
        pb.setList(list);
        request.getSession().setAttribute("pageBean", pb);
        request.getSession().setAttribute("list", pb.getList());

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

        Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
        String pageNum = Util.decode(request, "pageNum");//封装分页参数
        com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
        params.put("startIndex", pb.getStartIndex());
        params.put("pageSize", pb.getPageSize());
        List list = (List) supplierService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
        pb.setServlet("supplierList");
        pb.setSearchColumn(searchColumn);
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">价格:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="kuchunJiage" name="kuchunJiage" value="${vo.kuchunJiage}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入库时间:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="kuchunShijiana" name="kuchunShijiana" value="${vo.kuchunShijiana}">
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">商品描述:</label>
            <div class="col-sm-5">
                <textarea rows="3" class="form-control" id="kuchunText" name="kuchunText" placeholder="请输入内容......">${vo.kuchunText}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-5">
                <input type="submit" class="btn btn-line btn-rect btn-info btn-sm" value="保存">
                <input type="button" class="btn btn-line btn-rect btn-default btn-sm" value="返回" onclick="javascript:history.back(-1);">
            </div>
        }
        if (document.getElementById("jinghuoPrice").value.trim().length == 0) {
            alert("金额不能为空!");
            return false;
        }
        if (document.getElementById("jinghuoSulinag").value.trim().length == 0) {
            alert("数量不能为空!");
            return false;
        }
        if (document.getElementById("jinghuoShijian").value.trim().length == 0) {
            alert("进货时间不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.demo.dao.JinghuoMapper">


运行环境

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…均可

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、供应商模块、商品模块、进货模块、库存盘点、销售模块的增删改查管理

20220319000639

20220319000640

20220319000641

20220319000642

20220319000643

20220319000644

20220319000645

20220319000646

20220319000647

20220319000648

20220319000649

document

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值