生产管理(未完成1)

This commit is contained in:
zc
2026-06-24 11:09:30 +08:00
parent 71cf559a19
commit 70b4ce5dde
28 changed files with 1822 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
package top.mes.admin.bom.mapper;
import top.continew.starter.data.mp.base.BaseMapper;
import top.mes.admin.bom.model.entity.BomDO;
import org.springframework.stereotype.Repository;
/**
* BOM物料清单 Mapper
*
* @author zc
* @since 2026/06/23 17:28
*/
@Repository
public interface BomMapper extends BaseMapper<BomDO> {
}

View File

@@ -0,0 +1,43 @@
package top.mes.admin.bom.model.entity;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import top.mes.admin.common.model.entity.BaseDO;
import java.io.Serial;
/**
* BOM物料清单实体
*
* @author zc
* @since 2026/06/23 17:28
*/
@Data
@TableName("sys_bom")
public class BomDO extends BaseDO {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String bomCode;
/**
* 名称
*/
private String bomName;
/**
* 类型0成品 1半成品
*/
private Integer bomType;
/**
* 说明
*/
private String remark;
}

View File

@@ -0,0 +1,54 @@
package top.mes.admin.bom.model.query;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.enums.QueryType;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
/**
* BOM物料清单查询条件
*
* @author zc
* @since 2026/06/23 17:28
*/
@Data
@Schema(description = "BOM物料清单查询条件")
public class BomQuery implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@Schema(description = "编号")
@Query(type = QueryType.EQ)
private String bomCode;
/**
* 名称
*/
@Schema(description = "名称")
@Query(type = QueryType.EQ)
private String bomName;
/**
* 类型0成品 1半成品
*/
@Schema(description = "类型0成品 1半成品")
@Query(type = QueryType.EQ)
private Integer bomType;
/**
*
*/
@Schema(description = "")
@Query(type = QueryType.EQ)
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,57 @@
package top.mes.admin.bom.model.req;
import jakarta.validation.constraints.*;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Length;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
/**
* 创建或修改BOM物料清单参数
*
* @author zc
* @since 2026/06/23 17:28
*/
@Data
@Schema(description = "创建或修改BOM物料清单参数")
public class BomReq implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@Schema(description = "编号")
@NotBlank(message = "编号不能为空")
@Length(max = 32, message = "编号长度不能超过 {max} 个字符")
private String bomCode;
/**
* 名称
*/
@Schema(description = "名称")
@NotBlank(message = "名称不能为空")
@Length(max = 100, message = "名称长度不能超过 {max} 个字符")
private String bomName;
/**
* 类型0成品 1半成品
*/
@Schema(description = "类型0成品 1半成品")
@NotNull(message = "类型0成品 1半成品不能为空")
private Integer bomType;
/**
* 说明
*/
@Schema(description = "说明")
@Length(max = 255, message = "说明长度不能超过 {max} 个字符")
private String remark;
}

View File

@@ -0,0 +1,56 @@
package top.mes.admin.bom.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
/**
* BOM物料清单详情信息
*
* @author zc
* @since 2026/06/23 17:28
*/
@Data
@ExcelIgnoreUnannotated
@Schema(description = "BOM物料清单详情信息")
public class BomDetailResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@Schema(description = "编号")
@ExcelProperty(value = "编号")
private String bomCode;
/**
* 名称
*/
@Schema(description = "名称")
@ExcelProperty(value = "名称")
private String bomName;
/**
* 类型0成品 1半成品
*/
@Schema(description = "类型0成品 1半成品")
@ExcelProperty(value = "类型0成品 1半成品")
private Integer bomType;
/**
* 说明
*/
@Schema(description = "说明")
@ExcelProperty(value = "说明")
private String remark;
}

View File

@@ -0,0 +1,60 @@
package top.mes.admin.bom.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
/**
* BOM物料清单信息
*
* @author zc
* @since 2026/06/23 17:28
*/
@Data
@Schema(description = "BOM物料清单信息")
public class BomResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编号
*/
@Schema(description = "编号")
private String bomCode;
/**
* 名称
*/
@Schema(description = "名称")
private String bomName;
/**
* 类型0成品 1半成品
*/
@Schema(description = "类型0成品 1半成品")
private String bomType;
/**
* 说明
*/
@Schema(description = "说明")
private String remark;
/**
*
*/
@Schema(description = "")
private Long updateUser;
/**
*
*/
@Schema(description = "")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,17 @@
package top.mes.admin.bom.service;
import top.continew.starter.extension.crud.service.BaseService;
import top.mes.admin.bom.model.query.BomQuery;
import top.mes.admin.bom.model.req.BomReq;
import top.mes.admin.bom.model.resp.BomDetailResp;
import top.mes.admin.bom.model.resp.BomResp;
/**
* BOM物料清单业务接口
*
* @author zc
* @since 2026/06/23 17:28
*/
public interface BomService extends BaseService<BomResp, BomResp, BomQuery, BomReq> {
}

View File

@@ -0,0 +1,26 @@
package top.mes.admin.bom.service.impl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import top.continew.starter.extension.crud.service.BaseServiceImpl;
import top.mes.admin.bom.mapper.BomMapper;
import top.mes.admin.bom.model.entity.BomDO;
import top.mes.admin.bom.model.query.BomQuery;
import top.mes.admin.bom.model.req.BomReq;
import top.mes.admin.bom.model.resp.BomDetailResp;
import top.mes.admin.bom.model.resp.BomResp;
import top.mes.admin.bom.service.BomService;
/**
* BOM物料清单业务实现
*
* @author zc
* @since 2026/06/23 17:28
*/
@Service
@RequiredArgsConstructor
public class BomServiceImpl extends BaseServiceImpl<BomMapper, BomDO, BomResp, BomResp, BomQuery, BomReq> implements BomService {
}

View File

@@ -0,0 +1,16 @@
package top.mes.admin.process.mapper;
import top.continew.starter.data.mp.base.BaseMapper;
import top.mes.admin.process.model.entity.ProcessDO;
import org.springframework.stereotype.Repository;
/**
* 工序基础信息 Mapper
*
* @author zc
* @since 2026/06/18 15:48
*/
@Repository
public interface ProcessMapper extends BaseMapper<ProcessDO> {
}

View File

@@ -0,0 +1,159 @@
package top.mes.admin.process.model.entity;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import top.mes.admin.common.model.entity.BaseDO;
import java.io.Serial;
import java.math.BigDecimal;
/**
* 工序基础信息实体
*
* @author zc
* @since 2026/06/18 15:48
*/
@Data
@TableName("sys_process")
public class ProcessDO extends BaseDO {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工序编号(唯一)
*/
private String processCode;
/**
* 工序名称
*/
private String processName;
/**
* 工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序
*/
private Integer processType;
/**
* 工序分类SMT、组装、测试
*/
private String processCategory;
/**
* 是否关键工序0-否 1-是
*/
private Integer isKeyProcess;
/**
* 是否特殊工序0-否 1-是
*/
private Integer isSpecialProcess;
/**
* 是否质量门禁0-否 1-是(必须检验合格才能流转)
*/
private Integer isQualityGate;
/**
* 标准工时(分钟/件)
*/
private Integer standardDurationMinutes;
/**
* 换型/准备时间(分钟)
*/
private Integer setupDurationMinutes;
/**
* 等待时间(分钟)
*/
private Integer waitingDurationMinutes;
/**
* 搬运时间(分钟)
*/
private Integer moveDurationMinutes;
/**
* 默认工作中心/设备组
*/
private String defaultWorkCenter;
/**
* 所需技能等级1-初级 2-中级 3-高级 4-专家
*/
private Integer requiredSkillLevel;
/**
* 最少操作人数
*/
private Integer minOperatorCount;
/**
* 工序参数模板
*/
private String parameterTemplate;
/**
* 是否需要质量检验0-否 1-是
*/
private Integer qualityCheckRequired;
/**
* 默认抽检比例(%
*/
private BigDecimal defaultCheckRate;
/**
* 允许不良率(%
*/
private BigDecimal allowableDefectRate;
/**
* 是否需要领料0-否 1-是
*/
private Integer needMaterial;
/**
* 发料方式1-按单发料 2-按工序发料 3-按线边仓发料
*/
private Integer materialIssueMethod;
/**
* 状态1-启用 0-停用 2-草稿 3-已废弃
*/
private Integer status;
/**
* 版本号(修改自动+1
*/
private Integer version;
/**
* 排序号
*/
private Integer sortOrder;
/**
* SOP文件URL
*/
private String sopUrl;
/**
* 操作视频URL
*/
private String videoUrl;
/**
* 备注
*/
private String remark;
/**
* 附件ID列表逗号分隔
*/
private String attachmentIds;
}

View File

@@ -0,0 +1,104 @@
package top.mes.admin.process.model.query;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.enums.QueryType;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
import java.math.BigDecimal;
/**
* 工序基础信息查询条件
*
* @author zc
* @since 2026/06/18 15:48
*/
@Data
@Schema(description = "工序基础信息查询条件")
public class ProcessQuery implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工序编号(唯一)
*/
@Schema(description = "工序编号(唯一)")
@Query(type = QueryType.EQ)
private String processCode;
/**
* 工序名称
*/
@Schema(description = "工序名称")
@Query(type = QueryType.EQ)
private String processName;
/**
* 工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序
*/
@Schema(description = "工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序")
@Query(type = QueryType.EQ)
private Integer processType;
/**
* 是否关键工序0-否 1-是
*/
@Schema(description = "是否关键工序0-否 1-是")
@Query(type = QueryType.EQ)
private Integer isKeyProcess;
/**
* 是否特殊工序0-否 1-是
*/
@Schema(description = "是否特殊工序0-否 1-是")
@Query(type = QueryType.EQ)
private Integer isSpecialProcess;
/**
* 是否质量门禁0-否 1-是(必须检验合格才能流转)
*/
@Schema(description = "是否质量门禁0-否 1-是(必须检验合格才能流转)")
@Query(type = QueryType.EQ)
private Integer isQualityGate;
/**
* 是否需要质量检验0-否 1-是
*/
@Schema(description = "是否需要质量检验0-否 1-是")
@Query(type = QueryType.EQ)
private Integer qualityCheckRequired;
/**
* 是否需要领料0-否 1-是
*/
@Schema(description = "是否需要领料0-否 1-是")
@Query(type = QueryType.EQ)
private Integer needMaterial;
/**
* 状态1-启用 0-停用 2-草稿 3-已废弃
*/
@Schema(description = "状态1-启用 0-停用 2-草稿 3-已废弃")
@Query(type = QueryType.EQ)
private Integer status;
/**
* 版本号(修改自动+1
*/
@Schema(description = "版本号(修改自动+1")
@Query(type = QueryType.EQ)
private Integer version;
/**
* 创建时间
*/
@Schema(description = "创建时间")
@Query(type = QueryType.EQ)
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,207 @@
package top.mes.admin.process.model.req;
import jakarta.validation.constraints.*;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Length;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
import java.math.BigDecimal;
/**
* 创建或修改工序基础信息参数
*
* @author zc
* @since 2026/06/18 15:48
*/
@Data
@Schema(description = "创建或修改工序基础信息参数")
public class ProcessReq implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工序编号(唯一)
*/
@Schema(description = "工序编号(唯一)")
@NotBlank(message = "工序编号(唯一)不能为空")
@Length(max = 32, message = "工序编号(唯一)长度不能超过 {max} 个字符")
private String processCode;
/**
* 工序名称
*/
@Schema(description = "工序名称")
@NotBlank(message = "工序名称不能为空")
@Length(max = 64, message = "工序名称长度不能超过 {max} 个字符")
private String processName;
/**
* 工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序
*/
@Schema(description = "工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序")
@NotNull(message = "工序类型不能为空")
private Integer processType;
/**
* 工序分类SMT、组装、测试
*/
@Schema(description = "工序分类")
@Length(max = 32, message = "工序分类长度不能超过 {max} 个字符")
private String processCategory;
/**
* 是否关键工序0-否 1-是
*/
@Schema(description = "是否关键工序0-否 1-是")
@NotNull(message = "是否关键工序不能为空")
private Integer isKeyProcess;
/**
* 是否特殊工序0-否 1-是
*/
@Schema(description = "是否特殊工序0-否 1-是")
@NotNull(message = "是否特殊工序不能为空")
private Integer isSpecialProcess;
/**
* 是否质量门禁0-否 1-是(必须检验合格才能流转)
*/
@Schema(description = "是否质量门禁0-否 1-是(必须检验合格才能流转)")
private Integer isQualityGate;
/**
* 标准工时(分钟/件)
*/
@Schema(description = "标准工时(分钟/件)")
private Integer standardDurationMinutes;
/**
* 换型/准备时间(分钟)
*/
@Schema(description = "换型/准备时间(分钟)")
private Integer setupDurationMinutes;
/**
* 等待时间(分钟)
*/
@Schema(description = "等待时间(分钟)")
private Integer waitingDurationMinutes;
/**
* 搬运时间(分钟)
*/
@Schema(description = "搬运时间(分钟)")
private Integer moveDurationMinutes;
/**
* 默认工作中心/设备组
*/
@Schema(description = "默认工作中心/设备组")
@Length(max = 32, message = "默认工作中心/设备组长度不能超过 {max} 个字符")
private String defaultWorkCenter;
/**
* 所需技能等级1-初级 2-中级 3-高级 4-专家
*/
@Schema(description = "所需技能等级1-初级 2-中级 3-高级 4-专家")
private Integer requiredSkillLevel;
/**
* 最少操作人数
*/
@Schema(description = "最少操作人数")
private Integer minOperatorCount;
/**
* 工序参数模板
*/
@Schema(description = "工序参数模板")
@Length(max = 1073741824, message = "工序参数模板长度不能超过 {max} 个字符")
private String parameterTemplate;
/**
* 是否需要质量检验0-否 1-是
*/
@Schema(description = "是否需要质量检验0-否 1-是")
@NotNull(message = "是否需要质量检验不能为空")
private Integer qualityCheckRequired;
/**
* 默认抽检比例(%
*/
@Schema(description = "默认抽检比例(%")
private BigDecimal defaultCheckRate;
/**
* 允许不良率(%
*/
@Schema(description = "允许不良率(%")
private BigDecimal allowableDefectRate;
/**
* 是否需要领料0-否 1-是
*/
@Schema(description = "是否需要领料0-否 1-是")
@NotNull(message = "是否需要领料不能为空")
private Integer needMaterial;
/**
* 发料方式1-按单发料 2-按工序发料 3-按线边仓发料
*/
@Schema(description = "发料方式1-按单发料 2-按工序发料 3-按线边仓发料")
private Integer materialIssueMethod;
/**
* 状态1-启用 0-停用 2-草稿 3-已废弃
*/
@Schema(description = "状态1-启用 0-停用 2-草稿 3-已废弃")
@NotNull(message = "状态不能为空")
private Integer status;
/**
* 版本号(修改自动+1
*/
@Schema(description = "版本号(修改自动+1")
private Integer version;
/**
* 排序号
*/
@Schema(description = "排序号")
private Integer sortOrder;
/**
* SOP文件URL
*/
@Schema(description = "SOP文件URL")
@Length(max = 500, message = "SOP文件URL长度不能超过 {max} 个字符")
private String sopUrl;
/**
* 操作视频URL
*/
@Schema(description = "操作视频URL")
@Length(max = 500, message = "操作视频URL长度不能超过 {max} 个字符")
private String videoUrl;
/**
* 备注
*/
@Schema(description = "备注")
@Length(max = 500, message = "备注长度不能超过 {max} 个字符")
private String remark;
/**
* 附件ID列表逗号分隔
*/
@Schema(description = "附件ID列表逗号分隔")
@Length(max = 500, message = "附件ID列表逗号分隔长度不能超过 {max} 个字符")
private String attachmentIds;
}

View File

@@ -0,0 +1,218 @@
package top.mes.admin.process.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
import java.math.BigDecimal;
/**
* 工序基础信息详情信息
*
* @author zc
* @since 2026/06/18 15:48
*/
@Data
@ExcelIgnoreUnannotated
@Schema(description = "工序基础信息详情信息")
public class ProcessDetailResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工序编号(唯一)
*/
@Schema(description = "工序编号(唯一)")
@ExcelProperty(value = "工序编号(唯一)")
private String processCode;
/**
* 工序名称
*/
@Schema(description = "工序名称")
@ExcelProperty(value = "工序名称")
private String processName;
/**
* 工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序
*/
@Schema(description = "工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序")
@ExcelProperty(value = "工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序")
private Integer processType;
/**
* 工序分类SMT、组装、测试
*/
@Schema(description = "工序分类SMT、组装、测试")
@ExcelProperty(value = "工序分类SMT、组装、测试")
private String processCategory;
/**
* 是否关键工序0-否 1-是
*/
@Schema(description = "是否关键工序0-否 1-是")
@ExcelProperty(value = "是否关键工序0-否 1-是")
private Integer isKeyProcess;
/**
* 是否特殊工序0-否 1-是
*/
@Schema(description = "是否特殊工序0-否 1-是")
@ExcelProperty(value = "是否特殊工序0-否 1-是")
private Integer isSpecialProcess;
/**
* 是否质量门禁0-否 1-是(必须检验合格才能流转)
*/
@Schema(description = "是否质量门禁0-否 1-是(必须检验合格才能流转)")
@ExcelProperty(value = "是否质量门禁0-否 1-是(必须检验合格才能流转)")
private Integer isQualityGate;
/**
* 标准工时(分钟/件)
*/
@Schema(description = "标准工时(分钟/件)")
@ExcelProperty(value = "标准工时(分钟/件)")
private Integer standardDurationMinutes;
/**
* 换型/准备时间(分钟)
*/
@Schema(description = "换型/准备时间(分钟)")
@ExcelProperty(value = "换型/准备时间(分钟)")
private Integer setupDurationMinutes;
/**
* 等待时间(分钟)
*/
@Schema(description = "等待时间(分钟)")
@ExcelProperty(value = "等待时间(分钟)")
private Integer waitingDurationMinutes;
/**
* 搬运时间(分钟)
*/
@Schema(description = "搬运时间(分钟)")
@ExcelProperty(value = "搬运时间(分钟)")
private Integer moveDurationMinutes;
/**
* 默认工作中心/设备组
*/
@Schema(description = "默认工作中心/设备组")
@ExcelProperty(value = "默认工作中心/设备组")
private String defaultWorkCenter;
/**
* 所需技能等级1-初级 2-中级 3-高级 4-专家
*/
@Schema(description = "所需技能等级1-初级 2-中级 3-高级 4-专家")
@ExcelProperty(value = "所需技能等级1-初级 2-中级 3-高级 4-专家")
private Integer requiredSkillLevel;
/**
* 最少操作人数
*/
@Schema(description = "最少操作人数")
@ExcelProperty(value = "最少操作人数")
private Integer minOperatorCount;
/**
* 工序参数模板
*/
@Schema(description = "工序参数模板")
@ExcelProperty(value = "工序参数模板")
private String parameterTemplate;
/**
* 是否需要质量检验0-否 1-是
*/
@Schema(description = "是否需要质量检验0-否 1-是")
@ExcelProperty(value = "是否需要质量检验0-否 1-是")
private Integer qualityCheckRequired;
/**
* 默认抽检比例(%
*/
@Schema(description = "默认抽检比例(%")
@ExcelProperty(value = "默认抽检比例(%")
private BigDecimal defaultCheckRate;
/**
* 允许不良率(%
*/
@Schema(description = "允许不良率(%")
@ExcelProperty(value = "允许不良率(%")
private BigDecimal allowableDefectRate;
/**
* 是否需要领料0-否 1-是
*/
@Schema(description = "是否需要领料0-否 1-是")
@ExcelProperty(value = "是否需要领料0-否 1-是")
private Integer needMaterial;
/**
* 发料方式1-按单发料 2-按工序发料 3-按线边仓发料
*/
@Schema(description = "发料方式1-按单发料 2-按工序发料 3-按线边仓发料")
@ExcelProperty(value = "发料方式1-按单发料 2-按工序发料 3-按线边仓发料")
private Integer materialIssueMethod;
/**
* 状态1-启用 0-停用 2-草稿 3-已废弃
*/
@Schema(description = "状态1-启用 0-停用 2-草稿 3-已废弃")
@ExcelProperty(value = "状态1-启用 0-停用 2-草稿 3-已废弃")
private Integer status;
/**
* 版本号(修改自动+1
*/
@Schema(description = "版本号(修改自动+1")
@ExcelProperty(value = "版本号(修改自动+1")
private Integer version;
/**
* 排序号
*/
@Schema(description = "排序号")
@ExcelProperty(value = "排序号")
private Integer sortOrder;
/**
* SOP文件URL
*/
@Schema(description = "SOP文件URL")
@ExcelProperty(value = "SOP文件URL")
private String sopUrl;
/**
* 操作视频URL
*/
@Schema(description = "操作视频URL")
@ExcelProperty(value = "操作视频URL")
private String videoUrl;
/**
* 备注
*/
@Schema(description = "备注")
@ExcelProperty(value = "备注")
private String remark;
/**
* 附件ID列表逗号分隔
*/
@Schema(description = "附件ID列表逗号分隔")
@ExcelProperty(value = "附件ID列表逗号分隔")
private String attachmentIds;
}

View File

@@ -0,0 +1,199 @@
package top.mes.admin.process.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
import java.math.BigDecimal;
/**
* 工序基础信息信息
*
* @author zc
* @since 2026/06/18 15:48
*/
@Data
@Schema(description = "工序基础信息信息")
public class ProcessResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工序编号(唯一)
*/
@Schema(description = "工序编号(唯一)")
private String processCode;
/**
* 工序名称
*/
@Schema(description = "工序名称")
private String processName;
/**
* 工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序
*/
@Schema(description = "工序类型1-生产工序 2-检测工序 3-返工工序 4-包装工序 5-仓储工序 6-物流工序")
private String processType;
/**
* 工序分类SMT、组装、测试
*/
@Schema(description = "工序分类SMT、组装、测试")
private String processCategory;
/**
* 是否关键工序0-否 1-是
*/
@Schema(description = "是否关键工序0-否 1-是")
private String isKeyProcess;
/**
* 是否特殊工序0-否 1-是
*/
@Schema(description = "是否特殊工序0-否 1-是")
private String isSpecialProcess;
/**
* 是否质量门禁0-否 1-是(必须检验合格才能流转)
*/
@Schema(description = "是否质量门禁0-否 1-是(必须检验合格才能流转)")
private String isQualityGate;
/**
* 标准工时(分钟/件)
*/
@Schema(description = "标准工时(分钟/件)")
private Integer standardDurationMinutes;
/**
* 换型/准备时间(分钟)
*/
@Schema(description = "换型/准备时间(分钟)")
private Integer setupDurationMinutes;
/**
* 等待时间(分钟)
*/
@Schema(description = "等待时间(分钟)")
private Integer waitingDurationMinutes;
/**
* 搬运时间(分钟)
*/
@Schema(description = "搬运时间(分钟)")
private Integer moveDurationMinutes;
/**
* 默认工作中心/设备组
*/
@Schema(description = "默认工作中心/设备组")
private String defaultWorkCenter;
/**
* 所需技能等级1-初级 2-中级 3-高级 4-专家
*/
@Schema(description = "所需技能等级1-初级 2-中级 3-高级 4-专家")
private String requiredSkillLevel;
/**
* 最少操作人数
*/
@Schema(description = "最少操作人数")
private Integer minOperatorCount;
/**
* 工序参数模板
*/
@Schema(description = "工序参数模板")
private String parameterTemplate;
/**
* 是否需要质量检验0-否 1-是
*/
@Schema(description = "是否需要质量检验0-否 1-是")
private String qualityCheckRequired;
/**
* 默认抽检比例(%
*/
@Schema(description = "默认抽检比例(%")
private BigDecimal defaultCheckRate;
/**
* 允许不良率(%
*/
@Schema(description = "允许不良率(%")
private BigDecimal allowableDefectRate;
/**
* 是否需要领料0-否 1-是
*/
@Schema(description = "是否需要领料0-否 1-是")
private String needMaterial;
/**
* 发料方式1-按单发料 2-按工序发料 3-按线边仓发料
*/
@Schema(description = "发料方式1-按单发料 2-按工序发料 3-按线边仓发料")
private String materialIssueMethod;
/**
* 状态1-启用 0-停用 2-草稿 3-已废弃
*/
@Schema(description = "状态1-启用 0-停用 2-草稿 3-已废弃")
private String status;
/**
* 版本号(修改自动+1
*/
@Schema(description = "版本号(修改自动+1")
private Integer version;
/**
* 排序号
*/
@Schema(description = "排序号")
private Integer sortOrder;
/**
* SOP文件URL
*/
@Schema(description = "SOP文件URL")
private String sopUrl;
/**
* 操作视频URL
*/
@Schema(description = "操作视频URL")
private String videoUrl;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 附件ID列表逗号分隔
*/
@Schema(description = "附件ID列表逗号分隔")
private String attachmentIds;
/**
* 修改人
*/
@Schema(description = "修改人")
private Long updateUser;
/**
* 修改时间
*/
@Schema(description = "修改时间")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,17 @@
package top.mes.admin.process.service;
import top.continew.starter.extension.crud.service.BaseService;
import top.mes.admin.process.model.query.ProcessQuery;
import top.mes.admin.process.model.req.ProcessReq;
import top.mes.admin.process.model.resp.ProcessDetailResp;
import top.mes.admin.process.model.resp.ProcessResp;
/**
* 工序基础信息业务接口
*
* @author zc
* @since 2026/06/18 15:48
*/
public interface ProcessService extends BaseService<ProcessResp, ProcessResp, ProcessQuery, ProcessReq> {
}

View File

@@ -0,0 +1,26 @@
package top.mes.admin.process.service.impl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import top.continew.starter.extension.crud.service.BaseServiceImpl;
import top.mes.admin.process.mapper.ProcessMapper;
import top.mes.admin.process.model.entity.ProcessDO;
import top.mes.admin.process.model.query.ProcessQuery;
import top.mes.admin.process.model.req.ProcessReq;
import top.mes.admin.process.model.resp.ProcessDetailResp;
import top.mes.admin.process.model.resp.ProcessResp;
import top.mes.admin.process.service.ProcessService;
/**
* 工序基础信息业务实现
*
* @author zc
* @since 2026/06/18 15:48
*/
@Service
@RequiredArgsConstructor
public class ProcessServiceImpl extends BaseServiceImpl<ProcessMapper, ProcessDO, ProcessResp, ProcessResp, ProcessQuery, ProcessReq> implements ProcessService {
}

View File

@@ -0,0 +1,16 @@
package top.mes.admin.routing.mapper;
import top.continew.starter.data.mp.base.BaseMapper;
import top.mes.admin.routing.model.entity.RoutingDO;
import org.springframework.stereotype.Repository;
/**
* 工艺路线主 Mapper
*
* @author zc
* @since 2026/06/23 15:53
*/
@Repository
public interface RoutingMapper extends BaseMapper<RoutingDO> {
}

View File

@@ -0,0 +1,68 @@
package top.mes.admin.routing.model.entity;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import top.mes.admin.common.model.entity.BaseDO;
import java.io.Serial;
/**
* 工艺路线主实体
*
* @author zc
* @since 2026/06/23 15:53
*/
@Data
@TableName("sys_routing")
public class RoutingDO extends BaseDO {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工艺路线编码
*/
private String routingCode;
/**
* 工艺路线名称
*/
private String routingName;
/**
* 关联产品ID适用产品
*/
private Long productId;
/**
* 适用产品分类(如不指定具体产品)
*/
private String productCategory;
/**
* 默认产线ID
*/
private Long lineId;
/**
* 版本号
*/
private Integer version;
/**
* 是否启用0-否 1-是
*/
private Integer isActive;
/**
* 状态1-草稿 2-已发布 3-已废弃
*/
private Integer status;
/**
* 备注
*/
private String remark;
}

View File

@@ -0,0 +1,61 @@
package top.mes.admin.routing.model.query;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.enums.QueryType;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
/**
* 工艺路线主查询条件
*
* @author zc
* @since 2026/06/23 15:53
*/
@Data
@Schema(description = "工艺路线主查询条件")
public class RoutingQuery implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工艺路线编码
*/
@Schema(description = "工艺路线编码")
@Query(type = QueryType.EQ)
private String routingCode;
/**
* 工艺路线名称
*/
@Schema(description = "工艺路线名称")
@Query(type = QueryType.EQ)
private String routingName;
/**
* 版本号
*/
@Schema(description = "版本号")
@Query(type = QueryType.EQ)
private Integer version;
/**
* 是否启用0-否 1-是
*/
@Schema(description = "是否启用0-否 1-是")
@Query(type = QueryType.EQ)
private Integer isActive;
/**
* 状态1-草稿 2-已发布 3-已废弃
*/
@Schema(description = "状态1-草稿 2-已发布 3-已废弃")
@Query(type = QueryType.EQ)
private Integer status;
}

View File

@@ -0,0 +1,90 @@
package top.mes.admin.routing.model.req;
import jakarta.validation.constraints.*;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Length;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
/**
* 创建或修改工艺路线主参数
*
* @author zc
* @since 2026/06/23 15:53
*/
@Data
@Schema(description = "创建或修改工艺路线主参数")
public class RoutingReq implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工艺路线编码
*/
@Schema(description = "工艺路线编码")
@NotBlank(message = "工艺路线编码不能为空")
@Length(max = 32, message = "工艺路线编码长度不能超过 {max} 个字符")
private String routingCode;
/**
* 工艺路线名称
*/
@Schema(description = "工艺路线名称")
@NotBlank(message = "工艺路线名称不能为空")
@Length(max = 64, message = "工艺路线名称长度不能超过 {max} 个字符")
private String routingName;
/**
* 关联产品ID适用产品
*/
@Schema(description = "关联产品ID适用产品")
private Long productId;
/**
* 适用产品分类(如不指定具体产品)
*/
@Schema(description = "适用产品分类(如不指定具体产品)")
@Length(max = 32, message = "适用产品分类(如不指定具体产品)长度不能超过 {max} 个字符")
private String productCategory;
/**
* 默认产线ID
*/
@Schema(description = "默认产线ID")
private Long lineId;
/**
* 版本号
*/
@Schema(description = "版本号")
@NotNull(message = "版本号不能为空")
private Integer version;
/**
* 是否启用0-否 1-是
*/
@Schema(description = "是否启用0-否 1-是")
@NotNull(message = "是否启用0-否 1-是不能为空")
private Integer isActive;
/**
* 状态1-草稿 2-已发布 3-已废弃
*/
@Schema(description = "状态1-草稿 2-已发布 3-已废弃")
@NotNull(message = "状态1-草稿 2-已发布 3-已废弃不能为空")
private Integer status;
/**
* 备注
*/
@Schema(description = "备注")
@Length(max = 255, message = "备注长度不能超过 {max} 个字符")
private String remark;
}

View File

@@ -0,0 +1,91 @@
package top.mes.admin.routing.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
/**
* 工艺路线主详情信息
*
* @author zc
* @since 2026/06/23 15:53
*/
@Data
@ExcelIgnoreUnannotated
@Schema(description = "工艺路线主详情信息")
public class RoutingDetailResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工艺路线编码
*/
@Schema(description = "工艺路线编码")
@ExcelProperty(value = "工艺路线编码")
private String routingCode;
/**
* 工艺路线名称
*/
@Schema(description = "工艺路线名称")
@ExcelProperty(value = "工艺路线名称")
private String routingName;
/**
* 关联产品ID适用产品
*/
@Schema(description = "关联产品ID适用产品")
@ExcelProperty(value = "关联产品ID适用产品")
private Long productId;
/**
* 适用产品分类(如不指定具体产品)
*/
@Schema(description = "适用产品分类(如不指定具体产品)")
@ExcelProperty(value = "适用产品分类(如不指定具体产品)")
private String productCategory;
/**
* 默认产线ID
*/
@Schema(description = "默认产线ID")
@ExcelProperty(value = "默认产线ID")
private Long lineId;
/**
* 版本号
*/
@Schema(description = "版本号")
@ExcelProperty(value = "版本号")
private Integer version;
/**
* 是否启用0-否 1-是
*/
@Schema(description = "是否启用0-否 1-是")
@ExcelProperty(value = "是否启用0-否 1-是")
private Integer isActive;
/**
* 状态1-草稿 2-已发布 3-已废弃
*/
@Schema(description = "状态1-草稿 2-已发布 3-已废弃")
@ExcelProperty(value = "状态1-草稿 2-已发布 3-已废弃")
private Integer status;
/**
* 备注
*/
@Schema(description = "备注")
@ExcelProperty(value = "备注")
private String remark;
}

View File

@@ -0,0 +1,90 @@
package top.mes.admin.routing.model.resp;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import top.mes.admin.common.model.resp.BaseDetailResp;
import java.io.Serial;
import java.time.*;
/**
* 工艺路线主信息
*
* @author zc
* @since 2026/06/23 15:53
*/
@Data
@Schema(description = "工艺路线主信息")
public class RoutingResp extends BaseDetailResp {
@Serial
private static final long serialVersionUID = 1L;
/**
* 工艺路线编码
*/
@Schema(description = "工艺路线编码")
private String routingCode;
/**
* 工艺路线名称
*/
@Schema(description = "工艺路线名称")
private String routingName;
/**
* 关联产品ID适用产品
*/
@Schema(description = "关联产品ID适用产品")
private Long productId;
/**
* 适用产品分类(如不指定具体产品)
*/
@Schema(description = "适用产品分类(如不指定具体产品)")
private String productCategory;
/**
* 默认产线ID
*/
@Schema(description = "默认产线ID")
private Long lineId;
/**
* 版本号
*/
@Schema(description = "版本号")
private Integer version;
/**
* 是否启用0-否 1-是
*/
@Schema(description = "是否启用0-否 1-是")
private Integer isActive;
/**
* 状态1-草稿 2-已发布 3-已废弃
*/
@Schema(description = "状态1-草稿 2-已发布 3-已废弃")
private Integer status;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 修改人
*/
@Schema(description = "修改人")
private Long updateUser;
/**
* 修改时间
*/
@Schema(description = "修改时间")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,17 @@
package top.mes.admin.routing.service;
import top.continew.starter.extension.crud.service.BaseService;
import top.mes.admin.routing.model.query.RoutingQuery;
import top.mes.admin.routing.model.req.RoutingReq;
import top.mes.admin.routing.model.resp.RoutingDetailResp;
import top.mes.admin.routing.model.resp.RoutingResp;
/**
* 工艺路线主业务接口
*
* @author zc
* @since 2026/06/23 15:53
*/
public interface RoutingService extends BaseService<RoutingResp, RoutingResp, RoutingQuery, RoutingReq> {
}

View File

@@ -0,0 +1,26 @@
package top.mes.admin.routing.service.impl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import top.continew.starter.extension.crud.service.BaseServiceImpl;
import top.mes.admin.routing.mapper.RoutingMapper;
import top.mes.admin.routing.model.entity.RoutingDO;
import top.mes.admin.routing.model.query.RoutingQuery;
import top.mes.admin.routing.model.req.RoutingReq;
import top.mes.admin.routing.model.resp.RoutingDetailResp;
import top.mes.admin.routing.model.resp.RoutingResp;
import top.mes.admin.routing.service.RoutingService;
/**
* 工艺路线主业务实现
*
* @author zc
* @since 2026/06/23 15:53
*/
@Service
@RequiredArgsConstructor
public class RoutingServiceImpl extends BaseServiceImpl<RoutingMapper, RoutingDO, RoutingResp, RoutingResp, RoutingQuery, RoutingReq> implements RoutingService {
}

View File

@@ -33,7 +33,7 @@ export function list${classNamePrefix}(query: ${classNamePrefix}PageQuery) {
/** @desc 查询${businessName}详情 */
export function get${classNamePrefix}(id: string) {
return http.get<${classNamePrefix}DetailResp>(`${'$'}{BASE_URL}/${'$'}{id}`)
return http.get<${classNamePrefix}Resp>(`${'$'}{BASE_URL}/${'$'}{id}`)
}
/** @desc 新增${businessName} */

View File

@@ -0,0 +1,29 @@
package top.mes.admin.controller.bom;
import top.continew.starter.extension.crud.enums.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.mes.admin.common.controller.BaseController;
import top.mes.admin.bom.model.query.BomQuery;
import top.mes.admin.bom.model.req.BomReq;
import top.mes.admin.bom.model.resp.BomResp;
import top.mes.admin.bom.service.BomService;
/**
* BOM物料清单管理 API
*
* @author zc
* @since 2026/06/23 17:28
*/
@Tag(name = "BOM物料清单管理 API")
@RestController
@RequiredArgsConstructor
@CrudRequestMapping(value = "/bom/bom", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
public class BomController extends BaseController<BomService, BomResp, BomResp, BomQuery, BomReq> {
}

View File

@@ -0,0 +1,29 @@
package top.mes.admin.controller.process;
import top.continew.starter.extension.crud.enums.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.mes.admin.common.controller.BaseController;
import top.mes.admin.process.model.query.ProcessQuery;
import top.mes.admin.process.model.req.ProcessReq;
import top.mes.admin.process.model.resp.ProcessResp;
import top.mes.admin.process.service.ProcessService;
/**
* 工序基础信息管理 API
*
* @author zc
* @since 2026/06/18 15:48
*/
@Tag(name = "工序基础信息管理 API")
@RestController
@RequiredArgsConstructor
@CrudRequestMapping(value = "/process/process", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
public class ProcessController extends BaseController<ProcessService, ProcessResp, ProcessResp, ProcessQuery, ProcessReq> {
}

View File

@@ -0,0 +1,29 @@
package top.mes.admin.controller.routing;
import top.continew.starter.extension.crud.enums.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.mes.admin.common.controller.BaseController;
import top.mes.admin.routing.model.query.RoutingQuery;
import top.mes.admin.routing.model.req.RoutingReq;
import top.mes.admin.routing.model.resp.RoutingResp;
import top.mes.admin.routing.service.RoutingService;
/**
* 工艺路线主管理 API
*
* @author zc
* @since 2026/06/23 15:53
*/
@Tag(name = "工艺路线主管理 API")
@RestController
@RequiredArgsConstructor
@CrudRequestMapping(value = "/routing/routing", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
public class RoutingController extends BaseController<RoutingService, RoutingResp, RoutingResp, RoutingQuery, RoutingReq> {
}