diff --git a/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj b/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj index 9ae5013..035b1ff 100644 --- a/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj +++ b/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj @@ -25,10 +25,8 @@ - - diff --git a/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml b/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml index 8798dff..2b7b29d 100644 --- a/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml +++ b/backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml @@ -204,152 +204,7 @@ 点位编码 - - - 名 称 :胖子天骄桶管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/14 11:33:10 - 描 述 : - - - - - 桶名称 - - - - - 桶编号 - - - - - 名 称 :桶原料记录 - 创 建 人 :yangxiao - 创建时间 : 2023/7/14 11:47:33 - 描 述 : - - - - - 桶Id - - - - - 物料Id - - - - - 添加时间 - - - - - 名 称 :胖子天骄工艺基础信息 - 创 建 人 :yangxiao - 创建时间 : 2023/7/14 14:43:37 - 描 述 : - - - - - 工艺名称 - - - - - 设备区分 - - - - - 工艺描述 - - - - - 名 称 :工艺路线 - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 17:01:26 - 描 述 : - - - - - 步骤Id - - - - - 步骤 - - - - - 名称 - - - - - 单位 - - - - - 功能参数 - - - - - 功能值 物料信息 - - - - - 功能描述 - - - - - 名 称 :胖子天骄设备基础表 - 创 建 人 :yangxiao - 创建时间 : 2023/7/14 11:26:34 - 描 述 : - - - - - 名称 - - - - - 编码 - - - - - 设备类型 - - - - - 设备描述 - - - - - 设备维保时间 - - - - - 设备创建时间 - - - + 名 称 :胖子天骄成品基础信息管理 创 建 人 :yangxiao @@ -357,68 +212,32 @@ 描 述 : - + 成品编号 - + 成品名称 - + 配方Id - + 工艺Id - + 添加时间 - - - 名 称 :产线设备 - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 16:45:05 - 描 述 : - - - - - 产线Id - - - - - 产线设备 - - - - - 名 称 :产线料仓 - 创 建 人 :yangxiao - 创建时间 :2023/7/20 16:45:40 - 描 述 : - - - - - 产线Id - - - - - 产线料仓 - - - + 名 称 :胖子天骄原料管理 创 建 人 :yangxiao @@ -426,55 +245,27 @@ 描 述 : - + 原料名称 - + 原料编号 - + 原料单位 - + 原料分组 - - - 名 称 :胖子天骄料仓管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/14 11:31:34 - 描 述 : - - - - - 料仓编码 - - - - - 料仓名称 - - - - - 物料Id - - - - - 料仓容积 - - - + 名 称 :工单基础信息 创 建 人 :yangxiao @@ -482,32 +273,32 @@ 描 述 : - + 工单名称 - + 产线Id - + 成品Id - + 产量 - + 创建时间 - + 名 称 :工单拆分 创 建 人 :yangxiao @@ -515,17 +306,17 @@ 描 述 : - + 工单名称 - + 产量 - + 名 称 :工单状态 创 建 人 :yangxiao @@ -533,103 +324,21 @@ 描 述 : - + 工单Id - + 工单状态 - + 创建时间 - - - 名 称 :设备配方表 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 13:57:00 - 描 述 : - - - - - 设备Id - - - - - 配方Id - - - - - 名 称 :设备 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 13:51:45 - 描 述 : - - - - - 名称 - - - - - 编码 - - - - - 名 称 :分组信息 - 创 建 人 :yangxiao - 创建时间 : 2023/3/10 14:01:15 - 描 述 : - - - - - 名称 - - - - - 介绍 - - - - - 名 称 :物料 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 13:52:00 - 描 述 : - - - - - 名称 - - - - - 编码 - - - - - 单位 - - - - - 每秒出水量(g) - - 名 称 : @@ -740,24 +449,6 @@ 描述 - - - 名 称 :配方分组 - 创 建 人 :yangxiao - 创建时间 : 2023/3/10 14:56:03 - 描 述 : - - - - - 组Id - - - - - 产品Id - - 名 称 :配方信息 @@ -776,32 +467,27 @@ 自定义编码 - + - 名 称 :店铺信息 + 名 称 : 创 建 人 :yangxiao - 创建时间 : 2023/3/2 13:52:13 + 创建时间 : 2023/7/31 18:23:50 描 述 : - + 名称 - - - 地址 - - - + - 联系电话 + 编码 - + - 负责人 + 描述 @@ -1148,1912 +834,111 @@ 描 述 : - - - 初始化数据库 - - - - - - 名 称 : - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 15:43:00 - 描 述 : - - - - - 桶名称 - - - - - 桶编号 - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 编码 - - - - - 输出 - - - - - 主键 - - - - - 当前原料名称 - - - - - 名 称 : - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 17:29:52 - 描 述 : - - - - - 桶Id - - - - - 物料Id - - - - - 添加时间 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 编码 - - - - - 桶Id - - - - - 输出 - - - - - 主键 - - - - - 原料名称 - - - - - 桶名称 - - - - - 名 称 :桶服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础数据管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - - 更新 - - - - - - - - 名 称 :桶记录 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础数据管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 更新 - - - - - - - - 名 称 : - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 15:43:10 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :桶记录 - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 17:37:03 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 查询单条 - - - - - - - 名 称 :产品分组 - 创 建 人 :yangxiao - 创建时间 : 2023/3/10 13:59:43 - 描 述 : - - - - - 工艺名称 - - - - - 设备类型 0:炒锅 1:反应釜 - - - - - 工艺描述 - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 设备类型 0:炒锅 1:反应釜 - - - - - 不分页 - - - - - 输出 - - - - - 主键 - - - - - - 名 称 :产线管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/18 14:03:27 - 描 述 : - - - - - 步骤Id - - - - - 步骤 - - - - - 名称 - - - - - 单位 - - - - - 功能参数 - - - - - 功能值 物料信息 - - - - - 功能描述 - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 编码 - - - - - 工艺Id - - - - - 输出 - - - - - 主键 - - - - - 名 称 :工艺信息 - 创 建 人 :yangxiao - 创建时间 :2023/3/10 14:03:06 - 描 述 :配方工艺管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - 更新 - - - - - - - - 名 称 :工艺路线服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :CraftsInfo 工艺管理 CraftsSteps工艺步骤管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - - 更新 - - - - - - - - 名 称 :工艺信息 - 创 建 人 :yangxiao - 创建时间 :2023/3/10 14:03:21 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :产线管理 - 创 建 人 :yangxiao - 创建时间 :2023/7/18 14:05:16 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :设备Dto类 - 创 建 人 :yangxiao - 创建时间 : 2023/3/2 16:12:06 - 描 述 : - - - - - 增加 - - - - - 更新 - - - - - 删除 - - - - - 主键 - - - - - 不分页 - - - - - 设备Id - - - - - 分页 - - - - - 设备Id - - - - - 配方数组 - - - - - 输出 - - - - - 设备名称 - - - - - 配方名称 - - - - - 配方代码 - - - - - 分组Id - - - - - 分组名称 - - - - - 配方图片地址 - - - - - 名 称 :设备Dto类 - 创 建 人 :yangxiao - 创建时间 : 2023/3/2 16:12:06 - 描 述 : - - - - - 名称 - - 设备名称 - - - - 编码 - - - - - 设备类型 - - - - - 设备描述 - - 设备描述 - - - - 设备维保时间 - - 2023-7-17 - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 编码 - - - - - 输出 - - - - - 主键 - - - - - 名 称 :设备服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础信息管理 - - - - - 增加 - - - - - - - 批量下发配方 - - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 更新 - - - - - - - - 名 称 :设备服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础数据管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - - 更新 - - - - - - - - 名 称 :设备配方服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 18:30:58 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 查询单条 - - - - - - - 批量下发配方 - - - - - - - 名 称 :设备服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 18:30:58 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :成品管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 15:59:39 - 描 述 : - - - - - 成品编号 - - - - - 成品名称 - - - - - 配方Id - - - - - 工艺Id - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 编码 - - - - - 输出 - - - - - 主键 - - - - - 配方名称 - - - - - 工艺名称 - - - - - 名 称 :成品管理服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础数据管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - - 更新 - - - - - - - - 名 称 :成品信息管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/17 16:02:25 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :设备Dto类 - 创 建 人 :yangxiao - 创建时间 : 2023/3/2 16:12:06 - 描 述 : - - - - - 原料名称 - - - - - - 原料编号 - - - - - - 原料单位 - - - - - - 原料分组 - - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - - 删除 - - - - - 主键 - - - - - - 分页 - - - - - 名称 - - - - - - 编码 - - - - - - 输出 - - - - - 主键 - - - - - - 名 称 :物料服务 - 创 建 人 :yangxiao - 创建时间 :2023/3/2 18:31:53 - 描 述 : - - - - - 增加 - - - - - - 移除 - - - - - - 更新 - - - - - - 不分页列表 - - - - - - 分页列表 - - - - - - 下拉列表 - - - - - - 查询单条 - - - - - - - 名 称 :原料服务 - 创 建 人 :yangxiao - 创建时间 :2023年7月17日15:41:09 - 描 述 :基础数据管理 - - - - - 增加 - - - - - - - 删除 - - - - - - - - 详情 - - - - - - - - 列表 - - - - - - - 分页 - - - - - - - 下拉 - - - - - - - 更新 - - - - - - - - 名 称 : - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 15:15:48 - 描 述 : - - - - - 操作标题 - - - - - 内容 - - - - - 创建时间 - - - - - 增加 - - - - - 名 称 :日志服务 - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 15:17:58 - 描 述 : - - - - - 增加 - - - - - - 名 称 :操作日志 - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 15:17:24 - 描 述 : - - - - - 名 称 :产品分组 - 创 建 人 :yangxiao - 创建时间 : 2023/3/10 13:59:43 - 描 述 : - - - - - 名称 - - - - - 介绍 - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - - - 主键 - - - - - 分页 - - - - - 名称 - - - - - 输出 - - - - - 主键 - - - - - - 名 称 :产线设备 - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 17:00:32 - 描 述 : - - - - - 产线Id - - - - - 产线设备 - - - - - 产线设备分页 - - - - - 名称 - - - - - 产线Id - - - - - 删除产线设备 - - - - - 主键 - - - - - 产线设备关联信息 - - - - - 主键 - - - - - 名称 - - 设备名称 - - - - 编码 - - - - - 设备类型 - - - - - 设备描述 - - 设备描述 - - - - 名 称 :产线管理 - 创 建 人 :yangxiao - 创建时间 : 2023/7/18 14:03:27 - 描 述 : - - - - - 产线名称 - - - - - 产线编码 - - - - - 产线描述 - - - - - 增加 - - - - - 更新 - - - - - 主键 - - - - - 删除 - - - + - 主键 + 初始化数据库 + - + - 分页 + 名 称 :成品管理 + 创 建 人 :yangxiao + 创建时间 : 2023/7/17 15:59:39 + 描 述 : - + - 名称 + 成品编号 - + - 编码 + 成品名称 - + - 输出 + 配方Id - + - 主键 + 工艺Id - + - 名 称 : - 创 建 人 :yangxiao - 创建时间 : 2023/7/20 18:25:18 - 描 述 : + 增加 - + - 产线Id + 更新 - + - 产线设备 + 主键 - + - 产线设备分页 + 删除 - + - 名称 + 主键 - + - 产线Id + 分页 - + - 删除产线设备 + 名称 - + - 主键 + 编码 - + - 产线设备关联信息 + 输出 - + 主键 - - - 名称 - - 设备名称 - - + - 编码 + 配方名称 - + - 名 称 :分组信息 + 名 称 :成品管理服务 创 建 人 :yangxiao - 创建时间 :2023/3/10 14:03:06 - 描 述 : + 创建时间 :2023/3/2 16:11:04 + 描 述 :基础数据管理 - + 增加 - + 删除 @@ -3061,7 +946,7 @@ - + 详情 @@ -3069,27 +954,28 @@ - + 列表 - + 分页 - + 下拉 + - + 更新 @@ -3097,172 +983,211 @@ - + - 名 称 :分组信息 + 名 称 :成品信息管理 创 建 人 :yangxiao - 创建时间 :2023/3/10 14:03:21 + 创建时间 : 2023/7/17 16:02:25 描 述 : - + 增加 - + 移除 - + 更新 - + 不分页列表 - + - 下拉列表 + 分页列表 - + - 分页列表 + 下拉列表 - + 查询单条 - + - 名 称 :产线管理 + 名 称 :设备Dto类 创 建 人 :yangxiao - 创建时间 :2023/7/18 14:05:16 + 创建时间 : 2023/3/2 16:12:06 描 述 : - + - 增加 + 原料名称 - + - + - 移除 + 原料编号 + + + + + + 原料单位 + + + + + + 原料分组 + + + + + + 增加 - - + 更新 - - + - 不分页列表 + 主键 - + - + - 分页列表 + 删除 - - + - 下拉列表 + 主键 - + - + - 查询单条 + 分页 - - - + - 产线添加设备 + 名称 + + + + + + 编码 + + + + + + 输出 + + + + + 主键 + + + + + + 名 称 :物料服务 + 创 建 人 :yangxiao + 创建时间 :2023/3/2 18:31:53 + 描 述 : - - + - 产线删除设备 + 增加 - + - 产线设备不分页 + 移除 - + - 产线设备分页 + 更新 - + - 产线添加料仓 + 不分页列表 - + - 产线删除料仓 + 分页列表 - + - 产线料仓不分页 + 下拉列表 - + - 产线料仓分页 + 查询单条 + - + - 名 称 :产线服务 + 名 称 :原料服务 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 + 创建时间 :2023年7月17日15:41:09 描 述 :基础数据管理 - + 增加 - + 删除 @@ -3270,7 +1195,7 @@ - + 详情 @@ -3278,28 +1203,28 @@ - + 列表 - + 分页 - + 下拉 - + 更新 @@ -3307,53 +1232,55 @@ - + - 产线添加设备 + 名 称 : + 创 建 人 :yangxiao + 创建时间 : 2023/7/20 15:15:48 + 描 述 : - - + - 产线删除设备 + 操作标题 - - + - 产线设备不分页 + 内容 - - + - 产线设备分页 + 创建时间 - - + - 产线添加料仓 + 增加 - - + - 产线删除料仓 + 名 称 :日志服务 + 创 建 人 :yangxiao + 创建时间 : 2023/7/20 15:17:58 + 描 述 : - - + - 产线料仓不分页 + 增加 - + - 产线料仓分页 + 名 称 :操作日志 + 创 建 人 :yangxiao + 创建时间 : 2023/7/20 15:17:24 + 描 述 : - @@ -3521,12 +1448,6 @@ 分组Id - - - 主键 - - - 名 称 :配方物料服务 @@ -3630,13 +1551,6 @@ - - - 更改物料分组 - - - - 名 称 :配方物料服务 @@ -3758,156 +1672,156 @@ - + - 名 称 : 料仓服务 + 名 称 : 创 建 人 :yangxiao - 创建时间 : 2023/7/17 15:27:20 + 创建时间 : 2023/7/31 18:04:53 描 述 : - + - 料仓编码 + 名称 - + - 料仓名称 + 编码 - + - 物料Id + 描述 - + - 料仓容积 + 增加 - + - 增加 + 修改 - + - 更新 + 主键 + + + + + 刪除 - + 主键 - + - 删除 + 普通查询条件 - + 主键 - + - 分页 + 分页查询条件 - + 名称 - + 编码 - + 输出 - + 主键 - - - 物料Name - - - + - 名 称 :料仓服务 + 名 称 : 创 建 人 :yangxiao - 创建时间 : 2023/7/17 15:32:17 + 创建时间 : 2023/7/31 18:02:57 描 述 : - + 增加 - + - 移除 + 删除 - + 更新 - + 不分页列表 - + 分页列表 - + 下拉列表 - + 查询单条 - + - 名 称 :料仓服务 + 名 称 : 创 建 人 :yangxiao - 创建时间 :2023/3/2 16:11:04 - 描 述 :基础数据管理 + 创建时间 : 2023/7/31 18:03:25 + 描 述 : - + 增加 - + 删除 @@ -3915,7 +1829,7 @@ - + 详情 @@ -3923,28 +1837,28 @@ - + 列表 - + 分页 - + 下拉 - + 更新 @@ -4075,11 +1989,6 @@ 详情输出 - - - 工艺步骤 - - 物料信息 diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_FinalsInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/FinalsInfoEntity.cs similarity index 94% rename from backend/BPA.MES.Base.Application/Entitys/App/Pztj_FinalsInfoEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/App/FinalsInfoEntity.cs index bfbc782..2681ef9 100644 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_FinalsInfoEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/App/FinalsInfoEntity.cs @@ -7,7 +7,7 @@ /// 描 述 : /// [SugarTable("final_info")] - public class Pztj_FinalsInfoEntity : DEntityBase + public class FinalInfoEntity : DEntityBase { /// /// 成品编号 diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_MaterialsInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/MaterialsInfoEntity.cs similarity index 92% rename from backend/BPA.MES.Base.Application/Entitys/App/Pztj_MaterialsInfoEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/App/MaterialsInfoEntity.cs index 2acd5d6..9d4750a 100644 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_MaterialsInfoEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/App/MaterialsInfoEntity.cs @@ -7,7 +7,7 @@ /// 描 述 : /// [SugarTable("material_Info")] - public class Pztj_MaterialsInfoEntity : DEntityBase + public class MaterialInfoEntity : DEntityBase { /// /// 原料名称 diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketInfoEntity.cs deleted file mode 100644 index 79ade8f..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketInfoEntity.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :胖子天骄桶管理 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/14 11:33:10 - /// 描 述 : - /// - [SugarTable("bucket_info")] - public class Pztj_BucketInfoEntity : DEntityBase - { - /// - /// 桶名称 - /// - public string Name { get; set; } - /// - /// 桶编号 - /// - public string Code { get; set; } - - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketMaterialsRecordEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketMaterialsRecordEntity.cs deleted file mode 100644 index 8313e3e..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_BucketMaterialsRecordEntity.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :桶原料记录 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/14 11:47:33 - /// 描 述 : - /// - [SugarTable("bucket_material_record")] - public class Pztj_BucketMaterialsRecordEntity : DEntityBase - { - /// - /// 桶Id - /// - public string BucketId { get; set; } - /// - /// 物料Id - /// - public string MaterialId { get; set; } - /// - /// 添加时间 - /// - public DateTime? CreateTime { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftStepsEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftStepsEntity.cs deleted file mode 100644 index b28c87d..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftStepsEntity.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :工艺路线 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 17:01:26 - /// 描 述 : - /// - [SugarTable("craft_Steps")] - public class Pztj_CraftStepsEntity : DEntityBase - { - /// - /// 步骤Id - /// - public string CraftId { get; set; } - /// - /// 步骤 - /// - public string Step { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 单位 - /// - public string Unit { get; set; } - /// - /// 功能参数 - /// - public string Value { get; set; } - /// - /// 功能值 物料信息 - /// - public string Materials { get; set; } - /// - /// 功能描述 - /// - public string Describe { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftsInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftsInfoEntity.cs deleted file mode 100644 index 418b92d..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftsInfoEntity.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :胖子天骄工艺基础信息 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/14 14:43:37 - /// 描 述 : - /// - [SugarTable("craft_info")] - public class Pztj_CraftsInfoEntity : DEntityBase - { - /// - /// 工艺名称 - /// - public string Name { get; set; } - /// - /// 设备区分 - /// - public DeviceTypeEnum DeviceType { get; set; } - /// - /// 工艺描述 - /// - public string Description { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_DevicesInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_DevicesInfoEntity.cs deleted file mode 100644 index eb27067..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_DevicesInfoEntity.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :胖子天骄设备基础表 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/14 11:26:34 - /// 描 述 : - /// - [SugarTable("device_info")] - public class Pztj_DevicesInfoEntity: DEntityBase - { - /// - /// 名称 - /// - [Required(ErrorMessage = "名称不能为空")] - public string Name { get; set; } - /// - /// 编码 - /// - [Required(ErrorMessage = "编码不能为空")] - public string Code { get; set; } - /// - /// 设备类型 - /// - public string DeviceType { get; set; } - /// - /// 设备描述 - /// - public string Describe { get; set; } - /// - /// 设备维保时间 - /// - public string RepairDate { get; set; } - /// - /// 设备创建时间 - /// - public string CreateTime { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineDevicesEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineDevicesEntity.cs deleted file mode 100644 index d93c88b..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineDevicesEntity.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :产线设备 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/20 16:45:05 - /// 描 述 : - /// - [SugarTable("productline_devices")] - public class Pztj_LineDevicesEntity : DEntityBase - { - /// - /// 产线Id - /// - public string LineId { get; set; } - /// - /// 产线设备 - /// - public string DeviceId { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineStocksEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineStocksEntity.cs deleted file mode 100644 index ed6f78b..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_LineStocksEntity.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :产线料仓 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/7/20 16:45:40 - /// 描 述 : - /// - [SugarTable("productline_stocks")] - public class Pztj_LineStocksEntity : DEntityBase - { - /// - /// 产线Id - /// - public string LineId { get; set; } - /// - /// 产线料仓 - /// - public string StockId { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_StockInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/Pztj_StockInfoEntity.cs deleted file mode 100644 index 60338a1..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_StockInfoEntity.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :胖子天骄料仓管理 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/14 11:31:34 - /// 描 述 : - /// - [SugarTable("stock_info")] - public class Pztj_StockInfoEntity : DEntityBase - { - /// - /// 料仓编码 - /// - public string Code { get; set; } - /// - /// 料仓名称 - /// - public string Name { get; set; } - /// - /// 物料Id - /// - public string MaterialId { get; set; } - /// - /// 料仓容积 - /// - public string Volume { get; set; } - - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoEntity.cs similarity index 94% rename from backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/App/WorkInfoEntity.cs index 218c248..de277b2 100644 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoEntity.cs @@ -7,7 +7,7 @@ /// 描 述 : /// [SugarTable("work_info")] - public class Pztj_WorkInfoEntity : DEntityBase + public class WorkInfoEntity : DEntityBase { /// /// 工单名称 diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoItemEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoItemEntity.cs similarity index 89% rename from backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoItemEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/App/WorkInfoItemEntity.cs index eceb6c2..64f0b55 100644 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoItemEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoItemEntity.cs @@ -7,7 +7,7 @@ /// 描 述 : /// [SugarTable("work_info_item")] - public class Pztj_WorkInfoItemEntity : DEntityBase + public class WorkInfoItemEntity : DEntityBase { /// /// 工单名称 diff --git a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoStatusEntity.cs b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoStatusEntity.cs similarity index 91% rename from backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoStatusEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/App/WorkInfoStatusEntity.cs index 59a680b..d4a30c9 100644 --- a/backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoStatusEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/App/WorkInfoStatusEntity.cs @@ -7,7 +7,7 @@ /// 描 述 : /// [SugarTable("work_info_status")] - public class Pztj_WorkInfoStatusEntity : DEntityBase + public class WorkInfoStatusEntity : DEntityBase { /// /// 工单Id diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/DeviceParmEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/DeviceParmEntity.cs deleted file mode 100644 index 7992ef3..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/DeviceParmEntity.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BPA.MES.Base.Application.Entitys.Base -{ - /// - /// 名 称 : - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/31 15:06:00 - /// 描 述 : - /// - public class DeviceParmEntity - { - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/DeviceRecipeEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/DeviceRecipeEntity.cs deleted file mode 100644 index a7d7750..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/DeviceRecipeEntity.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :设备配方表 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 13:57:00 - /// 描 述 : - /// - [SugarTable("devices_recipes")] - public class DeviceRecipeEntity : DEntityBase - { - /// - /// 设备Id - /// - public string DeviceId { get; set; } - /// - /// 配方Id - /// - public string RecipesId { get; set; } - - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/GroupInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/GroupInfoEntity.cs deleted file mode 100644 index 2bbf3b3..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/GroupInfoEntity.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :分组信息 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/10 14:01:15 - /// 描 述 : - /// - [SugarTable("group_info")] - public class GroupInfoEntity: DEntityBase - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 介绍 - /// - public string Des { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/MaterialsInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/MaterialsInfoEntity.cs deleted file mode 100644 index 3f8ec05..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/MaterialsInfoEntity.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :物料 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 13:52:00 - /// 描 述 : - /// - [SugarTable("materials_info")] - public class MaterialsInfoEntity: DEntityBase - { - /// - /// 名称 - /// - [Required(ErrorMessage = "名称不能为空")] - public string Name { get; set; } - /// - /// 编码 - /// - [Required(ErrorMessage = "编码不能为空")] - public string Code { get; set; } - /// - /// 单位 - /// - public string Unit { get; set; } - /// - /// 每秒出水量(g) - /// - public string Wos { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/RecipeMaterialEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/RecipeMaterialEntity.cs index 6749534..9312c71 100644 --- a/backend/BPA.MES.Base.Application/Entitys/Base/RecipeMaterialEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/Base/RecipeMaterialEntity.cs @@ -24,6 +24,7 @@ /// /// 描述 /// + [SugarColumn(IsIgnore = true)] public string Describe { get; set; } } } diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/RecipesGroupEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/RecipesGroupEntity.cs deleted file mode 100644 index 1518fdd..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/RecipesGroupEntity.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :配方分组 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/10 14:56:03 - /// 描 述 : - /// - [SugarTable("recipes_group")] - public class RecipesGroupEntity - { - /// - /// 组Id - /// - public string GroupId { get; set; } - /// - /// 产品Id - /// - public string RecipesId { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/StoreInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/StoreInfoEntity.cs deleted file mode 100644 index 6a5c6ef..0000000 --- a/backend/BPA.MES.Base.Application/Entitys/Base/StoreInfoEntity.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace BPA.MES.Base.Application.Entitys -{ - /// - /// 名 称 :店铺信息 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/2 13:52:13 - /// 描 述 : - /// - [SugarTable("store_info")] - public class StoreInfoEntity : DEntityBase - { - /// - /// 名称 - /// - [Required(ErrorMessage = "名称不能为空")] - public string Name { get; set; } - /// - /// 地址 - /// - public string Address { get; set; } - /// - /// 联系电话 - /// - public string Phone { get; set; } - /// - /// 负责人 - /// - public string Directors { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Entitys/Base/DevicesInfoEntity.cs b/backend/BPA.MES.Base.Application/Entitys/Base/TemplateEntity.cs similarity index 58% rename from backend/BPA.MES.Base.Application/Entitys/Base/DevicesInfoEntity.cs rename to backend/BPA.MES.Base.Application/Entitys/Base/TemplateEntity.cs index a233b87..a56d138 100644 --- a/backend/BPA.MES.Base.Application/Entitys/Base/DevicesInfoEntity.cs +++ b/backend/BPA.MES.Base.Application/Entitys/Base/TemplateEntity.cs @@ -1,23 +1,25 @@ namespace BPA.MES.Base.Application.Entitys { /// - /// 名 称 :设备 + /// 名 称 : /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 13:51:45 + /// 创建时间 : 2023/7/31 18:23:50 /// 描 述 : /// - [SugarTable("devices_info")] - public class DevicesInfoEntity: DEntityBase + [SugarTable("template")] + public class TemplateEntity : DEntityBase { /// /// 名称 /// - [Required(ErrorMessage = "名称不能为空")] public string Name { get; set; } /// /// 编码 /// - [Required(ErrorMessage = "编码不能为空")] public string Code { get; set; } + /// + /// 描述 + /// + public string Des { get; set; } } } diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketInfoDto.cs b/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketInfoDto.cs deleted file mode 100644 index c3da2f5..0000000 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketInfoDto.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 : - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 15:43:00 - /// 描 述 : - /// - public class BucketInfoDto - { - /// - /// 桶名称 - /// - public string Name { get; set; } - /// - /// 桶编号 - /// - public string Code { get; set; } - } - /// - /// 增加 - /// - public class BucketInfoAddInput : BucketInfoDto - { - - } - /// - /// 更新 - /// - public class BucketInfoUpdateInput : BucketInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class BucketInfoDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class BucketInfoQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 编码 - /// - public string Code { get; set; } - } - /// - /// 输出 - /// - public class BucketInfoOutput : BucketInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - /// - /// 当前原料名称 - /// - public string MaterialName { get; set; } - } -} \ No newline at end of file diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketMaterialsRecordDto.cs b/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketMaterialsRecordDto.cs deleted file mode 100644 index 22d0c40..0000000 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Dtos/BucketMaterialsRecordDto.cs +++ /dev/null @@ -1,85 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 : - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 17:29:52 - /// 描 述 : - /// - public class BucketMaterialsRecordDto - { - /// - /// 桶Id - /// - public string BucketId { get; set; } - /// - /// 物料Id - /// - public string MaterialId { get; set; } - /// - /// 添加时间 - /// - public DateTime? CreateTime { get; set; } - } - public class BucketMaterialsRecordAddInput : BucketMaterialsRecordDto - { - - } - /// - /// 更新 - /// - public class BucketMaterialsRecordUpdateInput : BucketMaterialsRecordDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class BucketMaterialsRecordDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class BucketMaterialsRecordQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 编码 - /// - public string Code { get; set; } - /// - /// 桶Id - /// - public string BucketId { get; set; } - } - /// - /// 输出 - /// - public class BucketMaterialsRecordOutput : BucketMaterialsRecordDto - { - /// - /// 主键 - /// - public string Id { get; set; } - /// - /// 原料名称 - /// - public string MaterialName { get; set; } - /// - /// 桶名称 - /// - public string BucketName { get; set; } - - } -} diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketInfoService.cs b/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketInfoService.cs deleted file mode 100644 index 3ef5d46..0000000 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketInfoService.cs +++ /dev/null @@ -1,147 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :桶服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础数据管理 - /// - [ApiDescriptionSettings("基础数据管理", Order = 3, Tag = "桶服务", Name = "BucketInfo", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class BucketInfoService : IBucketInfoService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public BucketInfoService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(BucketInfoAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name || x.Code == input.Code); - if (r_entity != null) - { - throw Oops.Bah("名称已存在!"); - } - Pztj_BucketInfoEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(BucketInfoDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - BucketInfoOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpGet] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(BucketInfoQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.Id==b.BucketId && b.Id == SqlFunc.Subqueryable().Where(s => s.BucketId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) - .LeftJoin((a,b,c)=>b.MaterialId==c.Id) - .Select((a,b,c)=>new BucketInfoOutput - { - Id = a.Id.SelectAll(), - MaterialName = c.Name - }) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - - - - - /// - /// 下拉 - /// - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(BucketInfoUpdateInput input) - { - var isExit =await _dbContext.Queryable().Where(x => x.Id != input.Id && (x.Name == input.Name || x.Code == input.Code)).FirstAsync(); - if (isExit != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_BucketInfoEntity entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - ///// - ///// 根据桶Id查询记录 - ///// - ///// - ///// - //public async Task RecordList(string bucketId) - //{ - // var entity = await _dbContext.Queryable() - // .LeftJoin((a, b) => a.MaterialId == b.Id) - // .Select((a, b) => new BucketMaterialsRecordOutput - // { - // Id = a.Id.SelectAll(), - // MaterialName = b.Name - // }) - // .ToListAsync(); - // SqlSugarPagedList output = entity.Adapt>(); - // return output; - //} - } -} - diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketMaterialsRecordServcie.cs b/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketMaterialsRecordServcie.cs deleted file mode 100644 index 96b7f54..0000000 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/BucketMaterialsRecordServcie.cs +++ /dev/null @@ -1,103 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :桶记录 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础数据管理 - /// - [ApiDescriptionSettings("基础数据管理", Order = 3, Tag = "桶服务", Name = "BucketMaterialsRecord", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class BucketMaterialsRecordServcie : IBucketMaterialsRecordService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public BucketMaterialsRecordServcie(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(BucketMaterialsRecordAddInput input) - { - - Pztj_BucketMaterialsRecordEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(BucketMaterialsRecordDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - BucketMaterialsRecordOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpGet] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(BucketMaterialsRecordQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.BucketId==b.Id) - .LeftJoin((a,b,c)=>a.MaterialId==c.Id) - .WhereIF(!string.IsNullOrEmpty(input.BucketId),(a,b,c)=>a.BucketId==input.BucketId) - .OrderByDescending((a,b,c)=>a.CreateTime) - .Select((a,b,c)=>new BucketMaterialsRecordOutput - { - Id = a.Id.SelectAll(), - MaterialName = c.Name, - BucketName = b.Name - }) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(BucketMaterialsRecordUpdateInput input) - { - Pztj_BucketMaterialsRecordEntity entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketMaterialsRecordService.cs b/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketMaterialsRecordService.cs deleted file mode 100644 index 418d450..0000000 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketMaterialsRecordService.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :桶记录 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 17:37:03 - /// 描 述 : - /// - public interface IBucketMaterialsRecordService - { - /// - /// 增加 - /// - /// - Task Add(BucketMaterialsRecordAddInput input); - /// - /// 移除 - /// - /// - Task Del(BucketMaterialsRecordDelInput input); - /// - /// 更新 - /// - /// - Task Update(BucketMaterialsRecordUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 分页列表 - /// - /// - Task> PagedList(BucketMaterialsRecordQueryPageInput input); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsInfoDto.cs b/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsInfoDto.cs deleted file mode 100644 index 63ca3ce..0000000 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsInfoDto.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产品分组 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/10 13:59:43 - /// 描 述 : - /// - public class CraftsInfoDto - { - /// - /// 工艺名称 - /// - [Required(ErrorMessage = "设备类型不能为空")] - public string Name { get; set; } - /// - /// 设备类型 0:炒锅 1:反应釜 - /// - [Required(ErrorMessage = "设备类型不能为空")] - public string DeviceType { get; set; } - /// - /// 工艺描述 - /// - public string Description { get; set; } - } - /// - /// 增加 - /// - public class CraftsInfoAddInput : CraftsInfoDto - { - - } - /// - /// 更新 - /// - public class CraftsInfoUpdateInput : CraftsInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class CraftsInfoDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class CraftsInfoQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 设备类型 0:炒锅 1:反应釜 - /// - [Required(ErrorMessage = "设备类型不能为空")] - public DeviceTypeEnum DeviceType { get; set; } - } - /// - /// 不分页 - /// - public class CraftsInfoQueryInput - { - - } - /// - /// 输出 - /// - public class CraftsInfoOutput : CraftsInfoDto - { - /// - /// 主键 - /// - /// - public string Id { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsStepsDto.cs b/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsStepsDto.cs deleted file mode 100644 index 5dd9958..0000000 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Dtos/CraftsStepsDto.cs +++ /dev/null @@ -1,95 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线管理 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/18 14:03:27 - /// 描 述 : - /// - public class CraftsStepsDto - { - /// - /// 步骤Id - /// - public string CraftId { get; set; } - /// - /// 步骤 - /// - public string Step { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 单位 - /// - public string Unit { get; set; } - /// - /// 功能参数 - /// - public string Value { get; set; } - /// - /// 功能值 物料信息 - /// - public string Materials { get; set; } - /// - /// 功能描述 - /// - public string Describe { get; set; } - } - /// - /// 增加 - /// - public class CraftsStepsAddInput : CraftsStepsDto - { - - } - /// - /// 更新 - /// - public class CraftsStepsUpdateInput : CraftsStepsDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class CraftsStepsDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class CraftsStepsQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 编码 - /// - public string Code { get; set; } - /// - /// 工艺Id - /// - public string CraftId { get; set; } - } - /// - /// 输出 - /// - public class CraftsStepsOutput : CraftsStepsDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsInfoService.cs b/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsInfoService.cs deleted file mode 100644 index dc28c09..0000000 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsInfoService.cs +++ /dev/null @@ -1,118 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :工艺信息 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/10 14:03:06 - /// 描 述 :配方工艺管理 - /// - [ApiDescriptionSettings("配方工艺管理", Order = 0, Tag = "工艺服务", Name = "CraftsInfo", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class CraftsInfoService : ICraftsInfoService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public CraftsInfoService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(CraftsInfoAddInput input) - { - Pztj_CraftsInfoEntity entity = await _dbContext.Queryable().FirstAsync(x => x.Name ==input.Name); - if (entity != null) - { - throw Oops.Bah("名称已存在!"); - } - entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(CraftsInfoDelInput input) - { - var res = await _dbContext.Deleteable().Where(x=>x.Id==input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(); - CraftsInfoOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpPost, AllowAnonymous] - public async Task> List(CraftsInfoQueryInput input) - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(CraftsInfoQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .Where(x=>x.DeviceType == input.DeviceType) - .WhereIF(!string.IsNullOrEmpty(input.Name),x=>x.Name.Contains(input.Name)) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 下拉 - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(CraftsInfoUpdateInput input) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id != input.Id && x.Name == input.Name); - if (entity != null) - { - throw Oops.Bah("名称已存在!"); - } - entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsInfoService.cs b/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsInfoService.cs deleted file mode 100644 index 130be32..0000000 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsInfoService.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :工艺信息 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/10 14:03:21 - /// 描 述 : - /// - public interface ICraftsInfoService - { - /// - /// 增加 - /// - /// - Task Add(CraftsInfoAddInput input); - /// - /// 移除 - /// - /// - Task Del(CraftsInfoDelInput input); - /// - /// 更新 - /// - /// - Task Update(CraftsInfoUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(CraftsInfoQueryInput Input); - /// - /// 分页列表 - /// - /// - Task> PagedList(CraftsInfoQueryPageInput input); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsStepsService.cs b/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsStepsService.cs deleted file mode 100644 index c6d221e..0000000 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/ICraftsStepsService.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线管理 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/7/18 14:05:16 - /// 描 述 : - /// - public interface ICraftsStepsService - { - /// - /// 增加 - /// - /// - Task Add(CraftsStepsAddInput input); - /// - /// 移除 - /// - /// - Task Del(CraftsStepsDelInput input); - /// - /// 更新 - /// - /// - Task Update(CraftsStepsUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 分页列表 - /// - /// - Task> PagedList(CraftsStepsQueryPageInput input); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DeviceRecipeDto.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DeviceRecipeDto.cs deleted file mode 100644 index 167f13b..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DeviceRecipeDto.cs +++ /dev/null @@ -1,99 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备Dto类 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/2 16:12:06 - /// 描 述 : - /// - public class DeviceRecipeDto : DeviceRecipeEntity - { - - } - /// - /// 增加 - /// - public class DeviceRecipeAddInput : DeviceRecipeDto - { - - } - /// - /// 更新 - /// - public class DeviceRecipeUpdateInput : DeviceRecipeDto - { - - } - /// - /// 删除 - /// - public class DeviceRecipeDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 不分页 - /// - public class DeviceRecipeQueryInput - { - /// - /// 设备Id - /// - public string DeviceId { get; set; } - - } - /// - /// 分页 - /// - public class DeviceRecipeQueryPageInput : RequestPage - { - - } - - public class DeviceRecipeBatchAddInput - { - /// - /// 设备Id - /// - public string DeviceId { get; set; } - /// - /// 配方数组 - /// - public List RecipesIds { get; set; } = new(); - } - - - /// - /// 输出 - /// - public class DeviceRecipeOutput : DeviceRecipeDto - { - /// - /// 设备名称 - /// - public string DeviceName { get; set; } - /// - /// 配方名称 - /// - public string RecipeName { get; set; } - /// - /// 配方代码 - /// - public string RecipeCode { get; set; } - /// - /// 分组Id - /// - public string GroupId { get; set; } - /// - /// 分组名称 - /// - public string GroupName { get; set; } - /// - /// 配方图片地址 - /// - public string RecipesPic { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DevicesInfoDto.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DevicesInfoDto.cs deleted file mode 100644 index c95b597..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DevicesInfoDto.cs +++ /dev/null @@ -1,88 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备Dto类 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/2 16:12:06 - /// 描 述 : - /// - public class DevicesInfoDto - { - /// - /// 名称 - /// - /// 设备名称 - [Required(ErrorMessage = "名称不能为空")] - public string Name { get; set; } - /// - /// 编码 - /// - [Required(ErrorMessage = "编码不能为空")] - public string Code { get; set; } - /// - /// 设备类型 - /// - public string DeviceType { get; set; } - /// - /// 设备描述 - /// - /// 设备描述 - public string Describe { get; set; } - /// - /// 设备维保时间 - /// - /// 2023-7-17 - public string RepairDate { get; set; } - } - /// - /// 增加 - /// - public class DevicesInfoAddInput : DevicesInfoDto - { - - } - /// - /// 更新 - /// - public class DevicesInfoUpdateInput : DevicesInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class DevicesInfoDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class DevicesInfoQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 编码 - /// - public string Code { get; set; } - } - /// - /// 输出 - /// - public class DevicesInfoOutput : DevicesInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DeviceRecipeService.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DeviceRecipeService.cs deleted file mode 100644 index 26c0f83..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DeviceRecipeService.cs +++ /dev/null @@ -1,144 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础信息管理 - /// - [ApiDescriptionSettings("基础数据管理", Name = "DeviceRecipe", Tag = "设备服务", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class DeviceRecipeService : IDeviceRecipeService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public DeviceRecipeService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(DeviceRecipeAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.DeviceId == input.DeviceId && x.RecipesId==input.RecipesId); - if (r_entity != null) - { - throw Oops.Bah("名称已存在!"); - } - DeviceRecipeEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 批量下发配方 - /// - /// - /// - /// - - public async Task BatchUpdate(DeviceRecipeBatchAddInput input) - { - bool result = false; - List dr_entitys = new(); - foreach (var item in input.RecipesIds) - { - DeviceRecipeEntity entity = new(); - entity.RecipesId = item; - entity.DeviceId = input.DeviceId; - dr_entitys.Add(entity); - } - try - { - _dbContext.Ado.BeginTran(); - await _dbContext.Deleteable().Where(x => x.DeviceId == input.DeviceId).ExecuteCommandAsync(); - if (input.RecipesIds.Any()) - { - await _dbContext.Insertable(dr_entitys).ExecuteCommandAsync(); - } - _dbContext.Ado.CommitTran(); - result = true; - } - catch (Exception ex) - { - throw Oops.Bah("更新失败!"); - } - return result; - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(DeviceRecipeDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - DeviceRecipeOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpPost,AllowAnonymous] - public async Task> List(DeviceRecipeQueryInput input) - { - var output = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.RecipesId==b.Id) - .LeftJoin((a,b,c)=>a.RecipesId==c.RecipesId) - .LeftJoin((a, b, c,d)=>c.GroupId==d.Id) - .WhereIF(!string.IsNullOrEmpty(input.DeviceId),a=>a.DeviceId==input.DeviceId) - .Select((a, b, c,d) => new DeviceRecipeOutput - { - DeviceId = a.DeviceId, - RecipeName = b.Name, - RecipeCode = b.Code, - RecipesId = a.RecipesId, - GroupId = c.GroupId, - GroupName = d.Name - }) - .ToListAsync(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(DeviceRecipeQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(DeviceRecipeUpdateInput input) - { - var res = await _dbContext.Updateable().ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DevicesInfoService.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DevicesInfoService.cs deleted file mode 100644 index 77b066d..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/DevicesInfoService.cs +++ /dev/null @@ -1,119 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础数据管理 - /// - [ApiDescriptionSettings("基础数据管理",Order = 0, Tag = "设备服务", Name = "DevicesInfo", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class DevicesInfoService : IDevicesInfoService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public DevicesInfoService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(DevicesInfoAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name || x.Code == input.Code); - if (r_entity != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_DevicesInfoEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(DevicesInfoDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - DevicesInfoOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpGet] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(DevicesInfoQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.Name),x=>x.Name.Contains(input.Name)) - .WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Name.Contains(input.Code)) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 下拉 - /// - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(DevicesInfoUpdateInput input) - { - var isExit =await _dbContext.Queryable().Where(x => x.Id != input.Id && (x.Name == input.Name || x.Code == input.Code)).FirstAsync(); - if (isExit != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_DevicesInfoEntity entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDeviceRecipeService.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDeviceRecipeService.cs deleted file mode 100644 index 3c74b75..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDeviceRecipeService.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备配方服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 18:30:58 - /// 描 述 : - /// - public interface IDeviceRecipeService - { - /// - /// 增加 - /// - /// - Task Add(DeviceRecipeAddInput input); - /// - /// 移除 - /// - /// - Task Del(DeviceRecipeDelInput input); - /// - /// 更新 - /// - /// - Task Update(DeviceRecipeUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(DeviceRecipeQueryInput input); - /// - /// 分页列表 - /// - /// - Task> PagedList(DeviceRecipeQueryPageInput input); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - /// - /// 批量下发配方 - /// - /// - /// - Task BatchUpdate(DeviceRecipeBatchAddInput input); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDevicesInfoService.cs b/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDevicesInfoService.cs deleted file mode 100644 index 31386c0..0000000 --- a/backend/BPA.MES.Base.Application/Services/DeviceService/Services/IDevicesInfoService.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :设备服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 18:30:58 - /// 描 述 : - /// - public interface IDevicesInfoService - { - /// - /// 增加 - /// - /// - Task Add(DevicesInfoAddInput input); - /// - /// 移除 - /// - /// - Task Del(DevicesInfoDelInput input); - /// - /// 更新 - /// - /// - Task Update(DevicesInfoUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 分页列表 - /// - /// - Task> PagedList(DevicesInfoQueryPageInput input); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs b/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs index 055da75..d6faa70 100644 --- a/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs +++ b/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs @@ -79,9 +79,5 @@ /// 配方名称 /// public string RecipeName { get; set; } - /// - /// 工艺名称 - /// - public string CraftName { get; set; } } } diff --git a/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs b/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs index b258d0c..8692809 100644 --- a/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs @@ -22,12 +22,12 @@ [HttpPost] public async Task Add(FinalsInfoAddInput input) { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); + var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); if (r_entity != null) { throw Oops.Bah("名称已存在!"); } - Pztj_FinalsInfoEntity entity = input.Adapt(); + FinalInfoEntity entity = input.Adapt(); return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); } /// @@ -39,7 +39,7 @@ [HttpPost] public async Task Del(FinalsInfoDelInput input) { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); + var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); return res; } /// @@ -51,7 +51,7 @@ [HttpGet] public async Task Detail(string Id) { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); + var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); FinalsInfoOutput output = entity.Adapt(); return output; } @@ -63,7 +63,7 @@ [HttpGet] public async Task> List() { - var entity = await _dbContext.Queryable().ToListAsync(); + var entity = await _dbContext.Queryable().ToListAsync(); List output = entity.Adapt>(); return output; } @@ -75,16 +75,14 @@ [HttpPost] public async Task> PagedList(FinalsInfoQueryPageInput input) { - var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.CraftId==b.Id) - .LeftJoin((a, b, c) => a.RecipeId == c.Id) + var entity = await _dbContext.Queryable() + .LeftJoin((a, b) => a.RecipeId == b.Id) .WhereIF(!string.IsNullOrEmpty(input.Name),a=>a.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrEmpty(input.Code), a => a.Name.Contains(input.Code)) - .Select((a,b,c)=> new FinalsInfoOutput + .Select((a,b)=> new FinalsInfoOutput { Id = a.Id.SelectAll(), - RecipeName = c.Name, - CraftName = b.Name + RecipeName = b.Name, }) .ToPagedListAsync(input.PageIndex, input.PageSize); SqlSugarPagedList output = entity.Adapt>(); @@ -98,7 +96,7 @@ [HttpGet] public async Task SelectList() { - var entity = await _dbContext.Queryable().Select(x => new + var entity = await _dbContext.Queryable().Select(x => new { key = x.Id, value = x.Name @@ -114,7 +112,7 @@ [HttpPost] public async Task Update(FinalsInfoUpdateInput input) { - Pztj_FinalsInfoEntity entity = input.Adapt(); + FinalInfoEntity entity = input.Adapt(); var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); return res; } diff --git a/backend/BPA.MES.Base.Application/Services/MaterialService/Services/MaterialsInfoService.cs b/backend/BPA.MES.Base.Application/Services/MaterialService/Services/MaterialsInfoService.cs index c43d00a..d6e34f6 100644 --- a/backend/BPA.MES.Base.Application/Services/MaterialService/Services/MaterialsInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/MaterialService/Services/MaterialsInfoService.cs @@ -22,12 +22,12 @@ [HttpPost] public async Task Add(MaterialsInfoAddInput input) { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); + var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); if (r_entity != null) { throw Oops.Bah("名称已存在!"); } - Pztj_MaterialsInfoEntity entity = input.Adapt(); + MaterialInfoEntity entity = input.Adapt(); return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); } /// @@ -39,7 +39,7 @@ [HttpPost] public async Task Del(MaterialsInfoDelInput input) { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); + var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); return res; } /// @@ -51,7 +51,7 @@ [HttpGet] public async Task Detail(string Id) { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); + var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); MaterialsInfoOutput output = entity.Adapt(); return output; } @@ -63,7 +63,7 @@ [HttpGet] public async Task> List() { - var entity = await _dbContext.Queryable().ToListAsync(); + var entity = await _dbContext.Queryable().ToListAsync(); List output = entity.Adapt>(); return output; } @@ -75,7 +75,7 @@ [HttpPost] public async Task> PagedList(MaterialsInfoQueryPageInput input) { - var entity = await _dbContext.Queryable() + var entity = await _dbContext.Queryable() .WhereIF(!string.IsNullOrEmpty(input.Name),x=>x.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Code.Contains(input.Code)) .ToPagedListAsync(input.PageIndex, input.PageSize); @@ -90,7 +90,7 @@ [HttpGet] public async Task SelectList() { - var entity = await _dbContext.Queryable().Select(x => new + var entity = await _dbContext.Queryable().Select(x => new { key = x.Id, value = x.Name @@ -106,8 +106,8 @@ [HttpPost] public async Task Update(MaterialsInfoUpdateInput input) { - var entity = await _dbContext.Queryable().Where(x => x.Id == input.Id).FirstAsync(); - entity = input.Adapt(); + var entity = await _dbContext.Queryable().Where(x => x.Id == input.Id).FirstAsync(); + entity = input.Adapt(); var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); return res; } diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/GroupInfoDto.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/GroupInfoDto.cs deleted file mode 100644 index 408f415..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/GroupInfoDto.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产品分组 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/3/10 13:59:43 - /// 描 述 : - /// - public class GroupInfoDto - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 介绍 - /// - public string Des { get; set; } - } - /// - /// 增加 - /// - public class GroupInfoAddInput : GroupInfoDto - { - - } - /// - /// 更新 - /// - public class GroupInfoUpdateInput : GroupInfoDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class GroupInfoDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class GroupInfoQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - } - /// - /// 输出 - /// - public class GroupInfoOutput : GroupInfoDto - { - /// - /// 主键 - /// - /// - public string Id { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDeviceDto.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDeviceDto.cs deleted file mode 100644 index b8c1425..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDeviceDto.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线设备 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/20 17:00:32 - /// 描 述 : - /// - public class ProductLineDeviceDto - { - /// - /// 产线Id - /// - public string LineId { get; set; } - /// - /// 产线设备 - /// - public string DeviceId { get; set; } - } - public class ProductLineDeviceAddInput: ProductLineDeviceDto { - - - } - /// - /// 产线设备分页 - /// - public class ProductLineDeviceQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 产线Id - /// - public string LineId { get; set; } - } - /// - /// 删除产线设备 - /// - public class ProductLineDeviceDelInput: ProductLineDeviceDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 产线设备关联信息 - /// - public class ProductLineDeviceOutput: ProductLineDeviceDto - { - /// - /// 主键 - /// - public string Id { get; set; } - /// - /// 名称 - /// - /// 设备名称 - public string DeviceName { get; set; } - /// - /// 编码 - /// - public string DeviceCode { get; set; } - /// - /// 设备类型 - /// - public string DeviceType { get; set; } - /// - /// 设备描述 - /// - /// 设备描述 - public string Describe { get; set; } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDto.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDto.cs deleted file mode 100644 index f7215bf..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineDto.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线管理 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/18 14:03:27 - /// 描 述 : - /// - public class ProductLineDto - { - /// - /// 产线名称 - /// - public string Name { get; set; } - /// - /// 产线编码 - /// - public string Code { get; set; } - /// - /// 产线描述 - /// - public string Describe { get; set; } - } - /// - /// 增加 - /// - public class ProductLineAddInput : ProductLineDto - { - - } - /// - /// 更新 - /// - public class ProductLineUpdateInput : ProductLineDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 删除 - /// - public class ProductLineDelInput - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 分页 - /// - public class ProductLineQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 编码 - /// - public string Code { get; set; } - } - /// - /// 输出 - /// - public class ProductLineOutput : ProductLineDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineStockDto.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineStockDto.cs deleted file mode 100644 index 89e2c76..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineStockDto.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 : - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/20 18:25:18 - /// 描 述 : - /// - public class ProductLineStockDto - { - /// - /// 产线Id - /// - public string LineId { get; set; } - /// - /// 产线设备 - /// - public string StockId { get; set; } - } - public class ProductLineStockAddInput : ProductLineStockDto - { - - - } - /// - /// 产线设备分页 - /// - public class ProductLineStockQueryPageInput : RequestPage - { - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 产线Id - /// - public string LineId { get; set; } - } - /// - /// 删除产线设备 - /// - public class ProductLineStockDelInput : ProductLineStockDto - { - /// - /// 主键 - /// - public string Id { get; set; } - } - /// - /// 产线设备关联信息 - /// - public class ProductLineStockOutput : ProductLineStockDto - { - /// - /// 主键 - /// - public string Id { get; set; } - /// - /// 名称 - /// - /// 设备名称 - public string StockName { get; set; } - /// - /// 编码 - /// - public string StockCode { get; set; } - } -} - diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/GroupInfoService.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/GroupInfoService.cs deleted file mode 100644 index fcbcc6c..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/GroupInfoService.cs +++ /dev/null @@ -1,116 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :分组信息 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/10 14:03:06 - /// 描 述 : - /// - [ApiDescriptionSettings("产线管理", Order = 0, Name = "GroupInfo", Tag = "分组服务", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class GroupInfoService : IGroupInfoService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public GroupInfoService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(GroupInfoAddInput input) - { - GroupInfoEntity entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); - if (entity != null) - { - throw Oops.Bah("名称已存在!"); - } - entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(GroupInfoDelInput input) - { - var res = await _dbContext.Deleteable().Where(x=>x.Id==input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(); - GroupInfoOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpPost, AllowAnonymous] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(GroupInfoQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 下拉 - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(GroupInfoUpdateInput input) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id != input.Id && x.Name == input.Name); - if (entity != null) - { - throw Oops.Bah("名称已存在!"); - } - entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IGroupInfoService.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IGroupInfoService.cs deleted file mode 100644 index ed44933..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IGroupInfoService.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :分组信息 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/10 14:03:21 - /// 描 述 : - /// - public interface IGroupInfoService - { - /// - /// 增加 - /// - /// - Task Add(GroupInfoAddInput input); - /// - /// 移除 - /// - /// - Task Del(GroupInfoDelInput input); - /// - /// 更新 - /// - /// - Task Update(GroupInfoUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 分页列表 - /// - /// - Task> PagedList(GroupInfoQueryPageInput input); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IProductLineService.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IProductLineService.cs deleted file mode 100644 index bc92523..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/IProductLineService.cs +++ /dev/null @@ -1,100 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线管理 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/7/18 14:05:16 - /// 描 述 : - /// - public interface IProductLineService - { - /// - /// 增加 - /// - /// - Task Add(ProductLineAddInput input); - /// - /// 移除 - /// - /// - Task Del(ProductLineDelInput input); - /// - /// 更新 - /// - /// - Task Update(ProductLineUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 分页列表 - /// - /// - Task> PagedList(ProductLineQueryPageInput input); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - /// - /// 产线添加设备 - /// - /// - Task AddDevice(ProductLineDeviceAddInput input); - /// - /// 产线删除设备 - /// - /// - Task DeleteDevice(ProductLineDeviceDelInput input); - ///// - ///// 产线更新设备 - ///// - ///// - //Task UpdateDevice(string DeviceId); - /// - /// 产线设备不分页 - /// - /// - Task> DeviceList(); - /// - /// 产线设备分页 - /// - /// - Task> DevicePageList(ProductLineDeviceQueryPageInput input); - - - /// - /// 产线添加料仓 - /// - /// - Task AddStock(ProductLineStockAddInput input); - /// - /// 产线删除料仓 - /// - /// - Task DeleteStock(ProductLineStockDelInput input); - ///// - ///// 产线更新料仓 - ///// - ///// - //Task UpdateStock(string StockId); - /// - /// 产线料仓不分页 - /// - /// - Task> StockList(); - /// - /// 产线料仓分页 - /// - /// - Task> StockPageList(ProductLineStockQueryPageInput input); - } -} diff --git a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineService.cs b/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineService.cs deleted file mode 100644 index d5261d6..0000000 --- a/backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineService.cs +++ /dev/null @@ -1,241 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :产线服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础数据管理 - /// - [ApiDescriptionSettings("产线管理", Order = 0, Name = "ProductLine", Tag = "产线服务", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class ProductLineService : IProductLineService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public ProductLineService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(ProductLineAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); - if (r_entity != null) - { - throw Oops.Bah("名称已存在!"); - } - ProductLineEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(ProductLineDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - ProductLineOutput output = entity.Adapt(); - return output; - } - - /// - /// 列表 - /// - /// - /// - [HttpGet] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(ProductLineQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name)) - .WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Name.Contains(input.Code)) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 下拉 - /// - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(ProductLineUpdateInput input) - { - var isExit =await _dbContext.Queryable().Where(x => x.Id != input.Id && (x.Name == input.Name || x.Code == input.Code)).FirstAsync(); - if (isExit != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - ProductLineEntity entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 产线添加设备 - /// - /// - [HttpPost] - public async Task AddDevice(ProductLineDeviceAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.DeviceId == input.DeviceId); - if (r_entity != null) - { - throw Oops.Bah("设备已存在!"); - } - Pztj_LineDevicesEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 产线删除设备 - /// - /// - [HttpPost] - public async Task DeleteDevice(ProductLineDeviceDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 产线设备不分页 - /// - /// - [HttpGet] - public async Task> DeviceList() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 产线设备分页 - /// - /// - [HttpPost] - public async Task> DevicePageList(ProductLineDeviceQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.DeviceId==b.Id) - .WhereIF(!string.IsNullOrEmpty(input.Name), (a, b) => b.Name.Contains(input.Name)) - .Where((a, b) => a.LineId == input.LineId) - .Select((a,b)=>new ProductLineDeviceOutput - { - DeviceId = a.DeviceId, - DeviceCode = b.Code, - DeviceName = b.Name, - Describe = b.Describe, - DeviceType = b.DeviceType, - Id = a.Id, - LineId = a.LineId - }) - .ToPagedListAsync(input.PageIndex, input.PageSize); - return entity; - } - - - /// - /// 产线添加料仓 - /// - /// - [HttpPost] - public async Task AddStock(ProductLineStockAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.StockId == input.StockId); - if (r_entity != null) - { - throw Oops.Bah("设备已存在!"); - } - Pztj_LineStocksEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 产线删除料仓 - /// - /// - [HttpPost] - public async Task DeleteStock(ProductLineStockDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 产线料仓不分页 - /// - /// - [HttpGet] - public async Task> StockList() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 产线料仓分页 - /// - /// - [HttpPost] - public async Task> StockPageList(ProductLineStockQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .LeftJoin((a, b) => a.StockId == b.Id) - .WhereIF(!string.IsNullOrEmpty(input.Name), (a, b) => b.Name.Contains(input.Name)) - .Where((a, b) => a.LineId == input.LineId) - .Select((a, b) => new ProductLineStockOutput - { - StockId = a.StockId, - StockCode = b.Code, - StockName = b.Name, - Id = a.Id, - LineId = a.LineId - }) - .ToPagedListAsync(input.PageIndex, input.PageSize); - return entity; - } - } -} - diff --git a/backend/BPA.MES.Base.Application/Services/RecipesService/Dtos/RecipesInfoDto.cs b/backend/BPA.MES.Base.Application/Services/RecipesService/Dtos/RecipesInfoDto.cs index 83adee8..1046d42 100644 --- a/backend/BPA.MES.Base.Application/Services/RecipesService/Dtos/RecipesInfoDto.cs +++ b/backend/BPA.MES.Base.Application/Services/RecipesService/Dtos/RecipesInfoDto.cs @@ -72,13 +72,5 @@ /// public string GroupId { get; set; } } - - public class RecipesGroupInput : RecipesGroupEntity - { - /// - /// 主键 - /// - /// - public string Id { get; set; } - } + } diff --git a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/IRecipesInfoService.cs b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/IRecipesInfoService.cs index d1f07bb..db99ee3 100644 --- a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/IRecipesInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/IRecipesInfoService.cs @@ -44,11 +44,6 @@ /// /// Task Detail(string Id); - /// - /// 更改物料分组 - /// - /// - /// - Task ChangeGroup(RecipesGroupInput input); + } } diff --git a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipeMaterialService.cs b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipeMaterialService.cs index f20b767..c094415 100644 --- a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipeMaterialService.cs +++ b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipeMaterialService.cs @@ -86,7 +86,7 @@ { var output = await _dbContext.Queryable() .LeftJoin((a,b)=>a.RecipesId==b.Id) - .LeftJoin((a,b,c)=>a.MaterialId==c.Id) + .LeftJoin((a,b,c)=>a.MaterialId==c.Id) .WhereIF(!string.IsNullOrEmpty(input.RecipesId),(a,b,c)=>a.RecipesId==input.RecipesId) .Select((a,b,c)=>new RecipeMaterialOutput { diff --git a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipesInfoService.cs b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipesInfoService.cs index b535ab2..573beec 100644 --- a/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipesInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/RecipesService/Services/RecipesInfoService.cs @@ -76,9 +76,6 @@ public async Task> PagedList(RecipesInfoQueryPageInput input) { var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.Id==b.RecipesId) - .WhereIF(!string.IsNullOrEmpty(input.Name), (a, b) => a.Name.Contains(input.Name)) - .WhereIF(!string.IsNullOrEmpty(input.GroupId), (a, b) => b.GroupId==input.GroupId) .Select() .ToPagedListAsync(input.PageIndex, input.PageSize); SqlSugarPagedList output = entity.Adapt>(); @@ -117,20 +114,5 @@ var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); return res; } - [HttpPost] - public async Task ChangeGroup(RecipesGroupInput input) - { - var isExit =await _dbContext.Queryable().FirstAsync(x=>x.RecipesId==input.RecipesId); - var entity = input.Adapt(); - if (isExit==null) - { - return await _dbContext.Insertable(entity).ExecuteCommandIdentityIntoEntityAsync(); - } - else - { - return await _dbContext.Updateable(entity).IgnoreColumns(true).Where(x => x.RecipesId == input.RecipesId).ExecuteCommandHasChangeAsync(); - } - - } } } diff --git a/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/IStockInfoService.cs b/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/IStockInfoService.cs deleted file mode 100644 index 46e5196..0000000 --- a/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/IStockInfoService.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :料仓服务 - /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 15:32:17 - /// 描 述 : - /// - public interface IStockInfoService - { - /// - /// 增加 - /// - /// - Task Add(StockInfoAddInput input); - /// - /// 移除 - /// - /// - Task Del(StockInfoDelInput input); - /// - /// 更新 - /// - /// - Task Update(StockInfoUpdateInput input); - /// - /// 不分页列表 - /// - /// - Task> List(); - /// - /// 分页列表 - /// - /// - Task> PagedList(StockInfoQueryPageInput input); - /// - /// 下拉列表 - /// - /// - Task SelectList(); - /// - /// 查询单条 - /// - /// - /// - Task Detail(string Id); - - } -} diff --git a/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/StockInfoService.cs b/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/StockInfoService.cs deleted file mode 100644 index 26ec87c..0000000 --- a/backend/BPA.MES.Base.Application/Services/StockInfoService/Services/StockInfoService.cs +++ /dev/null @@ -1,123 +0,0 @@ -namespace BPA.MES.Base.Application.Services -{ - /// - /// 名 称 :料仓服务 - /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :基础数据管理 - /// - [ApiDescriptionSettings("基础数据管理", Order = 1, Name = "StockInfo", Tag = "料仓服务", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class StockInfoService : IStockInfoService, ITransient, IDynamicApiController - { - private readonly ISqlSugarClient _dbContext; - public StockInfoService(ISqlSugarClient db) - { - _dbContext = db; - } - /// - /// 增加 - /// - /// - /// - [HttpPost] - public async Task Add(StockInfoAddInput input) - { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name || x.Code==input.Code); - if (r_entity != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_StockInfoEntity entity = input.Adapt(); - return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); - } - /// - /// 删除 - /// - /// - /// - /// - [HttpPost] - public async Task Del(StockInfoDelInput input) - { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); - return res; - } - /// - /// 详情 - /// - /// - /// - /// - [HttpGet] - public async Task Detail(string Id) - { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - StockInfoOutput output = entity.Adapt(); - return output; - } - /// - /// 列表 - /// - /// - /// - [HttpGet] - public async Task> List() - { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); - return output; - } - /// - /// 分页 - /// - /// - /// - [HttpPost] - public async Task> PagedList(StockInfoQueryPageInput input) - { - var entity = await _dbContext.Queryable() - .LeftJoin((a,b)=>a.MaterialId==b.Id) - .Select((a,b)=>new StockInfoOutput - { - Id=a.Id.SelectAll(), - MaterialName= b.Name - }) - .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); - return output; - } - /// - /// 下拉 - /// - /// - /// - [HttpGet] - public async Task SelectList() - { - var entity = await _dbContext.Queryable().Select(x => new - { - key = x.Id, - value = x.Name - }).ToListAsync(); - return entity; - } - /// - /// 更新 - /// - /// - /// - /// - [HttpPost] - public async Task Update(StockInfoUpdateInput input) - { - var isExit =await _dbContext.Queryable().Where(x => x.Id != input.Id && (x.Name==input.Name || x.Code==input.Code)).FirstAsync(); - if (isExit != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_StockInfoEntity entity = input.Adapt(); - var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); - return res; - } - } -} diff --git a/backend/BPA.MES.Base.Application/Services/StockInfoService/Dtos/StockInfoDto.cs b/backend/BPA.MES.Base.Application/Services/Template/Dtos/TemplateDto.cs similarity index 60% rename from backend/BPA.MES.Base.Application/Services/StockInfoService/Dtos/StockInfoDto.cs rename to backend/BPA.MES.Base.Application/Services/Template/Dtos/TemplateDto.cs index 35c5b20..c54e69c 100644 --- a/backend/BPA.MES.Base.Application/Services/StockInfoService/Dtos/StockInfoDto.cs +++ b/backend/BPA.MES.Base.Application/Services/Template/Dtos/TemplateDto.cs @@ -1,41 +1,47 @@ -namespace BPA.MES.Base.Application.Services +namespace BPA.MES.Base.Application.Services.Template { /// - /// 名 称 : 料仓服务 + /// 名 称 : /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 15:27:20 + /// 创建时间 : 2023/7/31 18:04:53 /// 描 述 : /// - public class StockInfoDto + public class TemplateDto { /// - /// 料仓编码 - /// - public string Code { get; set; } - /// - /// 料仓名称 + /// 名称 /// public string Name { get; set; } /// - /// 物料Id + /// 编码 /// - public string MaterialId { get; set; } + public string Code { get; set; } /// - /// 料仓容积 + /// 描述 /// - public string Volume { get; set; } + public string Des { get; set; } } /// /// 增加 /// - public class StockInfoAddInput : StockInfoDto + public class TemplateAddInput: TemplateDto { } /// - /// 更新 + /// 修改 + /// + public class TemplateUpdateInput : TemplateDto + { + /// + /// 主键 + /// + public string Id { get; set; } + } + /// + /// 刪除 /// - public class StockInfoUpdateInput : StockInfoDto + public class TemplateDelInput { /// /// 主键 @@ -43,9 +49,9 @@ public string Id { get; set; } } /// - /// 删除 + /// 普通查询条件 /// - public class StockInfoDelInput + public class TemplateQueryInput { /// /// 主键 @@ -53,10 +59,11 @@ public string Id { get; set; } } /// - /// 分页 + /// 分页查询条件 /// - public class StockInfoQueryPageInput : RequestPage + public class TemplateQueryPageInput : RequestPage { + /// /// 名称 /// @@ -69,15 +76,12 @@ /// /// 输出 /// - public class StockInfoOutput : StockInfoDto + public class TemplateOutput: TemplateDto { /// /// 主键 /// public string Id { get; set; } - /// - /// 物料Name - /// - public string MaterialName { get; set; } + //下面增加多的数据 } } diff --git a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketInfoService.cs b/backend/BPA.MES.Base.Application/Services/Template/ITemplateService.cs similarity index 58% rename from backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketInfoService.cs rename to backend/BPA.MES.Base.Application/Services/Template/ITemplateService.cs index dbcb3b0..f8fa077 100644 --- a/backend/BPA.MES.Base.Application/Services/BucketInfoService/Services/IBucketInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/Template/ITemplateService.cs @@ -1,38 +1,44 @@ -namespace BPA.MES.Base.Application.Services +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.MES.Base.Application.Services.Template { /// /// 名 称 : /// 创 建 人 :yangxiao - /// 创建时间 : 2023/7/17 15:43:10 + /// 创建时间 : 2023/7/31 18:02:57 /// 描 述 : /// - public interface IBucketInfoService + public interface ITemplateService { /// /// 增加 /// /// - Task Add(BucketInfoAddInput input); + Task Add(TemplateAddInput input); /// - /// 移除 + /// 删除 /// /// - Task Del(BucketInfoDelInput input); + Task Del(TemplateDelInput input); /// /// 更新 /// /// - Task Update(BucketInfoUpdateInput input); + Task Update(TemplateUpdateInput input); /// /// 不分页列表 /// /// - Task> List(); + Task> List(TemplateQueryInput input); /// /// 分页列表 /// /// - Task> PagedList(BucketInfoQueryPageInput input); + Task> PagedList(TemplateQueryPageInput input); /// /// 下拉列表 /// @@ -43,6 +49,6 @@ /// /// /// - Task Detail(string Id); + Task Detail(string Id); } } diff --git a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsStepsService.cs b/backend/BPA.MES.Base.Application/Services/Template/TemplateService.cs similarity index 51% rename from backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsStepsService.cs rename to backend/BPA.MES.Base.Application/Services/Template/TemplateService.cs index e8f20c5..891917f 100644 --- a/backend/BPA.MES.Base.Application/Services/CraftsInfoService/Services/CraftsStepsService.cs +++ b/backend/BPA.MES.Base.Application/Services/Template/TemplateService.cs @@ -1,16 +1,16 @@ -namespace BPA.MES.Base.Application.Services +namespace BPA.MES.Base.Application.Services.Template { /// - /// 名 称 :工艺路线服务 + /// 名 称 : /// 创 建 人 :yangxiao - /// 创建时间 :2023/3/2 16:11:04 - /// 描 述 :CraftsInfo 工艺管理 CraftsSteps工艺步骤管理 + /// 创建时间 : 2023/7/31 18:03:25 + /// 描 述 : /// - [ApiDescriptionSettings("配方工艺管理", Order = 0, Tag = "工艺服务", Name = "CraftsSteps", KeepName = true, SplitCamelCase = true, KeepVerb = true)] - public class CraftsStepsService : ICraftsStepsService, ITransient, IDynamicApiController + [ApiDescriptionSettings("我是分组名称-模板", Name = "Template", Tag = "我的名字叫模板", KeepName = true, SplitCamelCase = true, KeepVerb = true)] + public class TemplateService : ITemplateService, ITransient, IDynamicApiController { private readonly ISqlSugarClient _dbContext; - public CraftsStepsService(ISqlSugarClient db) + public TemplateService(ISqlSugarClient db) { _dbContext = db; } @@ -20,14 +20,14 @@ /// /// [HttpPost] - public async Task Add(CraftsStepsAddInput input) + public async Task Add(TemplateAddInput input) { - var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); + var r_entity = await _dbContext.Queryable().FirstAsync(x => x.Name == input.Name); if (r_entity != null) { throw Oops.Bah("名称已存在!"); } - Pztj_CraftStepsEntity entity = input.Adapt(); + TemplateEntity entity = input.Adapt(); return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync(); } /// @@ -37,9 +37,9 @@ /// /// [HttpPost] - public async Task Del(CraftsStepsDelInput input) + public async Task Del(TemplateDelInput input) { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); + var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); return res; } /// @@ -49,10 +49,10 @@ /// /// [HttpGet] - public async Task Detail(string Id) + public async Task Detail(string Id) { - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); - CraftsStepsOutput output = entity.Adapt(); + var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == Id); + TemplateOutput output = entity.Adapt(); return output; } /// @@ -60,11 +60,11 @@ /// /// /// - [HttpGet] - public async Task> List() + [HttpPost] + public async Task> List(TemplateQueryInput input) { - var entity = await _dbContext.Queryable().ToListAsync(); - List output = entity.Adapt>(); + var entity = await _dbContext.Queryable().ToListAsync(); + List output = entity.Adapt>(); return output; } /// @@ -73,13 +73,13 @@ /// /// [HttpPost] - public async Task> PagedList(CraftsStepsQueryPageInput input) + public async Task> PagedList(TemplateQueryPageInput input) { - var entity = await _dbContext.Queryable() + var entity = await _dbContext.Queryable() .WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name)) - .WhereIF(!string.IsNullOrEmpty(input.CraftId), x => x.CraftId == input.CraftId) + .WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Code.Contains(input.Code)) .ToPagedListAsync(input.PageIndex, input.PageSize); - SqlSugarPagedList output = entity.Adapt>(); + SqlSugarPagedList output = entity.Adapt>(); return output; } /// @@ -90,7 +90,7 @@ [HttpGet] public async Task SelectList() { - var entity = await _dbContext.Queryable().Select(x => new + var entity = await _dbContext.Queryable().Select(x => new { key = x.Id, value = x.Name @@ -104,17 +104,12 @@ /// /// [HttpPost] - public async Task Update(CraftsStepsUpdateInput input) + public async Task Update(TemplateUpdateInput input) { - var isExit =await _dbContext.Queryable().Where(x => x.Id != input.Id && x.Name == input.Name).FirstAsync(); - if (isExit != null) - { - throw Oops.Bah("名称或编码已存在!"); - } - Pztj_CraftStepsEntity entity = input.Adapt(); + var entity = await _dbContext.Queryable().Where(x => x.Id == input.Id).FirstAsync(); + entity = input.Adapt(); var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); return res; } } } - diff --git a/backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkInfoDto.cs b/backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkInfoDto.cs index d8dd072..617990b 100644 --- a/backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkInfoDto.cs +++ b/backend/BPA.MES.Base.Application/Services/WorkInfoService/Dtos/WorkInfoDto.cs @@ -124,14 +124,9 @@ public WorkInfoDetailOutput() { - CraftList = new(); MaterialList = new(); } /// - /// 工艺步骤 - /// - public List CraftList { get; set; } - /// /// 物料信息 /// public List MaterialList { get; set; } diff --git a/backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs b/backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs index d0bebd8..ce2d74a 100644 --- a/backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs +++ b/backend/BPA.MES.Base.Application/Services/WorkInfoService/Services/WorkInfoService.cs @@ -27,12 +27,12 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services public async Task Add(WorkInfoAddInput input) { bool result = false; - Pztj_WorkInfoEntity entity = input.Adapt(); + WorkInfoEntity entity = input.Adapt(); try { _dbContext.Ado.BeginTran(); await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); - Pztj_WorkInfoStatusEntity pztj_WorkInfoStatusEntity = new() + WorkInfoStatusEntity pztj_WorkInfoStatusEntity = new() { Status = WorkOrderStatusEnum.Draft, WorkId = entity.Id @@ -57,7 +57,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpPost] public async Task Del(WorkInfoDelInput input) { - var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); + var res = await _dbContext.Deleteable().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync(); return res; } /// @@ -69,10 +69,10 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpGet] public async Task Detail(string Id) { - var entity = await _dbContext.Queryable() - .LeftJoin((a, b) => a.FinalId == b.Id) + var entity = await _dbContext.Queryable() + .LeftJoin((a, b) => a.FinalId == b.Id) .LeftJoin((a, b, c) => a.LineId == c.Id) - .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) + .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) .Where((a, b, c, d) => a.Id == Id) .Select((a, b, c, d) => new WorkInfoDetailOutput { @@ -85,18 +85,6 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services { throw Oops.Bah("没有找到工单信息!"); } - //获取成品信息 - var finainfo = await _dbContext.Queryable().FirstAsync(x => x.Id == entity.FinalId); - if (finainfo==null) - { - throw Oops.Bah("没有找到成品信息!"); - } - //获取工艺步骤 - var craftlist = await _dbContext.Queryable().Where(x => x.CraftId == finainfo.CraftId).ToListAsync(); - //获取物料信息 - var materiallist = await _dbContext.Queryable().Where(x => x.RecipesId == finainfo.RecipeId).ToListAsync(); - entity.CraftList = craftlist; - entity.MaterialList = materiallist; return entity; } /// @@ -107,10 +95,10 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpGet] public async Task> List(WorkInfoQueryInput input) { - var entity = await _dbContext.Queryable() - .LeftJoin((a, b) => a.FinalId == b.Id) + var entity = await _dbContext.Queryable() + .LeftJoin((a, b) => a.FinalId == b.Id) .LeftJoin((a, b, c) => a.LineId == c.Id) - .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) + .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) .WhereIF(!string.IsNullOrEmpty(input.Name), (a, b, c, d) => b.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrEmpty(input.Id), (a, b, c, d) => a.Id.Contains(input.Id)) .Select((a, b, c, d) => new WorkInfoOutput @@ -130,10 +118,10 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpPost] public async Task> PagedList(WorkInfoQueryPageInput input) { - var entity = await _dbContext.Queryable() - .LeftJoin((a, b) => a.FinalId == b.Id) + var entity = await _dbContext.Queryable() + .LeftJoin((a, b) => a.FinalId == b.Id) .LeftJoin((a, b, c) => a.LineId == c.Id) - .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) + .LeftJoin((a, b, c, d) => d.Id == SqlFunc.Subqueryable().Where(s => s.WorkId == a.Id).OrderByDesc(s => s.CreateTime).Select(s => s.Id)) .WhereIF(!string.IsNullOrEmpty(input.Name), (a, b, c, d) => b.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrEmpty(input.Id), (a, b, c, d) => a.Id.Contains(input.Id)) .Select((a, b, c, d) => new WorkInfoOutput @@ -162,7 +150,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services WorkId = workId, Status = WorkOrderStatusEnum.Issued }); - var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == workId); + var entity = await _dbContext.Queryable().FirstAsync(x => x.Id == workId); if (res) { await _MQTTService.MqttPublish(entity, Topics.WorkOrderPush, MessageID.WorkOrderIssued); @@ -177,7 +165,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpGet] public async Task SelectList() { - var entity = await _dbContext.Queryable().Select(x => new + var entity = await _dbContext.Queryable().Select(x => new { key = x.Id, value = x.Name @@ -193,7 +181,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpPost] public async Task Update(WorkInfoUpdateInput input) { - Pztj_WorkInfoEntity entity = input.Adapt(); + WorkInfoEntity entity = input.Adapt(); var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync(); return res; } @@ -206,7 +194,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpPost] public async Task UpdateStatus(WorkInfoStatusUpdateInput input) { - Pztj_WorkInfoStatusEntity entity = input.Adapt(); + WorkInfoStatusEntity entity = input.Adapt(); var res = await _dbContext.Insertable(entity).IgnoreColumns(true).ExecuteCommandIdentityIntoEntityAsync(); return res; } @@ -218,7 +206,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpPost] public async Task ForcedEnd(string workId) { - Pztj_WorkInfoStatusEntity entity = new() + WorkInfoStatusEntity entity = new() { WorkId = workId, Status = WorkOrderStatusEnum.Completed @@ -234,7 +222,7 @@ namespace BPA.MES.Base.Application.Services.WorkInfoService.Services [HttpGet] public async Task> StatusList(string workId) { - var entitys = await _dbContext.Queryable().Where(x => x.WorkId == workId).ToListAsync(); + var entitys = await _dbContext.Queryable().Where(x => x.WorkId == workId).ToListAsync(); List list = entitys.Adapt>(); return list; } diff --git a/backend/BPA.MES.Base.Web.Entry/Properties/launchSettings.json b/backend/BPA.MES.Base.Web.Entry/Properties/launchSettings.json index 2bb9b7d..0af794c 100644 --- a/backend/BPA.MES.Base.Web.Entry/Properties/launchSettings.json +++ b/backend/BPA.MES.Base.Web.Entry/Properties/launchSettings.json @@ -22,7 +22,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "http://192.168.1.243:5002", + "applicationUrl": "http://localhost:5000", "dotnetRunMessages": true }, "Docker": { diff --git a/backend/BPA.MES.Base.Web.Entry/appsettings.json b/backend/BPA.MES.Base.Web.Entry/appsettings.json index d565364..003be5c 100644 --- a/backend/BPA.MES.Base.Web.Entry/appsettings.json +++ b/backend/BPA.MES.Base.Web.Entry/appsettings.json @@ -10,7 +10,7 @@ "AllowedHosts": "*", "ConnectionConfigs": [ { - "ConnectionString": "server=10.2.1.254;Port=3306;Database=bpa_pztj_mes;Uid=root;Pwd=BapAdmin123456.;", + "ConnectionString": "server=10.2.1.254;Port=3306;Database=bpa_jxj_mes;Uid=root;Pwd=BapAdmin123456.;", "DbType": "MySql", "IsAutoCloseConnection": true } diff --git a/frontend/config/defaultSettings.ts b/frontend/config/defaultSettings.ts index a971d63..3dc26ae 100644 --- a/frontend/config/defaultSettings.ts +++ b/frontend/config/defaultSettings.ts @@ -9,19 +9,19 @@ const Settings: LayoutSettings & { title?:any } = { navTheme: 'light', - colorPrimary: '#13C2C2', + colorPrimary: '#1890ff', layout: 'mix', contentWidth: 'Fluid', fixedHeader: false, fixSiderbar: true, colorWeak: false, - title: "胖子天骄中控管理系统", + title: "吉香居中控管理系统", menu: { locale: false, // 禁用多语言功能 }, pwa: false, splitMenus:false, - logo: './logo.png', + iconfontUrl: '', }; diff --git a/frontend/config/proxy.ts b/frontend/config/proxy.ts index cb1a023..e9b5b41 100644 --- a/frontend/config/proxy.ts +++ b/frontend/config/proxy.ts @@ -6,7 +6,7 @@ export default { dev: { '/api/': { - target: 'http://192.168.1.243:5002', + target: 'http://localhost:5000', pathRewrite: { '/api': '/api' }, diff --git a/frontend/config/routes.ts b/frontend/config/routes.ts index 8f7af85..fac21f8 100644 --- a/frontend/config/routes.ts +++ b/frontend/config/routes.ts @@ -5,48 +5,36 @@ { icon: 'SettingOutlined', path: '/system', + locale:false, name: '系统管理', routes: [ - { path: '/system/account', name: '账号管理', component: './system/account' }, + { path: '/system/account', name: '账号管理', locale:false, component: './system/account' }, { path: '/system/user', name: '人员管理', component: './system/user' }, - { path: '/system/role', name: '角色管理', component: './system/role' }, - { path: '/system/module', name: '模块管理', component: './system/module' }, - { path: '/system/authTemplate', name: '权限管理', component: './system/authTemplate' }, + { path: '/system/role', name: '角色管理',locale:false, component: './system/role' }, + { path: '/system/module', name: '模块管理', locale:false,component: './system/module' }, + { path: '/system/authTemplate', name: '权限管理',locale:false, component: './system/authTemplate' }, ], }, { - path: '/base', icon: 'SettingOutlined', name: '基础数据管理', - routes: [{ path: '/base/deviceinfo', name: '设备管理', component: './deviceInfo/index' }, - { path: '/base/stock', name: '料仓管理', component: './stock/index' }, - { path: '/base/materials', name: '原料管理', component: './materials/index' }, - { path: '/base/bucket', name: '桶管理', component: './bucket/index' }, - { path: '/base/final', name: '成品管理', component: './final/index' }, - ] - }, - { - path: '/line', icon: 'SettingOutlined', name: '产线管理', - routes: [ - { path: '/line/manufacturing', name: '产线设备管理', component: './manufacturing/index' }, - { path: '/line/group', name: '分组', component: './group/index' } - ] - }, - { - path: '/recipeCraft', icon: 'SettingOutlined', name: '配方工艺管理', + icon: 'SettingOutlined', + path: '/model', + locale:false, + name: '工厂建模', routes: [ - { path: '/recipeCraft/recipe', name: '配方管理', component: './recipe/index' }, - { path: '/recipeCraft/pot', name: '炒锅工艺', component: './craftInfo/pot' }, - { path: '/recipeCraft/kettle', name: '反应釜工艺', component: './craftInfo/kettle' } - ] + { path: '/model/product', name: '产品', component: './template' }, + { path: '/model/material', name: '物料', component: './template' }, + { path: '/model/recipe', name: '配方管理', component: './template' }, + ], }, - { path: '/work', icon: 'SettingOutlined', name: '工单管理', component: './workInfo/index' }, { - path: '/data', icon: 'SettingOutlined', name: '数据服务', + icon: 'SettingOutlined', + path: '/turn', + name: '生产管理', routes: [ - { path: '/data/log1', name: '操作日志', component: './logs/index' }, - { path: '/data/log2', name: '运行日志', component: './logs/index' }, - { path: '/data/log3', name: '报警日志', component: './logs/index' }, - { path: '/data/log4', name: '数据采集', component: './logs/index' } - ] + { path: '/turn/order', name: '产品', component: './template' }, + { path: '/turn/board', name: '物料', component: './template' }, + { path: '/turn/materialBom', name: '配方管理', component: './template' }, + ], }, { path: '*', layout: false, component: './404' }, ]; diff --git a/frontend/package.json b/frontend/package.json index e57cd81..cc14475 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -49,7 +49,7 @@ ], "dependencies": { "@ant-design/icons": "^4.8.0", - "@ant-design/pro-components": "^2.3.44", + "@ant-design/pro-components": "^2.6.10", "@ant-design/pro-layout": "^7.8.3", "@ant-design/use-emotion-css": "1.0.4", "@umijs/route-utils": "^2.2.2", diff --git a/frontend/src/api/Bucket.ts b/frontend/src/api/Bucket.ts deleted file mode 100644 index fb86198..0000000 --- a/frontend/src/api/Bucket.ts +++ /dev/null @@ -1,132 +0,0 @@ - -import { request } from '@umijs/max'; - - -export default { - /** - * 新增 - * @param parms - * @returns - */ - Add(parms: BucketTypes.Info) { - return request('/api/bucketinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 删除 - * @param parms - * @returns - */ - Del(parms: BucketTypes.BucketInfoDelInput) { - return request(`/api/bucketinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 修改 - * @param parms - * @returns - */ - Update(parms: BucketTypes.Info) { - return request('/api/bucketinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - - - /** - * 详情 - * @param parms - * @returns - */ - Detail(id: string) { - return request(`/api/bucketinfo/detail?id=${id}`, { - method: 'GET' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - List() { - return request('/api/bucketinfo/list', { - method: 'POST' - }); - }, - /** - * 未绑定的设备列表 - * @param parms - * @returns - */ - UnBindList() { - return request('/api/bucketinfo/UnBindList', { - method: 'GET' - }); - - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: BucketTypes.Page) { - return request('/api/bucketinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 批量更新 - * @param parms - * @returns - */ - BatchUpdate(parms: BucketTypes.BatchAdd) { - return request('/api/bucketrecipe/batchupdate', { - method: 'POST', - data: parms - }); - }, - /** - * 根据设备Id查询配方信息 - * @param parms - * @returns - */ - RecipeList(id: string){ - return request('api/bucketrecipe/list', { - method: 'POST', - data: { - bucketId: id - } - }); - }, - // 根据桶id查询桶的物料记录 - - materialtrecored(parms: BucketTypes.BucketMaterialsRecordQueryPageInput){ - return request('/api/bucketmaterialsrecord/pagedlist',{ - method: 'POST', - data:{...parms} - }) - }, - // materialtrecored(){ - // return request('/api/bucketmaterialsrecord/list',{ - // method: 'GET', - - // }) - // } - -} - diff --git a/frontend/src/api/DeviceInfo.ts b/frontend/src/api/DeviceInfo.ts deleted file mode 100644 index e300905..0000000 --- a/frontend/src/api/DeviceInfo.ts +++ /dev/null @@ -1,119 +0,0 @@ - -import { request } from '@umijs/max'; - - -export default { - /** - * 新增 - * @param parms - * @returns - */ - Add(parms: DeviceTypes.Info) { - return request('/api/devicesinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 删除 - * @param parms - * @returns - */ - Del(parms: DeviceTypes.DeviceInfoDelInput) { - return request(`/api/devicesinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 修改 - * @param parms - * @returns - */ - Update(parms: DeviceTypes.Info) { - return request('/api/devicesinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 详情 - * @param parms - * @returns - */ - Detail(id: string) { - return request(`/api/devicesinfo/detail?id=${id}`, { - method: 'GET' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - List() { - return request('/api/devicesinfo/list', { - method: 'POST' - }); - }, - /** - * 未绑定的设备列表 - * @param parms - * @returns - */ - UnBindList() { - return request('/api/devicesinfo/UnBindList', { - method: 'GET' - }); - - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: DeviceTypes.Page) { - return request('/api/devicesinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 批量更新 - * @param parms - * @returns - */ - BatchUpdate(parms: DeviceTypes.BatchAdd) { - return request('/api/devicerecipe/batchupdate', { - method: 'POST', - data: parms - }); - }, - /** - * 根据设备Id查询配方信息 - * @param parms - * @returns - */ - RecipeList(id: string){ - return request(' api/devicerecipe/list', { - method: 'POST', - data: { - deviceId: id - } - }); - }, - // 设备下拉 - selectlist(){ - return request('/api/devicesinfo/selectlist',{ - method:'GET' - }) - } -} \ No newline at end of file diff --git a/frontend/src/api/Material.ts b/frontend/src/api/Material.ts deleted file mode 100644 index 6f0df94..0000000 --- a/frontend/src/api/Material.ts +++ /dev/null @@ -1,334 +0,0 @@ -import { request } from '@umijs/max'; - -export default { - /** - * 物料列表 - * @param params - * @returns - */ - MaterialList(params: MaterialTypes.MaterialPageListParams) { - return request('/erp/material/Material/GetMaterialPage', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 根据Id获取物料信息 - * @param id - */ - GetMaterialById(id: string) { - return request(`/erp/material/Material/GetMaterialById?id=${id}`, { - method: 'GET' - }); - }, - - /** - * 新增物料 - * @param params - * @returns - */ - AddMaterial(params: MaterialTypes.MaterialItemEA) { - return request('/erp/material/Material/AddMaterial', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 修改物料 - * @param params - * @returns - */ - UpdateMaterial(params: MaterialTypes.MaterialItemEA) { - return request('/erp/material/Material/UpdateMaterial', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 修改物料价格 - * @param params - * @returns - */ - UpdateMateriaPrice(params: MaterialTypes.MaterialPriceParams) { - return request('/erp/material/Material/UpdateMateriaPrice', { - method: 'POST', - data: { - ...params - } - }); - }, - - - /** - * 扩展属性分页列表 - * @param params - * @returns - */ - GetExtendAttributePage(params: MaterialTypes.ExtendAttributePageParams) { - return request('/erp/material/ExtendAttribute/GetExtendAttributePage', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 添加扩展属性 - * @param params - * @returns - */ - AddExtendAttribute(params: MaterialTypes.ExtendAttributeItem) { - return request('/erp/material/ExtendAttribute/AddExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 修改扩展属性 - * @param params - */ - UpdateExtendAttribute(params: MaterialTypes.ExtendAttributeItem) { - return request('/erp/material/ExtendAttribute/UpdateExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 根据获取扩展属性id获取扩展属性 - * @param id - * @returns - */ - GetExtendAttributeById(id: string) { - return request(`/erp/material/ExtendAttribute/GetExtendAttributeById?id=${id}`, { - method: 'GET' - }); - }, - - /** - * 根据物料ID查询物料扩展属性列表 - * @param materialId - * @returns - */ - GetMaterialExtendAttributeById(materialId: string) { - return request(`/erp/material/MaterialExtend/GetMaterialExtendAttributeById?input=${materialId}`, { - method: 'GET' - }); - }, - - /** - * 新增物料的扩展属性信息 - * @param params - * @returns - */ - AddMaterialExtendAttribute(params: MaterialTypes.MaterialExtendAttributeItem) { - return request('/erp/material/MaterialExtend/AddMaterialExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 编辑物料的扩展属性信息 - * @param params - */ - UpdateMaterialExtendAttribute(params: MaterialTypes.MaterialExtendAttributeItem) { - return request('/erp/material/MaterialExtend/UpdateMaterialExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 获取物料类型分页列表 - * @param params - */ - GetMaterialTypePage(params: MaterialTypes.MaterialTypeParams) { - return request('/erp/material/MaterialType/GetMaterialTypePage', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 新增物料类型 - * @param params - * @returns - */ - AddMaterialType(params: MaterialTypes.MaterialType) { - return request('/erp/material/MaterialType/AddMaterialType', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 更新物料类型 - * @param params - * @returns - */ - UpdateMaterialType(params: MaterialTypes.MaterialType) { - return request('/erp/material/MaterialType/UpdateMaterialType', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 根据物料类型Id获取物料的拓展信息 - * @param id - */ - GetMaterialTypeExtendAttributeById(id: string) { - return request(`/erp/material/MaterialType/GetMaterialTypeExtendAttributeById?Id=${id}`, { - method: 'GET' - }); - }, - - /** - * 新增物料类型的拓展信息 - * @param params - * @returns - */ - AddMaterialTypeExtendAttribute(params: MaterialTypes.MaterialTypeExtend) { - return request('/erp/material/MaterialTypeExtend/AddMaterialTypeExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 更新物料类型扩展信息 - * @param params - * @returns - */ - UpdateMaterialTypeExtendAttribute(params: MaterialTypes.MaterialTypeExtend) { - return request('/erp/material/MaterialTypeExtend/UpdateMaterialTypeExtendAttribute', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 根据物料Id查询物料的修改记录 - * @param params - * @returns - */ - MeterialModifyPage(params: MaterialTypes.MaterialModifyPageParams) { - return request(`/erp/material/MeterialModify/MeterialModifyPage`, { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 新增物料修改记录 - * @param params - * @returns - */ - AddMeterialModify(params: MaterialTypes.MaterialModify) { - return request('/erp/material/MeterialModify/AddMeterialModify', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 根据物料Id获取物料单位的换算列表 - * @param id - * @returns - */ - GetUnitTransformationsById(id: string) { - return request(`/erp/material/UnitTransformation/GetUnitTransformationsById?Id=${id}`, { - method: 'GET' - }); - }, - - /** - * 添加物料换算 - * @param params - * @returns - */ - AddUnitTransformation(params: MaterialTypes.MaterialUnitTransform) { - return request('/erp/material/UnitTransformation/AddUnitTransformation', { - method: 'POST', - data: { - ...params - } - }); - }, - - /** - * 编辑物料换算 - * @param params - * @returns - */ - UpdateUnitTransformation(params: MaterialTypes.MaterialUnitTransform) { - return request('/erp/material/UnitTransformation/UpdateUnitTransformation', { - method: 'POST', - data: { - ...params - } - }); - }, - - - /** - * 导出物料模板 - * @param materialTypeId - * @returns - */ - MaterialTemplateExport(materialTypeId: string) { - return request(`/erp/material/Material/MaterialTemplateExport?materialTypeId=${materialTypeId}`, { - method: 'GET', - responseType: 'blob' - }); - }, - - /** - * 导出物料数据 - * @param params - * @returns - */ - MaterialDataExport(params: MaterialTypes.ExportMaterialParams) { - return request('/erp/material/Material/MaterialDataExport', { - method: 'POST', - responseType: 'blob', - data: { - ...params - } - }); - } -} \ No newline at end of file diff --git a/frontend/src/api/StockService.ts b/frontend/src/api/StockService.ts deleted file mode 100644 index 5c44644..0000000 --- a/frontend/src/api/StockService.ts +++ /dev/null @@ -1,119 +0,0 @@ - -import { request } from '@umijs/max'; - - -export default { - /** - * 新增料仓 - * @param parms - * @returns - */ - Add(parms: StockTypes.Info) { - return request('/api/stockinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 删除 - * @param parms - * @returns - */ - Del(parms: StockTypes.StockInfoDelInput) { - return request(`/api/stockinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 修改 - * @param parms - * @returns - */ - Update(parms: StockTypes.Info) { - return request('/api/stockinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 详情 - * @param parms - * @returns - */ - Detail(id: string) { - return request(`/api/stockinfo/detail?id=${id}`, { - method: 'GET' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - List() { - return request('/api/stockinfo/list', { - method: 'POST' - }); - }, - /** - * 未绑定的设备列表 - * @param parms - * @returns - */ - UnBindList() { - return request('/api/stockinfo/UnBindList', { - method: 'GET' - }); - - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: StockTypes.Page) { - return request('/api/stockinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - // /** - // * 批量更新 - // * @param parms - // * @returns - // */ - // BatchUpdate(parms: StockTypes.BatchAdd) { - // return request('/api/Stockrecipe/batchupdate', { - // method: 'POST', - // data: parms - // }); - // }, - /** - * 根据设备Id查询配方信息 - * @param parms - * @returns - */ - RecipeList(id: string){ - return request(' api/stockrecipe/list', { - method: 'POST', - data: { - StockId: id - } - }); - }, - // 料仓下拉列表 - selectlist(){ - return request('/api/stockinfo/selectlist',{ - method :'GET' - }) - } -} \ No newline at end of file diff --git a/frontend/src/api/app/other/dto.d.ts b/frontend/src/api/app/other/dto.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/api/app/other/service.ts b/frontend/src/api/app/other/service.ts new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/api/app/template/dto.d.ts b/frontend/src/api/app/template/dto.d.ts new file mode 100644 index 0000000..850b776 --- /dev/null +++ b/frontend/src/api/app/template/dto.d.ts @@ -0,0 +1,67 @@ +declare namespace template { + /** + * 基类 + */ + type base_dto = { + /** + * 编码 + */ + code?: null | string; + /** + * 描述 + */ + des?: null | string; + /** + * 名称 + */ + name?: null | string; + } + /** + * 增加输入参数 + */ + type addInput = base_dto + /** + * 更新输入参数 + */ + interface updateInput extends base_dto { + /** + * 主键 + */ + id: string + } + /** + * 删除输入参数 + */ + interface delInput { + /** + * 主键 + */ + id: string + } + /** + * 查询输入参数 + */ + interface queryParms { + /** + * 名称 + */ + name?: null | string; + } + /** + * 查询分页输入参数 + */ + interface queryPage { + pageIndex: number, + pageSize: number, + name:string + } + /** + * 查询输出参数 + */ + interface output extends base_dto { + /** + * 主键 + */ + id: string + } +} \ No newline at end of file diff --git a/frontend/src/api/app/template/service.ts b/frontend/src/api/app/template/service.ts new file mode 100644 index 0000000..3906b66 --- /dev/null +++ b/frontend/src/api/app/template/service.ts @@ -0,0 +1,83 @@ + +import { request } from '@umijs/max'; + + +export default { + /** + * 新增 + * @param parms + * @returns + */ + Add(parms: template.addInput) { + return request('/api/template/add', { + method: 'POST', + data: { + ...parms, + }, + }); + }, + /** + * 删除 + * @param parms + * @returns + */ + Del(parms: template.delInput) { + return request(`/api/template/del`, { + method: 'POST', + data: { + ...parms, + }, + }); + }, + /** + * 修改 + * @param parms + * @returns + */ + Update(parms: template.updateInput) { + return request('/api/template/update', { + method: 'POST', + data: { + ...parms, + }, + }); + }, + /** + * 详情 + * @param parms + * @returns + */ + Detail(id: string) { + return request(`/api/template/detail?id=${id}`, { + method: 'GET' + }); + }, + /** + * 获取列表 + * @param parms + * @returns + */ + List(parms: template.queryParms) { + return request('/api/template/list', { + method: 'POST', + data: { + ...parms, + }, + }); + }, + /** + * 分页查询 + * @param parms + * @returns + */ + PagedList(parms: template.queryPage) { + return request('/api/template/pagedlist', { + method: 'POST', + data: { + ...parms, + }, + }); + }, + +} + diff --git a/frontend/src/api/craftsinfo.ts b/frontend/src/api/craftsinfo.ts deleted file mode 100644 index 24671c5..0000000 --- a/frontend/src/api/craftsinfo.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Pztj_CraftStepsAddInput } from './../types/Crafts.d'; - -import { request } from '@umijs/max'; - -// 工艺 -export default { - /** - * 新增 - * @param parms - * @returns - */ - Add(parms: CraftsTypes.Info) { - return request('/api/craftsinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 删除 - * @param parms - * @returns - */ - Del(parms: CraftsTypes.craftsInfoDelInput) { - return request(`/api/craftsinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 修改 - * @param parms - * @returns - */ - Update(parms: CraftsTypes.Info) { - return request('/api/craftsinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - - - /** - * 详情 - * @param parms - * @returns - */ - Detail(id: string) { - return request(`/api/craftsinfo/detail?id=${id}`, { - method: 'GET' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - List() { - return request('/api/craftsinfo/list', { - method: 'POST' - }); - }, - /** - * 未绑定的设备列表 - * @param parms - * @returns - */ - UnBindList() { - return request('/api/craftsinfo/UnBindList', { - method: 'GET' - }); - - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: CraftsTypes.Page) { - return request('/api/craftsinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 批量更新 - * @param parms - * @returns - */ - BatchUpdate(parms: CraftsTypes.BatchAdd) { - return request('/api/craftsrecipe/batchupdate', { - method: 'POST', - data: parms - }); - }, - // 下拉 - selectlist() { - return request('/api/craftsinfo/selectlist', { - method: 'GET', - - }) - }, - BatchAdd(parms :CraftsTypes.Pztj_CraftStepsAddInput[]){ - return request('',{ - method: 'POST', - data:{...parms} - }) - }, - //根据工艺查询步骤 - craftsStepPage(parms: CraftsTypes.Pztj_CraftStepsPageInput){ - return request(`/api/craftssteps/pagedlist`, { - method: 'POST', - data:{...parms} - }) - } -} - diff --git a/frontend/src/api/finalService.ts b/frontend/src/api/finalService.ts deleted file mode 100644 index 3f0f9cf..0000000 --- a/frontend/src/api/finalService.ts +++ /dev/null @@ -1,123 +0,0 @@ - -import { request } from '@umijs/max'; - - -export default { - /** - * 新增 - * @param parms - * @returns - */ - Add(parms: FinalTypes.Info) { - return request('/api/finalsinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 删除 - * @param parms - * @returns - */ - Del(parms: FinalTypes.FinalInfoDelInput) { - return request(`/api/finalsinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 修改 - * @param parms - * @returns - */ - Update(parms: FinalTypes.Info) { - return request('/api/finalsinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 详情 - * @param parms - * @returns - */ - Detail(id: string) { - return request(`/api/finalsinfo/detail?id=${id}`, { - method: 'GET' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - List() { - return request('/api/finalsinfo/list', { - method: 'POST' - }); - }, - /** - * 获取列表 - * @param parms - * @returns - */ - SelectList() { - return request('/api/finalsinfo/selectlist', { - method: 'GET' - }); - }, - /** - * 未绑定的设备列表 - * @param parms - * @returns - */ - UnBindList() { - return request('/api/finalsinfo/UnBindList', { - method: 'GET' - }); - - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: FinalTypes.Page) { - return request('/api/finalsinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 批量更新 - * @param parms - * @returns - */ - BatchUpdate(parms: FinalTypes.BatchAdd) { - return request('/api/finalsinfo/batchupdate', { - method: 'POST', - data: parms - }); - }, - /** - * 根据设备Id查询配方信息 - * @param parms - * @returns - */ - RecipeList(id: string){ - return request(' api/finalsinfo/list', { - method: 'POST', - data: { - deviceId: id - } - }); - } -} \ No newline at end of file diff --git a/frontend/src/api/groupService.ts b/frontend/src/api/groupService.ts deleted file mode 100644 index 0edc4af..0000000 --- a/frontend/src/api/groupService.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { request } from '@umijs/max'; - - -export default { - //创建分组 - Add(parms: GroupInfoTypes.Info) { - return request('/api/groupinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //删除 - Del(parms: GroupInfoTypes.Info) { - return request(`/api/groupinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //修改 - Update(parms: GroupInfoTypes.Info) { - return request('/api/groupinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //列表 - List() { - return request('/api/groupinfo/list', { - method: 'POST', - }); - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: GroupInfoTypes.Page) { - return request('/api/groupinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - // 下拉 - selectlist() { - return request('/api/groupinfo/selectlist', { - method: 'GET' - } - - ) - } -} - diff --git a/frontend/src/api/materialService.ts b/frontend/src/api/materialService.ts deleted file mode 100644 index efaa10f..0000000 --- a/frontend/src/api/materialService.ts +++ /dev/null @@ -1,70 +0,0 @@ - - -import { request } from '@umijs/max'; - - - -export default { - //创建 - Add(parms: MaterialsTypes.Info) { - return request('/api/materialsinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - //删除 - - Del(parms: MaterialsTypes.MaterialsInfoDelInput) { - return request(`/api/materialsinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - //修改 - Update(parms: MaterialsTypes.Info) { - return request('/api/materialsinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - - //获取列表 - List() { - return request('/api/materialsinfo/list', { - method: 'GET', - }); - }, - - // 下拉列表 - selectlist(){ - return request ('/api/materialsinfo/selectlist' ,{ - method:'GET' - }) - }, - - - - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: MaterialsTypes.Page) { - return request('/api/materialsinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - } -} - diff --git a/frontend/src/api/productlineService.ts b/frontend/src/api/productlineService.ts deleted file mode 100644 index a7edcb7..0000000 --- a/frontend/src/api/productlineService.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { request } from '@umijs/max'; - - -export default { - //创建产线 - Add(parms: ProductlineTypes.Info) { - return request('/api/productline/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //删除 - Del(parms: ProductlineTypes.Info) { - return request(`/api/productline/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //修改 - Update(parms: ProductlineTypes.Info) { - return request('/api/productline/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //列表 - List() { - return request('/api/productline/list', { - method: 'GET', - }); - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: ProductlineTypes.Page) { - return request('/api/productline/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - // 下拉列表 - selectlist() { - return request('/api/productline/selectlist', { - method: 'GET', - - }); - }, - // 产线添加设备 - adddevice(parms:ProductlineTypes.Productlinedevice){ - return request('/api/productline/adddevice',{ - method :'POST', - data:{ - ...parms, - } - }) - }, - // 产线添加料仓 - addstock(parms:ProductlineTypes.Productlinestock){ - return request('/api/productline/addstock',{ - method :'POST', - data:{ - ...parms, - } - }) - }, - // 产线设备分页 - devicepagelist(parms:ProductlineTypes.Productionlinepaging){ - return request('/api/productline/devicepagelist',{ - method:'POST', - data:{ - ...parms - } - }) - }, - // 产线料仓分页 - stockpagelist(parms:ProductlineTypes.Productionlinestockpaging){ - return request('/api/productline/stockpagelist',{ - method:'POST', - data:{ - ...parms - } - }) - }, - // 产线删除设备 - - deletedevice(parms:ProductlineTypes.Productionlinedeletiondevice){ - return request('/api/productline/deletedevice',{ - method:'POST', - data:{ - ...parms - } - }) - }, - // 产线删除料仓 - deletestock(parms:ProductlineTypes.Productionlinedeletstock){ - return request('',{ - method:'POST', - data:{ - ...parms - } - }) - } -} - - diff --git a/frontend/src/api/recipeService.ts b/frontend/src/api/recipeService.ts deleted file mode 100644 index 570af4d..0000000 --- a/frontend/src/api/recipeService.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { request } from '@umijs/max'; - - -export default { - //创建配方 - Add(parms: RecipeTypes.Info) { - return request('/api/recipesinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //删除 - Del(parms: RecipeTypes.Info) { - return request(`/api/recipesinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - //修改角色 - Update(parms: RecipeTypes.Info) { - return request('/api/recipesinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - - //获取角色列表 - List() { - return request('/api/recipesinfo/list', { - method: 'GET', - }); - }, - - /** - * 角色分页查询 - * @param parms - * @returns - */ - PagedList(parms: RecipeTypes.Page) { - return request('/api/recipesinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - /** - * 获取配方物料列表 - * @param parms - * @returns - */ - MaterialList(parms:RecipeMaterialTypes.Info ){ - return request('/api/recipematerial/list', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //批量创建物料信息 - BatchAdd(parms: RecipeMaterialTypes.Info[]){ - return request('/api/recipematerial/batchadd', { - method: 'POST', - data: parms - }); - }, - //更改分组 - ChangeGroup(parms: RecipeTypes.RecipesGroupInput){ - return request('/api/recipesinfo/changegroup', { - method: 'POST', - data: parms - }); - }, - // 下拉 - selectlist() { - return request('/api/recipesinfo/selectlist', { - method: 'GET', - - }) - } -} - diff --git a/frontend/src/api/storeService.ts b/frontend/src/api/storeService.ts deleted file mode 100644 index f3d1d1a..0000000 --- a/frontend/src/api/storeService.ts +++ /dev/null @@ -1,59 +0,0 @@ - - -import { request } from '@umijs/max'; - - -export default { - //创建 - Add(parms: StoreTypes.StoreInfo) { - return request('/api/storeinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - //删除 - Del(parms: StoreTypes.StoreInfo) { - return request(`/api/storeinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - //修改角色 - Update(parms: StoreTypes.StoreInfo) { - return request('/api/storeinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - - - //获取角色列表 - List() { - return request('/api/storeinfo/list', { - method: 'GET', - }); - }, - - /** - * 角色分页查询 - * @param parms - * @returns - */ - PagedList(parms: StoreTypes.StoreInfo) { - return request('/api/storeinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - } -} - diff --git a/frontend/src/api/AuthTemplate.ts b/frontend/src/api/sys/AuthTemplate.ts similarity index 100% rename from frontend/src/api/AuthTemplate.ts rename to frontend/src/api/sys/AuthTemplate.ts diff --git a/frontend/src/api/ModuleAPI.ts b/frontend/src/api/sys/ModuleAPI.ts similarity index 100% rename from frontend/src/api/ModuleAPI.ts rename to frontend/src/api/sys/ModuleAPI.ts diff --git a/frontend/src/api/Role.ts b/frontend/src/api/sys/Role.ts similarity index 100% rename from frontend/src/api/Role.ts rename to frontend/src/api/sys/Role.ts diff --git a/frontend/src/api/User.ts b/frontend/src/api/sys/User.ts similarity index 100% rename from frontend/src/api/User.ts rename to frontend/src/api/sys/User.ts diff --git a/frontend/src/api/accountService.ts b/frontend/src/api/sys/accountService.ts similarity index 100% rename from frontend/src/api/accountService.ts rename to frontend/src/api/sys/accountService.ts diff --git a/frontend/src/api/sys/index.tsx b/frontend/src/api/sys/index.tsx new file mode 100644 index 0000000..b6e52b8 --- /dev/null +++ b/frontend/src/api/sys/index.tsx @@ -0,0 +1,204 @@ +/** + * 设备基础信息管理 + * @param Page + * @returns + */ + import type { ActionType, ProColumns } from '@ant-design/pro-components'; + import { ProTable } from '@ant-design/pro-components'; + import { Button, Modal, Form, Input, message, Popconfirm, Tag} from 'antd'; + import { useRef, useState, useEffect } from 'react'; + import AccountAPI from '@/api/sys/accountService'; + + export default () => { + //表单 + const [typeForm] = Form.useForm(); + const [modelTitle, setModelTitle] = useState(); + //编辑/新增弹窗 + const [isModalOpen, setIsModalOpen] = useState(false); + const actionRef = useRef(); + const columns: ProColumns[] = [ + { + title: '账号', + dataIndex: 'account', + ellipsis: true, + }, + { + title: '操作', + valueType: 'option', + key: 'option', + render: (_, record) => [ + , + { + + const EnablejsonData: Account.TBAccountDTO = { + id: record.id, + name: '', + code: '' + }; + AccountAPI.Del(EnablejsonData).then((r) => { + if (r.statusCode === 200) { + message.success(r.statusCode === 200 ? '删除成功' : r.message); + actionRef.current?.reload(); + } + }); + }} + onCancel={() => { + message.info('已取消删除'); + }} + okText="确认" + cancelText="关闭" + > + + , + ], + }, + ]; + + /* + 初始化 + */ + useEffect(() => { + // 下拉列表信息 + const RegionDataList = () => { + + }; + RegionDataList(); + }, []); + + /* + *表单提交 + */ + const OnSubmit = async (values: Account.TBAccountDTO) => { + if (values.id) { + const response = await AccountAPI.Update(values); + if (response.statusCode === 200) { + message.success('修改成功'); + actionRef.current?.reload(); + setIsModalOpen(false); + } else { + message.error(response.errors || '修改失败'); + } + } else { + const response = await AccountAPI.Add(values); + console.log('response', response); + if (response.statusCode === 200) { + message.success('添加成功'); + actionRef.current?.reload(); + setIsModalOpen(false); + } else { + message.error(response.errors || '添加失败'); + } + } + }; + return ( + <> + + key="myTable" + columns={columns} + actionRef={actionRef} + cardBordered + request={async (params = {}) => { + const jsonData: DeviceTypes.Page = { + pageIndex: params.current || 1, + pageSize: params.pageSize || 10, + name: params.name || '', + id: '', + code: '' + }; + const response = await AccountAPI.PagedList(jsonData); + if (response.statusCode === 200) { + return { + data: response.data.items, + success: true, + total: response.data.total, + }; + } else { + return { + data: [], + success: false, + total: 0, + }; + } + }} + rowKey="id" + pagination={{ + pageSize: 10, + }} + dateFormatter="string" + headerTitle="设备列表" + toolBarRender={() => [ + , + ]} + /> + {modelTitle}} + open={isModalOpen} + onCancel={() => { + setIsModalOpen(false); + }} + footer={[ + , + , + ]} + > +
+ + + + +
+
+ + ); + }; + \ No newline at end of file diff --git a/frontend/src/api/workService.ts b/frontend/src/api/workService.ts deleted file mode 100644 index 7d619b8..0000000 --- a/frontend/src/api/workService.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { request } from '@umijs/max'; - - -export default { - //创建分组 - Add(parms: WorkInfoTypes.WorkInfoAddInput) { - return request('/api/workinfo/add', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //删除 - Del(parms: WorkInfoTypes.WorkInfoDelInput) { - return request(`/api/workinfo/del`, { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //修改 - Update(parms: WorkInfoTypes.WorkInfoUpdateInput) { - return request('/api/workinfo/update', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - //列表 - List() { - return request('/api/workinfo/list', { - method: 'POST', - }); - }, - /** - * 分页查询 - * @param parms - * @returns - */ - PagedList(parms: WorkInfoTypes.Page) { - return request('/api/workinfo/pagedlist', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - Publish(workId: string){ - return request(`/api/workinfo/publish/${workId}`, { - method: 'POST' - }); - }, - UpdateStatus(parms:WorkInfoTypes.WorkInfoStatusUpdateInput){ - return request('/api/workinfo/ForcedEnd', { - method: 'POST', - data: { - ...parms, - }, - }); - }, - ForcedEnd(workId: string){ - return request(`/api/workinfo/forcedend/${workId}`, { - method: 'POST' - }); - }, - UpdateStatusList(workId:string){ - return request(`/api/workinfo/statuslist/${workId}`, { - method: 'GET' - }); - } -} - diff --git a/frontend/src/app.tsx b/frontend/src/app.tsx index 5c156a9..6d27d1f 100644 --- a/frontend/src/app.tsx +++ b/frontend/src/app.tsx @@ -5,7 +5,7 @@ import defaultSettings from '../config/defaultSettings'; import { errorConfig } from './requestErrorConfig'; import HeaderRight from './components/HeaderRight'; import { history } from '@umijs/max'; -import UserAPI from '@/api/User'; +import UserAPI from '@/api/sys/User'; import React from 'react'; import * as Icon from '@ant-design/icons'; const isDev = process.env.NODE_ENV === 'development'; @@ -21,6 +21,7 @@ const loopMenuItem = (menus: MenuDataItem[]): MenuDataItem[] => { const formartRoutes = (menuTree: any[]) => { menuTree.forEach((item) => { item.path = item.url; + item.locale = false; if (item.children && item.children.length > 0 && item.category < 2) { formartRoutes(item.children); } else { @@ -74,32 +75,36 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => { content: '黑菠萝科技研发部', }, token: { - colorBgAppListIconHover: 'rgba(0,0,0,0.06)', - colorTextAppListIconHover: 'rgba(255,255,255,0.95)', - colorTextAppListIcon: 'rgba(255,255,255,0.85)', - sider: { - colorBgCollapsedButton: '#13C2C2', - colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)', - colorTextCollapsedButton: 'rgba(0,0,0,0.45)', - colorMenuBackground: '#000', - colorBgMenuItemCollapsedHover: 'rgba(0,0,0,0.06)', - colorBgMenuItemCollapsedSelected: '#13C2C2', - colorMenuItemDivider: 'rgba(255,255,255,0.15)', - colorBgMenuItemHover: '#F5222D', - colorBgMenuItemSelected: '#13C2C2', - colorTextMenuSelected: '#fff', - colorTextMenuItemHover: 'rgba(255,255,255,0.75)', - colorTextMenu: 'rgba(255,255,255,0.75)', - colorTextMenuSecondary: 'rgba(255,255,255,0.65)', - colorTextMenuTitle: 'rgba(255,255,255,0.95)', - colorTextMenuActive: 'rgba(255,255,255,0.95)', + // colorBgAppListIconHover: 'rgba(0,0,0,0.06)', + // colorTextAppListIconHover: 'rgba(255,255,255,0.95)', + colorTextAppListIcon: 'rgba(255,255,255,0.85)', + sider: { + // colorBgCollapsedButton: '#13C2C2', + // colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)', + // colorTextCollapsedButton: 'rgba(0,0,0,0.45)', + colorMenuBackground: '#fff', + // colorBgMenuItemCollapsedHover: 'rgba(0,0,0,0.06)', + // colorBgMenuItemCollapsedSelected: '#13C2C2', + colorMenuItemDivider: defaultSettings.colorPrimary, + // colorBgMenuItemHover: '#F5222D', + colorBgMenuItemSelected: defaultSettings.colorPrimary, + colorTextMenuSelected: '#000', + // colorTextMenuItemHover: 'rgba(255,255,255,0.75)', + colorTextMenu: '#000', + // colorTextMenuSecondary: 'rgba(255,255,255,0.65)', + // colorTextMenuTitle: 'rgba(255,255,255,0.95)', + // colorTextMenuActive: 'rgba(255,255,255,0.95)', colorTextSubMenuSelected: '#fff', - }, + }, header: { - colorBgHeader: '#000000', - colorMenuBackground: '#fff', - colorHeaderTitle: '#13C2C2', + colorBgHeader: '#000', + colorMenuBackground: '#000', + colorHeaderTitle: '#ffffff', }, + pageContainer:{ + paddingInlinePageContainerContent: 20, + paddingBlockPageContainerContent:10 + } }, footerRender: () =>