💖💖作者:计算机毕业设计江挽 💙💙个人简介:曾长期从事计算机专业培训教学,本人也热爱上课教学,语言擅长Java、微信小程序、Python、Golang、安卓Android等,开发项目包括大数据、深度学习、网站、小程序、安卓、算法。平常会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。平常喜欢分享一些自己开发中遇到的问题的解决办法,也喜欢交流技术,大家有技术代码这一块的问题可以问我! 💛💛想说的话:感谢大家的关注与支持! 💜💜 网站实战项目 安卓/小程序实战项目 大数据实战项目 深度学习实战项目
@TOC
农场管理系统介绍
农场管理系统是基于SpringBoot+Vue+MySQL技术栈开发的B/S架构Web应用系统,专门为现代化农场经营管理提供数字化解决方案。系统采用前后端分离的开发模式,后端使用SpringBoot框架整合Spring、SpringMVC和Mybatis技术,构建稳定高效的RESTful API接口,前端采用Vue.js结合ElementUI组件库打造用户友好的操作界面。系统功能涵盖农场基础信息管理、人员权限管理、生产计划制定、农业机械调度、农药化肥库存管理、使用申请审批、农产品种植管理和产品入库等核心业务流程。通过MySQL数据库存储和管理农场运营数据,实现了从生产资料采购、使用申请、库存监控到农产品产出的全流程数字化管理,为农场主提供科学决策支持,帮助员工高效完成日常工作任务,大幅提升农场运营效率和管理水平。
农场管理系统演示视频
[video(video-QmsoKMsg-1757926274162)(type-bilibili)(url-player.bilibili.com/player.html… | 【毕业设计项目】毕业设计选题推荐 毕设选题推荐 附源码+部署-教学课程+文档指导+ppt java python spring boot)]
农场管理系统演示图片
农场管理系统代码展示
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName("FarmAnalysis").getOrCreate()
@RestController
@RequestMapping("/api/farm")
public class FarmController {
@PostMapping("/addEmployee")
public ResponseEntity<String> addEmployee(@RequestBody Employee employee) {
if (employee.getName() == null || employee.getName().trim().isEmpty()) {
return ResponseEntity.badRequest().body("员工姓名不能为空");
}
if (employee.getPosition() == null || employee.getPosition().trim().isEmpty()) {
return ResponseEntity.badRequest().body("员工职位不能为空");
}
if (employee.getPhone() == null || !employee.getPhone().matches("^1[3-9]\\d{9}$")) {
return ResponseEntity.badRequest().body("手机号格式不正确");
}
Employee existingEmployee = employeeMapper.findByPhone(employee.getPhone());
if (existingEmployee != null) {
return ResponseEntity.badRequest().body("该手机号已被注册");
}
employee.setCreateTime(new Date());
employee.setStatus("active");
employee.setEmployeeId(generateEmployeeId());
int result = employeeMapper.insertEmployee(employee);
if (result > 0) {
logService.addLog("添加员工", "新增员工:" + employee.getName());
return ResponseEntity.ok("员工添加成功");
} else {
return ResponseEntity.status(500).body("员工添加失败");
}
}
@PostMapping("/pesticideOutbound")
public ResponseEntity<String> pesticideOutbound(@RequestBody PesticideOutbound outbound) {
PesticideInfo pesticide = pesticideMapper.findById(outbound.getPesticideId());
if (pesticide == null) {
return ResponseEntity.badRequest().body("农药信息不存在");
}
if (pesticide.getStock() < outbound.getOutboundQuantity()) {
return ResponseEntity.badRequest().body("库存不足,当前库存:" + pesticide.getStock());
}
if (outbound.getOutboundQuantity() <= 0) {
return ResponseEntity.badRequest().body("出库数量必须大于0");
}
String applicationStatus = applicationMapper.checkApplicationStatus(outbound.getApplicationId());
if (!"approved".equals(applicationStatus)) {
return ResponseEntity.badRequest().body("申请未通过审批,无法出库");
}
outbound.setOutboundTime(new Date());
outbound.setOperator(getCurrentUser().getName());
outbound.setOutboundStatus("completed");
int updateStock = pesticide.getStock() - outbound.getOutboundQuantity();
pesticideMapper.updateStock(outbound.getPesticideId(), updateStock);
int result = pesticideOutboundMapper.insertOutbound(outbound);
if (result > 0) {
applicationMapper.updateApplicationStatus(outbound.getApplicationId(), "used");
logService.addLog("农药出库", "出库农药:" + pesticide.getName() + ",数量:" + outbound.getOutboundQuantity());
return ResponseEntity.ok("农药出库成功");
} else {
return ResponseEntity.status(500).body("农药出库失败");
}
}
@PostMapping("/productInbound")
public ResponseEntity<String> productInbound(@RequestBody ProductInbound inbound) {
ProductType productType = productTypeMapper.findById(inbound.getProductTypeId());
if (productType == null) {
return ResponseEntity.badRequest().body("农产品种类不存在");
}
if (inbound.getInboundQuantity() <= 0) {
return ResponseEntity.badRequest().body("入库数量必须大于0");
}
if (inbound.getQuality() == null || inbound.getQuality().trim().isEmpty()) {
return ResponseEntity.badRequest().body("产品质量等级不能为空");
}
if (!Arrays.asList("优等", "一等", "二等", "合格").contains(inbound.getQuality())) {
return ResponseEntity.badRequest().body("质量等级只能选择:优等、一等、二等、合格");
}
ProductInfo existingProduct = productMapper.findByTypeAndQuality(inbound.getProductTypeId(), inbound.getQuality());
if (existingProduct != null) {
int newQuantity = existingProduct.getQuantity() + inbound.getInboundQuantity();
productMapper.updateQuantity(existingProduct.getId(), newQuantity);
} else {
ProductInfo newProduct = new ProductInfo();
newProduct.setProductTypeId(inbound.getProductTypeId());
newProduct.setQuality(inbound.getQuality());
newProduct.setQuantity(inbound.getInboundQuantity());
newProduct.setCreateTime(new Date());
productMapper.insertProduct(newProduct);
}
inbound.setInboundTime(new Date());
inbound.setOperator(getCurrentUser().getName());
inbound.setInboundStatus("completed");
int result = productInboundMapper.insertInbound(inbound);
if (result > 0) {
logService.addLog("农产品入库", "入库产品:" + productType.getName() + ",数量:" + inbound.getInboundQuantity() + ",质量:" + inbound.getQuality());
return ResponseEntity.ok("农产品入库成功");
} else {
return ResponseEntity.status(500).body("农产品入库失败");
}
}
}
农场管理系统文档展示
💖💖作者:计算机毕业设计江挽 💙💙个人简介:曾长期从事计算机专业培训教学,本人也热爱上课教学,语言擅长Java、微信小程序、Python、Golang、安卓Android等,开发项目包括大数据、深度学习、网站、小程序、安卓、算法。平常会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。平常喜欢分享一些自己开发中遇到的问题的解决办法,也喜欢交流技术,大家有技术代码这一块的问题可以问我! 💛💛想说的话:感谢大家的关注与支持! 💜💜 网站实战项目 安卓/小程序实战项目 大数据实战项目 深度学习实战项目