# MES
**Repository Path**: initking/mes
## Basic Information
- **Project Name**: MES
- **Description**: `MES`是为国内离散制造业的中小企业用户量身打造的一款产品,旨在帮助企业提升工厂资源配置效率和生产运营效率。它在生产过程中扮演着关键的角色,通过整合生产计划、物料管理、生产调度、质量管理和设备管理等功能,实现对生产过程的实时监控和管理,以提高生产效率、降低成本、提高产品质量,从而增强企业的竞争力,迈向更加成功的未来。
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: v1.0.0
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 8
- **Created**: 2024-12-10
- **Last Updated**: 2024-12-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# `mes`
**MES相关概念参考:**
- https://baike.baidu.com/item/%E7%94%9F%E4%BA%A7%E6%89%A7%E8%A1%8C%E7%B3%BB%E7%BB%9F/6371079
- https://wiki.mbalib.com/wiki/%E5%88%B6%E9%80%A0%E6%89%A7%E8%A1%8C%E7%B3%BB%E7%BB%9F
- https://erpnext.cc/mes/Mes%E7%9B%B8%E5%85%B3%E5%90%8D%E8%AF%8D%E8%A7%A3%E9%87%8A/
**SOP(Standard Operating Procedure)与SIP(Standard Inspection Procedure):**
SOP:标准的操作指导书(**即工程对产品各流程所做的详细的标准作业指导**),给操作者使用的作业标准;是作业人员的工作准则,将作业人员的工作予说明与规范,以达到作业的一致性与标准性。
SIP:标准的检查(验)指导书(**即品质工程师所做的针对产品进料、制程、成品所做的标准检验指导及标准**),这是给QC人员使用的检查标准。
SOP是针对产品的制造过程,是指导你如何做产品,它的编制依据是产品的图纸及工艺要求。而SIP是针对产品的检验过程,是指导你如何检验产品,它的依据是产品标准或规格书。SIP在制作时可以考量SOP的制作流程,比如SIP中的检验操作就可以参考SOP中的操作方法。
## 项目简介
在现代制造业中,提高工厂资源配置效率和生产运营效率是中小企业追求的目标。为了帮助企业实现这一目标,打造一款MES软件是必不可少,通过软件定义工厂、产品和工序工艺的方式,来提升工厂资源配置效率和生产运营效率。
`mes`是为国内离散制造业的中小企业用户量身打造的一款产品,旨在帮助企业提升工厂资源配置效率和生产运营效率。它在生产过程中扮演着关键的角色,通过整合生产计划、物料管理、生产调度、质量管理和设备管理等功能,实现对生产过程的实时监控和管理,以提高生产效率、降低成本、提高产品质量,从而增强企业的竞争力,迈向更加成功的未来。
该系统涵盖了(但不限于)以下功能:
- **组织架构**:用于配置工厂的组织结构、角色、岗位和权限,以支持工厂管理体系的建立和优化。
- **系统管理**:提供系统管理员所需的配置模块,以确保系统的正常运行和高效使用。
- **基础数据**:管理系统运行所需的基础业务数据,包括计量单位、物料分类、物料产品、客户、供应商、车间和工作站等信息。
- **排班管理**:安排工厂人员的工作任务计划,包括班组人员配置、班次安排、排班计划配置和节假日设置等。
- **生产管理**:根据生产计划和物料情况,合理安排生产任务的执行顺序和时间,以提高生产效率和资源利用率。
- **质量管理**:监控生产过程中的质量指标,及时发现和处理质量异常,以确保产品符合质量标准和客户要求。
- **设备管理**:监控和管理生产设备的运行状态,预防和处理设备故障,以确保设备稳定运行和生产连续性。
- **仓库管理**:提供完整的仓储管理功能,以支持物资出入库和库存跟踪需求,确保生产过程的顺畅进行。
- **工装夹具**:精确管理工装夹具的配置和使用情况,包括工装夹具的编号、属性、位置和维护信息,以确保生产过程中的装配和加工操作顺利进行。
- **消息公告**:提供消息发布和通知功能,用于向相关人员发送重要信息、通告和提醒,包括生产计划变更、质量异常报告和设备维护通知等。
本系统通过信息化手段实现对生产过程的全面管控和优化,为企业提供了实时的生产数据和决策支持,有助于提高生产效率、降低生产成本,提升产品质量和客户满意度,从而实现企业的可持续发展。
## 系统架构图
项目主体骨架基于`Spring Cloud Alibaba`生态体系,使用`MySQL`进行数据持久化管理,采用`Vue3`生态体系与`Element Puls UI`框架完成前端制作,同时项目提供`C++`微服务开发解决方案与集成、使用`Jenkins`实现`CD/CI`。

## 项目结构说明
> `mes`
>
> > `.gitignore` -- 忽略提交配置
> >
> > `README.md` -- 项目自述文件
> >
> > `documents` -- 环境搭建、编码规范、项目需求等等文档资源
> >
> > `mes-java` -- `Java`项目主体
> >
> > `mes-cpp` -- `C++`项目主体
> >
> > `mes-frontend` -- 前端项目主体
## 软件架构
### `Java`技术栈
#### 后端核心技术栈
版本匹配参考:
https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E
| 技术 | 说明 | 版本 | 备注 |
| ------------------------ | ---------------------- | ------------- | ------------------------------------------------------------ |
| `Spring` | 容器 | 5.2.15 | https://spring.io/ |
| `Spring Web MVC` | `MVC`框架 | 5.2.15 | https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html |
| `Beanvalidation` | 实体属性校验 | 2.0.2 | https://beanvalidation.org/2.0-jsr380/
https://www.baeldung.com/spring-boot-bean-validation |
| `MyBatis` | `ORM`框架 | 3.5.7 | http://www.mybatis.org/mybatis-3/zh/index.html |
| `MyBatis Plus` | `MyBatis`的增强工具 | 3.4.3.4 | https://baomidou.com/ |
| `MyBatis Plus Generator` | 代码生成器 | 3.5.1 | https://github.com/baomidou/generator |
| `Druid` | 数据库连接池 | 1.2.8 | https://github.com/alibaba/druid |
| `Lombok` | 实体类增加工具 | 1.18.20 | https://github.com/rzwitserloot/lombok |
| `Hutool` | Java工具类库 | 5.8.3 | https://hutool.cn/docs/#/ |
| `Knife4j` | 接口描述语言 | 2.0.8 | https://gitee.com/xiaoym/knife4j |
| `Nimbus JOSE JWT` | `JSON Web Token` | 8.21 | https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home |
| `Spring Boot` | Spring快速集成脚手架 | 2.3.12 | https://spring.io/projects/spring-boot |
| `Spring Cloud` | 微服务框架 | `Hoxton.SR12` | https://spring.io/projects/spring-cloud |
| `Spring Cloud Alibaba` | 微服务框架 | 2.2.8 | https://github.com/alibaba/spring-cloud-alibaba/wiki |
| `Spring Cloud Security` | 认证和授权框架 | 2.2.5 | https://spring.io/projects/spring-cloud-security |
| `Sentinel` | 分布式系统的流量防卫兵 | 1.8.4 | https://sentinelguard.io/zh-cn/ |
| `Seata` | 分布式事务解决方案 | 1.5.1 | https://seata.io/zh-cn/ |
| `MapStruct` | 实体类映射代码生成器 | `1.5.3.Final` | https://mapstruct.org/ |
#### 后端扩展技术栈
版本匹配参考:
https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#preface.requirements
https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#requirements
| 技术 | 说明 | 版本 | 备注 |
| -------------------------- | ---------------------- | ------ | ------------------------------------------------------------ |
| `EasyExcel` | Excel报表 | 3.0.5 | https://github.com/alibaba/easyexcel |
| `RocketMQ` | 消息队列中间件 | 4.9.3 | https://github.com/alibaba/spring-cloud-alibaba/wiki/RocketMQ |
| `WebSocket` | 及时通讯服务 | 5.2.15 | https://docs.spring.io/spring-framework/docs/5.3.15/reference/html/web.html#websocket |
| `FastDFS` | `dfs`客户端 | 2.0.1 | https://gitee.com/zero-awei/fastdfs-spring-boot-starter |
| `Elasticsearch` | 分布式搜索和分析引擎 | 7.6.2 | https://www.elastic.co/guide/en/elasticsearch/reference/7.6/index.html |
| `LogStash` | 日志收集工具 | 7.6.2 | https://www.elastic.co/guide/en/logstash/7.6/index.html |
| `Kibana` | 日志可视化查看工具 | 7.6.2 | https://www.elastic.co/guide/en/kibana/7.6/index.html |
| `logstash-logback-encoder` | `Logstash`日志收集插件 | 6.6 | https://github.com/logfellow/logstash-logback-encoder/tree/logstash-logback-encoder-6.6 |
| `spring-boot-admin` | 服务管理和监控面板 | 2.3.1 | https://github.com/codecentric/spring-boot-admin |
| `EasyEs` | `ES ORM`开发框架 | 1.0.3 | https://www.easy-es.cn/ |
| `spring-data-mongodb` | `Spring`集成`MongoDB` | 3.0.9 | https://docs.spring.io/spring-data/mongodb/docs/3.0.9.RELEASE/reference/html/#preface |
| `AJ-Captcha` | 验证码插件 | 1.3.0 | https://ajcaptcha.beliefteam.cn/captcha-doc/ |
### 前端技术栈
#### 核心技术栈
| 技术 | 说明 | 版本 | 备注 |
| -------------- | ---------------- | ------------------------------------------------------------ | ------------------------------------ |
| `Vue` | 前端框架 | `v3.x` | https://v3.vuejs.org/ |
| `Vue-Router` | 路由框架 | `v4.x` | https://next.router.vuejs.org/ |
| `Pinia` | 全局状态管理框架 | `v2.x` | https://pinia.vuejs.org/ |
| `Axios` | HTTP中间件 | [`v0.27.2`](https://github.com/axios/axios/releases/tag/v0.27.2) | https://github.com/axios/axios |
| `Element-Plus` | 前端`UI`框架 | `latest` | https://element-plus.gitee.io/zh-CN/ |
#### 扩展技术栈
| 技术 | 说明 | 版本 | 备注 |
| -------------------- | ----------------------- | -------- | ------------------------------------------------------------ |
| `Avue` | 基于`ElementUI`二次封装 | `v3.1.4` | https://v3.avuejs.com/ |
| `V-Charts` | 基于`Echarts`的图表框架 | latest | https://v-charts.js.org/ |
| `AJ-Captcha` | 验证码插件 | 1.3.0 | https://ajcaptcha.beliefteam.cn/captcha-doc/ |
| `SheetJS` | 电子表格插件 | 0.19.2 | https://docs.sheetjs.com/docs/
https://docs.sheetjs.com/docs/demos/frontend/vue |
| `vue-plugin-hiprint` | 打印插件 | 0.0.48 | https://gitee.com/CcSimple/vue-plugin-hiprint |
| `wangEditor` | 富文本编辑器 | v5 | https://www.wangeditor.com/v5/ |
### `CPP`技术栈
#### 后端核心技术栈
| 技术 | 说明 | 版本 | 备注 |
| ----------------- | ------------------ | ------------------------------------------------------ | ------------------------------------------------------------ |
| `oat++` | Web框架 | `1.3.0` | https://github.com/oatpp/oatpp |
| `MySQL Connector` | `MySQL`连接驱动库 | 8.0.27 | https://dev.mysql.com/downloads/connector/cpp/
https://dev.mysql.com/doc/connector-cpp/1.1/en/connector-cpp-apps.html |
| `JWT` | `JSON` Web Token | [v1.4](https://github.com/arun11299/cpp-jwt/tree/v1.4) | https://opensourcelibs.com/lib/cpp-jwt |
| `OpenSSL` | 开源安全套接层协议 | `1.1.1L` | https://www.openssl.org/
https://www.xolphin.com/support/OpenSSL/OpenSSL_-_Installation_under_Windows |
#### 后端扩展技术栈
| 技术 | 说明 | 版本 | 备注 |
| ---------- | ----------------- | -------- | --------------------------------------------- |
| `xlnt` | excel报表 | 1.5.0 | https://github.com/tfussell/xlnt |
| `fastdfs` | 文件存储客户端 | latest | https://gitee.com/fastdfs100 |
| `yaml-cpp` | 解析`yaml`数据 | 0.7.0 | https://github.com/jbeder/yaml-cpp |
| `nacos` | `nacos`客户端 | `v1.1.0` | https://github.com/nacos-group/nacos-sdk-cpp |
| `redis++` | `redis`连接客户端 | 1.3.2 | https://github.com/sewenew/redis-plus-plus |
| `rocketmq` | `rokcetmq`客户端 | 2.1.0 | https://github.com/apache/rocketmq-client-cpp |
| `mongo` | `mongodb`客户端 | 3.6.5 | https://www.mongodb.com/docs/drivers/cxx/ |
#### 测试前端技术栈
| 技术 | 说明 | 版本 | 备注 |
| ------------ | ---------- | ----- | ------------------------------- |
| `jQuery` | Ajax框架 | 3.6.0 | https://jquery.com/ |
| `HTML5` | 文本页面 | 5 | https://www.w3schools.com/html/ |
| `CSS3` | 页面样式表 | 3 | https://www.w3schools.com/css/ |
| `JavaScript` | 页面小脚本 | `ES6` | https://www.w3schools.com/js/ |
## 环境要求
### 开发工具
| 工具 | 说明 | 版本 | 备注 |
| --------------- | --------------------- | --------- | ------------------------------------------------------------ |
| `Navicat` | 数据库连接工具 | latest | https://www.navicat.com.cn/ |
| `RDM` | `Redis`可视化管理工具 | latest | https://github.com/uglide/RedisDesktopManager
https://gitee.com/qishibo/AnotherRedisDesktopManager |
| `PowerDesigner` | 数据库设计工具 | 16.6 | http://powerdesigner.de/ |
| `Axure` | 原型设计工具 | 9 | https://www.axure.com/ |
| `MindMaster` | 思维导图设计工具 | latest | http://www.edrawsoft.cn/mindmaster |
| `Visio` | 流程图绘制工具 | latest | https://www.microsoft.com/zh-cn/microsoft-365/visio/flowchart-software |
| `Apipost` | `API`接口调试工具 | latest | https://www.apipost.cn/ |
| `Mock.js` | `API`接口模拟测试 | latest | http://mockjs.com/ |
| `Git` | 项目版本管控工具 | latest | https://git-scm.com/ |
| `Codeup` | 项目源码托管平台 | latest | https://codeup.aliyun.com |
| `Projex` | 开发过程管控平台 | latest | https://devops.aliyun.com/projex |
| `IDEA` | `Java`开发`IDE` | 2022.1.3+ | https://www.jetbrains.com/idea/download |
| `Apache Maven` | Maven 构建工具 | 3.6.3 | https://maven.apache.org/ |
| `Docker Maven` | Maven Docker插件 | 0.40.2 | https://dmp.fabric8.io/
https://github.com/fabric8io/docker-maven-plugin |
| `VS` | `C++`开发`IDE` | 2022 | https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes |
| `Cmake` | `C++`跨平台编译 | latest | https://cmake.org/cmake/help/latest/index.html |
| gtest | 测试框架 | 1.14.0 | https://github.com/google/googletest |
### 开发环境
| 依赖环境 | 版本 | 备注 |
| --------- | ---------- | ------------------------- |
| `Windows` | 10+ | 操作系统 |
| `JDK` | 1.8.0_191+ | https://www.injdk.cn/ |
| `NodeJS` | 16.17.0 | https://nodejs.org/zh-cn/ |
| `NPM` | 8.19.2 | https://www.npmjs.com/ |
### 服务器环境
| 依赖环境 | 版本 | 备注 |
| ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `Anolis OS` | `8.6GA` | https://openanolis.cn/anolisos |
| `Docker` | latest | https://www.docker.com/ |
| `MySQL` | 8.0.20 | https://www.mysql.com/cn/ |
| `Redis` | 6.2.7 | https://redis.io/ |
| `Nacos` | 2.1.0 | https://nacos.io/zh-cn/docs/quick-start-docker.html |
| `Sentinel` | 1.8.4 | https://github.com/alibaba/Sentinel/releases |
| `Seata` | 1.5.1 | https://github.com/seata/seata |
| `RocketMQ` | 4.9.3 | https://rocketmq.apache.org/ |
| `Nginx` | latest | https://nginx.org/en/ |
| `FastDFS` | [V6.07](https://github.com/happyfish100/fastdfs/releases/tag/V6.07) | https://gitee.com/fastdfs100 |
| `ELK` | 7.6.2 | https://www.elastic.co/guide/en/elastic-stack/7.6/index.html |
| `MongoDB` | 4.4.17 | https://www.mongodb.com/try/download/community |
| `Jenkins` | latest | https://www.jenkins.io/zh/doc/book/installing/ |
## 特别鸣谢
`mes`的诞生离不开开源软件和社区的支持,感谢以下开源项目及项目维护者:
- `spring`:https://github.com/spring-projects
- `alibaba`:https://github.com/alibaba
- `mybatis`:https://github.com/mybatis/mybatis-3.git
- `mp`:https://github.com/baomidou
- `api`:https://gitee.com/xiaoym/knife4j
- `vue`:https://github.com/vuejs
- `ui`:https://github.com/ElemeFE
- `oatpp`:https://github.com/oatpp/oatpp
同时也感谢其他没有明确写出来的开源组件提供给与维护者。