英文版md

This commit is contained in:
hhl
2026-05-12 01:46:34 +08:00
parent b41d146d36
commit 1fc6406619
50 changed files with 12825 additions and 0 deletions

View File

@@ -0,0 +1,159 @@
# Production Team Model
## 1. Function Overview
The Production Team Model belongs to the basic module of the MES system. It is used to build the production team, production shift, and production member data of the enterprise, providing organizational basic data support for production scheduling.
**Core Functions:**
- Team Management: Maintain the addition, deletion, modification, and query of production teams
- Schedule Plan Management: Maintain the addition, deletion, modification, and query of production schedules
- Schedule Calendar: View the time planning and scheduling information of production schedules
**Function Screenshot**:
![Production Team Model Function Screenshot](/public/image_en/Organization/图片:班组模型功能截图.png)
## 2. Term Explanation
| Term | Definition | Description |
|------|------------|-------------|
| Production Team | Production Team, production operation organization unit | Used to organize and manage production personnel |
| Team Members | Production Members, members of the team | Operators belonging to a specific team |
| Schedule Plan | Production Schedule, team's schedule plan | Defines working hours and task allocation for the team |
| Rotation Method | Rotation Schedule, team's scheduling method | Such as rotation shifts, fixed scheduling, etc. |
| Rest Day Selection | Rest Day Schedule, team's rest day selection | Defines which days are rest days |
**Relationship Description:**
| Relationship Type | Description |
|------------------|-------------|
| Team → Shift | **1 to N**: A team can contain multiple shifts |
| Team → Production Members | **1 to N**: A team can contain multiple production members |
## 3. Production Team Model Interaction Flow
### 3.1 Team Management
#### 3.1.1 Team Description
A team is the basic organizational unit for production operations, used to assign production personnel.
**Function Screenshot**:
![Team List Screenshot](/public/image_en/Organization/图片:班组列表截图.png)
#### 3.1.2 Add Team
**Operation Steps:**
1. Go to [Production Configuration] → [Team Model] → [Team Management]
2. Click [Add] button
3. Fill in basic team information
4. Add team members
5. Click [OK] to complete team creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Team Name | Name of the team, e.g., "Packaging Team" | Yes |
| Belonging Factory Area | Production factory area where the team belongs, e.g., "Factory A" | Yes |
| Belonging Production Line | Production line where the team belongs, e.g., "Packaging Line" | Yes |
**[Important]** The team code cannot be modified after creation. Please confirm carefully when creating.
**Function Screenshot**:
![Add Team Screenshot](/public/image_en/Organization/图片:新增班组截图.png)
#### 3.1.3 Team Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Team Name | Fuzzy query by team name |
| Belonging Factory Area | Filter by team's factory area |
| Belonging Production Line | Filter by team's production line |
| Creation Time | Filter by team creation time |
### 3.2 Schedule Plan
#### 3.2.1 Schedule Plan Description
A schedule plan is the basic division of team working hours, used to manage the time arrangement of production operations.
**Function Screenshot**:
![Shift List Screenshot](/public/image_en/Organization/图片:班次列表截图.png)
#### 3.2.2 Add Schedule Plan
**Operation Steps:**
1. Go to [Production Configuration] → [Team Model] → [Schedule Plan]
2. Click [Add] button
3. Fill in basic schedule plan information
4. Click [OK] to complete schedule plan creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Schedule Name | Name of the schedule plan, e.g., "Morning Shift", "Afternoon Shift", "Evening Shift" | Yes |
| Schedule Code | Unique identification code of the schedule plan | Yes |
| Schedule Time Range | Time range of the schedule plan, e.g., "9:00-17:00" | Yes |
| Status | Status of the schedule plan, e.g., "Enabled", "Disabled" | No |
| Team | Teams included in the schedule plan | No |
| Remarks | Other supplementary information | No |
**[Important]** The schedule plan code cannot be modified after creation.
**[Important]** The schedule plan cannot be deleted once referenced by schedule records.
**Function Screenshot**:
![Add Schedule Plan Screenshot](/public/image_en/Organization/图片:新增排班计划截图.png)
#### 3.2.3 Schedule Plan Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Schedule Code | Exact query by schedule code |
| Schedule Name | Fuzzy query by schedule name |
| Creation Time | Filter by schedule plan creation time |
**Function Screenshot**:
![Schedule Plan Query Screenshot](/public/image_en/Organization/图片:排班计划查询截图.png)
#### 3.2.4 Import Schedule Plan
**Operation Steps:**
1. Go to [Production Configuration] → [Team Model] → [Schedule Plan]
2. Click [Import] button
3. Upload schedule plan file
4. Click [OK] to complete schedule plan import
**Function Screenshot**:
![Import Schedule Plan Screenshot](/public/image_en/Organization/图片:排班计划导入截图.png)
![Import Schedule Plan Excel](/public/image_en/Organization/图片排班计划导入excel.png)
#### 3.2.4 Export Schedule Plan
**Operation Steps:**
1. Go to [Production Configuration] → [Team Model] → [Schedule Plan]
2. Click [Export] button
3. Select export format (e.g., Excel)
4. Click [OK] to complete schedule plan export
#### 3.2.5 Schedule Calendar
The schedule calendar is a visual display of the team's schedule plan, used to view and manage schedule plans.
**Function Screenshot**:
![Schedule Calendar Screenshot](/public/image_en/Organization/图片:排班日历截图.png)

View File

@@ -0,0 +1,208 @@
# SPC Collection Model
## 1. Function Overview
The SPC Collection Model belongs to the basic module of the MES system. It is used to configure the result parameter collection points for process units, enabling real-time collection and monitoring of production process data. SPC (Statistical Process Control) is used to monitor the stability of production processes.
**Core Functions:**
- SCADA Point Binding: Configure the association relationship between process units and collection points
- Collection Parameter Management: Manage data collection parameters for collection points
**Function Screenshot**:
![SPC Collection Model Function Screenshot](/public/image_en/SPC_configuration/图片SPC采集模型功能截图.png)
## 2. Term Explanation
| Term | Definition | Description |
|------|------------|-------------|
| SPC | Statistical Process Control | Used to monitor the stability of production processes |
| SCADA | Supervisory Control and Data Acquisition | Used for real-time data collection and monitoring |
| Data Type | Type of collected data | Including first inspection data, result data |
| Result Parameter | Result parameters of process units | Defines output data after process execution |
| First Inspection Data | First piece inspection data | Inspection data for the first product produced |
## 3. Data Model Relationship Description
### 3.1 SPC Collection Configuration Components
A complete SPC collection configuration consists of the following four elements:
```mermaid
flowchart LR
subgraph SPC Collection Configuration Elements
direction TB
A[Process Unit] --> B[SPC Collection Configuration]
C[Data Type] --> B
D[SCADA Point] --> B
end
B --> E[Save to Corresponding Data Table]
```
| Element | Description | Example |
|---------|-------------|---------|
| Process Unit | Which process to configure for | Cell assembly process |
| Data Type | Business type of the data | First Inspection Data / Result Data |
| SCADA Point | Source point of the data | TEMP_001 |
### 3.2 Data Type and Data Table Mapping
The data type determines which table the data is saved to:
```mermaid
flowchart TB
subgraph Data Type
DT1["First Inspection Data<br/>(First Inspection)"]
DT2["Result Data<br/>(Result Data)"]
end
subgraph Corresponding Data Table
T1["First Inspection Data Table<br/>Saves first piece inspection data"]
T2["Result Parameter Table<br/>Saves process result data"]
end
DT1 -->|"Data Type=First Inspection"| T1
DT2 -->|"Data Type=Result"| T2
```
### 3.3 Collection Entry Description
SCADA data collection has only one entry interface `set_node_data`, with 4 callers:
```mermaid
flowchart TB
subgraph SCADA Collection Entry
A[set_node_data Interface]
end
subgraph Callers
B[EdgeMange]
C[EPS]
D[MES Internal Call]
E[Device Call]
end
B --> A
C --> A
D --> A
E --> A
style D fill:#90EE90
```
| Caller | Description | Relationship with SPC Configuration |
|--------|-------------|-------------------------------------|
| EdgeMange | Edge manager push | Does not use SPC configuration |
| EPS | EPS system push | Does not use SPC configuration |
| MES Internal Call | MES internal business call | **Uses SPC configuration** |
| Device Call | Direct device call | Does not use SPC configuration |
**This function configures the collection rules for "MES Internal Call".**
### 3.4 MES Internal Call Collection Process
When MES internal business calls the `set_node_data` interface, the SPC collection configuration determines where the data is saved:
```mermaid
sequenceDiagram
participant MES业务 as MES Internal Business
participant SCADA as set_node_data Interface
participant SPC配置 as SPC Collection Configuration
participant DB as Database
MES业务->>SCADA: Call set_node_data<br/>Parameters: Point Code, Collected Value
SCADA->>SPC配置: Query configuration by point code
SPC配置-->>SCADA: Return: Process Unit, Data Type, SCADA Point
SCADA->>DB: Save to corresponding data table based on data type
DB-->>SCADA: Save successful
SCADA-->>MES业务: Return result
```
### 3.5 Configuration Examples
| Configuration ID | Process Unit | Data Type | Data Table | SCADA Point |
|-----------------|--------------|-----------|------------|-------------|
| Config 1 | Cell Assembly Process | First Inspection Data | First Inspection Data Table | TEMP_001 |
| Config 2 | Cell Assembly Process | Result Data | Result Parameter Table | PRESS_001 |
| Config 3 | Formation Process | Result Data | Result Parameter Table | VOLT_001 |
## 4. SPC Collection Model Interaction Flow
### 4.1 SCADA Point Binding
#### 4.1.1 Point Binding Description
Point binding establishes the association between process units and SCADA collection points, enabling automatic collection of production data.
**Function Screenshot**:
![SCADA Point Binding List Screenshot](/public/image_en/SPC_configuration/图片SCADA点位绑定列表截图.png)
#### 4.1.2 Add Point Binding
**Operation Steps:**
1. Go to [Production Configuration] → [SPC Collection Model] → [SCADA Point Binding]
2. Click [Add] button
3. Select the process unit to bind
4. Select or configure SCADA collection points
5. Set collection parameters
6. Click [Save] to complete point binding
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Process Unit | Process unit to bind the point | Yes |
| Point Code | Point code in SCADA system | Yes |
| Point Name | Descriptive name of the point | Yes |
| Data Type | Data type of the point, e.g., "Numeric", "Switch" | Yes |
| Collection Frequency | Data collection frequency in seconds | Yes |
| Status | Enabled/Disabled | No |
| Remarks | Other supplementary information | No |
**[Important]** The point code must match the configuration in the SCADA system, otherwise data collection will fail.
**[Important]** The same point code cannot be bound to the same process unit repeatedly.
**Function Screenshot**:
![Add Point Binding Screenshot](/public/image_en/SPC_configuration/图片:新增点位绑定截图.png)
#### 4.1.3 Edit Point Binding
**Operation Steps:**
1. Go to [Production Configuration] → [SPC Collection Model] → [SCADA Point Binding]
2. Find the binding record to edit in the list
3. Click [Edit] button
4. Modify the information to update
5. Click [Save] to complete modification
**[Note]** Historical collected data is not affected.
#### 4.1.4 Delete Point Binding
**Operation Steps:**
1. Go to [Production Configuration] → [SPC Collection Model] → [SCADA Point Binding]
2. Find the binding record to delete in the list
3. Click [Delete] button
4. Confirm the delete operation
**[Note]** After deleting the point binding, subsequent data collection for this point will stop, but collected data will be retained.
#### 4.1.5 Point Binding Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Process Unit | Filter by process unit |
| Point Code | Exact query by point code |
| Point Name | Fuzzy query by point name |
| Status | Filter by enabled/disabled status |
| Creation Time | Filter by creation time range |

View File

@@ -0,0 +1,115 @@
# Factory Area Model
## 1. Function Overview
The Factory Area Model belongs to the basic module of the MES system. It is used to build the factory areas and production lines for the MES system, providing data support for team management, batches, and environmental control data creation.
**Core Functions:**
- Factory Area Management: Maintain the addition, deletion, modification, and query of factory areas
- Production Line Management: Maintain the addition, deletion, modification, and query of production lines
Function Screenshot:
![Factory Model Function Screenshot](/public/image_en/factory_model/图片:工厂模型功能截图.png)
## 2. Term Explanation
#### 2.1.1 Factory Modeling Related Terms
| Term | Definition | Description |
|------|------------|-------------|
| Factory Area | Area, production manufacturing area | Used to correspond to production lines |
| Production Line | Production Line, production line body | Used to correspond to production teams and production workshops |
## 3. Factory Area Model Structure
### 3.1 Module Hierarchy Description
The factory area model structure adopts hierarchical management, from top to bottom: Factory → Production Line.
**Module Hierarchy Structure:**
```mermaid
flowchart TD
A[Factory Area Settings Area]
A --> B[Production Line]
```
| Level | Name | Description |
|-------|------|-------------|
| 1 | Factory | Independent production manufacturing unit |
| 2 | Production Line | Specific production line body |
### 3.2 Add/Edit Factory
**Operation Steps:**
1. Go to [Production Configuration] → [Factory Area Model] → [Factory Area Settings]
2. Click [Add/Edit Factory] button, select [Add/Edit Factory] button as needed
3. Fill in basic factory information
4. Click [Save] to complete factory creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Factory Code | Unique identification code of the factory, usually using abbreviations | Yes |
| Factory Name | Full name of the factory, e.g., "** Factory Area" | Yes |
| Remarks | Other supplementary information | No |
**[Important]** Once the factory code is bound to a production line, it cannot be modified. Please confirm carefully when creating.
**Function Screenshot**:
![Add/Edit Factory Screenshot](/public/image_en/factory_model/图片:新增编辑工厂截图.png)
### 3.3 Add/Edit Production Line
**Operation Steps:**
1. Go to [Production Configuration] → [Factory Area Model] → [Production Line Settings]
2. Click [Add/Edit Production Line] button, select [Add/Edit Production Line] button as needed
3. Fill in basic production line information
4. Click [Save] to complete production line creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Production Line Code | Unique identification code of the production line | Yes |
| Production Line Name | Name of the production line, e.g., "** Production Line" | Yes |
| Belonging Factory Area | Belonging factory area | Yes |
| Remarks | Other supplementary information | No |
**[Note]** Once the production line code is bound to a workshop, it cannot be modified. Please confirm carefully when creating.
**Function Screenshot**:
![Add/Edit Production Line Screenshot](/public/image_en/factory_model/图片:新增编辑产线截图.png)
### 3.4 Query Operation - Factory
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Name | Fuzzy query by factory area name |
| Code | Fuzzy query by factory area code |
**Function Screenshot**:
![Factory Model Query Screenshot](/public/image_en/factory_model/图片:工厂模型查询截图.png)
### 3.5 Query Operation - Production Line
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Name | Fuzzy query by production line name |
| Code | Fuzzy query by production line code |
**Function Screenshot**:
![Production Line Model Query Screenshot](/public/image_en/factory_model/图片:产线模型查询截图.png)

View File

@@ -0,0 +1,301 @@
# Material Model Management
## 1. Function Overview
Material Model Management belongs to the basic module of the MES system. It is used to build core data such as material classification, material basic information, and BOM (Bill of Materials) for the enterprise, providing material basic data support for production planning, material procurement, warehouse management, cost accounting, and other business modules.
**Core Functions:**
- Material Category List: Maintain the classification system of materials, manage by material type
- Material Information Management: Maintain basic material information, material attributes, units of measure, etc.
- BOM Management: Maintain the material composition list of products, define the quantity relationship between products and materials
- Unit of Measure: Define standard units for measuring material quantities, such as pieces, items, kilograms, meters, etc.
**Function Screenshot**:
![Material Model Function Screenshot](/public/image_en/material_model/图片:物料模型功能截图.png)
## 2. Term Explanation
| Term | Definition | Description |
|------|------------|-------------|
| Material Category | Material Category, unit for classifying materials | Used to distinguish different types of materials |
| Material Information | Material Information, basic attributes and characteristics of materials | Including material code, name, specification, unit, etc. |
| Bill of Materials | BOM, Bill of Materials, product composition list | Defines the quantity relationship between products and materials |
| Unit of Measure | Unit of Measure, standard unit for measuring material quantities | Such as pieces, items, kilograms, meters, etc., belongs to material information attributes |
| Material Code | Material Code, unique identification code of materials | Unique number in the material management system |
**Data Model Relationship Description:**
```mermaid
flowchart TB
subgraph Material Category List
MCA[Material Category A]
MCB[Material Category B]
end
subgraph Material Information Management
MI1[Material Info 1]
MI2[Material Info 2]
MI3[Material Info 3]
end
subgraph BOM Management
BOM1[BOM A]
BOM2[BOM B]
end
MCA -->|1:N| MI1
MCA -->|1:N| MI2
MCB -->|1:N| MI3
BOM1 ---|N:M| MI1
BOM1 ---|N:M| MI2
BOM2 ---|N:M| MI2
BOM2 ---|N:M| MI3
```
**Relationship Description:**
| Relationship Type | Description |
|------------------|-------------|
| Material Category List → Material Information Management | **1 to N**: A material category can contain multiple material information entries |
| BOM Management ↔ Material Information Management | **N to M**: A BOM can reference multiple materials, a material can be referenced by multiple BOMs |
| Material Information Management → Unit of Measure | **Attribute**: Unit of measure is one of the attributes of material information |
**Simplified Relationship Diagram:**
```mermaid
flowchart LR
A[Material Category List] -->|1:N| B[Material Information Management]
C[BOM Management] -.->|N:M| B
B -->|Contains| D[Unit of Measure]
B -->|Contains| E[Material Specification]
B -->|Contains| F[Material Attributes]
```
## 3. Material Model Interaction Flow
### 3.1 Material Category List Management
#### 3.1.1 Material Category Description
Material category is a unit for classifying materials, used to distinguish different types of materials for easy retrieval and maintenance.
**Function Screenshot**:
![Material Category List Screenshot](/public/image_en/material_model/图片:物料类别列表截图.png)
#### 3.1.2 Add Material Category
**Operation Steps:**
1. Go to [Production Configuration] → [Material Model] → [Material Category List]
2. Click [Add] button
3. Fill in basic information
4. Click [Save] to complete category creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Material Category Code | Unique identification code of the category | Yes |
| Material Category Name | Name of the category, e.g., "Raw Materials", "Semi-finished Products" | Yes |
| Remarks | Other supplementary information | No |
**[Important]** Once the material category code is enabled, it cannot be modified or deleted. Please confirm carefully when creating.
**Function Screenshot**:
![Material Category Settings Screenshot](/public/image_en/material_model/图片:物料类别设置截图.png)
#### 3.1.3 Material Category Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Material Category Code | Exact query by material category code |
| Material Category Name | Fuzzy query by material category name |
| Parent Category | Filter by parent category |
### 3.2 Material Information Management
#### 3.2.1 Material Information Description
Material information is core data describing the basic attributes and characteristics of materials, including material code, name, unit of measure, etc. It is the foundation of enterprise material management.
**Material Information Characteristics:**
- Uniqueness: Each material has a unique material code
- Standardization: Material information has unified data specifications and standards
- Relevance: Material information can be referenced by BOM, work orders, warehouse, and other modules
**Function Screenshot**:
![Material Information List Screenshot](/public/image_en/material_model/图片:物料信息列表截图.png)
#### 3.2.2 Add Material Information
**Operation Steps:**
1. Go to [Production Configuration] → [Material Model] → [Material Information Management]
2. Click [Add] button
3. Fill in basic material information
4. Click [Save] to complete material information creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Material Code | Unique identification code of the material | Yes |
| Material Name | Name of the material | Yes |
| Material Category | Associated material category | Yes |
| Unit of Measure | Unit of measure for the material, such as pieces, items, kilograms, etc. | Yes |
| Remarks | Other supplementary information | No |
**[Note]** The material code cannot be modified after creation. Please confirm carefully when creating.
**[Important]** Once material information is referenced by BOM or other documents, it cannot be deleted.
**Function Screenshot**:
<!-- ![Add Material Information Screenshot](/public/image_en/material_model/图片:新增物料信息截图.png) -->
#### 3.2.3 Material Information Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Material Code | Exact query by material code |
| Material Name | Fuzzy query by material name |
| Material Category | Filter by material category |
| Material Type | Filter by material type |
**Function Screenshot**:
![Material Information Query List Screenshot](/public/image_en/material_model/图片:物料信息查询列表截图.png)
### 3.3 BOM Management
#### 3.3.1 BOM Description
BOM (Bill of Materials) is core data defining the composition relationship between products and materials, recording which materials a product consists of and the quantity ratio of each material. BOM is an important basis for production planning, material procurement, and cost accounting.
**BOM Characteristics:**
- Hierarchy: Supports multi-level BOM, reflecting the product assembly structure
- Quantity Relationship: Clearly defines material quantities and ratios at each level
- Version Management: Supports BOM version changes and historical traceability
**Function Screenshot**:
![BOM List Screenshot](/public/image_en/material_model/图片BOM物料清单列表截图.png)
#### 3.3.2 Add BOM
**Operation Steps:**
1. Go to [Production Configuration] → [Material Model] → [BOM Management]
2. Click [Add] button
3. Fill in basic BOM information
4. Click [Save] to complete BOM creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| BOM Version Code | Unique identification code of the BOM | Yes |
| BOM Version Name | Name of the BOM, e.g., "Bill of Materials for Product A" | Yes |
| Product Code | Associated product model | Yes |
| Status | Status: Enabled, Disabled | Yes |
| Remarks | Other supplementary information | No |
**[Important]** Once a BOM is referenced by a production work order, it cannot be deleted.
**Function Screenshot**:
![Add BOM Screenshot](/public/image_en/process_model/图片:新增工艺流程截图.png)
#### 3.3.3 Set BOM
**Operation Steps:**
1. Go to [Production Configuration] → [Material Model] → [BOM Management]
2. Select the BOM to set, click [Set BOM] button
3. Select the corresponding process, configure material information and input quantity in IN/OUT
**BOM Item Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| IN/OUT | Material input and output of the process | Yes |
| Material Category | Referenced material category | Yes |
| Material Code | Referenced material code | Yes |
| Material Name | Referenced material name | Yes |
| Input Quantity | Quantity of this material used to produce one product | Yes |
| Unit | Unit of measure for material quantity | Yes |
**[Note]** The same material code is not allowed to appear in the same BOM.
**[Note]** The unit of measure for BOM items should be consistent with the unit of measure in material information.
**Function Screenshot**:
![BOM Item Material Configuration Screenshot](/public/image_en/material_model/图片BOM子项物料配置截图.png)
#### 3.3.4 BOM Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| BOM Code | Exact query by BOM code |
| BOM Name | Fuzzy query by BOM name |
| Product Model | Filter by product model |
### 3.4 Unit of Measure Management
#### 3.4.1 Unit of Measure Description
Unit of measure is an attribute of material information, used to standardize the measurement of material quantities. The system predefines common units of measure and supports user-defined units of measure.
**Common Unit of Measure Types:**
- Quantity Units: pieces, items, pieces, sticks, units, sets
- Weight Units: kilograms, grams, tons, pounds
- Length Units: meters, centimeters, millimeters, inches
- Volume Units: liters, milliliters, cubic meters
- Area Units: square meters, square centimeters
**Function Screenshot**:
![Unit of Measure List Screenshot](/public/image_en/material_model/图片:计量单位列表截图.png)
#### 3.4.2 Add Unit of Measure
**Operation Steps:**
1. Go to [Production Configuration] → [Material Model] → [Unit of Measure]
2. Click [Add] button
3. Fill in basic unit of measure information
4. Click [Save] to complete unit of measure creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Unit Code | Unique identification code of the unit | Yes |
| Unit Name | Name of the unit, e.g., "pieces", "kilograms" | Yes |
| Remarks | Other supplementary information | No |
**[Note]** System predefined units of measure cannot be modified or deleted.
**[Important]** Once a unit of measure is referenced by material information, it cannot be deleted.
**Function Screenshot**:
![Add Unit of Measure Screenshot](/public/image_en/material_model/图片:新增计量单位截图.png)
#### 3.4.3 Unit of Measure Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Unit Code | Exact query by unit code |
| Unit Name | Fuzzy query by unit name |
| Unit Type | Filter by unit type |

View File

@@ -0,0 +1,473 @@
# Process Flow Model
## 1. Function Overview
The Process Flow Model belongs to the basic module of the MES system. It is used to build core process data such as product process flow classification, process flows, process units, process set values, and process result parameters, providing process basic data support for production execution, quality management, and other business modules.
**Core Functions:**
- Process Flow Category: Maintain the classification system of process flows, classify by production section
- Process Unit: Maintain a standardized library of process units, which can be reused by multiple process flows to achieve process standardization
- Process Flow Management: Maintain complete process flows for specific products, define process sequence, process set values, process result parameters, etc.
**Function Screenshot**:
![Process Model Function Screenshot](/public/image_en/process_model/图片:工艺模型功能截图.png)
## 2. Term Explanation
| Term | Definition | Description |
|------|------------|-------------|
| Process Flow Category | Process Category, unit for classifying process flows by section | Used to distinguish process flows of different production sections |
| Process Flow | Process Flow, defines the complete processing sequence from raw materials to finished products | Also known as process route or production flow |
| Process Unit | Process Unit, standardized small process module | Can be reused by multiple process flows |
| Process Set Value | Process Set Value, standard parameters for process operations | Such as temperature, pressure, time, etc., belongs to process unit attributes |
| Process Result Parameter | Process Result Parameter, actual result records of process operations | Used for process monitoring and quality traceability, belongs to process unit attributes |
| Device Category | Device Category, unit for classifying device categories | Used to distinguish different types of devices, belongs to process unit attributes |
| Calculation Script | Process Calculation Script, additional code logic executed by process interfaces | Used for complex calculations in production execution, belongs to process attributes |
| Channel Exception Record | Channel Exception Record, records detailed information of process channel exceptions | Used for device point early warning, belongs to process attributes |
**Data Model Relationship Description:**
```mermaid
flowchart TB
subgraph Process Flow Category
CA[Process Flow Category A]
CB[Process Flow Category B]
end
subgraph Process Flow
PA1[Process Flow A1]
PA2[Process Flow A2]
PB1[Process Flow B1]
end
subgraph Process Unit
U1[Process Unit 1]
U2[Process Unit 2]
U3[Process Unit 3]
end
CA -->|1:N| PA1
CA -->|1:N| PA2
CB -->|1:N| PB1
PA1 --- U1
PA1 --- U2
PA2 --- U2
PB1 --- U2
PB1 --- U3
U1 -->|Attribute| PSV1[Process Set Value]
U1 -->|Attribute| PRP1[Process Result Parameter]
U1 -->|Attribute| DC1[Device Category]
U2 -->|Attribute| PSV2[Process Set Value]
U2 -->|Attribute| PRP2[Process Result Parameter]
U2 -->|Attribute| DC2[Device Category]
```
**Relationship Description:**
| Relationship Type | Description |
|------------------|-------------|
| Process Flow Category → Process Flow | **1 to N**: A process flow category can contain multiple process flows |
| Process Flow ↔ Process Unit | **N to M**: A process flow can reference multiple process units, a process unit can be reused by multiple process flows |
| Process Unit → Process Set Value | **Attribute**: Process set value is one of the attributes of process unit |
| Process Unit → Process Result Parameter | **Attribute**: Process result parameter is one of the attributes of process unit |
| Process Unit → Device Category | **Attribute**: Device category is one of the attributes of process unit |
**Simplified Relationship Diagram:**
```mermaid
flowchart LR
A[Process Flow Category] -->|1:N| B[Process Flow]
B -.->|N:M| C[Process Unit]
C -->|Contains| D[Process Set Value]
C -->|Contains| E[Process Result Parameter]
C -->|Contains| F[Device Category]
```
## 3. Process Flow Model Interaction Flow
### 3.1 Process Flow Category Management
#### 3.1.1 Process Flow Category Description
Process flow category is a unit for classifying process flows by production section, used to distinguish process flows of different production sections.
**Function Screenshot**:
![Process Flow Category List Screenshot](/public/image_en/process_model/图片:工艺流程类别列表截图.png)
#### 3.1.2 Add Process Flow Category
**Operation Steps:**
1. Go to [Production Configuration] → [Process Model] → [Process Flow Category]
2. Click [Add] button
3. Fill in basic information
4. Click [Save] to complete category creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Process Flow Category Code | Unique identification code of the category | Yes |
| Process Flow Category Name | Name of the category, e.g., "** Section" | Yes |
| Remarks | Other supplementary information | No |
**[Important]** Once the category code is enabled, it cannot be modified or deleted. Please confirm carefully when creating.
**Function Screenshot**:
![Process Flow Category Settings Screenshot](/public/image_en/process_model/图片:工艺流程类别设置截图.png)
#### 3.1.3 Process Flow Category Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Category Code | Exact query by category code |
| Category Name | Fuzzy query by category name |
### 3.2 Process Unit Management
#### 3.2.1 Process Unit Description
A process unit is a standardized small process module, which is the basic unit constituting a process flow. Process units are universal and can be referenced by multiple process flows to achieve standardized reuse of processes.
**Process Unit Characteristics:**
- Standardization: Define unified process names, process codes, and operation specifications
- Reusability: Can be referenced by multiple process flows without repeated creation
- Configurability: Supports configuring preset process parameters and preset result parameters for processes
**Function Screenshot**:
![Process Unit List Screenshot](/public/image_en/process_model/图片:工序单元列表截图.png)
#### 3.2.2 Add Process Unit
**Operation Steps:**
1. Go to [Production Configuration] → [Process Model] → [Process Unit]
2. Click [Add] button
3. Fill in basic process unit information
4. Click [OK] to complete process unit creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Process Unit Code | Unique identification code of the process unit | Yes |
| Process Unit Name | Name of the process unit, e.g., "SMT Mounting" | Yes |
| Device Category | Device category for completing this process, e.g., "SMT" | Yes |
| Remarks | Other supplementary information | No |
**[Note]** Once a process unit is created, the code cannot be modified. Please confirm carefully when creating.
**[Important]** Once a process unit is referenced by a process flow, it cannot be deleted. Please confirm carefully when creating.
**Function Screenshot**:
![Add Process Unit Screenshot](/public/image_en/process_model/图片:新增工序单元截图.png)
#### 3.2.3 Preset Set Values
Preset set values are preset standard parameters for the process, such as temperature, pressure, time, etc. When adding a process to a process flow, the preset set values will be configured by default.
**Function Screenshot**:
![Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:预设设定值对话框截图.png)
**Operation Steps:**
1. On the [Process Unit] page, click the process unit that needs to configure set values
2. Click [Preset Set Values] button to open the preset set values dialog
3. Fill in the set value parameters
4. Click [OK] to complete set value configuration
**[Important]** The preset set value dialog varies according to the category of the process unit.
The following are the preset set value dialog types in the MES system:
- Charging/Discharging Related: ![Capacity Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:分容预设设定值对话框截图.png)
- Sorting Related: ![Sorting Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:分选预设设定值对话框截图.png)
- OCV Related: ![OCV Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:预设设定值对话框截图.png)
- Rest Related: ![Rest Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:静置预设设定值对话框截图.png)
- DCIR Related: ![DCIR Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片DCIR预设设定值对话框截图.png)
In addition to the above, MES also provides a table-form preset set value dialog for configuring complex set values.
Others: ![General Preset Set Value Dialog Screenshot](/public/image_en/process_model/图片:常规预设设定值对话框截图.png)
**[Important]** If the site has special requirements and needs to customize the preset set value dialog content, please contact the MES system administrator for development.
#### 3.2.4 Preset Result Parameters
Preset result parameters are preset actual result records for the process, such as voltage, current, time, etc. When adding a process to a process flow, the preset result parameters will be configured by default.
**Function Screenshot**:
![Preset Result Parameter Dialog Screenshot](/public/image_en/process_model/图片:预设结果参数对话框截图.png)
##### 3.2.4.1 Add Result Parameter
**Operation Steps:**
1. On the [Process Unit] page, click the process unit that needs to configure result parameters
2. Click [Preset Result Parameters] button to open the preset result parameters dialog
3. Click [Add Row] button to open the add result parameter dialog
4. Fill in the result parameter information
5. Click [OK] to complete result parameter configuration
**[Important]** After adding, the system will automatically add three result parameters: START_TIME, FINISH_TIME, and DEVICE_CODE.
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Parameter | Unique identification code of the result parameter | Yes |
| Name | Name of the result parameter, e.g., "Voltage" | Yes |
| Type | FLOAT/INT/VARCHAR/TEXT/TIMESTAMP | Yes |
| Is Unique | Whether the result parameter changes according to the number of steps. For example, the result parameters of capacity grading and formation change according to the number of steps. 10 steps have 10 result parameters; while processes such as second sealing or electrolyte injection have no steps and are unique | Yes |
| Upload | When uploading result parameters, it is judged according to whether to upload. If yes, it is uploaded to the MES system; otherwise, it is not uploaded | Yes |
| Remarks | Other supplementary information | No |
**Function Screenshot**:
![Add Preset Result Parameter Dialog Screenshot](/public/image_en/process_model/图片:新增预设结果参数对话框截图.png)
##### 3.2.4.2 Import Preset Result Parameters
Importing preset result parameters is to batch import the result parameters of the process, such as voltage, current, time, etc.
**Operation Steps:**
1. On the [Process Unit] page, click the process unit that needs to configure result parameters
2. Click [Preset Result Parameters] button to open the preset result parameters dialog
3. Click [Import] button to open the import result parameters dialog
4. Click [Select File] to upload the xlsx file containing result parameters
**[Note]** If the imported result parameters have duplicate codes or names with existing result parameters, an error will be reported.
**[Note]** The xlsx file for import will be provided by MES for download. Users can modify it according to the downloaded file and re-import.
**Function Screenshot**:
![Import Result Parameter Button and File Dialog Screenshot](/public/image_en/process_model/图片:导入结果参数的按钮和文件对话框截图.png)
![Import Result Parameter File Screenshot](/public/image_en/process_model/图片:导入结果参数文件截图.png)
#### 3.2.5 Process Unit Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Process Unit Code | Exact query by process unit code |
| Process Unit Name | Fuzzy query by process unit name |
| Device Category | Filter by device category |
**Function Screenshot**:
![Process Unit Query List Screenshot](/public/image_en/process_model/图片:工序单元查询列表截图.png)
### 3.3 Process Flow Management
#### 3.3.1 Process Flow Description
Process flow is core data defining the complete processing sequence of a product from raw materials to finished products, including process arrangement, process name, process code, process set values, process result parameters, etc.
**Function Screenshot**:
![Process Flow List Screenshot](/public/image_en/process_model/图片:工艺流程列表截图.png)
#### 3.3.2 Add Process Flow
**Operation Steps:**
1. Go to [Production Configuration] → [Process Model] → [Process Flow]
2. Click [Add] button
3. Fill in basic process flow information
4. Click [Save] to complete process flow creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Process Flow Code | Unique identification code of the process flow | Yes |
| Process Flow Name | Name of the process flow | Yes |
| Process Flow Category | Associated process flow category | Yes |
| Product Code | Associated product model | Yes |
| Remarks | Other supplementary information | No |
**[Important]** Once a process flow is bound to a production batch, it cannot be deleted.
**Function Screenshot**:
![Add Process Flow Screenshot](/public/image_en/process_model/图片:新增工艺流程截图.png)
#### 3.3.3 Relationship Between Process Flow, Process Unit, and Process
```mermaid
flowchart TB
A[Process Flow Category] -->|1:N| B[Process Flow A]
A -->|1:N| C[Process Flow B]
B --> D[Process 1]
B --> E[Process 2]
B --> F[Process 3]
C --> G[Process 2]
C --> H[Process 4]
C --> F
D --> I[Process Unit: Mounting]
E --> J[Process Unit: Welding]
F --> K[Process Unit: Testing]
G --> I
H --> L[Process Unit: Assembly]
```
**[Note]** The process code and process name are automatically assigned by the system. The assignment rule is the unique ID of the process flow concatenated with the process unit code. Users do not need to input manually. Users can modify the name as needed, but the code cannot be modified.
### 3.4 Set Process (Process Details)
The process details page is used to configure detailed information of the process flow, including adding processes, deleting processes, editing set values, editing result parameters, setting calculation scripts, etc.
**Function Screenshot**:
![Process Details Page Screenshot](/public/image_en/process_model/图片:工艺详情页面截图.png)
#### 3.4.1 Set Process (Process Details) Description
**Operation Steps:**
1. Go to [Production Configuration] → [Process Model] → [Process Flow]
2. Click [Set Process] button
3. Enter the [Process Details] page
**Function Description:**
- Add Process: Configure process sequence, process unit, whether to enable channel exception recording, etc.
- Delete Process: Configure process sequence, process unit, whether to enable channel exception recording, etc.
- Edit Set Values: Configure standard operation parameters for each process, such as temperature, pressure, time, etc.
- Edit Result Parameters: Configure actual result records for each process, such as voltage, current, time, etc.
- Set Calculation Script: Configure actual result records for each process, such as voltage, current, time, etc.
#### 3.4.2 Add Process
**Operation Steps:**
1. On the [Process Flow] page, click the [Set Process] button for the process flow to configure, enter the [Process Details] page
2. Click the add button to open the add process dialog
3. Select the process unit, the system will automatically generate the process code and process name
4. Select whether to enable channel exception recording
5. Click [OK] to complete process configuration
**Process Configuration Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Process Unit | Process selected from the process unit library | Yes |
| Process Code | Automatically generated process code, format is process flow unique id + process unit code | Yes |
| Process Name | Automatically generated process name, format is process flow unique id + process unit name | Yes |
| Enable Channel Exception Recording | Whether to enable channel exception recording for this process | No |
| Remarks | Other supplementary information | No |
**[Note]** When a process is deleted, the related set values and result parameters will also be deleted. Please proceed with caution.
**[Important]** Once a process flow is bound to a production batch, processes cannot be deleted.
**Function Screenshot**:
![Add Process Dialog Screenshot](/public/image_en/process_model/图片:新增工序对话框截图.png)
#### 3.4.3 Process Set Values
Process set values are standard parameters for process operations, such as temperature, pressure, time, etc.
**Operation Steps:**
1. On the [Process Details] page, click the process that needs to configure set values
2. Click [Add Set Value] button to open the add set value dialog
3. Fill in the set value parameter, unit, minimum value, maximum value, normal value, warning value, alarm value
4. Click [OK] to complete set value configuration
**[Note]** If the process unit of this process has set preset set values, the system will automatically fill in the preset set values, and users do not need to configure them manually.
**[Important]** Process set values are obtained by the equipment through MES interfaces [get_battery_process_setting]() and [get_tray_process_setting]().
**Function Screenshot**:
![Process Set Value Dialog Screenshot](/public/image_en/process_model/图片:工序设定值对话框截图.png)
#### 3.4.4 Process Result Parameters
Process result parameters are actual result records of process operations, such as voltage, current, time, etc.
**[Note]** If the process unit of this process has set preset result parameters, the system will automatically fill in the preset result parameters, and users do not need to configure them manually.
**[Important]** If the result parameters of this process are non-unique, the system will dynamically generate result parameters according to the number of steps in the set values after the set values are determined.
> For example, the result parameters of the capacity grading process are voltage, current, voltage, etc. According to the number of steps, the voltage, current, voltage of the first step, the voltage, current, voltage of the second step, etc., are generated until the last step.
**Function Screenshot**:
![Process Result Parameter Dialog Screenshot](/public/image_en/process_model/图片:工序结果参数对话框截图.png)
#### 3.4.5 Calculation Script
Calculation scripts are scripts that trigger complex calculations during equipment interface calls based on the set script trigger position, such as before or after interface execution. Calculation scripts are written in PHP code and used to add specific complex logic to the project based on the interface.
**Function Screenshot**:
![Calculation Script Dialog Screenshot](/public/image_en/process_model/图片:计算脚本对话框截图.png)
##### 3.4.5.1 Add Calculation Script
**Operation Steps:**
1. On the [Process Details] page, click the process that needs to configure the calculation script
2. Click [Calculation Script] button to open the add calculation script list dialog
3. Click [Add] button to open the add calculation script dialog
4. Fill in the basic information of the calculation script, including script name, trigger position, script content
5. Click [Calculation Script Editor] button to open the calculation script editor dialog
6. Write PHP code in the calculation script editor
7. Click [Save] button to save the calculation script
8. Click [OK] to complete calculation script configuration
**Function Screenshot**:
![Add Calculation Script Dialog Screenshot](/public/image_en/process_model/图片:新增计算脚本对话框截图.png)
![Calculation Script Editor Dialog Screenshot](/public/image_en/process_model/图片:计算脚本编辑器对话框截图.png)
**[Note]** The script editor has syntax highlighting, code hints, formatting, and other functions
**[Note]** The script editor has a preset function library that users can directly drag and drop to use
**[Important]** The script editor saves calculation data for a certain result parameter, which requires a corresponding parameter in the result parameters, otherwise an error will occur.
##### 3.4.5.2 Calculation Script Usage Case
**Case 1:**
For example, to add K value calculation for OCV2, the process from backend setting to execution and export display:
```mermaid
sequenceDiagram
participant 用户 as User
participant MES as MES System
participant 设备 as Device
用户->>MES: 1. Edit calculation script (Set trigger position: End Position)
MES->>MES: 2. Save calculation script configuration
设备->>MES: 3. Device uploads data (OCV2 data)
MES->>MES: 4. Determine if trigger position is "End Position"
MES->>MES: 5. Load corresponding calculation script
MES->>MES: 6. Execute script logic (Calculate K value)
MES->>MES: 7. Save calculation result to result parameter
MES->>用户: 8. Return calculation completed result
```
**Process Description:**
| Step | Executor | Operation | Description |
|------|----------|-----------|-------------|
| 1 | User | Edit calculation script | Set trigger position to "End Position" |
| 2 | MES | Save script configuration | Save script content and trigger position |
| 3 | Device | Upload data | Device calls interface to upload OCV2 data |
| 4 | MES | Determine trigger position | Check if trigger position is "End Position" |
| 5 | MES | Load script | Load corresponding script according to trigger position |
| 6 | MES | Execute calculation | Run script logic to calculate K value |
| 7 | MES | Save result | Save calculation result to result parameter |
| 8 | MES | Return result | Show calculation completed status to user |
#### 3.4.6 View Logs
Logs record the operation logs of the process details page, including operations such as adding, deleting, editing processes, configuring set values, configuring result parameters, configuring calculation scripts, etc.
**Operation Steps:**
1. On the [Process Details] page, click [View Logs] button
2. The log dialog pops up, showing all operation logs
**Function Screenshot**:
![View Logs Dialog Screenshot](/public/image_en/process_model/图片:查看日志对话框截图.png)

View File

@@ -0,0 +1,228 @@
# Product Model Management
## 1. Function Overview
Product Model Management belongs to the basic module of the MES system. It is used to build core data such as product classification, product basic information, and abnormal/defect categories for the enterprise, providing product basic data support for production planning, work order execution, quality management, and other business modules.
**Core Functions:**
- Product List: Maintain basic product information, support product classification management and multi-level product structure
- Abnormal/Defect Management: Maintain abnormal/defect categories for products, bind device categories for quality anomaly recording during production
**Function Screenshot**:
![Product Model Function Screenshot](/public/image_en/product_model/图片:产品模型功能截图.png)
## 2. Term Explanation
| Term | Definition | Description |
|------|------------|-------------|
| Product List | Product List, records basic product information and classification | Basic data for production execution and quality management |
| Abnormal/Defect | Abnormal/Defect, abnormal situations occurring during production | Including NG (Not Good) and ERR (Error) types |
| Defect Category | Defect Category, classification management of abnormal/defects | Used to distinguish different types of abnormalities |
| Device Category | Device Category, classification management of devices | Abnormal/defects are bound to device categories for anomaly recording on specific devices |
| NG | Not Good, non-conforming product | Products judged as non-conforming during production |
| ERR | Error, error | Error information occurring during system or device operation |
**Data Model Relationship Description:**
```mermaid
flowchart TB
subgraph Product List
P1[Product]
P2[Product]
end
subgraph Process Flow
PF1[Process Flow A]
PF2[Process Flow B]
end
subgraph Abnormal/Defect Management
D1[NG Defect Category]
D2[ERR Error Category]
end
subgraph Device Category
DC1[Device Category]
DC2[Device Category]
end
P1 -->|1:N| PF1
P2 -->|1:N| PF2
DC1 -->|1:N| D1
DC2 -->|1:N| D2
```
**Relationship Description:**
| Relationship Type | Description |
|------------------|-------------|
| Product List → Process Flow | **1 to N**: A product can be configured with multiple process flows |
| Device Category → Abnormal/Defect Management | **1 to N**: A device category can be configured with multiple abnormal/defect categories |
## 3. Product Model Interaction Flow
### 3.1 Product List Management
#### 3.1.1 Product List Description
Product list is core data recording basic product information, including product model, product name, etc. It is the foundation of enterprise production execution and quality management.
**Product List Characteristics:**
- Relevance: Product information can be referenced by process flows
**Function Screenshot**:
![Product List Screenshot](/public/image_en/product_model/图片:产品列表截图.png)
#### 3.1.2 Add Product
**Operation Steps:**
1. Go to [Production Configuration] → [Product Model] → [Product List]
2. Click [Add] button
3. Fill in basic product information
4. Click [Save] to complete product creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Product Model | Unique identification code of the product | Yes |
| Product Name | Name of the product | Yes |
| Remarks | Other supplementary information | No |
**[Important]** The product model cannot be modified after creation. Please confirm carefully when creating.
**[Important]** Once a product is referenced by a process flow or work order, it cannot be deleted.
**Function Screenshot**:
![Add Product Screenshot](/public/image_en/product_model/图片:新增产品截图.png)
#### 3.1.3 Product Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Product Model | Exact query by product model |
| Product Name | Fuzzy query by product name |
| Product Category | Filter by product category |
**Function Screenshot**:
![Product Query List Screenshot](/public/image_en/product_model/图片:产品查询列表截图.png)
### 3.2 Abnormal/Defect Management
#### 3.2.1 Abnormal/Defect Management Description
Abnormal/Defect Management is used to record abnormal situations occurring during production, including two types: NG (Not Good - non-conforming products) and ERR (Error - errors). Abnormal/defect categories are bound to device categories for anomaly recording in specific device processes.
**Abnormal/Defect Types:**
| Type | Description |
|------|-------------|
| NG | Not Good, non-conforming product, products judged as non-conforming during production |
| ERR | Error, system or device runtime errors |
**Function Screenshot**:
![Abnormal/Defect Management List Screenshot](/public/image_en/product_model/图片:异常不良管理列表截图.png)
#### 3.2.2 Add Abnormal/Defect Category
**Operation Steps:**
1. Go to [Production Configuration] → [Product Model] → [Abnormal/Defect Management]
2. Click [Add] button
3. Select abnormal type (NG/ERR)
4. Fill in abnormal/defect category information
5. Select the bound device category
6. Click [Save] to complete abnormal/defect category creation
**Field Description:**
| Field | Description | Required |
|-------|-------------|----------|
| Abnormal Category Code | Unique identification code of the abnormal category | Yes |
| Abnormal Category Name | Name of the abnormal category, e.g., "Short Circuit", "Open Circuit" | Yes |
| Abnormal Type | NG (Non-conforming) / ERR (Error) | Yes |
| Device Category | Bound device category for anomaly recording on specific devices | Yes |
| Remarks | Other supplementary information | No |
**[Important]** The abnormal category code cannot be modified after creation.
**[Important]** Once an abnormal/defect category is used, it cannot be deleted.
**Function Screenshot**:
![Add Abnormal/Defect Category Screenshot](/public/image_en/product_model/图片:新增异常不良类别截图.png)
#### 3.2.3 Abnormal/Defect Category Query
**Query Conditions:**
| Query Condition | Description |
|----------------|-------------|
| Abnormal Category Code | Exact query by abnormal category code |
| Abnormal Category Name | Fuzzy query by abnormal category name |
| Abnormal Type | Filter by abnormal type: NG / ERR |
| Device Category | Filter by bound device category |
**Function Screenshot**:
![Abnormal/Defect Category Query List Screenshot](/public/image_en/product_model/图片:异常不良类别查询列表截图.png)
#### 3.2.4 Import Abnormal/Defect Categories
The import function supports batch importing abnormal/defect category data to improve data maintenance efficiency.
**Operation Steps:**
1. Go to [Production Configuration] → [Product Model] → [Abnormal/Defect Management]
2. Click [Import] button
3. Download the import template
4. Fill in abnormal/defect category data according to the template format
5. Click [Select File] to upload the completed Excel file
6. Click [Start Import] to execute data import
7. View the import result report
**Import Template Field Description:**
| Field | Description | Required | Example |
|-------|-------------|----------|---------|
| Abnormal Category Code | Unique identification code of the abnormal category | Yes | NG-001 |
| Abnormal Category Name | Name of the abnormal category | Yes | Short Circuit |
| Abnormal Type | NG (Non-conforming) / ERR (Error) | Yes | NG |
| Device Category Code | Bound device category code | Yes | DEV-SMT |
| Remarks | Other supplementary information | No | - |
**[Note]** Ensure the device category exists before importing.
**[Tip]** It is recommended to import a small amount of data first for verification, and then perform large-scale import after confirming the format is correct.
**Function Screenshot**:
![Import Abnormal/Defect Category Dialog Screenshot](/public/image_en/product_model/图片:导入异常不良类别对话框截图.png)
#### 3.2.5 Batch Delete Abnormal/Defect Categories
The batch delete function supports deleting multiple abnormal/defect categories at once to improve data cleaning efficiency.
**Operation Steps:**
1. Go to [Production Configuration] → [Product Model] → [Abnormal/Defect Management]
2. Check the abnormal/defect categories to delete in the list (multiple selection allowed)
3. Click [Batch Delete] button
4. Confirm deletion in the pop-up confirmation dialog
5. Click [OK] to execute batch deletion
**[Note]** Used abnormal/defect categories cannot be deleted.
**[Note]** Delete operations cannot be recovered. Please confirm carefully before deleting.
**[Tip]** It is recommended to query whether the category has been referenced by work orders or anomaly records before deletion.
**Function Screenshot**:
![Batch Delete Confirmation Dialog Screenshot](/public/image_en/product_model/图片:批量删除确认对话框截图.png)
### 3.3 Abnormal/Defect Management Description
Abnormal/Defect Management is independent of products and process flows, and only has a binding relationship with device categories. Abnormal/defect categories are used to record abnormal situations occurring in devices during production.
**[Important]** Abnormal/Defect Management is not associated with process flows, but is directly bound to device categories.
**[Important]** Multiple abnormal/defect categories can be bound to the same device category to achieve unified management of anomaly classification.