0
点赞
收藏
分享

微信扫一扫

【开源】JAVA+Vue.js实现食品生产管理系统

在这里插入图片描述


目录


一、摘要

1.1 项目介绍

基于JAVA+Vue+SpringBoot+MySQL的食品生产管理系统,包含了加工厂管理、客户管理、食品管理、生产订单、销售订单、系统公告模块,还包含系统自带的用户管理、部门管理、角色管理、菜单管理、日志管理、数据字典管理、文件管理、图表展示等基础模块,食品生产管理系统基于角色的访问控制,给食品管理员、加工厂店员使用,可将权限精确到按钮级别,您可以自定义角色并分配权限,系统适合设计精确的权限约束需求。

1.2 项目录屏


二、功能模块

在食品产品管理系统中的难点重点是不同食品有不同的有效期,当把食品供应到多个卖场之后,会存在食品的供应、回收等问题。这些问题亟待解决。

系统主要通过食品管理、用户管理以及各个不同的角色等主要功能模块来实现食品产品管理系统的功能。其中包括用户信息的建立、修改以及删除;商品信息的建立、修改以及删除。特别是用户进行订购产品时,当食品过多或不足,会存在食品的供应、回收等问题。以及对各类食品的管理。从而,实现对食品各种信息、用户信息等实现全面、动态、及时的管理。

2.1 加工厂管理模块

用于对于生产加工的工厂进行管理,管理者可以进行添加加工厂,修改信息、删除加工厂信息等功能。

2.2 客户管理模块

客户管理模块主要是把客户汇总,做成可视化表格,便于对客户进行增删改查等基本操作的管理。

2.3 食品管理模块

食品管理模块主要对已经产出的食品进行信息分类展示,管理员可以对它进行查看,并进行增删改查功能。

2.4 生产销售订单管理模块

包括生产订单管理模块以及销售管理模块。生产订单管理模块是把需要加工的食品订单进行管理;销售管理是记录以及销售的食品种类以及数量,清晰的看到各类食品的销售并进行选择进行加订。

2.5 系统管理模块

包括两个个模块,权限管理、角色管理。权限管理模块分为两个权限,管理用户并分配权限角色,权限分为管理员与食品加工厂管理员,管理员可以看到所有功能模块,加工厂管理员只能看到加工厂生产订单管理;角色管理模块管理各个权限角色并进行解释。

2.6 其他管理模块

包括登陆日志以及系统公告。登陆日志可以查看历史登陆信息;系统公告模块可以编辑发布公告呈现在管理员的首页。


三、系统展示

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


四、核心代码

4.1 查询食品

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询食品")
public Result<IPage<Food>> getByPage(@ModelAttribute Food food ,@ModelAttribute PageVo page){
    QueryWrapper<Food> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(food.getTitle())) {
        qw.like("title",food.getTitle());
    }
    if(!ZwzNullUtils.isNull(food.getContent())) {
        qw.like("content",food.getContent());
    }
    if(!ZwzNullUtils.isNull(food.getType())) {
        qw.eq("type",food.getType());
    }
    IPage<Food> data = iFoodService.page(PageUtil.initMpPage(page),qw);
    return new ResultUtil<IPage<Food>>().setData(data);
}

4.2 查询加工厂

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询加工厂")
public Result<IPage<ProcessingFactory>> getByPage(@ModelAttribute ProcessingFactory processingFactory ,@ModelAttribute PageVo page){
    QueryWrapper<ProcessingFactory> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(processingFactory.getTitle())) {
        qw.like("title",processingFactory.getTitle());
    }
    if(!ZwzNullUtils.isNull(processingFactory.getAddress())) {
        qw.like("address",processingFactory.getAddress());
    }
    if(!ZwzNullUtils.isNull(processingFactory.getDutyName())) {
        qw.like("duty_name",processingFactory.getDutyName());
    }
    IPage<ProcessingFactory> data = iProcessingFactoryService.page(PageUtil.initMpPage(page),qw);
    return new ResultUtil<IPage<ProcessingFactory>>().setData(data);
}

4.3 新增生产订单

@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ApiOperation(value = "新增生产订单")
public Result<ProduceOrder> insert(ProduceOrder produceOrder){
    Food food = iFoodService.getById(produceOrder.getFoodId());
    if(food == null) {
        return ResultUtil.error("食品不存在");
    }
    produceOrder.setFoodName(food.getTitle());
    produceOrder.setContent(food.getContent());
    produceOrder.setImage(food.getImage());
    produceOrder.setType(food.getType());
    iProduceOrderService.saveOrUpdate(produceOrder);
    food.setStock(food.getStock().add(produceOrder.getNumber()));
    iFoodService.saveOrUpdate(food);
    return new ResultUtil<ProduceOrder>().setData(produceOrder);
}

4.4 新增销售订单

@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ApiOperation(value = "新增销售订单")
public Result<SalesOrder> insert(SalesOrder salesOrder){
    Food food = iFoodService.getById(salesOrder.getFoodId());
    if(food == null) {
        return ResultUtil.error("食品不存在");
    }
    if(food.getStock().compareTo(salesOrder.getNumber()) < 0) {
        return ResultUtil.error("库存不足");
    }
    salesOrder.setFoodName(food.getTitle());
    salesOrder.setContent(food.getContent());
    salesOrder.setImage(food.getImage());
    salesOrder.setType(food.getType());
    Customer customer = iCustomerService.getById(salesOrder.getBuyId());
    if(customer == null) {
        return ResultUtil.error("客户不存在");
    }
    salesOrder.setBuyName(customer.getTitle());
    iSalesOrderService.saveOrUpdate(salesOrder);
    food.setStock(food.getStock().subtract(salesOrder.getNumber()));
    iFoodService.saveOrUpdate(food);
    return new ResultUtil<SalesOrder>().setData(salesOrder);
}

4.5 查询客户

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询客户")
public Result<IPage<Customer>> getByPage(@ModelAttribute Customer customer ,@ModelAttribute PageVo page){
    QueryWrapper<Customer> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(customer.getTitle())) {
        qw.like("title",customer.getTitle());
    }
    if(!ZwzNullUtils.isNull(customer.getSex())) {
        qw.eq("sex",customer.getSex());
    }
    if(!ZwzNullUtils.isNull(customer.getChannel())) {
        qw.eq("channel",customer.getChannel());
    }
    IPage<Customer> data = iCustomerService.page(PageUtil.initMpPage(page),qw);
    return new ResultUtil<IPage<Customer>>().setData(data);
}

五、免责说明

  • 本项目仅供个人学习使用,商用授权请联系博主,否则后果自负。
  • 博主拥有本软件构建后的应用系统全部内容所有权及独立的知识产权,拥有最终解释权。
  • 如有问题,欢迎在仓库 Issue 留言,看到后会第一时间回复,相关意见会酌情考虑,但没有一定被采纳的承诺或保证。

下载本系统代码或使用本系统的用户,必须同意以下内容,否则请勿下载!

  1. 出于自愿而使用/开发本软件,了解使用本软件的风险,且同意自己承担使用本软件的风险。
  2. 利用本软件构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果和博主无关,博主对此不承担任何责任。
  3. 在任何情况下,对于因使用或无法使用本软件而导致的任何难以合理预估的损失(包括但不仅限于商业利润损失、业务中断与业务信息丢失),博主概不承担任何责任。
  4. 必须了解使用本软件的风险,博主不承诺提供一对一的技术支持、使用担保,也不承担任何因本软件而产生的难以预料的问题的相关责任。

在这里插入图片描述

举报

相关推荐

0 条评论