XX装配线生产管理系统 (MES) 微服务项目

发布于:2025-08-29 ⋅ 阅读:(18) ⋅ 点赞:(0)

目录结构:

1.README.md

# XX装配线生产管理系统 (MES) 微服务项目

本工程采用 Spring Boot 3.x & Spring Cloud微服务架构,涵盖生产计划、设备监控、出入库、质量、基础数据等核心业务,支持分布式部署与扩展。

## 目录结构

- mes-gateway: API网关
- mes-auth: 认证与授权
- mes-plan: 生产计划管理
- mes-monitor: 设备监控采集
- mes-maintenance: 故障与维护
- mes-inventory: 库存与出入库
- mes-quality: 质量管理
- mes-base-data: 基础数据管理
- mes-report: 报表分析
- common: 公共DTO、工具等

## 技术栈
- Spring Boot 3.x / Spring Cloud
- JPA, MySQL, InfluxDB, Redis, RabbitMQ
- Docker, Kubernetes
- 前端建议:Vue3/React + AntDesignPro

## 启动指南

在各微服务目录下执行
```bash
mvn spring-boot:run
```
或
```bash
./mvnw spring-boot:run
```

---

2.pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xx.mes</groupId>
    <artifactId>xx-mes-system</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <modules>
        <module>common</module>
        <module>mes-gateway</module>
        <module>mes-auth</module>
        <module>mes-plan</module>
        <module>mes-monitor</module>
        <module>mes-maintenance</module>
        <module>mes-inventory</module>
        <module>mes-quality</module>
        <module>mes-base-data</module>
        <module>mes-report</module>
    </modules>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>3.2.6</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2023.0.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <properties>
        <java.version>17</java.version>
        <spring-cloud.version>2023.0.1</spring-cloud.version>
    </properties>
</project>

3) common/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>com.xx.mes</groupId>
        <artifactId>xx-mes-system</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>common</artifactId>
</project>

4) baseresponse.java

package com.xx.mes.common.dto;

import lombok.Data;

@Data
public class BaseResponse<T> {
    private int code;
    private String message;
    private T data;
    public static <T> BaseResponse<T> success(T data) {
        BaseResponse<T> resp = new BaseResponse<>();
        resp.setCode(0);
        resp.setMessage("success");
        resp.setData(data);
        return resp;
    }
    public static <T> BaseResponse<T> error(String msg) {
        BaseResponse<T> resp = new BaseResponse<>();
        resp.setCode(-1);
        resp.setMessage(msg);
        return resp;
    }
}


网站公告

今日签到

点亮在社区的每一天
去签到