55 Commits

Author SHA1 Message Date
71f6cfed3d Merge remote-tracking branch 'origin/生产及设备基础资料' 2026-05-28 17:16:45 +08:00
84821955c9 胶料快检记录新增 2026-05-28 17:15:20 +08:00
geht
a63cd6ad1a IM聊天功能优化 2026-05-28 17:08:34 +08:00
geht
3539eab924 新增IM聊天 2026-05-28 14:37:05 +08:00
geht
99e574f600 新增架子车数设定 2026-05-28 10:38:57 +08:00
geht
f3e0ffca4c 优化混炼示方日志记录逻辑,直接从入参构建快照以减少数据库查询,提高性能与效率。 2026-05-27 17:38:55 +08:00
geht
d2c1d4443b 优化配方日志查询功能,新增默认排序和参数处理逻辑,提升数据获取效率与用户体验。 2026-05-26 17:53:24 +08:00
geht
9e36435a72 新增配方日志查询功能,记录配方和混炼示方的创建、更新与删除操作,增强数据追溯能力。 2026-05-26 17:50:55 +08:00
geht
c70f7b2b90 新增混炼示方密炼PS审批联动同步审批人功能,优化混炼示方的编辑与删除权限控制,增强用户交互体验。 2026-05-26 11:15:00 +08:00
geht
7786369a63 Merge branch '20260519-3.9.2版本-葛昊天分支' 2026-05-26 11:09:41 +08:00
geht
e6241c16c7 优化混炼示方中换算系数和配方参数的数值展示与输入解析,调整相关字段的小数精度,增强用户交互体验。 2026-05-26 10:26:53 +08:00
geht
51cac2c17a 新增混炼示方选择弹窗及相关功能,支持规格选择与参照新增,优化用户交互体验。 2026-05-26 10:21:56 +08:00
geht
a579f0e15c 新增参照历史混合步骤功能,包含混合步骤复制、状态解析及历史步骤选择弹窗,优化用户交互体验。 2026-05-26 10:10:28 +08:00
geht
41f8cef462 优化混炼示方 2026-05-26 09:52:42 +08:00
geht
72aeee0f10 优化种类生成逻辑 2026-05-25 20:42:13 +08:00
geht
441c19e87a 实现密炼物料种类配置关联解析功能,新增种类查找表加载与解析接口,优化选料弹窗层级与刷新功能,增强用户体验与系统稳定性。 2026-05-25 20:29:07 +08:00
geht
dc3f305303 优化混炼示方,新增种类配置 2026-05-25 19:44:14 +08:00
589961397c 快检实验标准新增 2026-05-25 16:01:14 +08:00
837a85f7ba Merge branch '生产及设备基础资料' 2026-05-25 11:02:18 +08:00
a6579f019a 快检实验方法新增 2026-05-25 11:01:26 +08:00
af8bf14b5e 胶料快检实验类型、胶料快检数据点、胶料快检实验方法新增 2026-05-25 11:01:00 +08:00
geht
c85657d199 新增混炼示方生成预览与批量创建功能,优化相关字段及用户交互,修复界面显示问题,增强系统稳定性和用户体验。 2026-05-22 19:43:41 +08:00
geht
f3e3a99ebc Merge remote-tracking branch 'origin/main' into 20260519-3.9.2版本-葛昊天分支 2026-05-22 16:35:11 +08:00
geht
d7fd9c6037 新增MES混炼示方模块,包括主表及子表结构、控制器、服务和映射器的实现,支持增删改查功能,优化数据验证和用户体验,增强系统稳定性。 2026-05-22 16:34:33 +08:00
geht
680eb6c54c 更新配合示方模块,新增密炼PS审批联动功能,支持状态与审批人同步,优化相关服务实现,调整数据库状态字典,增强系统数据一致性和用户体验。 2026-05-22 12:15:05 +08:00
b56bf74bb8 Merge branch 'main' of http://27.223.88.102:33000/chenx/qhmes 2026-05-22 12:04:56 +08:00
467c49f432 密炼机动作维护、日罐物料对应信息、密炼机条件维护、生产订单、金蝶对接配置 2026-05-22 12:04:46 +08:00
fa1c5c9b42 Merge remote-tracking branch 'origin/生产及设备基础资料' 2026-05-22 09:58:43 +08:00
geht
442b31ad37 Merge branch '20260519-3.9.2版本-葛昊天分支' 2026-05-21 18:50:05 +08:00
geht
89407d1f1d 新增配合示方模块,包括主子表结构、控制器、服务及映射器的实现,支持增删改查功能,优化胶料代号生成逻辑及相关字段,增强数据验证和用户体验。 2026-05-21 18:49:20 +08:00
2496d05349 设备点检记录新增 2026-05-21 17:54:57 +08:00
874e513c90 Merge branch 'main' of http://27.223.88.102:33000/chenx/qhmes 2026-05-21 10:04:24 +08:00
e678276aba 密炼机动作维护、日罐物料对应关系 2026-05-21 10:04:06 +08:00
geht
a10aae420a 更新胶料信息处理逻辑,优化字段描述及数据验证,增强系统稳定性和用户体验。 2026-05-20 19:06:58 +08:00
geht
9f37292eea 更新胶料编码为胶料别名,调整相关字段和描述,新增数据库字段以支持胶料信息补全 2026-05-20 16:12:38 +08:00
geht
1a4027086c Merge branch 'main' into 20260519-3.9.2版本-葛昊天分支 2026-05-20 15:59:44 +08:00
geht
031725de7e 新增MES密炼物料替代对应关系及开炼机参数维护模块,包括相关实体、控制器、服务和映射器的实现,支持增删改查及数据验证功能。 2026-05-20 15:56:27 +08:00
09c58f80eb 胶料信息更换分类字典 2026-05-20 15:55:54 +08:00
geht
cd3194d1a6 Merge remote-tracking branch 'origin/main' into 20260519-3.9.2版本-葛昊天分支 2026-05-20 15:49:36 +08:00
c09ca584c3 解决终端汉字乱码问题 2026-05-20 15:37:39 +08:00
0e6eba8cf4 Merge branch 'main' of http://27.223.88.102:33000/chenx/qhmes 2026-05-20 15:30:46 +08:00
34b6ed4478 胶料信息 2026-05-20 15:30:42 +08:00
1b45d6124d 设备点检配置新增 2026-05-20 15:30:37 +08:00
geht
27c2ed898c 添加兼容旧库的桌面端登录设置配置项,确保在缺失时自动补全相关 sys_config 项 2026-05-20 12:29:10 +08:00
geht
e5e8341b3e 修正日志输出中的访问URL提示信息,去掉多余的冒号以提高可读性。 2026-05-20 11:59:21 +08:00
geht
39c990b2ae 修正日志输出中的访问URL提示信息,调整标点符号以提高可读性。 2026-05-20 11:58:43 +08:00
b86c94add9 Merge remote-tracking branch 'origin/main' into 生产及设备基础资料 2026-05-20 11:35:54 +08:00
84286a6769 配置地址 2026-05-20 11:29:52 +08:00
9fe1da209d 点检及保养项目新增 2026-05-19 15:20:51 +08:00
geht
ddc10cf7ea 桌面端打包,降低版本。 2026-05-19 14:13:32 +08:00
d57cb6cb8c eclipse文件隐藏 2026-05-19 12:01:13 +08:00
geht
be169ed131 Update VSCode configuration, enhance Java project settings, and modify application properties for improved logging and encoding support 2026-05-19 11:22:53 +08:00
geht
500de8961d Merge branch '升级分支' 2026-05-19 10:23:33 +08:00
e0833d3cbd Merge branch '生产及设备基础资料' 2026-05-19 10:17:03 +08:00
34009b8900 设备管理基础资料准备 2026-05-18 16:36:04 +08:00
470 changed files with 56559 additions and 555 deletions

10
.gitignore vendored
View File

@@ -1,10 +1,20 @@
## ide
**/.idea
**/.project
**/.classpath
**/.factorypath
**/.settings/
*.iml
rebel.xml
.project
.classpath
.settings/
.factorypath
**/.settings/
## backend
**/target
**/bin/
**/logs
## front

42
.vscode/launch.json vendored
View File

@@ -1,12 +1,32 @@
{
"configurations": [
{
"type": "java",
"name": "JeecgSystemApplication",
"request": "launch",
"mainClass": "org.jeecg.JeecgSystemApplication",
"projectName": "jeecg-system-start",
"preLaunchTask": "JeecgBoot: compile"
}
]
}
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "jeecgboot-vue3: 调试前端 (Chrome)",
"url": "http://localhost:3100",
"webRoot": "${workspaceFolder}/jeecgboot-vue3",
"preLaunchTask": "jeecgboot-vue3: dev"
},
{
"type": "node",
"request": "launch",
"name": "jeecgboot-vue3: dev",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "dev"],
"cwd": "${workspaceFolder}/jeecgboot-vue3",
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**", "**/node_modules/**"]
},
{
"type": "java",
"name": "JeecgSystemApplication (单体)",
"request": "launch",
"mainClass": "org.jeecg.JeecgSystemApplication",
"projectName": "jeecg-system-start",
"cwd": "${workspaceFolder}/jeecg-boot/jeecg-module-system/jeecg-system-start",
"vmArgs": "-Dfile.encoding=UTF-8 -Dspring.main.banner-mode=log -Dspring.banner.charset=UTF-8 -Dlogging.charset.console=GBK"
}
]
}

31
.vscode/settings.json vendored
View File

@@ -4,6 +4,8 @@
"java.import.maven.enabled": true,
"java.configuration.updateBuildConfiguration": "automatic",
"java.autobuild.enabled": true,
"java.import.maven.offline.enabled": false,
"java.configuration.maven.notCoveredPluginExecutionSeverity": "ignore",
"java.jdt.ls.java.home": "C:\\Program Files\\Java\\jdk-17",
"java.configuration.runtimes": [
{
@@ -11,5 +13,32 @@
"path": "C:\\Program Files\\Java\\jdk-17",
"default": true
}
]
],
"java.maven.downloadSources": true,
"java.eclipse.downloadSources": true,
"java.project.importOnFirstTimeStartup": "automatic",
"java.configuration.checkProjectSettingsExclusions": false,
"java.import.exclusions": [
"**/jeecg-server-cloud/**",
"**/jeecg-boot-platform/**",
"**/node_modules/**",
"**/.metadata/**",
"**/archetype-resources/**",
"**/META-INF/maven/**"
],
"java.project.resourceFilters": [
"node_modules",
".git",
"jeecg-server-cloud",
"jeecg-boot-platform"
],
"java.debug.settings.console": "integratedTerminal",
"java.debug.settings.vmArgs": "-Dfile.encoding=UTF-8 -Dspring.main.banner-mode=log -Dspring.banner.charset=UTF-8 -Dlogging.charset.console=GBK",
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"args": ["-NoExit", "-Command", "chcp 936 | Out-Null"]
}
}
}

18
.vscode/tasks.json vendored
View File

@@ -54,6 +54,24 @@
"dependsOn": "YY.Admin: build",
"problemMatcher": []
},
{
"label": "jeecgboot-vue3: dev",
"type": "shell",
"command": "pnpm run dev",
"options": {
"cwd": "${workspaceFolder}/jeecgboot-vue3"
},
"isBackground": true,
"problemMatcher": {
"owner": "vite",
"pattern": { "regexp": "^$" },
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "(Local:|ready in|http://localhost)"
}
}
},
{
"label": "YY.Admin: run (script)",
"type": "process",

View File

@@ -2,6 +2,12 @@
**/.idea
*.iml
rebel.xml
# VS Code/Cursor Java 扩展Eclipse JDT导入 Maven 时自动生成,勿提交
.project
.classpath
.settings/
.factorypath
**/.settings/
## backend
**/target

14
jeecg-boot/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "JeecgSystemApplication (单体)",
"request": "launch",
"mainClass": "org.jeecg.JeecgSystemApplication",
"projectName": "jeecg-system-start",
"cwd": "${workspaceFolder}/jeecg-module-system/jeecg-system-start",
"vmArgs": "-Dspring.main.banner-mode=log -Dspring.banner.charset=UTF-8 -Dlogging.charset.console=GBK"
}
]
}

37
jeecg-boot/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,37 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable",
"java.import.maven.enabled": true,
"java.configuration.updateBuildConfiguration": "automatic",
"java.autobuild.enabled": true,
"java.import.maven.offline.enabled": false,
"java.configuration.maven.notCoveredPluginExecutionSeverity": "ignore",
"java.jdt.ls.java.home": "C:\\Program Files\\Java\\jdk-17",
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "C:\\Program Files\\Java\\jdk-17",
"default": true
}
],
"java.maven.downloadSources": true,
"java.eclipse.downloadSources": true,
"java.project.importOnFirstTimeStartup": "automatic",
"java.configuration.checkProjectSettingsExclusions": false,
"java.import.exclusions": [
"**/jeecg-server-cloud/**",
"**/jeecg-boot-platform/**",
"**/node_modules/**",
"**/.metadata/**",
"**/archetype-resources/**",
"**/META-INF/maven/**"
],
"java.project.resourceFilters": [
"node_modules",
".git",
"jeecg-server-cloud",
"jeecg-boot-platform"
],
"java.debug.settings.console": "integratedTerminal",
"java.debug.settings.vmArgs": "-Dspring.main.banner-mode=log -Dspring.banner.charset=UTF-8 -Dlogging.charset.console=GBK"
}

18
jeecg-boot/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Maven: 修复 Java Classpath",
"type": "shell",
"command": "mvn clean install -DskipTests -pl jeecg-boot-base-core,jeecg-boot-module/jeecg-module-print,jeecg-boot-module/jeecg-module-xslmes -am",
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": []
}
]
}

View File

@@ -11,9 +11,9 @@ menu_type=VALUES(menu_type), perms=VALUES(perms), perms_type=VALUES(perms_type),
is_route=VALUES(is_route), is_leaf=VALUES(is_leaf), hidden=VALUES(hidden), status=VALUES(status), del_flag=VALUES(del_flag),
always_show=VALUES(always_show), keep_alive=VALUES(keep_alive), internal_or_external=VALUES(internal_or_external);
-- 二级菜单料信息
-- 二级菜单料信息
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, menu_type, perms, perms_type, sort_no, is_route, is_leaf, hidden, status, del_flag, keep_alive, internal_or_external, create_by, create_time)
VALUES ('1860000000000000011', '1860000000000000001', '料信息', '/mes/materialinfo', 'mes/materialinfo/index', 'MesMaterialList', 1, NULL, '1', 1, 1, 1, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000011', '1860000000000000001', '料信息', '/mes/materialinfo', 'mes/materialinfo/index', 'MesMaterialList', 1, NULL, '1', 1, 1, 1, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
parent_id=VALUES(parent_id), name=VALUES(name), url=VALUES(url), component=VALUES(component), component_name=VALUES(component_name),
menu_type=VALUES(menu_type), perms=VALUES(perms), perms_type=VALUES(perms_type), sort_no=VALUES(sort_no),

View File

@@ -0,0 +1,92 @@
-- 日罐物料对应信息菜单与权限挂到MES密炼工程目录
SET NAMES utf8mb4;
SET @mixer_parent_id = (
SELECT id
FROM sys_permission
WHERE name = 'MES密炼工程' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
);
SET @mixer_parent_id = IFNULL(@mixer_parent_id, (
SELECT id
FROM sys_permission
WHERE url = '/mes' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
));
SET @mixer_parent_id = IFNULL(@mixer_parent_id, '1860000000000000001');
INSERT INTO sys_permission(
id, parent_id, name, url, component, component_name, menu_type, perms, perms_type, sort_no,
is_route, is_leaf, hidden, status, del_flag, keep_alive, internal_or_external, create_by, create_time
)
VALUES (
'1860000000000099311', @mixer_parent_id, '日罐物料对应信息',
'/mes/daytankmaterialmapinfo',
'mes/daytankmaterialmapinfo/index',
'MesXslDayTankMaterialMapList', 1, NULL, '1', 31,
1, 1, 0, '1', 0, 1, 0, 'admin', NOW()
)
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
url = VALUES(url),
component = VALUES(component),
component_name = VALUES(component_name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
sort_no = VALUES(sort_no),
is_route = VALUES(is_route),
is_leaf = VALUES(is_leaf),
hidden = VALUES(hidden),
status = VALUES(status),
del_flag = VALUES(del_flag),
keep_alive = VALUES(keep_alive),
internal_or_external = VALUES(internal_or_external);
INSERT INTO sys_permission(id, parent_id, name, menu_type, perms, perms_type, status, del_flag, create_by, create_time) VALUES
('1860000000000099312', '1860000000000099311', '新增', 2, 'xslmes:mes_xsl_day_tank_material_map:add', '1', '1', 0, 'admin', NOW()),
('1860000000000099313', '1860000000000099311', '编辑', 2, 'xslmes:mes_xsl_day_tank_material_map:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000099314', '1860000000000099311', '删除', 2, 'xslmes:mes_xsl_day_tank_material_map:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000099315', '1860000000000099311', '批量删除', 2, 'xslmes:mes_xsl_day_tank_material_map:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000099316', '1860000000000099311', '导出', 2, 'xslmes:mes_xsl_day_tank_material_map:exportXls', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
status = VALUES(status),
del_flag = VALUES(del_flag);
-- admin 角色授权
INSERT INTO sys_role_permission(id, role_id, permission_id, operate_date, operate_ip)
SELECT REPLACE(UUID(), '-', ''), 'f6817f48af4fb3af11b9e8bf182f618b', p.id, NOW(), '127.0.0.1'
FROM sys_permission p
WHERE p.id IN (
'1860000000000099311',
'1860000000000099312', '1860000000000099313', '1860000000000099314', '1860000000000099315', '1860000000000099316'
)
AND NOT EXISTS (
SELECT 1
FROM sys_role_permission rp
WHERE rp.role_id = 'f6817f48af4fb3af11b9e8bf182f618b'
AND rp.permission_id = p.id
);
-- 强制修复确保菜单路由与组件路径正确避免历史错误路径导致查看组件引用是否正确
UPDATE sys_permission
SET
parent_id = @mixer_parent_id,
url = '/mes/daytankmaterialmapinfo',
component = 'mes/daytankmaterialmapinfo/index',
component_name = 'MesXslDayTankMaterialMapList',
menu_type = 1,
is_route = 1,
is_leaf = 1,
hidden = 0,
status = '1',
del_flag = 0
WHERE id = '1860000000000099311';

View File

@@ -37,19 +37,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_downtime_main_type` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000119', @mes_base_pid, '停机主类型', '/xslmes/mesXslDowntimeMainType', 'xslmes/mesXslDowntimeMainType/MesXslDowntimeMainTypeList', NULL, 1, NULL, '1', 18, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000119', @mes_equip_pid, '停机主类型', '/xslmes/mesXslDowntimeMainType', 'xslmes/mesXslDowntimeMainType/MesXslDowntimeMainTypeList', NULL, 1, NULL, '1', 9, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:partition-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:partition-outlined' WHERE `id` = '1860000000000000119' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000120', '1860000000000000119', '新增', 2, 'mes:mes_xsl_downtime_main_type:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -45,19 +45,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_downtime_type` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000126', @mes_base_pid, '停机类型', '/xslmes/mesXslDowntimeType', 'xslmes/mesXslDowntimeType/MesXslDowntimeTypeList', NULL, 1, NULL, '1', 19, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000126', @mes_equip_pid, '停机类型', '/xslmes/mesXslDowntimeType', 'xslmes/mesXslDowntimeType/MesXslDowntimeTypeList', NULL, 1, NULL, '1', 10, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:pause-circle-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:pause-circle-outlined' WHERE `id` = '1860000000000000126' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000127', '1860000000000000126', '新增', 2, 'mes:mes_xsl_downtime_type:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -0,0 +1,91 @@
-- MES 设备点检配置主子表建表 + 菜单 + 按钮 + 租户 admin 授权
-- 权限前缀mes:mes_xsl_equip_inspect_config:*
-- 父菜单设备管理类型字典复用 xslmes_im_item_category须先有点检及保养项目功能
-- FlywayV3.9.2_78__mes_xsl_equip_inspect_config.sql
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `mes_xsl_equip_inspect_config` (
`id` varchar(32) NOT NULL COMMENT '主键',
`equipment_ledger_id` varchar(32) NOT NULL COMMENT '设备台账主键 mes_xsl_equipment_ledger.id',
`equipment_name` varchar(500) DEFAULT NULL COMMENT '设备名称冗余',
`equipment_code` varchar(500) DEFAULT NULL COMMENT '设备编号冗余',
`config_type` varchar(500) NOT NULL COMMENT '配置类型字典xslmes_im_item_categoryinspect点检/maintain保养同设备同类型唯一',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(500) DEFAULT NULL COMMENT '部门',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_meic_tenant_equip_type` (`tenant_id`, `equipment_ledger_id`, `config_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES设备点检配置';
CREATE TABLE IF NOT EXISTS `mes_xsl_equip_inspect_config_line` (
`id` varchar(32) NOT NULL COMMENT '主键',
`config_id` varchar(32) NOT NULL COMMENT '主表主键 mes_xsl_equip_inspect_config.id',
`inspect_maintain_item_id` varchar(32) NOT NULL COMMENT '点检及保养项目主键 mes_xsl_inspect_maintain_item.id',
`item_code` varchar(500) DEFAULT NULL COMMENT '点检项目编号冗余',
`item_name` varchar(500) DEFAULT NULL COMMENT '项目名称冗余',
`item_category` varchar(500) DEFAULT NULL COMMENT '项目类别冗余',
`item_type` varchar(500) DEFAULT NULL COMMENT '项目类型冗余',
`equipment_part_name` varchar(500) DEFAULT NULL COMMENT '设备部位名称冗余',
`equipment_sub_part_name` varchar(500) DEFAULT NULL COMMENT '设备小部位名称冗余',
`inspect_method` varchar(500) DEFAULT NULL COMMENT '点检方式冗余',
`judgment_criteria` varchar(500) DEFAULT NULL COMMENT '判断基准冗余',
`sort_no` int DEFAULT '0' COMMENT '排序号',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_meicl_config` (`config_id`),
KEY `idx_meicl_item` (`inspect_maintain_item_id`),
UNIQUE KEY `uk_meicl_config_item` (`config_id`, `inspect_maintain_item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES设备点检配置明细';
SET @mes_tenant_id = 1002;
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000148', @mes_equip_pid, '设备点检配置', '/xslmes/mesXslEquipInspectConfig', 'xslmes/mesXslEquipInspectConfig/MesXslEquipInspectConfigList', NULL, 1, NULL, '1', 12, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:control-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:control-outlined' WHERE `id` = '1860000000000000148' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000149', '1860000000000000148', '新增', 2, 'mes:mes_xsl_equip_inspect_config:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000150', '1860000000000000148', '编辑', 2, 'mes:mes_xsl_equip_inspect_config:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000151', '1860000000000000148', '删除', 2, 'mes:mes_xsl_equip_inspect_config:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000152', '1860000000000000148', '批量删除', 2, 'mes:mes_xsl_equip_inspect_config:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000153', '1860000000000000148', '导出', 2, 'mes:mes_xsl_equip_inspect_config:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000154', '1860000000000000148', '导入', 2, 'mes:mes_xsl_equip_inspect_config:importExcel', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000148',
'1860000000000000149', '1860000000000000150', '1860000000000000151', '1860000000000000152',
'1860000000000000153', '1860000000000000154'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -0,0 +1,138 @@
-- MES 点检/保养记录主子表建表 + 字典 + 菜单 + 按钮 + 租户 admin 授权
-- 权限前缀mes:mes_xsl_equip_inspect_record:*
-- 父菜单设备管理依赖设备点检配置设备台账
-- FlywayV3.9.2_79__mes_xsl_equip_inspect_record.sql
SET NAMES utf8mb4;
INSERT INTO `sys_dict`(`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES点检记录结果', 'xslmes_im_inspect_result', '合格/不合格', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_im_inspect_result' AND `del_flag` = 0);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.`id`, '合格', 'pass', '', 1, 1, 'admin', NOW()
FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_inspect_result' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.`id` AND i.`item_value` = 'pass');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.`id`, '不合格', 'fail', '', 2, 1, 'admin', NOW()
FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_inspect_result' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.`id` AND i.`item_value` = 'fail');
INSERT INTO `sys_dict`(`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES点检记录状态', 'xslmes_im_record_status', '待点检/已点检', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_im_record_status' AND `del_flag` = 0);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.`id`, '待点检', 'pending', '', 1, 1, 'admin', NOW()
FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_record_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.`id` AND i.`item_value` = 'pending');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.`id`, '已点检', 'done', '', 2, 1, 'admin', NOW()
FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_record_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.`id` AND i.`item_value` = 'done');
CREATE TABLE IF NOT EXISTS `mes_xsl_equip_inspect_record` (
`id` varchar(32) NOT NULL COMMENT '主键',
`record_no` varchar(32) NOT NULL COMMENT '记录编号EC+yyyyMMdd+4位流水租户内按日递增',
`plan_no` varchar(500) DEFAULT NULL COMMENT '计划单号',
`plan_id` varchar(32) DEFAULT NULL COMMENT '计划主键隐藏',
`equipment_ledger_id` varchar(32) NOT NULL COMMENT '设备台账主键 mes_xsl_equipment_ledger.id',
`equipment_code` varchar(500) DEFAULT NULL COMMENT '设备编码冗余',
`equipment_name` varchar(500) DEFAULT NULL COMMENT '设备名称冗余',
`equip_inspect_config_id` varchar(32) DEFAULT NULL COMMENT '设备点检配置主键 mes_xsl_equip_inspect_config.id',
`record_type` varchar(500) NOT NULL COMMENT '类型字典xslmes_im_item_categoryinspect点检/maintain保养',
`inspect_date` date DEFAULT NULL COMMENT '点检日期',
`inspector_user_id` varchar(32) DEFAULT NULL COMMENT '点检人用户ID',
`inspector_username` varchar(500) DEFAULT NULL COMMENT '点检人账号',
`inspector_realname` varchar(500) DEFAULT NULL COMMENT '点检人姓名',
`inspect_result` varchar(500) NOT NULL COMMENT '点检结果字典xslmes_im_inspect_resultpass合格/fail不合格',
`record_status` varchar(500) NOT NULL COMMENT '状态字典xslmes_im_record_statuspending待点检/done已点检',
`handled_flag` varchar(1) DEFAULT NULL COMMENT '是否已处理字典yn1是0否仅不合格记录使用',
`handler_user_id` varchar(32) DEFAULT NULL COMMENT '处理人用户ID',
`handler_username` varchar(500) DEFAULT NULL COMMENT '处理人账号',
`handler_realname` varchar(500) DEFAULT NULL COMMENT '处理人姓名',
`handle_time` datetime DEFAULT NULL COMMENT '处理时间',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(500) DEFAULT NULL COMMENT '部门',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_meir_tenant_record_no` (`tenant_id`, `record_no`),
KEY `idx_meir_equip_type` (`equipment_ledger_id`, `record_type`),
KEY `idx_meir_inspect_date` (`inspect_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES点检保养记录';
CREATE TABLE IF NOT EXISTS `mes_xsl_equip_inspect_record_line` (
`id` varchar(32) NOT NULL COMMENT '主键',
`record_id` varchar(32) NOT NULL COMMENT '主表主键 mes_xsl_equip_inspect_record.id',
`equip_inspect_config_line_id` varchar(32) NOT NULL COMMENT '设备点检配置明细主键 mes_xsl_equip_inspect_config_line.id',
`inspect_maintain_item_id` varchar(32) DEFAULT NULL COMMENT '点检及保养项目主键冗余',
`item_code` varchar(500) DEFAULT NULL COMMENT '点检项目编号冗余',
`item_name` varchar(500) DEFAULT NULL COMMENT '项目名称冗余',
`item_category` varchar(500) DEFAULT NULL COMMENT '项目类别冗余',
`item_type` varchar(500) DEFAULT NULL COMMENT '项目类型冗余',
`equipment_part_name` varchar(500) DEFAULT NULL COMMENT '设备部位冗余',
`equipment_sub_part_name` varchar(500) DEFAULT NULL COMMENT '设备小部位冗余',
`inspect_method` varchar(500) DEFAULT NULL COMMENT '点检方式冗余',
`judgment_criteria` varchar(500) DEFAULT NULL COMMENT '判断基准冗余',
`line_inspect_result` varchar(500) DEFAULT NULL COMMENT '明细点检结果文本',
`picture_files` varchar(2000) DEFAULT NULL COMMENT '图片上传路径逗号分隔',
`sort_no` int DEFAULT '0' COMMENT '排序号',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_meirl_record` (`record_id`),
KEY `idx_meirl_config_line` (`equip_inspect_config_line_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES点检保养记录明细';
SET @mes_tenant_id = 1002;
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000155', @mes_equip_pid, '点检保养记录', '/xslmes/mesXslEquipInspectRecord', 'xslmes/mesXslEquipInspectRecord/MesXslEquipInspectRecordList', 'MesXslEquipInspectRecordList', 1, NULL, '1', 13, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:file-done-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:file-done-outlined' WHERE `id` = '1860000000000000155' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000156', '1860000000000000155', '新增', 2, 'mes:mes_xsl_equip_inspect_record:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000157', '1860000000000000155', '编辑', 2, 'mes:mes_xsl_equip_inspect_record:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000158', '1860000000000000155', '删除', 2, 'mes:mes_xsl_equip_inspect_record:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000159', '1860000000000000155', '批量删除', 2, 'mes:mes_xsl_equip_inspect_record:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000160', '1860000000000000155', '导出', 2, 'mes:mes_xsl_equip_inspect_record:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000161', '1860000000000000155', '导入', 2, 'mes:mes_xsl_equip_inspect_record:importExcel', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000155',
'1860000000000000156', '1860000000000000157', '1860000000000000158', '1860000000000000159',
'1860000000000000160', '1860000000000000161'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -56,14 +56,15 @@ WHERE d.`dict_code` = 'xslmes_equipment_maintain_distinct'
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000070', @mes_base_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 10, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000070', @mes_equip_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 2, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),

View File

@@ -0,0 +1,31 @@
-- 设备管理目录 MES管理 下迁出 MES基础资料 同级已执行旧版 mes-xsl-equipment-ledger-menu-permission 时用
SET NAMES utf8mb4;
SET @mes_equip_root_parent = (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES基础资料'
LIMIT 1
);
SET @mes_equip_root_parent = IFNULL(@mes_equip_root_parent, (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES资料'
LIMIT 1
));
SET @mes_equip_root_sort = IFNULL((
SELECT `sort_no` + 1 FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
ORDER BY `sort_no` DESC
LIMIT 1
), 51);
UPDATE `sys_permission`
SET
`parent_id` = @mes_equip_root_parent,
`sort_no` = @mes_equip_root_sort,
`menu_type` = 0,
`is_leaf` = 0,
`hidden` = 0,
`status` = '1',
`del_flag` = 0
WHERE `id` = '1860000000000000133';

View File

@@ -0,0 +1,131 @@
-- MES 设备台账字典 + 建表 + 设备管理目录菜单 + 设备台账菜单 + 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀mes:mes_xsl_equipment_ledger:*
-- 父菜单设备管理目录 MES基础资料 同级 MES管理 子级子菜单设备台账
-- 修改租户 SET @mes_tenant_id新环境也可依赖 Flyway V3.9.2_72__mes_xsl_equipment_ledger.sql
SET NAMES utf8mb4;
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES设备台账状态', 'xslmes_equipment_ledger_status', '在用/停用/报废', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_equipment_ledger_status' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '在用', '0', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_equipment_ledger_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '0');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '停用', '1', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_equipment_ledger_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '报废', '2', 3, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_equipment_ledger_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '2');
CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_ledger` (
`id` varchar(32) NOT NULL COMMENT '主键',
`process_operation_id` varchar(32) NOT NULL COMMENT '所属工序 mes_xsl_process_operation.id',
`process_operation_name` varchar(500) DEFAULT NULL COMMENT '工序名称冗余',
`equipment_name` varchar(500) NOT NULL COMMENT '设备名称同租户未删除唯一',
`equipment_code` varchar(128) NOT NULL COMMENT '设备编号同租户未删除唯一',
`manufacturer_id` varchar(32) DEFAULT NULL COMMENT '所属设备厂家 mes_xsl_manufacturer.id',
`manufacturer_name` varchar(500) DEFAULT NULL COMMENT '设备厂家名称冗余',
`equipment_category_id` varchar(32) DEFAULT NULL COMMENT '设备类别 mes_xsl_equipment_category.id',
`equipment_category_name` varchar(500) DEFAULT NULL COMMENT '设备类别名称冗余',
`equipment_type_id` varchar(32) DEFAULT NULL COMMENT '设备类型 mes_xsl_equipment_type.id',
`equipment_type_name` varchar(500) DEFAULT NULL COMMENT '设备类型名称冗余',
`factory_id` varchar(32) DEFAULT NULL COMMENT '所属工厂厂家信息',
`factory_name` varchar(500) DEFAULT NULL COMMENT '所属工厂名称冗余',
`equipment_model` varchar(500) DEFAULT NULL COMMENT '设备型号',
`equipment_status` varchar(1) NOT NULL DEFAULT '0' COMMENT '设备状态 字典xslmes_equipment_ledger_status0在用1停用2报废',
`serial_no` varchar(500) DEFAULT NULL COMMENT '序列号',
`nameplate` varchar(500) DEFAULT NULL COMMENT '铭牌',
`maintain_dept_id` varchar(32) DEFAULT NULL COMMENT '维修部门 sys_depart.id',
`maintain_person` varchar(500) DEFAULT NULL COMMENT '维修人员',
`manage_dept_id` varchar(32) DEFAULT NULL COMMENT '主管部门 sys_depart.id',
`doc_file_no` varchar(500) DEFAULT NULL COMMENT '资料文件编号',
`production_date` date DEFAULT NULL COMMENT '生产日期',
`purchase_date` date DEFAULT NULL COMMENT '购买日期',
`use_date` date DEFAULT NULL COMMENT '使用日期',
`vendor_contact` varchar(500) DEFAULT NULL COMMENT '厂商联系人',
`asset_value` varchar(128) DEFAULT NULL COMMENT '价值',
`controlled_pda` varchar(500) DEFAULT NULL COMMENT '受控PDA',
`overproduction_ratio` varchar(128) DEFAULT NULL COMMENT '超产比率',
`effective_volume` varchar(128) DEFAULT NULL COMMENT '有效体积',
`enabled_flag` varchar(1) NOT NULL DEFAULT '1' COMMENT '是否启用 字典yn1是0否',
`equipment_desc` varchar(1000) DEFAULT NULL COMMENT '设备描述',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(500) DEFAULT NULL COMMENT '部门',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mel_tenant_code` (`tenant_id`, `equipment_code`),
KEY `idx_mel_tenant_name` (`tenant_id`, `equipment_name`),
KEY `idx_mel_process` (`process_operation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES设备台账';
SET @mes_tenant_id = 1002;
-- MES基础资料同级取其 parent_id通常为 NULL MES管理 并列
SET @mes_equip_root_parent = (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES基础资料'
LIMIT 1
);
SET @mes_equip_root_parent = IFNULL(@mes_equip_root_parent, (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES资料'
LIMIT 1
));
SET @mes_equip_root_sort = IFNULL((
SELECT `sort_no` + 1 FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
ORDER BY `sort_no` DESC
LIMIT 1
), 51);
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `id` = '1860000000000000133' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000133', @mes_equip_root_parent, '设备管理', '/xslmes/equipment', 'layouts/RouteView', 'MesEquipmentLayout', 0, NULL, '1', @mes_equip_root_sort, 1, 0, 0, '1', 0, 0, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`menu_type` = VALUES(`menu_type`), `icon` = 'ant-design:tool-outlined', `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:tool-outlined' WHERE `id` = '1860000000000000133' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000134', '1860000000000000133', '设备台账', '/xslmes/mesXslEquipmentLedger', 'xslmes/mesXslEquipmentLedger/MesXslEquipmentLedgerList', 'MesXslEquipmentLedgerList', 1, NULL, '1', 1, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000135', '1860000000000000134', '新增', 2, 'mes:mes_xsl_equipment_ledger:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000136', '1860000000000000134', '编辑', 2, 'mes:mes_xsl_equipment_ledger:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000137', '1860000000000000134', '删除', 2, 'mes:mes_xsl_equipment_ledger:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000138', '1860000000000000134', '批量删除', 2, 'mes:mes_xsl_equipment_ledger:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000139', '1860000000000000134', '导出', 2, 'mes:mes_xsl_equipment_ledger:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000140', '1860000000000000134', '导入', 2, 'mes:mes_xsl_equipment_ledger:importExcel', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`),
`status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000133',
'1860000000000000134',
'1860000000000000135', '1860000000000000136', '1860000000000000137', '1860000000000000138',
'1860000000000000139', '1860000000000000140'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -0,0 +1,46 @@
-- MES 设备台账仅建表完整初始化请执行 mes-xsl-equipment-ledger-menu-permission.sql
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_ledger` (
`id` varchar(32) NOT NULL COMMENT '主键',
`process_operation_id` varchar(32) NOT NULL COMMENT '所属工序',
`process_operation_name` varchar(500) DEFAULT NULL COMMENT '工序名称冗余',
`equipment_name` varchar(500) NOT NULL COMMENT '设备名称',
`equipment_code` varchar(128) NOT NULL COMMENT '设备编号',
`manufacturer_id` varchar(32) DEFAULT NULL COMMENT '所属设备厂家',
`manufacturer_name` varchar(500) DEFAULT NULL COMMENT '设备厂家名称冗余',
`equipment_category_id` varchar(32) DEFAULT NULL COMMENT '设备类别',
`equipment_category_name` varchar(500) DEFAULT NULL COMMENT '设备类别名称冗余',
`equipment_type_id` varchar(32) DEFAULT NULL COMMENT '设备类型',
`equipment_type_name` varchar(500) DEFAULT NULL COMMENT '设备类型名称冗余',
`factory_id` varchar(32) DEFAULT NULL COMMENT '所属工厂',
`factory_name` varchar(500) DEFAULT NULL COMMENT '所属工厂名称冗余',
`equipment_model` varchar(500) DEFAULT NULL COMMENT '设备型号',
`equipment_status` varchar(1) NOT NULL DEFAULT '0' COMMENT '设备状态',
`serial_no` varchar(500) DEFAULT NULL COMMENT '序列号',
`nameplate` varchar(500) DEFAULT NULL COMMENT '铭牌',
`maintain_dept_id` varchar(32) DEFAULT NULL COMMENT '维修部门',
`maintain_person` varchar(500) DEFAULT NULL COMMENT '维修人员',
`manage_dept_id` varchar(32) DEFAULT NULL COMMENT '主管部门',
`doc_file_no` varchar(500) DEFAULT NULL COMMENT '资料文件编号',
`production_date` date DEFAULT NULL COMMENT '生产日期',
`purchase_date` date DEFAULT NULL COMMENT '购买日期',
`use_date` date DEFAULT NULL COMMENT '使用日期',
`vendor_contact` varchar(500) DEFAULT NULL COMMENT '厂商联系人',
`asset_value` varchar(128) DEFAULT NULL COMMENT '价值',
`controlled_pda` varchar(500) DEFAULT NULL COMMENT '受控PDA',
`overproduction_ratio` varchar(128) DEFAULT NULL COMMENT '超产比率',
`effective_volume` varchar(128) DEFAULT NULL COMMENT '有效体积',
`enabled_flag` varchar(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
`equipment_desc` varchar(1000) DEFAULT NULL COMMENT '设备描述',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(500) DEFAULT NULL COMMENT '部门',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记',
PRIMARY KEY (`id`),
KEY `idx_mel_tenant_code` (`tenant_id`, `equipment_code`),
KEY `idx_mel_tenant_name` (`tenant_id`, `equipment_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES设备台账';

View File

@@ -0,0 +1,10 @@
-- 设备管理目录及指定子菜单图标可重复执行
SET NAMES utf8mb4;
UPDATE `sys_permission` SET `icon` = 'ant-design:tool-outlined' WHERE `id` = '1860000000000000133' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:apartment-outlined' WHERE `id` = '1860000000000000091' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:tags-outlined' WHERE `id` = '1860000000000000098' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:shopping-outlined' WHERE `id` = '1860000000000000105' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:shop-outlined' WHERE `id` = '1860000000000000112' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:partition-outlined' WHERE `id` = '1860000000000000119' AND `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:pause-circle-outlined' WHERE `id` = '1860000000000000126' AND `del_flag` = 0;

View File

@@ -24,14 +24,15 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_part` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000084', @mes_base_pid, '设备部位', '/xslmes/mesXslEquipmentPart', 'xslmes/mesXslEquipmentPart/MesXslEquipmentPartList', NULL, 1, NULL, '1', 12, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000084', @mes_equip_pid, '设备部位', '/xslmes/mesXslEquipmentPart', 'xslmes/mesXslEquipmentPart/MesXslEquipmentPartList', NULL, 1, NULL, '1', 4, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),

View File

@@ -27,19 +27,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_sub_part` (
SET @mes_tenant_id = 1002;
SET @xslmes_root_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES XSL', 'XSLMES管理', 'XSLMES')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @xslmes_root_pid = IFNULL(@xslmes_root_pid, '1900000000000000300');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000091', @xslmes_root_pid, '设备小部位', '/xslmes/mesXslEquipmentSubPart', 'xslmes/mesXslEquipmentSubPart/MesXslEquipmentSubPartList', NULL, 1, NULL, '1', 14, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000091', @mes_equip_pid, '设备小部位', '/xslmes/mesXslEquipmentSubPart', 'xslmes/mesXslEquipmentSubPart/MesXslEquipmentSubPartList', NULL, 1, NULL, '1', 5, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:apartment-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:apartment-outlined' WHERE `id` = '1860000000000000091' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000092', '1860000000000000091', '新增', 2, 'mes:mes_xsl_equipment_sub_part:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -1,26 +1,22 @@
-- 设备类型菜单/按钮补全并挂到 MES基础资料解决仅 UPDATE id 077 不存在菜单与权限均不显示
-- 设备类型菜单/按钮补全并挂到设备管理解决仅 UPDATE id 077 不存在菜单与权限均不显示
-- 可重复执行修改租户改 SET @mes_tenant_id
SET NAMES utf8mb4;
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES基础资料'
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES资料'
));
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料');
WHERE `id` = @mes_equip_pid;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000077', @mes_base_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 11, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000077', @mes_equip_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 3, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
@@ -39,7 +35,7 @@ ON DUPLICATE KEY UPDATE
`perms_type` = VALUES(`perms_type`), `is_leaf` = 1, `status` = '1', `del_flag` = 0;
UPDATE `sys_permission` p
INNER JOIN (SELECT @mes_base_pid AS `pid`) x ON 1 = 1
INNER JOIN (SELECT @mes_equip_pid AS `pid`) x ON 1 = 1
SET p.`parent_id` = x.`pid`,
p.`is_leaf` = 0,
p.`url` = '/xslmes/mesXslEquipmentType',

View File

@@ -23,14 +23,15 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_equipment_type` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000077', @mes_base_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 11, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000077', @mes_equip_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 3, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),

View File

@@ -0,0 +1,118 @@
-- MES 点检及保养项目字典 + 建表 + 菜单 + 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀与 Controller前端 v-auth 一致mes:mes_xsl_inspect_maintain_item:*
-- 父菜单设备管理修改租户改 SET @mes_tenant_id
-- 新环境也可依赖 FlywayV3.9.2_77__mes_xsl_inspect_maintain_item.sql
SET NAMES utf8mb4;
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES点检保养项目类别', 'xslmes_im_item_category', 'inspect点检/maintain保养', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_im_item_category' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '点检', 'inspect', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_item_category' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'inspect');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '保养', 'maintain', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_item_category' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'maintain');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES点检保养项目类型', 'xslmes_im_item_type', 'mechanical机械类/electrical电气类', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_im_item_type' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '机械类', 'mechanical', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_item_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'mechanical');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '电气类', 'electrical', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_item_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'electrical');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES点检方式', 'xslmes_im_inspect_method', 'visual视觉/sight目测/hearing听觉', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_im_inspect_method' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '视觉', 'visual', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_inspect_method' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'visual');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '目测', 'sight', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_inspect_method' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'sight');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '听觉', 'hearing', 3, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_im_inspect_method' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'hearing');
CREATE TABLE IF NOT EXISTS `mes_xsl_inspect_maintain_item` (
`id` varchar(32) NOT NULL COMMENT '主键',
`item_name` varchar(500) NOT NULL COMMENT '项目名称同租户未删除数据中唯一',
`item_code` varchar(500) NOT NULL COMMENT '项目编号同租户未删除数据中唯一',
`equipment_category_id` varchar(32) NOT NULL COMMENT '设备类别主键 mes_xsl_equipment_category.id',
`equipment_category_name` varchar(500) DEFAULT NULL COMMENT '设备类别名称冗余',
`equipment_type_id` varchar(32) NOT NULL COMMENT '设备类型主键 mes_xsl_equipment_type.id',
`equipment_type_name` varchar(500) DEFAULT NULL COMMENT '设备类型名称冗余',
`equipment_part_id` varchar(32) NOT NULL COMMENT '设备部位主键 mes_xsl_equipment_part.id',
`equipment_part_name` varchar(500) DEFAULT NULL COMMENT '设备部位名称冗余',
`equipment_sub_part_id` varchar(32) NOT NULL COMMENT '设备小部位主键 mes_xsl_equipment_sub_part.id',
`equipment_sub_part_name` varchar(500) DEFAULT NULL COMMENT '设备小部位名称冗余',
`item_category` varchar(500) NOT NULL COMMENT '项目类别字典xslmes_im_item_categoryinspect点检/maintain保养',
`item_type` varchar(500) NOT NULL COMMENT '项目类型字典xslmes_im_item_typemechanical机械类/electrical电气类',
`inspect_method` varchar(500) NOT NULL COMMENT '点检方式字典xslmes_im_inspect_methodvisual视觉/sight目测/hearing听觉',
`judgment_criteria` varchar(500) NOT NULL COMMENT '判断基准',
`maintain_cycle_days` int DEFAULT NULL COMMENT '保养周期',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(500) DEFAULT NULL COMMENT '部门',
`create_by` varchar(500) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(500) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mimi_tenant_name` (`tenant_id`, `item_name`),
KEY `idx_mimi_tenant_code` (`tenant_id`, `item_code`),
KEY `idx_mimi_category` (`equipment_category_id`),
KEY `idx_mimi_type` (`equipment_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES点检及保养项目';
SET @mes_tenant_id = 1002;
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000141', @mes_equip_pid, '点检及保养项目', '/xslmes/mesXslInspectMaintainItem', 'xslmes/mesXslInspectMaintainItem/MesXslInspectMaintainItemList', NULL, 1, NULL, '1', 11, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:audit-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:audit-outlined' WHERE `id` = '1860000000000000141' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000142', '1860000000000000141', '新增', 2, 'mes:mes_xsl_inspect_maintain_item:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000143', '1860000000000000141', '编辑', 2, 'mes:mes_xsl_inspect_maintain_item:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000144', '1860000000000000141', '删除', 2, 'mes:mes_xsl_inspect_maintain_item:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000145', '1860000000000000141', '批量删除', 2, 'mes:mes_xsl_inspect_maintain_item:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000146', '1860000000000000141', '导出', 2, 'mes:mes_xsl_inspect_maintain_item:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000147', '1860000000000000141', '导入', 2, 'mes:mes_xsl_inspect_maintain_item:importExcel', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000141',
'1860000000000000142', '1860000000000000143', '1860000000000000144', '1860000000000000145',
'1860000000000000146', '1860000000000000147'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -1,6 +1,6 @@
-- MES 厂家信息字典 + 建表 + 菜单 + 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀与 Controller前端 v-auth 一致mes:mes_xsl_manufacturer:*
-- 父菜单MES基础资料 / MES资料与备品件等脚本相同 @mes_base_pid修改租户改 SET @mes_tenant_id
-- 父菜单设备管理@mes_equip_pid修改租户改 SET @mes_tenant_id
-- 新环境也可依赖 FlywayV3.9.2_63__mes_xsl_manufacturer.sql与本文内容一致重复执行幂等
SET NAMES utf8mb4;
@@ -47,19 +47,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_manufacturer` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000112', @mes_base_pid, '厂家信息', '/xslmes/mesXslManufacturer', 'xslmes/mesXslManufacturer/MesXslManufacturerList', NULL, 1, NULL, '1', 17, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000112', @mes_equip_pid, '厂家信息', '/xslmes/mesXslManufacturer', 'xslmes/mesXslManufacturer/MesXslManufacturerList', NULL, 1, NULL, '1', 8, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:shop-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:shop-outlined' WHERE `id` = '1860000000000000112' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000113', '1860000000000000112', '新增', 2, 'mes:mes_xsl_manufacturer:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -0,0 +1,92 @@
-- 密炼机动作维护菜单与权限挂到MES密炼工程目录
SET NAMES utf8mb4;
SET @mixer_parent_id = (
SELECT id
FROM sys_permission
WHERE name = 'MES密炼工程' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
);
SET @mixer_parent_id = IFNULL(@mixer_parent_id, (
SELECT id
FROM sys_permission
WHERE url = '/mes' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
));
SET @mixer_parent_id = IFNULL(@mixer_parent_id, '1860000000000000001');
INSERT INTO sys_permission(
id, parent_id, name, url, component, component_name, menu_type, perms, perms_type, sort_no,
is_route, is_leaf, hidden, status, del_flag, keep_alive, internal_or_external, create_by, create_time
)
VALUES (
'1860000000000099211', @mixer_parent_id, '密炼机动作维护',
'/mes/mixeractioninfo',
'mes/mixeractioninfo/index',
'MesXslMixerActionList', 1, NULL, '1', 30,
1, 1, 0, '1', 0, 1, 0, 'admin', NOW()
)
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
url = VALUES(url),
component = VALUES(component),
component_name = VALUES(component_name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
sort_no = VALUES(sort_no),
is_route = VALUES(is_route),
is_leaf = VALUES(is_leaf),
hidden = VALUES(hidden),
status = VALUES(status),
del_flag = VALUES(del_flag),
keep_alive = VALUES(keep_alive),
internal_or_external = VALUES(internal_or_external);
INSERT INTO sys_permission(id, parent_id, name, menu_type, perms, perms_type, status, del_flag, create_by, create_time) VALUES
('1860000000000099212', '1860000000000099211', '新增', 2, 'xslmes:mes_xsl_mixer_action:add', '1', '1', 0, 'admin', NOW()),
('1860000000000099213', '1860000000000099211', '编辑', 2, 'xslmes:mes_xsl_mixer_action:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000099214', '1860000000000099211', '删除', 2, 'xslmes:mes_xsl_mixer_action:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000099215', '1860000000000099211', '批量删除', 2, 'xslmes:mes_xsl_mixer_action:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000099216', '1860000000000099211', '导出', 2, 'xslmes:mes_xsl_mixer_action:exportXls', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
status = VALUES(status),
del_flag = VALUES(del_flag);
-- admin 角色授权
INSERT INTO sys_role_permission(id, role_id, permission_id, operate_date, operate_ip)
SELECT REPLACE(UUID(), '-', ''), 'f6817f48af4fb3af11b9e8bf182f618b', p.id, NOW(), '127.0.0.1'
FROM sys_permission p
WHERE p.id IN (
'1860000000000099211',
'1860000000000099212', '1860000000000099213', '1860000000000099214', '1860000000000099215', '1860000000000099216'
)
AND NOT EXISTS (
SELECT 1
FROM sys_role_permission rp
WHERE rp.role_id = 'f6817f48af4fb3af11b9e8bf182f618b'
AND rp.permission_id = p.id
);
-- 强制修复确保菜单路由与组件路径正确避免历史错误路径导致查看组件引用是否正确
UPDATE sys_permission
SET
parent_id = @mixer_parent_id,
url = '/mes/mixeractioninfo',
component = 'mes/mixeractioninfo/index',
component_name = 'MesXslMixerActionList',
menu_type = 1,
is_route = 1,
is_leaf = 1,
hidden = 0,
status = '1',
del_flag = 0
WHERE id = '1860000000000099211';

View File

@@ -0,0 +1,92 @@
-- 密炼机条件维护菜单与权限挂到MES密炼工程目录
SET NAMES utf8mb4;
SET @mixer_parent_id = (
SELECT id
FROM sys_permission
WHERE name = 'MES密炼工程' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
);
SET @mixer_parent_id = IFNULL(@mixer_parent_id, (
SELECT id
FROM sys_permission
WHERE url = '/mes' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
));
SET @mixer_parent_id = IFNULL(@mixer_parent_id, '1860000000000000001');
INSERT INTO sys_permission(
id, parent_id, name, url, component, component_name, menu_type, perms, perms_type, sort_no,
is_route, is_leaf, hidden, status, del_flag, keep_alive, internal_or_external, create_by, create_time
)
VALUES (
'1860000000000099411', @mixer_parent_id, '密炼机条件维护',
'/mes/mixerconditioninfo',
'mes/mixerconditioninfo/index',
'MesXslMixerConditionList', 1, NULL, '1', 32,
1, 1, 0, '1', 0, 1, 0, 'admin', NOW()
)
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
url = VALUES(url),
component = VALUES(component),
component_name = VALUES(component_name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
sort_no = VALUES(sort_no),
is_route = VALUES(is_route),
is_leaf = VALUES(is_leaf),
hidden = VALUES(hidden),
status = VALUES(status),
del_flag = VALUES(del_flag),
keep_alive = VALUES(keep_alive),
internal_or_external = VALUES(internal_or_external);
INSERT INTO sys_permission(id, parent_id, name, menu_type, perms, perms_type, status, del_flag, create_by, create_time) VALUES
('1860000000000099412', '1860000000000099411', '新增', 2, 'xslmes:mes_xsl_mixer_condition:add', '1', '1', 0, 'admin', NOW()),
('1860000000000099413', '1860000000000099411', '编辑', 2, 'xslmes:mes_xsl_mixer_condition:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000099414', '1860000000000099411', '删除', 2, 'xslmes:mes_xsl_mixer_condition:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000099415', '1860000000000099411', '批量删除', 2, 'xslmes:mes_xsl_mixer_condition:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000099416', '1860000000000099411', '导出', 2, 'xslmes:mes_xsl_mixer_condition:exportXls', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
status = VALUES(status),
del_flag = VALUES(del_flag);
-- admin 角色授权
INSERT INTO sys_role_permission(id, role_id, permission_id, operate_date, operate_ip)
SELECT REPLACE(UUID(), '-', ''), 'f6817f48af4fb3af11b9e8bf182f618b', p.id, NOW(), '127.0.0.1'
FROM sys_permission p
WHERE p.id IN (
'1860000000000099411',
'1860000000000099412', '1860000000000099413', '1860000000000099414', '1860000000000099415', '1860000000000099416'
)
AND NOT EXISTS (
SELECT 1
FROM sys_role_permission rp
WHERE rp.role_id = 'f6817f48af4fb3af11b9e8bf182f618b'
AND rp.permission_id = p.id
);
-- 强制修复确保菜单路由与组件路径正确
UPDATE sys_permission
SET
parent_id = @mixer_parent_id,
url = '/mes/mixerconditioninfo',
component = 'mes/mixerconditioninfo/index',
component_name = 'MesXslMixerConditionList',
menu_type = 1,
is_route = 1,
is_leaf = 1,
hidden = 0,
status = '1',
del_flag = 0
WHERE id = '1860000000000099411';

View File

@@ -0,0 +1,62 @@
-- 将设备类别/类型/部位/小部位备品件厂家停机类菜单挂到设备管理目录下工序管理仍留 MES基础资料
-- 前置已执行 mes-xsl-equipment-ledger-menu-permission.sql Flyway V3.9.2_72 创建设备管理目录 id=1860000000000000133
-- 修改租户 SET @mes_tenant_id
SET NAMES utf8mb4;
SET @mes_tenant_id = 1002;
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
UPDATE `sys_permission`
SET `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0
WHERE `id` = @mes_equip_pid;
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 1, `is_leaf` = 0 WHERE `id` = '1860000000000000134';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 2, `is_leaf` = 0 WHERE `id` = '1860000000000000070';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 3, `is_leaf` = 0 WHERE `id` = '1860000000000000077';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 4, `is_leaf` = 0 WHERE `id` = '1860000000000000084';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 5, `is_leaf` = 0 WHERE `id` = '1860000000000000091';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 6, `is_leaf` = 0 WHERE `id` = '1860000000000000098';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 7, `is_leaf` = 0 WHERE `id` = '1860000000000000105';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 8, `is_leaf` = 0 WHERE `id` = '1860000000000000112';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 9, `is_leaf` = 0 WHERE `id` = '1860000000000000119';
UPDATE `sys_permission` SET `parent_id` = @mes_equip_pid, `sort_no` = 10, `is_leaf` = 0 WHERE `id` = '1860000000000000126';
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
@mes_equip_pid,
'1860000000000000134',
'1860000000000000070',
'1860000000000000071', '1860000000000000072', '1860000000000000073', '1860000000000000074', '1860000000000000075', '1860000000000000076',
'1860000000000000077',
'1860000000000000078', '1860000000000000079', '1860000000000000080', '1860000000000000081', '1860000000000000082', '1860000000000000083',
'1860000000000000084',
'1860000000000000085', '1860000000000000086', '1860000000000000087', '1860000000000000088', '1860000000000000089', '1860000000000000090',
'1860000000000000091',
'1860000000000000092', '1860000000000000093', '1860000000000000094', '1860000000000000095', '1860000000000000096', '1860000000000000097',
'1860000000000000098',
'1860000000000000099', '1860000000000000100', '1860000000000000101', '1860000000000000102', '1860000000000000103', '1860000000000000104',
'1860000000000000105',
'1860000000000000106', '1860000000000000107', '1860000000000000108', '1860000000000000109', '1860000000000000110', '1860000000000000111',
'1860000000000000112',
'1860000000000000113', '1860000000000000114', '1860000000000000115', '1860000000000000116', '1860000000000000117', '1860000000000000118',
'1860000000000000119',
'1860000000000000120', '1860000000000000121', '1860000000000000122', '1860000000000000123', '1860000000000000124', '1860000000000000125',
'1860000000000000126',
'1860000000000000127', '1860000000000000128', '1860000000000000129', '1860000000000000130', '1860000000000000131', '1860000000000000132',
'1860000000000000135', '1860000000000000136', '1860000000000000137', '1860000000000000138', '1860000000000000139', '1860000000000000140'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -1,4 +1,4 @@
-- 工序管理设备类别设备类型挂到MES基础资料修复权限树is_leaf与租户 admin 授权
-- 工序管理MES基础资料设备类别设备类型挂设备管理修复权限树is_leaf与租户 admin 授权
-- 适用菜单曾在 MES XSL 根下或 is_leaf=1 导致角色授权页不显示按钮权限
-- 修改租户 SET @mes_tenant_id
SET NAMES utf8mb4;
@@ -16,10 +16,21 @@ SET @mes_base_pid = IFNULL(@mes_base_pid, (
));
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料');
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `id` = @mes_equip_pid;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000060', @mes_base_pid, '工序管理', '/xslmes/mesXslProcessOperation', 'xslmes/mesXslProcessOperation/MesXslProcessOperationList', NULL, 1, NULL, '1', 9, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
@@ -37,7 +48,7 @@ ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `perms` = VALUES(`perms`), `is_leaf` = 1, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000070', @mes_base_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 10, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000070', @mes_equip_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 2, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0;
@@ -53,7 +64,7 @@ ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `perms` = VALUES(`perms`), `is_leaf` = 1, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000077', @mes_base_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 11, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000077', @mes_equip_pid, '设备类型', '/xslmes/mesXslEquipmentType', 'xslmes/mesXslEquipmentType/MesXslEquipmentTypeList', NULL, 1, NULL, '1', 3, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0;

View File

@@ -1,4 +1,4 @@
-- 工序管理(060)设备类别(070)补全菜单/按钮 MES基础资料修复 is_leaf租户 admin 授权
-- 工序管理(060) MES基础资料设备类别(070)挂设备管理修复 is_leaf租户 admin 授权
-- 可重复执行修改租户改 SET @mes_tenant_id
SET NAMES utf8mb4;
@@ -15,10 +15,21 @@ SET @mes_base_pid = IFNULL(@mes_base_pid, (
));
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料');
UPDATE `sys_permission`
SET `is_leaf` = 0
WHERE `id` = @mes_equip_pid;
-- 工序管理
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000060', @mes_base_pid, '工序管理', '/xslmes/mesXslProcessOperation', 'xslmes/mesXslProcessOperation/MesXslProcessOperationList', NULL, 1, NULL, '1', 9, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
@@ -42,7 +53,7 @@ UPDATE `sys_permission` SET `name` = '新增' WHERE `id` = '1860000000000000061'
-- 设备类别
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000070', @mes_base_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 10, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000070', @mes_equip_pid, '设备类别', '/xslmes/mesXslEquipmentCategory', 'xslmes/mesXslEquipmentCategory/MesXslEquipmentCategoryList', NULL, 1, NULL, '1', 2, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`menu_type` = VALUES(`menu_type`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),

View File

@@ -0,0 +1,92 @@
-- 生产订单菜单与权限挂到MES密炼工程目录
SET NAMES utf8mb4;
SET @mixer_parent_id = (
SELECT id
FROM sys_permission
WHERE name = 'MES密炼工程' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
);
SET @mixer_parent_id = IFNULL(@mixer_parent_id, (
SELECT id
FROM sys_permission
WHERE url = '/mes' AND menu_type = 0 AND del_flag = 0
ORDER BY create_time ASC
LIMIT 1
));
SET @mixer_parent_id = IFNULL(@mixer_parent_id, '1860000000000000001');
INSERT INTO sys_permission(
id, parent_id, name, url, component, component_name, menu_type, perms, perms_type, sort_no,
is_route, is_leaf, hidden, status, del_flag, keep_alive, internal_or_external, create_by, create_time
)
VALUES (
'1860000000000099511', @mixer_parent_id, '生产订单',
'/mes/productionorderinfo',
'mes/productionorderinfo/index',
'MesXslProductionOrderList', 1, NULL, '1', 33,
1, 1, 0, '1', 0, 1, 0, 'admin', NOW()
)
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
url = VALUES(url),
component = VALUES(component),
component_name = VALUES(component_name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
sort_no = VALUES(sort_no),
is_route = VALUES(is_route),
is_leaf = VALUES(is_leaf),
hidden = VALUES(hidden),
status = VALUES(status),
del_flag = VALUES(del_flag),
keep_alive = VALUES(keep_alive),
internal_or_external = VALUES(internal_or_external);
INSERT INTO sys_permission(id, parent_id, name, menu_type, perms, perms_type, status, del_flag, create_by, create_time) VALUES
('1860000000000099512', '1860000000000099511', '新增', 2, 'xslmes:mes_xsl_production_order:add', '1', '1', 0, 'admin', NOW()),
('1860000000000099513', '1860000000000099511', '编辑', 2, 'xslmes:mes_xsl_production_order:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000099514', '1860000000000099511', '删除', 2, 'xslmes:mes_xsl_production_order:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000099515', '1860000000000099511', '批量删除', 2, 'xslmes:mes_xsl_production_order:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000099516', '1860000000000099511', '导出', 2, 'xslmes:mes_xsl_production_order:exportXls', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
parent_id = VALUES(parent_id),
name = VALUES(name),
menu_type = VALUES(menu_type),
perms = VALUES(perms),
perms_type = VALUES(perms_type),
status = VALUES(status),
del_flag = VALUES(del_flag);
-- admin 角色授权
INSERT INTO sys_role_permission(id, role_id, permission_id, operate_date, operate_ip)
SELECT REPLACE(UUID(), '-', ''), 'f6817f48af4fb3af11b9e8bf182f618b', p.id, NOW(), '127.0.0.1'
FROM sys_permission p
WHERE p.id IN (
'1860000000000099511',
'1860000000000099512', '1860000000000099513', '1860000000000099514', '1860000000000099515', '1860000000000099516'
)
AND NOT EXISTS (
SELECT 1
FROM sys_role_permission rp
WHERE rp.role_id = 'f6817f48af4fb3af11b9e8bf182f618b'
AND rp.permission_id = p.id
);
-- 强制修复确保菜单路由与组件路径正确
UPDATE sys_permission
SET
parent_id = @mixer_parent_id,
url = '/mes/productionorderinfo',
component = 'mes/productionorderinfo/index',
component_name = 'MesXslProductionOrderList',
menu_type = 1,
is_route = 1,
is_leaf = 1,
hidden = 0,
status = '1',
del_flag = 0
WHERE id = '1860000000000099511';

View File

@@ -0,0 +1,66 @@
-- MES 胶料快检数据点建表 + 菜单质量管理下+ 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀mes:mes_xsl_rubber_quick_test_data_point:*
-- 依赖mes_xsl_rubber_quick_test_type修改租户改 SET @mes_tenant_id
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_data_point` (
`id` varchar(32) NOT NULL COMMENT '主键',
`point_name` varchar(128) NOT NULL COMMENT '数据点名称同租户未删除唯一',
`quick_test_type_id` varchar(32) NOT NULL COMMENT '实验类型 mes_xsl_rubber_quick_test_type.id',
`quick_test_type_name` varchar(128) DEFAULT NULL COMMENT '实验类型名称冗余',
`unit_type` varchar(64) DEFAULT NULL COMMENT '单位类型手填',
`point_desc` varchar(500) DEFAULT NULL COMMENT '描述',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mrqtdp_tenant_type` (`tenant_id`, `quick_test_type_id`),
UNIQUE KEY `uk_mrqtdp_tenant_name_del` (`tenant_id`, `point_name`, `del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检数据点';
SET @mes_tenant_id = 1002;
SET @mes_quality_pid = IFNULL(
(SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1),
'1860000000000000162'
);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000170', @mes_quality_pid, '胶料快检数据点', '/xslmes/mesXslRubberQuickTestDataPoint', 'xslmes/mesXslRubberQuickTestDataPoint/MesXslRubberQuickTestDataPointList', 'MesXslRubberQuickTestDataPointList', 1, NULL, '1', 2, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0,
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
UPDATE `sys_permission` SET `icon` = 'ant-design:dot-chart-outlined' WHERE `id` = '1860000000000000170' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `is_leaf`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000171', '1860000000000000170', '新增', 2, 'mes:mes_xsl_rubber_quick_test_data_point:add', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000172', '1860000000000000170', '编辑', 2, 'mes:mes_xsl_rubber_quick_test_data_point:edit', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000173', '1860000000000000170', '删除', 2, 'mes:mes_xsl_rubber_quick_test_data_point:delete', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000174', '1860000000000000170', '批量删除', 2, 'mes:mes_xsl_rubber_quick_test_data_point:deleteBatch', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000175', '1860000000000000170', '导出', 2, 'mes:mes_xsl_rubber_quick_test_data_point:exportXls', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000176', '1860000000000000170', '导入', 2, 'mes:mes_xsl_rubber_quick_test_data_point:importExcel', '1', 1, '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`is_leaf` = 1, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000170',
'1860000000000000171', '1860000000000000172', '1860000000000000173', '1860000000000000174',
'1860000000000000175', '1860000000000000176'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -0,0 +1,27 @@
-- 撤销胶料快检实验方法删除菜单权限字典业务表可整文件一次执行
-- 说明若仅未执行过 V3.9.2_99 / mes-xsl-rubber-quick-test-method-menu-permission.sql执行本脚本即可
-- Flyway 执行过 V3.9.2_99 的环境请同时执行 flyway V3.9.2_100 或本脚本内容一致
SET NAMES utf8mb4;
DELETE FROM `sys_role_permission`
WHERE `permission_id` IN (
'1860000000000000170',
'1860000000000000171', '1860000000000000172', '1860000000000000173',
'1860000000000000174', '1860000000000000175', '1860000000000000176'
);
DELETE FROM `sys_permission`
WHERE `id` IN (
'1860000000000000170',
'1860000000000000171', '1860000000000000172', '1860000000000000173',
'1860000000000000174', '1860000000000000175', '1860000000000000176'
);
DELETE di FROM `sys_dict_item` di
INNER JOIN `sys_dict` d ON di.`dict_id` = d.`id`
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_rotor_type' AND d.`del_flag` = 0;
DELETE FROM `sys_dict`
WHERE `dict_code` = 'xslmes_rubber_quick_test_rotor_type';
DROP TABLE IF EXISTS `mes_xsl_rubber_quick_test_method`;

View File

@@ -0,0 +1,294 @@
-- 胶料快检实验方法主子表字典 + 建表 + 菜单质量管理下+ 按钮 + 租户 admin 授权
-- 权限前缀mes:mes_xsl_rubber_quick_test_method:*
-- 菜单 ID 1860000000000000177与数据点 170 段区分
-- 可与 Flyway V3.9.2_102 重复执行ON DUPLICATE / IF NOT EXISTS
-- SET @mes_tenant_id多租户 admin 授权目标租户
SET NAMES utf8mb4;
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检转子类型', 'xslmes_rubber_quick_test_rotor_type', '1大转子2小转子', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_rotor_type' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '大转子', '1', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_rotor_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '小转子', '2', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_rotor_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '2');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检扭矩单位', 'xslmes_rubber_quick_test_torque_unit', 'Ib.indNmkg.cmNmmdm', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_torque_unit' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, v.txt, v.val, v.ord, 1, 'admin', NOW()
FROM `sys_dict` d
CROSS JOIN (
SELECT 'Ib.in' AS txt, 'Ib.in' AS val, 1 AS ord UNION ALL
SELECT 'dNm', 'dNm', 2 UNION ALL
SELECT 'kg.cm', 'kg.cm', 3 UNION ALL
SELECT 'Nm', 'Nm', 4 UNION ALL
SELECT 'mdm', 'mdm', 5
) v
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_torque_unit'
AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = v.val);
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检时间单位', 'xslmes_rubber_quick_test_time_unit', 'secminm:s', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_time_unit' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, v.txt, v.val, v.ord, 1, 'admin', NOW()
FROM `sys_dict` d
CROSS JOIN (
SELECT 'sec' AS txt, 'sec' AS val, 1 AS ord UNION ALL
SELECT 'min', 'min', 2 UNION ALL
SELECT 'm:s', 'm:s', 3
) v
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_time_unit'
AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = v.val);
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检门尼单位', 'xslmes_rubber_quick_test_mooney_unit', 'MU', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_mooney_unit' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, 'MU', 'MU', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_mooney_unit'
AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = 'MU');
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_method` (
`id` varchar(32) NOT NULL COMMENT '主键',
`method_code` varchar(16) NOT NULL COMMENT '方法编号租户内从001递增自动生成',
`method_name` varchar(128) NOT NULL COMMENT '实验方法名称同租户未删除唯一',
`quick_test_type_id` varchar(32) NOT NULL COMMENT '实验类型 mes_xsl_rubber_quick_test_type.id',
`quick_test_type_name` varchar(128) DEFAULT NULL COMMENT '实验类型名称冗余',
`test_temp_c` decimal(12,2) DEFAULT NULL COMMENT '实验温度°C',
`preheat_time_min` decimal(12,2) DEFAULT NULL COMMENT '预热时间min',
`test_time_min` decimal(12,2) DEFAULT NULL COMMENT '实验时间min',
`test_angle_deg` decimal(12,2) DEFAULT NULL COMMENT '实验角度Deg',
`test_freq_hz` decimal(12,2) DEFAULT NULL COMMENT '实验频率Hz',
`rotor_type` varchar(2) DEFAULT NULL COMMENT '转子类型字典xslmes_rubber_quick_test_rotor_type1大转子2小转子',
`rotor_speed_rpm` decimal(12,2) DEFAULT NULL COMMENT '转子速度rpm',
`method_desc` varchar(500) DEFAULT NULL COMMENT '方法描述',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mrqtm_tenant_code` (`tenant_id`, `method_code`),
KEY `idx_mrqtm_type` (`quick_test_type_id`),
UNIQUE KEY `uk_mrqtm_tenant_name_del` (`tenant_id`, `method_name`, `del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检实验方法';
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_method_line` (
`id` varchar(32) NOT NULL COMMENT '主键',
`method_id` varchar(32) NOT NULL COMMENT '主表 mes_xsl_rubber_quick_test_method.id',
`data_point_id` varchar(32) NOT NULL COMMENT '数据点 mes_xsl_rubber_quick_test_data_point.id',
`point_name` varchar(128) DEFAULT NULL COMMENT '数据点名称冗余只读带出',
`unit_type` varchar(64) DEFAULT NULL COMMENT '单位类型冗余只读带出',
`torque_unit_type` varchar(32) DEFAULT NULL COMMENT '扭矩单位类型字典xslmes_rubber_quick_test_torque_unit',
`time_unit_type` varchar(32) DEFAULT NULL COMMENT '时间单位类型字典xslmes_rubber_quick_test_time_unit',
`mooney_unit_type` varchar(32) DEFAULT NULL COMMENT '门尼单位类型字典xslmes_rubber_quick_test_mooney_unit',
`sort_no` int DEFAULT NULL COMMENT '排序号',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_mrqtml_method` (`method_id`),
UNIQUE KEY `uk_mrqtml_method_point` (`method_id`, `data_point_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检实验方法明细';
SET @mes_tenant_id = 1002;
SET @mes_quality_pid = IFNULL(
(SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1),
'1860000000000000162'
);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000177', @mes_quality_pid, '胶料快检实验方法', '/xslmes/mesXslRubberQuickTestMethod', 'xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethodList', 'MesXslRubberQuickTestMethodList', 1, NULL, '1', 3, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0,
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
UPDATE `sys_permission` SET `icon` = 'ant-design:profile-outlined' WHERE `id` = '1860000000000000177' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `is_leaf`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000178', '1860000000000000177', '新增', 2, 'mes:mes_xsl_rubber_quick_test_method:add', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000179', '1860000000000000177', '编辑', 2, 'mes:mes_xsl_rubber_quick_test_method:edit', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000180', '1860000000000000177', '删除', 2, 'mes:mes_xsl_rubber_quick_test_method:delete', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000181', '1860000000000000177', '批量删除', 2, 'mes:mes_xsl_rubber_quick_test_method:deleteBatch', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000182', '1860000000000000177', '导出', 2, 'mes:mes_xsl_rubber_quick_test_method:exportXls', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000183', '1860000000000000177', '导入', 2, 'mes:mes_xsl_rubber_quick_test_method:importExcel', '1', 1, '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`is_leaf` = 1, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000177',
'1860000000000000178', '1860000000000000179', '1860000000000000180', '1860000000000000181',
'1860000000000000182', '1860000000000000183'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -0,0 +1,151 @@
-- 胶料快检记录主子表字典 + 建表 + 菜单质量管理下+ 按钮 + 胶料信息检验按钮 + 租户 admin 授权
-- 权限前缀mes:mes_xsl_rubber_quick_test_record:*
-- 菜单 ID 1860000000000000192
-- SET @mes_tenant_id多租户 admin 授权目标租户
SET NAMES utf8mb4;
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检记录检验结果', 'xslmes_rubber_quick_test_record_result', '1合格0不合格', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_record_result' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '合格', '1', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_record_result' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '不合格', '0', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_record_result' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '0');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检班次', 'xslmes_rubber_quick_test_work_shift', '班次', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_work_shift' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, v.txt, v.val, v.ord, 1, 'admin', NOW()
FROM `sys_dict` d
CROSS JOIN (
SELECT '早班' AS txt, '1' AS val, 1 AS ord UNION ALL
SELECT '中班', '2', 2 UNION ALL
SELECT '晚班', '3', 3
) v
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_work_shift'
AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = v.val);
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检班组', 'xslmes_rubber_quick_test_work_team', '班组', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_work_team' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, v.txt, v.val, v.ord, 1, 'admin', NOW()
FROM `sys_dict` d
CROSS JOIN (
SELECT '甲班' AS txt, '1' AS val, 1 AS ord UNION ALL
SELECT '乙班', '2', 2 UNION ALL
SELECT '丙班', '3', 3
) v
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_work_team'
AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = v.val);
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_record` (
`id` varchar(32) NOT NULL COMMENT '主键',
`record_no` varchar(32) DEFAULT NULL COMMENT '单号JL+日期+4位流水如JL202605280001',
`rubber_material_id` varchar(32) DEFAULT NULL COMMENT '胶料 mes_material.id',
`rubber_material_name` varchar(128) DEFAULT NULL COMMENT '胶料名称冗余',
`std_id` varchar(32) DEFAULT NULL COMMENT '引用的实验标准 mes_xsl_rubber_quick_test_std.id',
`prod_equipment_ledger_id` varchar(32) DEFAULT NULL COMMENT '生产机台 mes_xsl_equipment_ledger.id',
`prod_equipment_name` varchar(128) DEFAULT NULL COMMENT '生产机台名称冗余',
`production_date` date DEFAULT NULL COMMENT '生产日期',
`train_no` varchar(64) DEFAULT NULL COMMENT '车次编号',
`work_shift` varchar(8) DEFAULT NULL COMMENT '班次字典xslmes_rubber_quick_test_work_shift',
`work_team` varchar(8) DEFAULT NULL COMMENT '班组字典xslmes_rubber_quick_test_work_team',
`inspect_times` int DEFAULT NULL COMMENT '检验次数',
`inspect_time` datetime DEFAULT NULL COMMENT '检验时间',
`inspector_user_id` varchar(32) DEFAULT NULL COMMENT '检验人用户ID',
`inspector_username` varchar(64) DEFAULT NULL COMMENT '检验人账号冗余',
`inspector_realname` varchar(64) DEFAULT NULL COMMENT '检验人姓名冗余',
`quick_test_type_id` varchar(32) DEFAULT NULL COMMENT '检验类型 mes_xsl_rubber_quick_test_type.id',
`quick_test_type_name` varchar(128) DEFAULT NULL COMMENT '检验类型名称冗余',
`inspect_result` varchar(2) DEFAULT NULL COMMENT '检验结果字典xslmes_rubber_quick_test_record_result1合格0不合格',
`production_plan_no` varchar(100) DEFAULT NULL COMMENT '生产计划号',
`inspect_equipment_ledger_id` varchar(32) DEFAULT NULL COMMENT '检验机台 mes_xsl_equipment_ledger.id',
`inspect_equipment_name` varchar(128) DEFAULT NULL COMMENT '检验机台名称冗余',
`rubber_card_no` varchar(100) DEFAULT NULL COMMENT '胶料卡片号',
`rubber_batch_no` varchar(100) DEFAULT NULL COMMENT '胶料批次',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_mrqtr_record_no` (`record_no`),
KEY `idx_mrqtr_material` (`rubber_material_id`),
KEY `idx_mrqtr_std` (`std_id`),
KEY `idx_mrqtr_tenant` (`tenant_id`),
KEY `idx_mrqtr_inspect_time` (`inspect_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检记录';
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_record_line` (
`id` varchar(32) NOT NULL COMMENT '主键',
`record_id` varchar(32) NOT NULL COMMENT '主表 mes_xsl_rubber_quick_test_record.id',
`data_point_id` varchar(32) DEFAULT NULL COMMENT '数据点 mes_xsl_rubber_quick_test_data_point.id',
`inspect_item` varchar(128) DEFAULT NULL COMMENT '检验项目数据点名称只读带出',
`lower_limit` decimal(18,6) DEFAULT NULL COMMENT '检验下限只读带出',
`inspect_value` decimal(18,6) DEFAULT NULL COMMENT '检验值',
`upper_limit` decimal(18,6) DEFAULT NULL COMMENT '检验上限只读带出',
`sort_no` int DEFAULT NULL COMMENT '排序号',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_mrqtrl_record` (`record_id`),
UNIQUE KEY `uk_mrqtrl_record_point` (`record_id`, `data_point_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检记录明细';
SET @mes_tenant_id = 1002;
SET @mes_quality_pid = IFNULL(
(SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1),
'1860000000000000162'
);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000192', @mes_quality_pid, '胶料快检记录', '/xslmes/mesXslRubberQuickTestRecord', 'xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecordList', 'MesXslRubberQuickTestRecordList', 1, NULL, '1', 5, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`component_name` = VALUES(`component_name`), `sort_no` = VALUES(`sort_no`), `is_leaf` = VALUES(`is_leaf`), `keep_alive` = VALUES(`keep_alive`);
UPDATE `sys_permission` SET `icon` = 'ant-design:file-search-outlined' WHERE `id` = '1860000000000000192' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000193', '1860000000000000192', '新增', 2, 'mes:mes_xsl_rubber_quick_test_record:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000194', '1860000000000000192', '编辑', 2, 'mes:mes_xsl_rubber_quick_test_record:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000195', '1860000000000000192', '删除', 2, 'mes:mes_xsl_rubber_quick_test_record:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000196', '1860000000000000192', '批量删除', 2, 'mes:mes_xsl_rubber_quick_test_record:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000197', '1860000000000000192', '导出', 2, 'mes:mes_xsl_rubber_quick_test_record:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000198', '1860000000000000192', '导入', 2, 'mes:mes_xsl_rubber_quick_test_record:importExcel', '1', '1', 0, 'admin', NOW()),
('1860000000000000199', '1860000000000000192', '从胶料生成', 2, 'mes:mes_xsl_rubber_quick_test_record:batchFromMaterial', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE `perms` = VALUES(`perms`), `name` = VALUES(`name`);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000200', '1860000000000000011', '胶料快检', 2, 'mes:mes_material:rubberQuickTestInspect', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE `perms` = VALUES(`perms`), `name` = VALUES(`name`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NOW(), '127.0.0.1'
FROM sys_role r
CROSS JOIN sys_permission p
WHERE r.tenant_id = @mes_tenant_id
AND r.role_code = 'admin'
AND p.id IN (
'1860000000000000192',
'1860000000000000193', '1860000000000000194', '1860000000000000195', '1860000000000000196',
'1860000000000000197', '1860000000000000198', '1860000000000000199',
'1860000000000000200'
)
AND NOT EXISTS (
SELECT 1 FROM sys_role_permission rp
WHERE rp.role_id = r.id AND rp.permission_id = p.id
);

View File

@@ -0,0 +1,130 @@
-- 胶料快检实验标准主子表字典 + 建表 + 菜单质量管理下+ 按钮 + 租户 admin 授权
-- 权限前缀mes:mes_xsl_rubber_quick_test_std:*
-- 菜单 ID 1860000000000000184实验方法占用 177-183
-- 可与 Flyway V3.9.2_103 重复执行ON DUPLICATE / IF NOT EXISTS
-- SET @mes_tenant_id多租户 admin 授权目标租户
SET NAMES utf8mb4;
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检密炼机类型', 'xslmes_rubber_quick_test_mixer_type', '1普通密炼机2串密炼机', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_mixer_type' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '普通密炼机', '1', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_mixer_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '串密炼机', '2', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_mixer_type' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '2');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检标准启用状态', 'xslmes_rubber_quick_test_std_enable_status', '1使用中0已停用', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_std_enable_status' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '使用中', '1', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_std_enable_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '已停用', '0', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_std_enable_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '0');
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`)
SELECT REPLACE(UUID(), '-', ''), 'MES胶料快检标准审核状态', 'xslmes_rubber_quick_test_std_audit_status', '0草稿1已批准', 0, 'admin', NOW(), 0, 0
WHERE NOT EXISTS (SELECT 1 FROM `sys_dict` WHERE `dict_code` = 'xslmes_rubber_quick_test_std_audit_status' AND `del_flag` = 0);
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '草稿', '0', 1, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_std_audit_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '0');
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`)
SELECT REPLACE(UUID(), '-', ''), d.id, '已批准', '1', 2, 1, 'admin', NOW() FROM `sys_dict` d
WHERE d.`dict_code` = 'xslmes_rubber_quick_test_std_audit_status' AND NOT EXISTS (SELECT 1 FROM `sys_dict_item` i WHERE i.`dict_id` = d.id AND i.`item_value` = '1');
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_std` (
`id` varchar(32) NOT NULL COMMENT '主键',
`std_name` varchar(128) NOT NULL COMMENT '实验标准名称同租户未删除唯一',
`test_method_id` varchar(32) NOT NULL COMMENT '实验方法 mes_xsl_rubber_quick_test_method.id',
`test_method_name` varchar(128) DEFAULT NULL COMMENT '实验方法名称冗余',
`mixer_type` varchar(2) DEFAULT NULL COMMENT '密炼机类型字典xslmes_rubber_quick_test_mixer_type1普通密炼机2串密炼机',
`rubber_material_id` varchar(32) DEFAULT NULL COMMENT '胶料 mes_material.id',
`rubber_material_name` varchar(128) DEFAULT NULL COMMENT '胶料名称冗余',
`ps_compile_id` varchar(32) DEFAULT NULL COMMENT '密炼PS编制 mes_xsl_mixer_ps_compile.id',
`issue_number` varchar(100) DEFAULT NULL COMMENT '发行编号密炼PS编码冗余',
`issue_date` date DEFAULT NULL COMMENT '发行日期',
`issue_dept_id` varchar(32) DEFAULT NULL COMMENT '发行部门ID',
`issue_dept_name` varchar(200) DEFAULT NULL COMMENT '发行部门名称冗余',
`enable_status` varchar(2) DEFAULT '1' COMMENT '启用状态字典xslmes_rubber_quick_test_std_enable_status1使用中0已停用',
`audit_status` varchar(2) DEFAULT '0' COMMENT '审核状态字典xslmes_rubber_quick_test_std_audit_status0草稿1已批准',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mrqts_method` (`test_method_id`),
KEY `idx_mrqts_material` (`rubber_material_id`),
KEY `idx_mrqts_tenant` (`tenant_id`),
UNIQUE KEY `uk_mrqts_tenant_name_del` (`tenant_id`, `std_name`, `del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检实验标准';
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_std_line` (
`id` varchar(32) NOT NULL COMMENT '主键',
`std_id` varchar(32) NOT NULL COMMENT '主表 mes_xsl_rubber_quick_test_std.id',
`data_point_id` varchar(32) NOT NULL COMMENT '数据点 mes_xsl_rubber_quick_test_data_point.id',
`point_name` varchar(128) DEFAULT NULL COMMENT '数据点名称冗余只读带出',
`lower_limit` decimal(18,6) DEFAULT NULL COMMENT '下限值',
`lower_warn` decimal(18,6) DEFAULT NULL COMMENT '下警告值',
`target_value` decimal(18,6) DEFAULT NULL COMMENT '目标值',
`upper_warn` decimal(18,6) DEFAULT NULL COMMENT '上警告值',
`upper_limit` decimal(18,6) DEFAULT NULL COMMENT '上限值',
`sort_no` int DEFAULT NULL COMMENT '排序号',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_mrqtsl_std` (`std_id`),
UNIQUE KEY `uk_mrqtsl_std_point` (`std_id`, `data_point_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检实验标准明细';
SET @mes_tenant_id = 1002;
SET @mes_quality_pid = IFNULL(
(SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1),
'1860000000000000162'
);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000184', @mes_quality_pid, '胶料快检实验标准', '/xslmes/mesXslRubberQuickTestStd', 'xslmes/mesXslRubberQuickTestStd/MesXslRubberQuickTestStdList', 'MesXslRubberQuickTestStdList', 1, NULL, '1', 4, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`component_name` = VALUES(`component_name`), `sort_no` = VALUES(`sort_no`), `is_leaf` = VALUES(`is_leaf`), `keep_alive` = VALUES(`keep_alive`);
UPDATE `sys_permission` SET `icon` = 'ant-design:file-protect-outlined' WHERE `id` = '1860000000000000184' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000185', '1860000000000000184', '新增', 2, 'mes:mes_xsl_rubber_quick_test_std:add', '1', '1', 0, 'admin', NOW()),
('1860000000000000186', '1860000000000000184', '编辑', 2, 'mes:mes_xsl_rubber_quick_test_std:edit', '1', '1', 0, 'admin', NOW()),
('1860000000000000187', '1860000000000000184', '删除', 2, 'mes:mes_xsl_rubber_quick_test_std:delete', '1', '1', 0, 'admin', NOW()),
('1860000000000000188', '1860000000000000184', '批量删除', 2, 'mes:mes_xsl_rubber_quick_test_std:deleteBatch', '1', '1', 0, 'admin', NOW()),
('1860000000000000189', '1860000000000000184', '导出', 2, 'mes:mes_xsl_rubber_quick_test_std:exportXls', '1', '1', 0, 'admin', NOW()),
('1860000000000000190', '1860000000000000184', '导入', 2, 'mes:mes_xsl_rubber_quick_test_std:importExcel', '1', '1', 0, 'admin', NOW()),
('1860000000000000191', '1860000000000000184', '启用停用', 2, 'mes:mes_xsl_rubber_quick_test_std:updateStatus', '1', '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE `perms` = VALUES(`perms`), `name` = VALUES(`name`);
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NOW(), '127.0.0.1'
FROM sys_role r
CROSS JOIN sys_permission p
WHERE r.tenant_id = @mes_tenant_id
AND r.role_code = 'admin'
AND p.id IN (
'1860000000000000184',
'1860000000000000185', '1860000000000000186', '1860000000000000187', '1860000000000000188',
'1860000000000000189', '1860000000000000190', '1860000000000000191'
)
AND NOT EXISTS (
SELECT 1 FROM sys_role_permission rp
WHERE rp.role_id = r.id AND rp.permission_id = p.id
);

View File

@@ -0,0 +1,87 @@
-- MES 胶料快检实验类型建表 + 质量管理目录 + 子菜单 + 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀与 Controller前端 v-auth 一致mes:mes_xsl_rubber_quick_test_type:*
-- 修改租户 SET @mes_tenant_id
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_quick_test_type` (
`id` varchar(32) NOT NULL COMMENT '主键',
`type_code` varchar(16) NOT NULL COMMENT '实验类型编号租户内从001递增自动生成',
`type_name` varchar(128) NOT NULL COMMENT '实验类型名称',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门',
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT '0' COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mrqtt_tenant_code` (`tenant_id`, `type_code`),
KEY `idx_mrqtt_tenant_name` (`tenant_id`, `type_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料快检实验类型';
SET @mes_tenant_id = 1002;
SET @mes_root_parent = (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES基础资料'
LIMIT 1
);
SET @mes_root_parent = IFNULL(@mes_root_parent, (
SELECT `parent_id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = 'MES资料'
LIMIT 1
));
SET @mes_root_parent = IFNULL(@mes_root_parent, '1860000000000000001');
SET @mes_quality_sort = IFNULL((
SELECT `sort_no` + 1 FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料', '设备管理')
ORDER BY `sort_no` DESC
LIMIT 1
), 52);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000162', @mes_root_parent, '质量管理', '/xslmes/quality', 'layouts/RouteView', 'MesQualityLayout', 0, NULL, '1', @mes_quality_sort, 1, 0, 0, '1', 0, 0, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`),
`menu_type` = VALUES(`menu_type`), `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0;
UPDATE `sys_permission` SET `icon` = 'ant-design:safety-certificate-outlined' WHERE `id` = '1860000000000000162' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000163', '1860000000000000162', '胶料快检实验类型', '/xslmes/mesXslRubberQuickTestType', 'xslmes/mesXslRubberQuickTestType/MesXslRubberQuickTestTypeList', 'MesXslRubberQuickTestTypeList', 1, NULL, '1', 1, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = 0, `hidden` = 0, `status` = '1', `del_flag` = 0,
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
UPDATE `sys_permission` SET `icon` = 'ant-design:experiment-outlined' WHERE `id` = '1860000000000000163' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `is_leaf`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000164', '1860000000000000163', '新增', 2, 'mes:mes_xsl_rubber_quick_test_type:add', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000165', '1860000000000000163', '编辑', 2, 'mes:mes_xsl_rubber_quick_test_type:edit', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000166', '1860000000000000163', '删除', 2, 'mes:mes_xsl_rubber_quick_test_type:delete', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000167', '1860000000000000163', '批量删除', 2, 'mes:mes_xsl_rubber_quick_test_type:deleteBatch', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000168', '1860000000000000163', '导出', 2, 'mes:mes_xsl_rubber_quick_test_type:exportXls', '1', 1, '1', 0, 'admin', NOW()),
('1860000000000000169', '1860000000000000163', '导入', 2, 'mes:mes_xsl_rubber_quick_test_type:importExcel', '1', 1, '1', 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`),
`is_leaf` = 1, `status` = '1', `del_flag` = 0;
INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`)
SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1'
FROM `sys_role` r
CROSS JOIN `sys_permission` p
WHERE r.`tenant_id` = @mes_tenant_id
AND r.`role_code` = 'admin'
AND p.`id` IN (
'1860000000000000162',
'1860000000000000163',
'1860000000000000164', '1860000000000000165', '1860000000000000166', '1860000000000000167',
'1860000000000000168', '1860000000000000169'
)
AND NOT EXISTS (
SELECT 1 FROM `sys_role_permission` rp
WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id`
);

View File

@@ -26,19 +26,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_spare_part` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000105', @mes_base_pid, '备品件信息', '/xslmes/mesXslSparePart', 'xslmes/mesXslSparePart/MesXslSparePartList', NULL, 1, NULL, '1', 16, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000105', @mes_equip_pid, '备品件信息', '/xslmes/mesXslSparePart', 'xslmes/mesXslSparePart/MesXslSparePartList', NULL, 1, NULL, '1', 7, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:shopping-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:shopping-outlined' WHERE `id` = '1860000000000000105' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000106', '1860000000000000105', '新增', 2, 'mes:mes_xsl_spare_part:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -20,19 +20,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_spare_parts_category` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000098', @mes_base_pid, '备品件类别', '/xslmes/mesXslSparePartsCategory', 'xslmes/mesXslSparePartsCategory/MesXslSparePartsCategoryList', NULL, 1, NULL, '1', 15, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000098', @mes_equip_pid, '备品件类别', '/xslmes/mesXslSparePartsCategory', 'xslmes/mesXslSparePartsCategory/MesXslSparePartsCategoryList', NULL, 1, NULL, '1', 6, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:tags-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:tags-outlined' WHERE `id` = '1860000000000000098' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000099', '1860000000000000098', '新增', 2, 'mes:mes_xsl_spare_parts_category:add', '1', '1', 0, 'admin', NOW()),

View File

@@ -22,6 +22,7 @@ import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.net.*;
import java.sql.Date;
import java.util.*;
@@ -1046,7 +1047,7 @@ public class oConvertUtils {
BigDecimal bigDecimal = new BigDecimal(uploadCount);
//换算成MB
BigDecimal divide = bigDecimal.divide(new BigDecimal(1048576));
count = divide.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
count = divide.setScale(2, RoundingMode.HALF_UP).doubleValue();
return count;
}
return count;

View File

@@ -0,0 +1,468 @@
-- author:jiangxh---date:20260521--for: 【配合示方】新增配合示方主子表模块 ---
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_91__mes_xsl_formula_spec.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpec.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpecLine.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaSpecPage.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslFormulaSpecMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslFormulaSpecLineMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslFormulaSpecController.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpecList.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:jiangxh---date:20260521--for: 【配合示方】主表新增混合段1-7合计字段 ---
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_92__mes_xsl_formula_spec_stage_total.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpec.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260521--for: 【配合示方】STEP全为A/Q时对应胶比重清零 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260521--for: 【配合示方】含胶率按密炼物料小类汇总重量% ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue
-- author:cursor---date:20260521--for: 【配合示方】含胶率物料小类可配置设置弹窗 ---
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_96__mes_xsl_formula_spec_rubber_content_setting.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpecSetting.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaRubberContentSettingVO.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslFormulaSpecSettingMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecSettingService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecSettingServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslFormulaSpecController.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaRubberContentSettingModal.vue
-- author:cursor---date:20260521--for: 【配合示方】含胶率设置改用系统MES物料分类字典 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaRubberContentSettingModal.vue
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecSettingService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecSettingServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslFormulaSpecController.java
-- author:cursor---date:20260521--for: 【配合示方】含胶率设置小类下拉对齐密炼物料loadTreeData加载 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaRubberContentSettingModal.vue
-- author:cursor---date:20260521--for: 【配合示方】含胶率设置改为loadAllData加载MES物料分类全部节点 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaRubberContentSettingModal.vue
-- author:cursor---date:20260521--for: 【配合示方】含胶率设置弹窗openModal未传data导致不加载分类 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaRubberContentSettingModal.vue
-- author:cursor---date:20260521--for: 【配合示方】明细新增物料大类/小类展示列(不落库) ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue
-- author:cursor---date:20260521--for: 【配合示方】明细备注列与1-7段列宽适当缩小 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
-- author:cursor---date:20260521--for: 【配合示方】基本信息模块改为汇总格状布局 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260521--for: 【配合示方】基本信息改为显式表格格状布局 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
-- author:cursor---date:20260521--for: 【配合示方】汇总与基本信息标题格增加内阴影 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260521--for: 【配合示方】明细列表新增列显示/隐藏设置 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaLineColumnSetting.vue
-- author:cursor---date:20260521--for: 【配合示方】明细列表列设置改为保存后生效并修复勾选状态 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaLineColumnSetting.vue
-- author:cursor---date:20260521--for: 【配合示方】审批进度编制人展示真实姓名 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpec.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260521--for: 【配合示方】编辑页A胶TOTAL PHR缺失时按明细补算回显 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260521--for: 【配合示方】编辑打开时基本资料闪清修复 ---
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
-- author:cursor---date:20260522--for: 【配合示方】状态字典调整为审批流程8项 ---
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_97__mes_xsl_formula_spec_status_dict.sql
-- author:cursor---date:20260522--for: 【配合示方】密炼PS校对/审核/批准联动同步状态与审批人 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A17】新增MES技术管理-混炼示方1主4子表及紧凑页 ---
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_98__mes_xsl_mixing_spec.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpec.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpecMaterial.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpecStep.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpecDownStep.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpecTcu.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslMixingSpecPage.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixingSpecMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixingSpecMaterialMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixingSpecStepMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixingSpecDownStepMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixingSpecTcuMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixingSpecService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixingSpecController.java
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpecList.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A33】新增混炼示方主表/明细字段交互优化 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixerAction/components/MesXslMixerActionSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixerCondition/components/MesXslMixerConditionSelectModal.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A34】混炼示方动作/组合改为下拉选择 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A35】混炼示方动作/组合列常显下拉倒三角 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingStepSelectCell.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】F段明细加入最后一段B炼好胶(如三段用B2)+Q列配合剂 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】B2/Bn明细改为上一段胶料一条(B{n-1}+胶料名)+本段列配合剂 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】修复B2与B1相同按列增量拼接并支持列2+非Q配合剂 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaMixingGenerateRowVO.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaGenerateMixingModal.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】生成混炼示方B段改为Bn=B(n-1)+第n列有值配合剂增量拼接 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】生成混炼示方明细种类按分类字典is_rubber显示胶料或小类名 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】生成混炼示方编号原样追加胶料代号中胶料名称后的后缀 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】生成混炼示方明细按STEP过滤B段仅A物料、F段仅Q物料 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A38】配合示方生成混炼示方预览段×机台批量创建 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaMixingGenerate*.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslFormulaSpecController.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpecList.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaGenerateMixingModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslEquipInspectConfig/components/MesXslEquipmentLedgerMultiSelectModal.vue
-- author:cursor---date:20260522--for: 【XSLMES-20260522-A36】混炼示方动作/组合下拉列表被表格裁切修复 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingStepSelectCell.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A43】混炼示方换算系数联动橡胶及配合剂单重实时计算 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A42】混炼示方橡胶及配合剂明细底部固定合计行 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A41】混炼示方橡胶及配合剂明细累计按种类分组合计 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A44】配合示方生成混炼示方时按设备台账有效体积自动计算填充体积 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslEquipInspectConfig/components/MesXslEquipmentLedgerMultiSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A45】混炼示方保存/批量生成子表改批量插入并延长前端超时 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/MesXslFormulaSpec.api.ts
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A46】混炼示方换算系数/单重/机台有效体积联动填充体积 ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslEquipInspectConfig/components/MesXslEquipmentLedgerSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A47】混炼示方保存分步骤性能诊断日志 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixingSpecController.java
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A48】生成混炼示方时同步B/F段胶至密炼物料母炼胶/A胶、终炼胶/Q胶 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A49】删除混炼示方时同步删除B/F段胶密炼物料 ---
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】MES物料小类胶料标记/生成混炼示方种类映射/混炼示方选料弹窗 ---
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysCategoryServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/system/category/category.constants.ts
jeecgboot-vue3/src/views/system/category/category.data.ts
jeecgboot-vue3/src/views/system/category/components/CategoryModal.vue
jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSysCategoryModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialCategorySetting.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗左侧小类树为空修复对齐密炼物料列表树加载/异步展开/隐藏配置重置) ---
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗小类设置无明细/统一分类加载函数 -----------
jeecgboot-vue3/src/views/system/category/category.constants.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialCategorySetting.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗分类加载改为getChildListBatch两级查询 -----------
jeecgboot-vue3/src/views/system/category/category.constants.ts
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗openModal未传data导致初始化未执行 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗移出父Modal+useModalInner初始化 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】小类展示分组勾选互不覆盖 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialCategorySetting.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A50】选料弹窗隐藏ERP列并新增自动/人工称量列 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A51】密炼物料种类配置表及列表批量新增 -----------
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_102__mes_xsl_mixer_material_kind_cfg.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixerMaterialKindCfg.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixerMaterialKindCfgMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerMaterialKindCfgService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerMaterialKindCfgServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerMaterialKindCfgController.java
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/MesXslMixerMaterialKindCfgList.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/MesXslMixerMaterialKindCfg.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/MesXslMixerMaterialKindCfg.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/components/MesXslMixerMaterialKindCfgBatchModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/components/MesXslMixerMaterialKindCfgEditModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A51】密炼物料种类配置菜单ID冲突修复 -----------
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_102__mes_xsl_mixer_material_kind_cfg.sql
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_103__mes_xsl_mixer_material_kind_cfg_menu_fix.sql
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】混炼示方种类改读密炼物料种类配置生成/选料弹窗) -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslMixerMaterialKindLookupVO.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerMaterialKindCfgService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerMaterialKindCfgServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerMaterialKindCfgController.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/MesXslMixerMaterialKindCfg.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】选料弹窗层级修复及关闭父弹窗时同步关闭 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】选料弹窗左侧物料小类树会话缓存 -----------
jeecgboot-vue3/src/views/system/category/category.constants.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】选料弹窗小类设置按钮 Popover 层级修复 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialCategorySetting.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】选料弹窗小类设置新增刷新分类字典 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialCategorySetting.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A52】高层级弹窗内 Message 提示层级修复 -----------
jeecgboot-vue3/src/design/public.less
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A53】种类解析移除小类名兜底/通用选料弹窗接配置/配置变更清缓存 -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerMaterialKindCfgService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerMaterialKindCfgServiceImpl.java
jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingSpecModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingMaterialSelectModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslMixerMaterialKindCfg/MesXslMixerMaterialKindCfgList.vue
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A54】母炼胶明细行绑定已同步密炼物料主数据及种类配置解析 -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A55】混炼示方明细新增密炼物料ID字段 -----------
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_104__mes_xsl_mixing_spec_material_mixer_material_id.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixingSpecMaterial.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A56】混炼示方批量删除性能优化子表批量删+去重同步删密炼物料) -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
-- author:cursor---date:20260525--for: 【XSLMES-20260525-A57】混合步骤动作/组合下拉最多展示20条 -----------
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/components/MesXslMixingStepSelectCell.vue
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验类型质量管理目录、001自动编号、CRUD与菜单权限 ---
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_97__mes_xsl_rubber_quick_test_type.sql
jeecg-boot/db/mes-xsl-rubber-quick-test-type-menu-permission.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestType.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestTypeMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestTypeService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestTypeServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestTypeController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestType/MesXslRubberQuickTestTypeList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestType/MesXslRubberQuickTestType.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestType/MesXslRubberQuickTestType.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestType/components/MesXslRubberQuickTestTypeModal.vue
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验方法质量管理菜单、001编号、名称唯一、关联实验类型 ---
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_99__mes_xsl_rubber_quick_test_method.sql
jeecg-boot/db/mes-xsl-rubber-quick-test-method-menu-permission.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestMethod.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestMethodMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestMethodService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestMethodServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestMethodController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethodList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/components/MesXslRubberQuickTestMethodModal.vue
-- author:jiangxh---date:20260522--for: 【MES】撤销胶料快检实验方法功能删代码+库清理脚本)---
jeecg-boot/db/mes-xsl-rubber-quick-test-method-drop.sql
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_100__drop_mes_xsl_rubber_quick_test_method.sql
-- author:jiangxh---date:20260522--for: 【MES】胶料快检数据点质量管理菜单、名称唯一、关联实验类型、单位手填 ---
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_101__mes_xsl_rubber_quick_test_data_point.sql
jeecg-boot/db/mes-xsl-rubber-quick-test-data-point-menu-permission.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestDataPoint.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestDataPointMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestDataPointService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestDataPointServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestDataPointController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestDataPoint/MesXslRubberQuickTestDataPointList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestDataPoint/MesXslRubberQuickTestDataPoint.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestDataPoint/MesXslRubberQuickTestDataPoint.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestDataPoint/components/MesXslRubberQuickTestDataPointModal.vue
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验类型名称同租户不可重复Service兜底+唯一索引)---
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_98__mes_xsl_rubber_quick_test_type_name_unique.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestTypeServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestTypeController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestType/MesXslRubberQuickTestType.data.ts
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验方法主子表质量管理菜单177段、001编号、名称唯一、选择数据点明细 ---
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_102__mes_xsl_rubber_quick_test_method.sql
jeecg-boot/db/mes-xsl-rubber-quick-test-method-menu-permission.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestMethod.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestMethodLine.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslRubberQuickTestMethodPage.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestMethodMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestMethodLineMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestMethodService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestMethodServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestMethodController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethodList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/components/MesXslRubberQuickTestMethodModal.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/components/MesXslRubberQuickTestDataPointSelectModal.vue
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验方法明细字典单位必选、不可清空 ---
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/components/MesXslRubberQuickTestMethodModal.vue
-- author:jiangxh---date:20260522--for: 【MES】胶料快检实验方法明细单位字典默认取首项非空选---
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/MesXslRubberQuickTestMethod.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestMethod/components/MesXslRubberQuickTestMethodModal.vue
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestMethodController.java
jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue
-- author:cursor---date:20260526--for: 【XSLMES-20260526-A61】混炼示方密炼PS校对/审核/批准联动同步审批人 -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixingSpecService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpec.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslMixingSpec/MesXslMixingSpecList.vue
-- author:cursor---date:20260526--for: 【配方日志查询】配合示方/混炼示方修改日志记录与查询接口 -----------
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_107__mes_xsl_formula_spec_edit_log.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslFormulaSpecEditLog.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaSpecEditChangeItemVO.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslFormulaSpecEditLogDetailVO.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslFormulaSpecEditLogMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/common/MesXslFormulaSpecEditLogDiffUtil.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecEditLogService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecEditLogServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslFormulaSpecEditLogController.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixingSpecServiceImpl.java
-- author:cursor---date:20260526--for: 【配方日志查询】前端列表页与修改对比弹窗 -----------
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpecEditLog/MesXslFormulaSpecEditLog.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpecEditLog/MesXslFormulaSpecEditLog.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpecEditLog/MesXslFormulaSpecEditLogList.vue
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpecEditLog/components/MesXslFormulaSpecEditLogCompareModal.vue
-- author:cursor---date:20260526--for: 【配方日志查询】明细对比展示逐行逐字段变更内容 -----------
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/common/MesXslFormulaSpecEditLogDiffUtil.java
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpecEditLog/MesXslFormulaSpecEditLog.data.ts
-- author:jiangxh---date:20260525--for: 【MES】胶料快检记录主子表、质量管理菜单、胶料信息批量检验生成 ---
jeecg-boot/db/mes-xsl-rubber-quick-test-record-menu-permission.sql
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_108__mes_xsl_rubber_quick_test_record.sql
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestRecord.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestRecordLine.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslRubberQuickTestRecordPage.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/vo/MesXslRubberQuickTestRecordBatchFromMaterialVO.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestRecordMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberQuickTestRecordLineMapper.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestRecordService.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestRecordServiceImpl.java
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberQuickTestRecordController.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecordList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecord.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecord.api.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/components/MesXslRubberQuickTestRecordModal.vue
jeecgboot-vue3/src/views/mes/material/MesMaterialList.vue
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_109__mes_xsl_rubber_quick_test_record_no.sql
-- author:jiangxh---date:20260528--for: 【MES】胶料快检记录单号、无弹窗直接生成、列表去掉新增、明细不可增删 ---
jeecg-boot/db/mes-xsl-rubber-quick-test-record-menu-permission.sql
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberQuickTestRecord.java
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberQuickTestRecordService.java
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberQuickTestRecordServiceImpl.java
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecordList.vue
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/MesXslRubberQuickTestRecord.data.ts
jeecgboot-vue3/src/views/xslmes/mesXslRubberQuickTestRecord/components/MesXslRubberQuickTestRecordModal.vue
jeecgboot-vue3/src/views/mes/material/MesMaterialList.vue

View File

@@ -17,6 +17,7 @@
<dependency>
<groupId>org.jeecgframework.boot3</groupId>
<artifactId>jeecg-boot-base-core</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<!-- 复用打印模板模块打印机枚举、业务绑定、PDF 提交队列 -->
<dependency>

View File

@@ -0,0 +1,546 @@
package org.jeecg.modules.xslmes.common;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpec;
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpecLine;
import org.jeecg.modules.xslmes.vo.MesXslFormulaSpecEditChangeItemVO;
import org.jeecg.modules.xslmes.vo.MesXslMixingSpecPage;
/**
* 配方示方修改日志:快照序列化与差异对比
*/
public final class MesXslFormulaSpecEditLogDiffUtil {
public static final String SECTION_MAIN = "main";
public static final String SECTION_LINE = "line";
public static final String SECTION_MATERIAL = "material";
public static final String SECTION_STEP = "step";
public static final String SECTION_DOWN_STEP = "downStep";
public static final String SECTION_TCU = "tcu";
private static final Set<String> IGNORE_FIELDS = Set.of(
"id",
"createBy",
"createTime",
"updateBy",
"updateTime",
"delFlag",
"tenantId",
"sysOrgCode",
"createBy_dictText",
"lineList",
"materialList",
"stepList",
"downStepList",
"tcuList");
private static final Map<String, String> FORMULA_MAIN_LABELS = buildFormulaMainLabels();
private static final Map<String, String> MIXING_MAIN_LABELS = buildMixingMainLabels();
private static final Map<String, String> SECTION_LABELS = Map.of(
SECTION_MAIN, "主表",
SECTION_LINE, "配合明细",
SECTION_MATERIAL, "橡胶及配合剂",
SECTION_STEP, "混合步骤",
SECTION_DOWN_STEP, "下密炼机条件",
SECTION_TCU, "TCU温度条件");
private static final Map<String, Map<String, String>> SECTION_FIELD_LABELS = buildSectionFieldLabels();
private static final Map<String, String[]> SECTION_SUMMARY_FIELDS = buildSectionSummaryFields();
private MesXslFormulaSpecEditLogDiffUtil() {}
public static String buildFormulaSnapshotJson(MesXslFormulaSpec main, List<MesXslFormulaSpecLine> lineList) {
Map<String, Object> snapshot = new LinkedHashMap<>(2);
snapshot.put(SECTION_MAIN, toJsonObject(main));
snapshot.put(SECTION_LINE, lineList == null ? List.of() : lineList);
return toJson(snapshot);
}
public static String buildMixingSnapshotJson(MesXslMixingSpecPage page) {
if (page == null) {
return null;
}
Map<String, Object> snapshot = new LinkedHashMap<>(5);
snapshot.put(SECTION_MAIN, toJsonObject(page));
snapshot.put(SECTION_MATERIAL, page.getMaterialList() == null ? List.of() : page.getMaterialList());
snapshot.put(SECTION_STEP, page.getStepList() == null ? List.of() : page.getStepList());
snapshot.put(SECTION_DOWN_STEP, page.getDownStepList() == null ? List.of() : page.getDownStepList());
snapshot.put(SECTION_TCU, page.getTcuList() == null ? List.of() : page.getTcuList());
return toJson(snapshot);
}
public static List<MesXslFormulaSpecEditChangeItemVO> compare(
String specType, String beforeSnapshot, String afterSnapshot) {
List<MesXslFormulaSpecEditChangeItemVO> items = new ArrayList<>();
JSONObject before = parseObject(beforeSnapshot);
JSONObject after = parseObject(afterSnapshot);
Map<String, String> mainLabels = SPEC_TYPE_MIXING.equals(specType) ? MIXING_MAIN_LABELS : FORMULA_MAIN_LABELS;
compareMainSection(items, before == null ? null : before.getJSONObject(SECTION_MAIN),
after == null ? null : after.getJSONObject(SECTION_MAIN), mainLabels);
if (SPEC_TYPE_FORMULA.equals(specType)) {
compareChildListSection(items, SECTION_LINE, before, after);
} else {
compareChildListSection(items, SECTION_MATERIAL, before, after);
compareChildListSection(items, SECTION_STEP, before, after);
compareChildListSection(items, SECTION_DOWN_STEP, before, after);
compareChildListSection(items, SECTION_TCU, before, after);
}
return items;
}
public static String buildSummary(String actionType, List<MesXslFormulaSpecEditChangeItemVO> items) {
if ("create".equals(actionType)) {
return "新增示方";
}
if ("delete".equals(actionType)) {
return "删除示方";
}
if (items == null || items.isEmpty()) {
return "内容无变化";
}
Set<String> labels = new LinkedHashSet<>();
for (MesXslFormulaSpecEditChangeItemVO item : items) {
if (SECTION_MAIN.equals(item.getSection()) && StringUtils.isNotBlank(item.getFieldLabel())) {
labels.add(item.getFieldLabel());
} else if (StringUtils.isNotBlank(item.getSectionLabel())) {
labels.add(item.getSectionLabel());
}
}
if (labels.isEmpty()) {
return "内容有变更";
}
String joined = String.join("", labels);
if (joined.length() > 180) {
joined = joined.substring(0, 177) + "...";
}
return "修改:" + joined;
}
private static void compareMainSection(
List<MesXslFormulaSpecEditChangeItemVO> items,
JSONObject before,
JSONObject after,
Map<String, String> labels) {
Set<String> keys = new LinkedHashSet<>();
if (before != null) {
keys.addAll(before.keySet());
}
if (after != null) {
keys.addAll(after.keySet());
}
for (String key : keys) {
if (IGNORE_FIELDS.contains(key)) {
continue;
}
String beforeVal = formatValue(before == null ? null : before.get(key));
String afterVal = formatValue(after == null ? null : after.get(key));
if (Objects.equals(beforeVal, afterVal)) {
continue;
}
MesXslFormulaSpecEditChangeItemVO item = new MesXslFormulaSpecEditChangeItemVO();
item.setSection(SECTION_MAIN);
item.setSectionLabel(SECTION_LABELS.get(SECTION_MAIN));
item.setFieldKey(key);
item.setFieldLabel(labels.getOrDefault(key, key));
item.setBeforeValue(beforeVal);
item.setAfterValue(afterVal);
items.add(item);
}
}
private static void compareChildListSection(
List<MesXslFormulaSpecEditChangeItemVO> items, String section, JSONObject before, JSONObject after) {
List<JSONObject> beforeList = toJsonObjectList(before == null ? null : before.get(section));
List<JSONObject> afterList = toJsonObjectList(after == null ? null : after.get(section));
if (Objects.equals(normalizeListJson(beforeList), normalizeListJson(afterList))) {
return;
}
Map<String, String> fieldLabels = SECTION_FIELD_LABELS.getOrDefault(section, Map.of());
String[] summaryFields = SECTION_SUMMARY_FIELDS.getOrDefault(section, new String[0]);
Map<String, JSONObject> beforeMap = indexRows(beforeList);
Map<String, JSONObject> afterMap = indexRows(afterList);
Set<String> rowKeys = new LinkedHashSet<>();
rowKeys.addAll(beforeMap.keySet());
rowKeys.addAll(afterMap.keySet());
for (String rowKey : rowKeys) {
JSONObject beforeRow = beforeMap.get(rowKey);
JSONObject afterRow = afterMap.get(rowKey);
String rowLabel = formatRowLabel(rowKey);
if (beforeRow == null && afterRow != null) {
addChangeItem(items, section, rowKey + "_add", rowLabel + "(新增)", "",
formatRowSummary(afterRow, fieldLabels, summaryFields));
continue;
}
if (beforeRow != null && afterRow == null) {
addChangeItem(items, section, rowKey + "_del", rowLabel + "(删除)",
formatRowSummary(beforeRow, fieldLabels, summaryFields), "");
continue;
}
compareRowFields(items, section, rowKey, rowLabel, beforeRow, afterRow, fieldLabels);
}
}
private static void compareRowFields(
List<MesXslFormulaSpecEditChangeItemVO> items,
String section,
String rowKey,
String rowLabel,
JSONObject beforeRow,
JSONObject afterRow,
Map<String, String> fieldLabels) {
Set<String> keys = new LinkedHashSet<>();
keys.addAll(beforeRow.keySet());
keys.addAll(afterRow.keySet());
for (String key : keys) {
if (IGNORE_FIELDS.contains(key) || isRowMetaField(key)) {
continue;
}
String beforeVal = formatValue(beforeRow.get(key));
String afterVal = formatValue(afterRow.get(key));
if (Objects.equals(beforeVal, afterVal)) {
continue;
}
addChangeItem(
items,
section,
rowKey + "_" + key,
rowLabel + "·" + fieldLabels.getOrDefault(key, key),
beforeVal,
afterVal);
}
}
private static void addChangeItem(
List<MesXslFormulaSpecEditChangeItemVO> items,
String section,
String fieldKey,
String fieldLabel,
String beforeValue,
String afterValue) {
MesXslFormulaSpecEditChangeItemVO item = new MesXslFormulaSpecEditChangeItemVO();
item.setSection(section);
item.setSectionLabel(SECTION_LABELS.getOrDefault(section, section));
item.setFieldKey(fieldKey);
item.setFieldLabel(fieldLabel);
item.setBeforeValue(beforeValue);
item.setAfterValue(afterValue);
items.add(item);
}
/** 按 sortNo 优先、否则按列表序号建立行索引 */
private static Map<String, JSONObject> indexRows(List<JSONObject> rows) {
Map<String, JSONObject> map = new LinkedHashMap<>();
if (rows == null) {
return map;
}
int index = 0;
for (JSONObject row : rows) {
index++;
if (row == null) {
continue;
}
Integer sortNo = row.getInteger("sortNo");
String key = sortNo != null ? "sort_" + sortNo : "idx_" + index;
map.put(key, row);
}
return map;
}
private static String formatRowLabel(String rowKey) {
if (rowKey.startsWith("sort_")) {
return "" + rowKey.substring(5) + "";
}
if (rowKey.startsWith("idx_")) {
return "" + rowKey.substring(4) + "";
}
return rowKey;
}
private static String formatRowSummary(JSONObject row, Map<String, String> fieldLabels, String[] summaryFields) {
if (row == null || row.isEmpty()) {
return "";
}
List<String> parts = new ArrayList<>();
for (String key : summaryFields) {
String val = formatValue(row.get(key));
if (StringUtils.isBlank(val)) {
continue;
}
parts.add(fieldLabels.getOrDefault(key, key) + "=" + val);
}
if (parts.isEmpty()) {
for (String key : fieldLabels.keySet()) {
String val = formatValue(row.get(key));
if (StringUtils.isBlank(val)) {
continue;
}
parts.add(fieldLabels.get(key) + "=" + val);
if (parts.size() >= 4) {
break;
}
}
}
return String.join("", parts);
}
private static boolean isRowMetaField(String key) {
return "formulaSpecId".equals(key) || "mixingSpecId".equals(key);
}
private static List<JSONObject> toJsonObjectList(Object listObj) {
if (listObj == null) {
return List.of();
}
JSONArray array = listObj instanceof JSONArray jsonArray ? jsonArray : JSON.parseArray(toJson(listObj));
if (array == null || array.isEmpty()) {
return List.of();
}
List<JSONObject> rows = new ArrayList<>(array.size());
for (int i = 0; i < array.size(); i++) {
Object element = array.get(i);
if (element instanceof JSONObject jsonObject) {
rows.add(jsonObject);
} else if (element != null) {
rows.add(JSON.parseObject(toJson(element)));
}
}
return rows;
}
private static Map<String, Map<String, String>> buildSectionFieldLabels() {
Map<String, Map<String, String>> map = new LinkedHashMap<>();
map.put(SECTION_LINE, buildFormulaLineLabels());
map.put(SECTION_MATERIAL, buildMixingMaterialLabels());
map.put(SECTION_STEP, buildMixingStepLabels());
map.put(SECTION_DOWN_STEP, buildMixingStepLabels());
map.put(SECTION_TCU, buildMixingTcuLabels());
return map;
}
private static Map<String, String[]> buildSectionSummaryFields() {
Map<String, String[]> map = new LinkedHashMap<>();
map.put(SECTION_LINE, new String[] {"mixerMaterialName", "mixerMaterialCode", "phr", "step"});
map.put(SECTION_MATERIAL, new String[] {"mixerMaterialName", "unitWeight", "accumWeight", "seqNo"});
map.put(SECTION_STEP, new String[] {"actionName", "actionSec", "tempC", "speedRpm"});
map.put(SECTION_DOWN_STEP, new String[] {"actionName", "actionSec", "tempC", "speedRpm"});
map.put(SECTION_TCU, new String[] {"sectionType", "frontRotorTemp", "rearRotorTemp", "drugWeighPos"});
return map;
}
private static Map<String, String> buildFormulaLineLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("sortNo", "序号");
map.put("phr", "PHR");
map.put("mixerMaterialCode", "物料编码");
map.put("mixerMaterialName", "物料名称");
map.put("materialDesc", "物料描述");
map.put("step", "STEP");
map.put("weighMode", "称量方式");
map.put("weightPercent", "重量%");
map.put("volume", "体积");
map.put("remark", "备注");
for (int i = 1; i <= 7; i++) {
map.put("stage" + i, "混合段" + i);
}
return map;
}
private static Map<String, String> buildMixingMaterialLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("sortNo", "序号");
map.put("materialMajor", "物料大类");
map.put("materialMinor", "物料小类");
map.put("materialKind", "种类");
map.put("mixerMaterialName", "物料名称");
map.put("mixerMaterialDesc", "物料描述");
map.put("unitWeight", "单重");
map.put("accumWeight", "累计");
map.put("seqNo", "顺序");
return map;
}
private static Map<String, String> buildMixingStepLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("sortNo", "序号");
map.put("actionName", "动作");
map.put("actionSec", "时间(秒)");
map.put("protectSec", "保护时间");
map.put("tempC", "温度(℃)");
map.put("powerKw", "功率(Kw)");
map.put("energyKwh", "能量(Kwh)");
map.put("comboMode", "组合");
map.put("speedRpm", "转速(rpm)");
map.put("pressureMpa", "压力(Mpa)");
map.put("boltPercent", "栓(%)");
return map;
}
private static Map<String, String> buildMixingTcuLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("sortNo", "序号");
map.put("sectionType", "区分");
map.put("frontRotorTemp", "前转子温度");
map.put("rearRotorTemp", "后转子温度");
map.put("frontChamberTemp", "前混炼室温度");
map.put("rearChamberTemp", "后混炼室温度");
map.put("topPlugTemp", "上下顶栓温度");
map.put("drugWeighPos", "药品称量位置");
return map;
}
private static JSONObject parseObject(String json) {
if (StringUtils.isBlank(json)) {
return null;
}
return JSON.parseObject(json);
}
private static JSONObject toJsonObject(Object obj) {
if (obj == null) {
return new JSONObject();
}
JSONObject jsonObject = JSON.parseObject(toJson(obj));
for (String ignore : IGNORE_FIELDS) {
jsonObject.remove(ignore);
}
return jsonObject;
}
private static String toJson(Object obj) {
return JSON.toJSONStringWithDateFormat(
obj, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue);
}
private static String normalizeListJson(Object listObj) {
if (listObj == null) {
return "[]";
}
if (listObj instanceof List<?> list) {
return normalizeListJson(list);
}
return toJson(listObj);
}
private static String normalizeListJson(List<JSONObject> rows) {
if (rows == null || rows.isEmpty()) {
return "[]";
}
List<JSONObject> normalized = new ArrayList<>(rows.size());
for (JSONObject row : rows) {
if (row == null) {
continue;
}
JSONObject copy = new JSONObject(row);
for (String ignore : IGNORE_FIELDS) {
copy.remove(ignore);
}
copy.remove("formulaSpecId");
copy.remove("mixingSpecId");
normalized.add(copy);
}
return toJson(normalized);
}
private static String formatValue(Object value) {
if (value == null) {
return "";
}
if (value instanceof BigDecimal decimal) {
return decimal.stripTrailingZeros().toPlainString();
}
if (value instanceof Date date) {
return toJson(date).replace("\"", "");
}
return String.valueOf(value);
}
private static Map<String, String> buildFormulaMainLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("category", "分类");
map.put("specCode", "示方编号");
map.put("rubberCode", "胶料代号");
map.put("rubberMaterialId", "胶料ID");
map.put("basicFormula", "基本配合");
map.put("issueDate", "发行日期");
map.put("purpose", "用途");
map.put("issueNumber", "发行编号");
map.put("mixingStages", "混合段数");
map.put("mixingMachine", "混合机器");
map.put("issueDeptId", "发行部门ID");
map.put("issueDeptName", "发行部门");
map.put("status", "状态");
map.put("aRubberTotalPhr", "A胶合计PHR");
map.put("totalPhr", "总PHR");
map.put("naturalRubber", "天然橡胶");
map.put("syntheticRubber", "合成橡胶");
map.put("totalAmount", "总量");
map.put("weightUnitPrice", "重量单价");
map.put("volumeUnitPrice", "体积单价");
map.put("qRubberSg", "Q胶比重");
map.put("aRubberSg", "A胶比重");
map.put("proofreadBy", "校对人");
map.put("proofreadTime", "校对时间");
map.put("auditBy", "审核人");
map.put("auditTime", "审核时间");
map.put("approveBy", "批准人");
map.put("approveTime", "批准时间");
for (int i = 1; i <= 7; i++) {
map.put("stage" + i + "Total", "混合段" + i + "合计");
}
return map;
}
private static Map<String, String> buildMixingMainLabels() {
Map<String, String> map = new LinkedHashMap<>();
map.put("specName", "规格");
map.put("purpose", "用途");
map.put("machineId", "机台ID");
map.put("machineName", "机台");
map.put("makeDate", "制作日期");
map.put("issueNumber", "发行编号");
map.put("convertFactor", "换算系数");
map.put("fillVolume", "填充体积");
map.put("recycleCarbonSec", "回收炭黑(秒)");
map.put("motherRubberSg", "母胶比重");
map.put("finalRubberSg", "终炼胶比重");
map.put("applyFactory", "适用工厂");
map.put("stageCount", "段数");
map.put("pureMixSec", "纯混炼时间(秒)");
map.put("recycleCarbonKg", "回收炭黑(kg)");
map.put("autoSmallPrintSetting", "自动小票打印设置");
map.put("setTrainCount", "设定车次");
map.put("sideWallWaterTemp", "侧壁水温");
map.put("overtimeDischargeSec", "超时排胶(秒)");
map.put("overtempDischargeSec", "超温排胶(秒)");
map.put("overtempDischargeTemp", "超温排胶温度");
map.put("doorWaterTemp", "门水温");
map.put("rotorWaterTemp", "转子水温");
map.put("maxFeedTemp", "最高投料温度");
map.put("draftBy", "编制人");
map.put("draftTime", "编制时间");
map.put("proofreadBy", "校对人");
map.put("proofreadTime", "校对时间");
map.put("auditBy", "审核人");
map.put("auditTime", "审核时间");
map.put("approveBy", "批准人");
map.put("approveTime", "批准时间");
map.put("changeDate", "变更日期");
return map;
}
public static final String SPEC_TYPE_FORMULA = "formula";
public static final String SPEC_TYPE_MIXING = "mixing";
}

View File

@@ -0,0 +1,67 @@
package org.jeecg.modules.xslmes.common;
import jakarta.servlet.http.HttpServletRequest;
import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.TenantConstant;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
/**
* MES 租户解析工具xslmes 模块内统一入口,避免各 Service 重复依赖 TokenUtils
*/
public final class MesXslTenantUtils {
private MesXslTenantUtils() {}
/**
* 解析租户 ID优先实体上下文其次 TenantContext最后从当前请求头/参数读取
*/
public static Integer resolveTenantId(Integer contextTenantId) {
if (contextTenantId != null) {
return contextTenantId;
}
String tenantId = getTenantIdString();
if (oConvertUtils.isEmpty(tenantId)) {
return null;
}
try {
return Integer.parseInt(tenantId.trim());
} catch (NumberFormatException e) {
return null;
}
}
/** 尽力解析租户 ID无法解析时返回 0 */
public static int resolveTenantIdBestEffort() {
return oConvertUtils.getInt(getTenantIdString(), 0);
}
private static String getTenantIdString() {
String tenantId = TenantContext.getTenant();
if (oConvertUtils.isNotEmpty(tenantId)) {
return tenantId;
}
try {
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
if (request != null) {
tenantId = getTenantIdByRequest(request);
}
} catch (Exception ignored) {
// 非 Web 请求上下文时忽略
}
return tenantId;
}
/** 与 TokenUtils.getTenantIdByRequest 行为一致 */
private static String getTenantIdByRequest(HttpServletRequest request) {
String tenantId = request.getParameter(TenantConstant.TENANT_ID);
if (tenantId == null) {
tenantId = oConvertUtils.getString(request.getHeader(CommonConstant.TENANT_ID));
}
if (oConvertUtils.isNotEmpty(tenantId) && "undefined".equals(tenantId)) {
return null;
}
return tenantId;
}
}

View File

@@ -0,0 +1,18 @@
package org.jeecg.modules.xslmes.common;
/**
* MES xslmes 业务常量
*/
public final class XslMesBizConstants {
/** 密炼PS类型原材料检验标准字典 xslmes_ps_belong */
public static final String PS_TYPE_RAW_INSPECT_STD = "raw_inspect_std";
/** 胶料快检实验标准审核状态:已批准 */
public static final String RUBBER_QUICK_TEST_STD_AUDIT_APPROVED = "1";
/** 胶料快检实验标准审核状态:草稿 */
public static final String RUBBER_QUICK_TEST_STD_AUDIT_DRAFT = "0";
private XslMesBizConstants() {}
}

View File

@@ -0,0 +1,151 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslDayTankMaterialMap;
import org.jeecg.modules.xslmes.service.IMesXslDayTankMaterialMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@Tag(name = "日罐物料对应信息")
@RestController
@RequestMapping("/xslmes/mesXslDayTankMaterialMap")
public class MesXslDayTankMaterialMapController
extends JeecgController<MesXslDayTankMaterialMap, IMesXslDayTankMaterialMapService> {
@Autowired private IMesXslDayTankMaterialMapService dayTankMaterialMapService;
@Operation(summary = "日罐物料对应信息-分页列表查询")
@GetMapping("/list")
public Result<IPage<MesXslDayTankMaterialMap>> queryPageList(
MesXslDayTankMaterialMap model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslDayTankMaterialMap> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
IPage<MesXslDayTankMaterialMap> pageList = dayTankMaterialMapService.page(new Page<>(pageNo, pageSize), queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "日罐物料对应信息-添加")
@Operation(summary = "日罐物料对应信息-添加")
@RequiresPermissions("xslmes:mes_xsl_day_tank_material_map:add")
@PostMapping("/add")
public Result<String> add(@RequestBody MesXslDayTankMaterialMap model) {
String err = validateForSave(model);
if (err != null) {
return Result.error(err);
}
dayTankMaterialMapService.fillReferenceFields(model);
if (StringUtils.isBlank(model.getMachineCode()) || StringUtils.isBlank(model.getMachineName())) {
return Result.error("请选择有效的机台名称");
}
if (StringUtils.isBlank(model.getMaterialName())) {
return Result.error("请选择有效的物料名称");
}
dayTankMaterialMapService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "日罐物料对应信息-编辑")
@Operation(summary = "日罐物料对应信息-编辑")
@RequiresPermissions("xslmes:mes_xsl_day_tank_material_map:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslDayTankMaterialMap model) {
String err = validateForSave(model);
if (err != null) {
return Result.error(err);
}
dayTankMaterialMapService.fillReferenceFields(model);
if (StringUtils.isBlank(model.getMachineCode()) || StringUtils.isBlank(model.getMachineName())) {
return Result.error("请选择有效的机台名称");
}
if (StringUtils.isBlank(model.getMaterialName())) {
return Result.error("请选择有效的物料名称");
}
dayTankMaterialMapService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "日罐物料对应信息-通过id删除")
@Operation(summary = "日罐物料对应信息-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_day_tank_material_map:delete")
@DeleteMapping("/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
dayTankMaterialMapService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "日罐物料对应信息-批量删除")
@Operation(summary = "日罐物料对应信息-批量删除")
@RequiresPermissions("xslmes:mes_xsl_day_tank_material_map:deleteBatch")
@DeleteMapping("/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
dayTankMaterialMapService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "日罐物料对应信息-通过id查询")
@GetMapping("/queryById")
public Result<MesXslDayTankMaterialMap> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslDayTankMaterialMap entity = dayTankMaterialMapService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_day_tank_material_map:exportXls")
@RequestMapping("/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslDayTankMaterialMap model) {
return super.exportXls(request, model, MesXslDayTankMaterialMap.class, "日罐物料对应信息");
}
private String validateForSave(MesXslDayTankMaterialMap model) {
if (oConvertUtils.isEmpty(model.getEquipmentId()) || StringUtils.isBlank(model.getEquipmentId())) {
return "机台名称不能为空";
}
model.setEquipmentId(model.getEquipmentId().trim());
if (oConvertUtils.isEmpty(model.getMaterialId()) || StringUtils.isBlank(model.getMaterialId())) {
return "物料名称不能为空";
}
model.setMaterialId(model.getMaterialId().trim());
if (model.getUseStatus() == null) {
model.setUseStatus(1);
}
if (model.getAllowSync() == null) {
model.setAllowSync(1);
}
if (model.getSiloCategoryId() != null) {
model.setSiloCategoryId(model.getSiloCategoryId().trim());
}
if (model.getStation() != null) {
model.setStation(model.getStation().trim());
}
if (model.getSiloNo() != null) {
model.setSiloNo(model.getSiloNo().trim());
}
return null;
}
}

View File

@@ -0,0 +1,230 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectConfig;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectConfigLine;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentLedger;
import org.jeecg.modules.xslmes.entity.MesXslInspectMaintainItem;
import org.jeecg.modules.xslmes.service.IMesXslEquipInspectConfigService;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentLedgerService;
import org.jeecg.modules.xslmes.service.IMesXslInspectMaintainItemService;
import org.jeecg.modules.xslmes.vo.MesXslEquipInspectConfigPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 设备点检配置(主子表)
*/
@Tag(name = "MES设备点检配置")
@RestController
@RequestMapping("/xslmes/mesXslEquipInspectConfig")
@Slf4j
public class MesXslEquipInspectConfigController
extends JeecgController<MesXslEquipInspectConfig, IMesXslEquipInspectConfigService> {
private static final Set<String> CONFIG_TYPE = Set.of("inspect", "maintain");
@Autowired
private IMesXslEquipInspectConfigService mesXslEquipInspectConfigService;
@Autowired
private IMesXslEquipmentLedgerService mesXslEquipmentLedgerService;
@Autowired
private IMesXslInspectMaintainItemService mesXslInspectMaintainItemService;
@Operation(summary = "MES设备点检配置-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslEquipInspectConfig>> queryPageList(
MesXslEquipInspectConfig model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslEquipInspectConfig> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<MesXslEquipInspectConfig> page = new Page<>(pageNo, pageSize);
IPage<MesXslEquipInspectConfig> pageList = mesXslEquipInspectConfigService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES设备点检配置-添加")
@Operation(summary = "MES设备点检配置-添加")
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslEquipInspectConfigPage page) {
MesXslEquipInspectConfig main = new MesXslEquipInspectConfig();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260519 for【MES】设备点检配置保存校验-----------
String err = validateForSave(main, page.getLineList(), null);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260519 for【MES】设备点检配置保存校验-----------
mesXslEquipInspectConfigService.saveMain(main, page.getLineList());
return Result.OK("添加成功!");
}
@AutoLog(value = "MES设备点检配置-编辑")
@Operation(summary = "MES设备点检配置-编辑")
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslEquipInspectConfigPage page) {
MesXslEquipInspectConfig main = new MesXslEquipInspectConfig();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260519 for【MES】设备点检配置保存校验-----------
String err = validateForSave(main, page.getLineList(), main.getId());
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260519 for【MES】设备点检配置保存校验-----------
mesXslEquipInspectConfigService.updateMain(main, page.getLineList());
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES设备点检配置-删除")
@Operation(summary = "MES设备点检配置-通过id删除")
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslEquipInspectConfigService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES设备点检配置-批量删除")
@Operation(summary = "MES设备点检配置-批量删除")
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslEquipInspectConfigService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES设备点检配置-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslEquipInspectConfig> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslEquipInspectConfig entity = mesXslEquipInspectConfigService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES设备点检配置-查询明细")
@GetMapping(value = "/queryLineListByConfigId")
public Result<List<MesXslEquipInspectConfigLine>> queryLineListByConfigId(
@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslEquipInspectConfigService.selectLinesByConfigId(id));
}
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslEquipInspectConfig model) {
return super.exportXls(request, model, MesXslEquipInspectConfig.class, "MES设备点检配置");
}
@RequiresPermissions("mes:mes_xsl_equip_inspect_config:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslEquipInspectConfig.class);
}
//update-begin---author:jiangxh ---date:20260519 for【MES】设备点检配置主表唯一、明细项目不重复、从点检保养项目带出-----------
private String validateForSave(
MesXslEquipInspectConfig main, List<MesXslEquipInspectConfigLine> lineList, String excludeId) {
if (main == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(main.getEquipmentLedgerId())) {
return "请选择设备台账";
}
MesXslEquipmentLedger ledger = mesXslEquipmentLedgerService.getById(main.getEquipmentLedgerId());
if (ledger == null || isDeleted(ledger.getDelFlag())) {
return "设备台账不存在或已删除";
}
main.setEquipmentName(ledger.getEquipmentName());
main.setEquipmentCode(ledger.getEquipmentCode());
String configType = main.getConfigType();
if (configType != null) {
configType = configType.trim();
}
if (oConvertUtils.isEmpty(configType) || !CONFIG_TYPE.contains(configType)) {
return "类型无效,请选择点检或保养";
}
main.setConfigType(configType);
if (mesXslEquipInspectConfigService.isConfigDuplicated(
main.getEquipmentLedgerId(), configType, excludeId, main)) {
return "该设备在此类型(点检/保养)下已存在配置,不能重复添加";
}
if (lineList == null || lineList.isEmpty()) {
return "请至少添加一条点检项目明细";
}
Set<String> itemIds = new HashSet<>();
int sort = 0;
for (int i = 0; i < lineList.size(); i++) {
MesXslEquipInspectConfigLine line = lineList.get(i);
if (line == null) {
continue;
}
int rowNo = i + 1;
if (oConvertUtils.isEmpty(line.getInspectMaintainItemId())) {
return "" + rowNo + " 行未选择点检及保养项目";
}
String itemId = line.getInspectMaintainItemId().trim();
if (!itemIds.add(itemId)) {
return "" + rowNo + " 行点检项目与前面行重复,同一配置中点检项目不能重复";
}
MesXslInspectMaintainItem item = mesXslInspectMaintainItemService.getById(itemId);
if (item == null || isDeleted(item.getDelFlag())) {
return "" + rowNo + " 行点检及保养项目不存在或已删除";
}
if (!configType.equals(item.getItemCategory())) {
return "" + rowNo + " 行项目类别与配置类型不一致(配置为"
+ ("inspect".equals(configType) ? "点检" : "保养")
+ "";
}
line.setInspectMaintainItemId(itemId);
line.setItemCode(item.getItemCode());
line.setItemName(item.getItemName());
line.setItemCategory(item.getItemCategory());
line.setItemType(item.getItemType());
line.setEquipmentPartName(item.getEquipmentPartName());
line.setEquipmentSubPartName(item.getEquipmentSubPartName());
line.setInspectMethod(item.getInspectMethod());
line.setJudgmentCriteria(item.getJudgmentCriteria());
line.setSortNo(sort++);
}
if (itemIds.isEmpty()) {
return "请至少添加一条点检项目明细";
}
return null;
}
private static boolean isDeleted(Integer delFlag) {
return delFlag != null && delFlag.equals(CommonConstant.DEL_FLAG_1);
}
//update-end---author:jiangxh ---date:20260519 for【MES】设备点检配置主表唯一、明细项目不重复、从点检保养项目带出-----------
}

View File

@@ -0,0 +1,411 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectConfig;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectRecord;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectRecordLine;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentLedger;
import org.jeecg.modules.xslmes.service.IMesXslEquipInspectConfigService;
import org.jeecg.modules.xslmes.service.IMesXslEquipInspectRecordService;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentLedgerService;
import org.jeecg.modules.xslmes.util.MesXslEquipInspectBizMsg;
import org.jeecg.modules.xslmes.vo.MesXslEquipInspectRecordBatchCreateDTO;
import org.jeecg.modules.xslmes.vo.MesXslEquipInspectRecordBatchCreateResult;
import org.jeecg.modules.xslmes.vo.MesXslEquipInspectRecordHandleDTO;
import org.jeecg.modules.xslmes.vo.MesXslEquipInspectRecordPage;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 点检/保养记录(主子表)
*/
@Tag(name = "MES点检保养记录")
@RestController
@RequestMapping("/xslmes/mesXslEquipInspectRecord")
@Slf4j
public class MesXslEquipInspectRecordController
extends JeecgController<MesXslEquipInspectRecord, IMesXslEquipInspectRecordService> {
private static final Set<String> RECORD_TYPE = Set.of("inspect", "maintain");
private static final Set<String> INSPECT_RESULT = Set.of("pass", "fail");
private static final Set<String> RECORD_STATUS = Set.of("pending", "done");
@Autowired
private IMesXslEquipInspectRecordService mesXslEquipInspectRecordService;
@Autowired
private IMesXslEquipmentLedgerService mesXslEquipmentLedgerService;
@Autowired
private IMesXslEquipInspectConfigService mesXslEquipInspectConfigService;
@Operation(summary = "MES点检保养记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslEquipInspectRecord>> queryPageList(
MesXslEquipInspectRecord model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslEquipInspectRecord> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<MesXslEquipInspectRecord> page = new Page<>(pageNo, pageSize);
IPage<MesXslEquipInspectRecord> pageList = mesXslEquipInspectRecordService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES点检保养记录-添加")
@Operation(summary = "MES点检保养记录-添加")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslEquipInspectRecordPage page) {
MesXslEquipInspectRecord main = new MesXslEquipInspectRecord();
BeanUtils.copyProperties(page, main);
String err = validateForSave(main, page.getLineList(), null);
if (err != null) {
return Result.error(err);
}
fillRecordNoIfEmpty(main);
fillInspector(main);
mesXslEquipInspectRecordService.saveMain(main, page.getLineList());
return Result.OK("添加成功!");
}
@AutoLog(value = "MES点检保养记录-编辑")
@Operation(summary = "MES点检保养记录-编辑")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslEquipInspectRecordPage page) {
MesXslEquipInspectRecord main = new MesXslEquipInspectRecord();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260520 for【MES】仅待点检可录入保存后变已点检-----------
if (oConvertUtils.isEmpty(main.getId())) {
return Result.error("记录主键不能为空");
}
MesXslEquipInspectRecord existing = mesXslEquipInspectRecordService.getById(main.getId());
if (existing == null) {
return Result.error("未找到对应数据");
}
if ("done".equals(existing.getRecordStatus())) {
return Result.error("已点检记录不可修改,仅可查看");
}
main.setRecordStatus("done");
String err = validateForEntry(main, page.getLineList());
if (err != null) {
return Result.error(err);
}
fillInspector(main);
mesXslEquipInspectRecordService.updateMain(main, page.getLineList());
return Result.OK("录入成功!");
//update-end---author:jiangxh ---date:20260520 for【MES】仅待点检可录入保存后变已点检-----------
}
@AutoLog(value = "MES点检保养记录-删除")
@Operation(summary = "MES点检保养记录-通过id删除")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslEquipInspectRecordService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES点检保养记录-批量删除")
@Operation(summary = "MES点检保养记录-批量删除")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslEquipInspectRecordService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES点检保养记录-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslEquipInspectRecord> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslEquipInspectRecord entity = mesXslEquipInspectRecordService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES点检保养记录-查询明细")
@GetMapping(value = "/queryLineListByRecordId")
public Result<List<MesXslEquipInspectRecordLine>> queryLineListByRecordId(
@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslEquipInspectRecordService.selectLinesByRecordId(id));
}
//update-begin---author:jiangxh ---date:20260521 for【MES】不合格点检记录登记处理人及处理时间-----------
@AutoLog(value = "MES点检保养记录-不合格处理")
@Operation(summary = "MES点检保养记录-不合格处理")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:edit")
@PostMapping(value = "/handleFail")
public Result<String> handleFail(@RequestBody MesXslEquipInspectRecordHandleDTO dto) {
try {
mesXslEquipInspectRecordService.handleFailRecord(dto);
return Result.OK("处理成功!");
} catch (IllegalArgumentException ex) {
return Result.error(ex.getMessage());
}
}
//update-end---author:jiangxh ---date:20260521 for【MES】不合格点检记录登记处理人及处理时间-----------
@Operation(summary = "MES点检保养记录-生成记录编号")
@GetMapping(value = "/generateRecordNo")
public Result<String> generateRecordNo() {
MesXslEquipInspectRecord ctx = new MesXslEquipInspectRecord();
return Result.OK(mesXslEquipInspectRecordService.generateRecordNo(ctx));
}
@AutoLog(value = "MES点检保养记录-从设备台账批量生成")
@Operation(summary = "MES点检保养记录-从设备台账批量生成")
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:add")
@PostMapping(value = "/batchCreateFromEquipment")
public Result<MesXslEquipInspectRecordBatchCreateResult> batchCreateFromEquipment(
@RequestBody MesXslEquipInspectRecordBatchCreateDTO dto) {
if (dto == null || CollectionUtils.isEmpty(dto.getEquipmentLedgerIds())) {
return Result.error("请先选择设备");
}
String recordType = dto.getRecordType();
if (recordType != null) {
recordType = recordType.trim();
}
if (oConvertUtils.isEmpty(recordType) || !RECORD_TYPE.contains(recordType)) {
return Result.error("类型无效,请使用点检或保养");
}
MesXslEquipInspectRecord inspectorCtx = new MesXslEquipInspectRecord();
fillInspector(inspectorCtx);
MesXslEquipInspectRecordBatchCreateResult result =
mesXslEquipInspectRecordService.batchCreateFromEquipment(
dto.getEquipmentLedgerIds(), recordType, inspectorCtx);
if (result.getSuccessCount() <= 0 && !result.getFailMessages().isEmpty()) {
return Result.error(String.join("", result.getFailMessages()));
}
String msg = "成功生成 " + result.getSuccessCount() + " 条记录";
if (!result.getFailMessages().isEmpty()) {
msg = msg + "" + String.join("", result.getFailMessages());
}
return Result.OK(msg, result);
}
@Operation(summary = "MES点检保养记录-按设备与类型带出配置明细")
@GetMapping(value = "/loadLinesByEquipment")
public Result<List<MesXslEquipInspectRecordLine>> loadLinesByEquipment(
@RequestParam(name = "equipmentLedgerId") String equipmentLedgerId,
@RequestParam(name = "recordType") String recordType) {
String type = recordType != null ? recordType.trim() : "";
if (oConvertUtils.isEmpty(equipmentLedgerId) || !RECORD_TYPE.contains(type)) {
return Result.error("请选择设备与类型(点检/保养)");
}
List<MesXslEquipInspectRecordLine> lines =
mesXslEquipInspectRecordService.buildLinesFromEquipConfig(equipmentLedgerId, type);
if (lines.isEmpty()) {
MesXslEquipmentLedger ledger = mesXslEquipmentLedgerService.getById(equipmentLedgerId);
String equipName =
ledger != null && oConvertUtils.isNotEmpty(ledger.getEquipmentName())
? ledger.getEquipmentName()
: (ledger != null ? ledger.getEquipmentCode() : equipmentLedgerId);
return Result.error(MesXslEquipInspectBizMsg.noConfigMessage(equipName, type));
}
return Result.OK(lines);
}
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslEquipInspectRecord model) {
return super.exportXls(request, model, MesXslEquipInspectRecord.class, "MES点检保养记录");
}
@RequiresPermissions("mes:mes_xsl_equip_inspect_record:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslEquipInspectRecord.class);
}
private void fillRecordNoIfEmpty(MesXslEquipInspectRecord main) {
if (oConvertUtils.isEmpty(main.getRecordNo())) {
main.setRecordNo(mesXslEquipInspectRecordService.generateRecordNo(main));
}
}
private void fillInspector(MesXslEquipInspectRecord main) {
if (SecurityUtils.getSubject() == null || SecurityUtils.getSubject().getPrincipal() == null) {
return;
}
if (!(SecurityUtils.getSubject().getPrincipal() instanceof LoginUser user)) {
return;
}
main.setInspectorUserId(user.getId());
main.setInspectorUsername(user.getUsername());
main.setInspectorRealname(user.getRealname());
}
//update-begin---author:jiangxh ---date:20260520 for【MES】录入点检结果必填项校验保存为已点检-----------
private String validateForEntry(MesXslEquipInspectRecord main, List<MesXslEquipInspectRecordLine> lineList) {
String err = validateForSave(main, lineList, main.getId());
if (err != null) {
return err;
}
if (main.getInspectDate() == null) {
return "请选择点检日期";
}
if (oConvertUtils.isEmpty(main.getInspectorUserId()) && oConvertUtils.isEmpty(main.getInspectorRealname())) {
return "点检人不能为空";
}
String inspectResult = main.getInspectResult();
if (inspectResult != null) {
inspectResult = inspectResult.trim();
}
if (oConvertUtils.isEmpty(inspectResult) || !INSPECT_RESULT.contains(inspectResult)) {
return "请选择点检结果(合格/不合格)";
}
main.setInspectResult(inspectResult);
main.setRecordStatus("done");
//update-begin---author:jiangxh ---date:20260521 for【MES】不合格记录默认未处理-----------
if ("fail".equals(inspectResult)) {
main.setHandledFlag("0");
} else {
main.setHandledFlag(null);
main.setHandlerUserId(null);
main.setHandlerUsername(null);
main.setHandlerRealname(null);
main.setHandleTime(null);
}
//update-end---author:jiangxh ---date:20260521 for【MES】不合格记录默认未处理-----------
return null;
}
//update-end---author:jiangxh ---date:20260520 for【MES】录入点检结果必填项校验保存为已点检-----------
//update-begin---author:jiangxh ---date:20260520 for【MES】点检保养记录保存校验与配置明细关联-----------
private String validateForSave(
MesXslEquipInspectRecord main, List<MesXslEquipInspectRecordLine> lineList, String excludeId) {
if (main == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(main.getEquipmentLedgerId())) {
return "请选择设备";
}
MesXslEquipmentLedger ledger = mesXslEquipmentLedgerService.getById(main.getEquipmentLedgerId());
if (ledger == null || isDeleted(ledger.getDelFlag())) {
return "设备台账不存在或已删除";
}
main.setEquipmentName(ledger.getEquipmentName());
main.setEquipmentCode(ledger.getEquipmentCode());
String recordType = main.getRecordType();
if (recordType != null) {
recordType = recordType.trim();
}
if (oConvertUtils.isEmpty(recordType) || !RECORD_TYPE.contains(recordType)) {
return "类型无效,请选择点检或保养";
}
main.setRecordType(recordType);
if (main.getInspectDate() == null) {
main.setInspectDate(new Date());
}
String recordStatus = main.getRecordStatus();
if (recordStatus != null) {
recordStatus = recordStatus.trim();
}
if (oConvertUtils.isEmpty(recordStatus) || !RECORD_STATUS.contains(recordStatus)) {
return "请选择状态(待点检/已点检)";
}
main.setRecordStatus(recordStatus);
String inspectResult = main.getInspectResult();
if (inspectResult != null) {
inspectResult = inspectResult.trim();
}
if ("done".equals(recordStatus)) {
if (oConvertUtils.isEmpty(inspectResult) || !INSPECT_RESULT.contains(inspectResult)) {
return "已点检时请选择点检结果(合格/不合格)";
}
main.setInspectResult(inspectResult);
} else {
if (oConvertUtils.isNotEmpty(inspectResult) && !INSPECT_RESULT.contains(inspectResult)) {
return "点检结果无效";
}
main.setInspectResult(oConvertUtils.isEmpty(inspectResult) ? null : inspectResult);
}
if (oConvertUtils.isEmpty(main.getRecordNo())) {
return "记录编号不能为空";
}
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<MesXslEquipInspectConfig> cw =
new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
cw.eq(MesXslEquipInspectConfig::getEquipmentLedgerId, main.getEquipmentLedgerId());
cw.eq(MesXslEquipInspectConfig::getConfigType, recordType);
cw.and(
q ->
q.eq(MesXslEquipInspectConfig::getDelFlag, CommonConstant.DEL_FLAG_0)
.or()
.isNull(MesXslEquipInspectConfig::getDelFlag));
MesXslEquipInspectConfig config = mesXslEquipInspectConfigService.getOne(cw, false);
if (config == null) {
String equipName =
oConvertUtils.isNotEmpty(ledger.getEquipmentName())
? ledger.getEquipmentName()
: ledger.getEquipmentCode();
return MesXslEquipInspectBizMsg.noConfigMessage(equipName, recordType);
}
main.setEquipInspectConfigId(config.getId());
if (lineList == null || lineList.isEmpty()) {
return "明细不能为空,请选择设备后自动带出点检项目";
}
Set<String> configLineIds = new HashSet<>();
int sort = 0;
for (int i = 0; i < lineList.size(); i++) {
MesXslEquipInspectRecordLine line = lineList.get(i);
if (line == null) {
continue;
}
int rowNo = i + 1;
if (oConvertUtils.isEmpty(line.getEquipInspectConfigLineId())) {
return "" + rowNo + " 行未关联点检配置明细";
}
String lineId = line.getEquipInspectConfigLineId().trim();
if (!configLineIds.add(lineId)) {
return "" + rowNo + " 行点检配置明细重复";
}
line.setEquipInspectConfigLineId(lineId);
line.setSortNo(sort++);
}
if (configLineIds.isEmpty()) {
return "明细不能为空";
}
return null;
}
private static boolean isDeleted(Integer delFlag) {
return delFlag != null && delFlag.equals(CommonConstant.DEL_FLAG_1);
}
//update-end---author:jiangxh ---date:20260520 for【MES】点检保养记录保存校验与配置明细关联-----------
}

View File

@@ -0,0 +1,319 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentLedger;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentLedgerService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 设备台账
*/
@Tag(name = "MES设备台账")
@RestController
@RequestMapping("/xslmes/mesXslEquipmentLedger")
@Slf4j
public class MesXslEquipmentLedgerController extends JeecgController<MesXslEquipmentLedger, IMesXslEquipmentLedgerService> {
private static final Set<String> EQUIPMENT_STATUS = Set.of("0", "1", "2");
private static final Set<String> ENABLED_FLAGS = Set.of("0", "1");
@Autowired
private IMesXslEquipmentLedgerService mesXslEquipmentLedgerService;
@Operation(summary = "MES设备台账-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslEquipmentLedger>> queryPageList(
MesXslEquipmentLedger model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslEquipmentLedger> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
Page<MesXslEquipmentLedger> page = new Page<>(pageNo, pageSize);
IPage<MesXslEquipmentLedger> pageList = mesXslEquipmentLedgerService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES设备台账-添加")
@Operation(summary = "MES设备台账-添加")
@RequiresPermissions("mes:mes_xsl_equipment_ledger:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslEquipmentLedger model) {
//update-begin---author:jiangxh ---date:20260518 for【MES】设备台账保存前校验-----------
String err = validateForSave(model, null);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260518 for【MES】设备台账保存前校验-----------
mesXslEquipmentLedgerService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "MES设备台账-编辑")
@Operation(summary = "MES设备台账-编辑")
@RequiresPermissions("mes:mes_xsl_equipment_ledger:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslEquipmentLedger model) {
//update-begin---author:jiangxh ---date:20260518 for【MES】设备台账保存前校验-----------
String err = validateForSave(model, model.getId());
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260518 for【MES】设备台账保存前校验-----------
mesXslEquipmentLedgerService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES设备台账-删除")
@Operation(summary = "MES设备台账-通过id删除")
@RequiresPermissions("mes:mes_xsl_equipment_ledger:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslEquipmentLedgerService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES设备台账-批量删除")
@Operation(summary = "MES设备台账-批量删除")
@RequiresPermissions("mes:mes_xsl_equipment_ledger:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslEquipmentLedgerService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES设备台账-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslEquipmentLedger> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslEquipmentLedger entity = mesXslEquipmentLedgerService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "校验设备编号是否重复")
@GetMapping(value = "/checkEquipmentCode")
public Result<String> checkEquipmentCode(
@RequestParam(name = "equipmentCode", required = true) String equipmentCode,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(equipmentCode) || equipmentCode.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslEquipmentLedger ctx = new MesXslEquipmentLedger();
if (mesXslEquipmentLedgerService.isEquipmentCodeDuplicated(equipmentCode.trim(), dataId, ctx)) {
return Result.error("设备编号不能重复");
}
return Result.OK("该值可用!");
}
@Operation(summary = "校验设备名称是否重复")
@GetMapping(value = "/checkEquipmentName")
public Result<String> checkEquipmentName(
@RequestParam(name = "equipmentName", required = true) String equipmentName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(equipmentName) || equipmentName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslEquipmentLedger ctx = new MesXslEquipmentLedger();
if (mesXslEquipmentLedgerService.isEquipmentNameDuplicated(equipmentName.trim(), dataId, ctx)) {
return Result.error("设备名称不能重复");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("mes:mes_xsl_equipment_ledger:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslEquipmentLedger model) {
return super.exportXls(request, model, MesXslEquipmentLedger.class, "MES设备台账");
}
@RequiresPermissions("mes:mes_xsl_equipment_ledger:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> ent : fileMap.entrySet()) {
MultipartFile file = ent.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<MesXslEquipmentLedger> list =
ExcelImportUtil.importExcel(file.getInputStream(), MesXslEquipmentLedger.class, params);
if (list == null) {
list = List.of();
}
Set<String> codesInFile = new HashSet<>();
Set<String> namesInFile = new HashSet<>();
for (int i = 0; i < list.size(); i++) {
MesXslEquipmentLedger row = list.get(i);
int rowNo = i + 1;
if (row == null) {
return Result.error("文件导入失败:第 " + rowNo + " 条数据无效(空行)");
}
String err = validateImportRow(row, rowNo, codesInFile, namesInFile);
if (err != null) {
return Result.error(err);
}
}
long start = System.currentTimeMillis();
mesXslEquipmentLedgerService.saveBatch(list);
log.info("设备台账Excel导入完成耗时{}ms行数={}", System.currentTimeMillis() - start, list.size());
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
String msg = e.getMessage();
log.error(msg, e);
if (msg != null && msg.indexOf("Duplicate entry") >= 0) {
return Result.error("文件导入失败: 存在重复数据(设备编号或设备名称不能重复)");
}
return Result.error("文件导入失败:" + e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
return Result.error("文件导入失败!");
}
//update-begin---author:jiangxh ---date:20260518 for【MES】设备台账保存与导入校验-----------
private String validateForSave(MesXslEquipmentLedger model, String excludeId) {
if (oConvertUtils.isEmpty(model.getProcessOperationId())) {
return "请选择所属工序";
}
if (oConvertUtils.isEmpty(model.getEquipmentName()) || model.getEquipmentName().trim().isEmpty()) {
return "设备名称不能为空";
}
String name = model.getEquipmentName().trim();
model.setEquipmentName(name);
if (mesXslEquipmentLedgerService.isEquipmentNameDuplicated(name, excludeId, model)) {
return "设备名称不能重复";
}
if (oConvertUtils.isEmpty(model.getEquipmentCode()) || model.getEquipmentCode().trim().isEmpty()) {
return "设备编号不能为空";
}
String code = model.getEquipmentCode().trim();
model.setEquipmentCode(code);
if (mesXslEquipmentLedgerService.isEquipmentCodeDuplicated(code, excludeId, model)) {
return "设备编号不能重复";
}
trimRelationNames(model);
String status = model.getEquipmentStatus();
if (oConvertUtils.isEmpty(status)) {
model.setEquipmentStatus("0");
} else {
status = status.trim();
if (!EQUIPMENT_STATUS.contains(status)) {
return "设备状态无效(须为在用/停用/报废)";
}
model.setEquipmentStatus(status);
}
String enabled = model.getEnabledFlag();
if (oConvertUtils.isEmpty(enabled)) {
model.setEnabledFlag("1");
} else {
enabled = enabled.trim();
if (!ENABLED_FLAGS.contains(enabled)) {
return "是否启用无效(须为是/否)";
}
model.setEnabledFlag(enabled);
}
return null;
}
private String validateImportRow(MesXslEquipmentLedger row, int rowNo, Set<String> codesInFile, Set<String> namesInFile) {
String code = row.getEquipmentCode();
if (code != null) {
code = code.trim();
}
if (oConvertUtils.isEmpty(code)) {
return "文件导入失败:第 " + rowNo + " 条设备编号不能为空";
}
row.setEquipmentCode(code);
if (!codesInFile.add(code)) {
return "文件导入失败:设备编号【" + code + "】在导入文件中重复";
}
if (mesXslEquipmentLedgerService.isEquipmentCodeDuplicated(code, null, row)) {
return "文件导入失败:第 " + rowNo + " 条设备编号【" + code + "】不能重复";
}
String name = row.getEquipmentName();
if (name != null) {
name = name.trim();
}
if (oConvertUtils.isEmpty(name)) {
return "文件导入失败:第 " + rowNo + " 条设备名称不能为空";
}
row.setEquipmentName(name);
if (!namesInFile.add(name)) {
return "文件导入失败:设备名称【" + name + "】在导入文件中重复";
}
if (mesXslEquipmentLedgerService.isEquipmentNameDuplicated(name, null, row)) {
return "文件导入失败:第 " + rowNo + " 条设备名称【" + name + "】不能重复";
}
trimRelationNames(row);
String status = row.getEquipmentStatus();
if (oConvertUtils.isEmpty(status)) {
row.setEquipmentStatus("0");
} else if (!EQUIPMENT_STATUS.contains(status.trim())) {
return "文件导入失败:第 " + rowNo + " 条设备状态无效";
} else {
row.setEquipmentStatus(status.trim());
}
String enabled = row.getEnabledFlag();
if (oConvertUtils.isEmpty(enabled)) {
row.setEnabledFlag("1");
} else if (!ENABLED_FLAGS.contains(enabled.trim())) {
return "文件导入失败:第 " + rowNo + " 条是否启用无效";
} else {
row.setEnabledFlag(enabled.trim());
}
return null;
}
private static void trimRelationNames(MesXslEquipmentLedger model) {
if (model.getProcessOperationName() != null) {
model.setProcessOperationName(model.getProcessOperationName().trim());
}
if (model.getManufacturerName() != null) {
model.setManufacturerName(model.getManufacturerName().trim());
}
if (model.getEquipmentCategoryName() != null) {
model.setEquipmentCategoryName(model.getEquipmentCategoryName().trim());
}
if (model.getEquipmentTypeName() != null) {
model.setEquipmentTypeName(model.getEquipmentTypeName().trim());
}
if (model.getFactoryName() != null) {
model.setFactoryName(model.getFactoryName().trim());
}
}
//update-end---author:jiangxh ---date:20260518 for【MES】设备台账保存与导入校验-----------
}

View File

@@ -0,0 +1,236 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpec;
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpecLine;
import org.jeecg.modules.xslmes.service.IMesXslFormulaSpecService;
import org.jeecg.modules.xslmes.service.IMesXslFormulaSpecSettingService;
import org.jeecg.modules.xslmes.vo.MesXslFormulaMixingGeneratePreviewVO;
import org.jeecg.modules.xslmes.vo.MesXslFormulaMixingGenerateRequestVO;
import org.jeecg.modules.xslmes.vo.MesXslFormulaRubberContentSettingVO;
import org.jeecg.modules.xslmes.vo.MesXslFormulaSpecPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 配合示方
*/
@Tag(name = "MES配合示方")
@RestController
@RequestMapping("/xslmes/mesXslFormulaSpec")
@Slf4j
public class MesXslFormulaSpecController extends JeecgController<MesXslFormulaSpec, IMesXslFormulaSpecService> {
@Autowired
private IMesXslFormulaSpecService mesXslFormulaSpecService;
@Autowired
private IMesXslFormulaSpecSettingService mesXslFormulaSpecSettingService;
@Operation(summary = "MES配合示方-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslFormulaSpec>> queryPageList(
MesXslFormulaSpec model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "keyword", required = false) String keyword,
HttpServletRequest req) {
QueryWrapper<MesXslFormulaSpec> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
if (oConvertUtils.isNotEmpty(keyword)) {
queryWrapper.and(
w -> w.like("spec_code", keyword)
.or()
.like("rubber_code", keyword)
.or()
.like("issue_number", keyword)
.or()
.like("purpose", keyword));
}
queryWrapper.orderByDesc("update_time").orderByDesc("create_time");
Page<MesXslFormulaSpec> page = new Page<>(pageNo, pageSize);
IPage<MesXslFormulaSpec> pageList = mesXslFormulaSpecService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES配合示方-添加")
@Operation(summary = "MES配合示方-添加")
@RequiresPermissions("xslmes:mes_xsl_formula_spec:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslFormulaSpecPage page) {
//update-begin---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
String err = validateMain(page);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
MesXslFormulaSpec main = new MesXslFormulaSpec();
BeanUtils.copyProperties(page, main);
mesXslFormulaSpecService.saveMain(main, page.getLineList());
return Result.OK("添加成功!");
}
@AutoLog(value = "MES配合示方-编辑")
@Operation(summary = "MES配合示方-编辑")
@RequiresPermissions("xslmes:mes_xsl_formula_spec:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslFormulaSpecPage page) {
//update-begin---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
String err = validateMain(page);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
MesXslFormulaSpec main = new MesXslFormulaSpec();
BeanUtils.copyProperties(page, main);
mesXslFormulaSpecService.updateMain(main, page.getLineList());
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES配合示方-删除")
@Operation(summary = "MES配合示方-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_formula_spec:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslFormulaSpecService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES配合示方-批量删除")
@Operation(summary = "MES配合示方-批量删除")
@RequiresPermissions("xslmes:mes_xsl_formula_spec:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslFormulaSpecService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES配合示方-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslFormulaSpec> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslFormulaSpec entity = mesXslFormulaSpecService.getByIdWithLines(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES配合示方-查询明细")
@GetMapping(value = "/queryLineListByMainId")
public Result<List<MesXslFormulaSpecLine>> queryLineListByMainId(@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslFormulaSpecService.selectLinesByMainId(id));
}
//update-begin---author:cursor ---date:20260521 for配合示方胶料代号自动生成-----------
@Operation(summary = "MES配合示方-生成胶料代号")
@GetMapping(value = "/generateRubberCode")
public Result<Map<String, String>> generateRubberCode(
@RequestParam(name = "rubberMaterialId") String rubberMaterialId,
@RequestParam(name = "category") String category,
@RequestParam(name = "excludeSpecId", required = false) String excludeSpecId) {
try {
String rubberCode = mesXslFormulaSpecService.generateRubberCode(rubberMaterialId, category, excludeSpecId);
return Result.OK(Map.of("rubberCode", rubberCode));
} catch (IllegalArgumentException ex) {
return Result.error(ex.getMessage());
}
}
//update-end---author:cursor ---date:20260521 for配合示方胶料代号自动生成-----------
//update-begin---author:cursor ---date:20260521 for【配合示方】含胶率物料小类可配置-----------
@Operation(summary = "MES配合示方-查询含胶率物料小类配置")
@GetMapping(value = "/getRubberContentSetting")
public Result<MesXslFormulaRubberContentSettingVO> getRubberContentSetting() {
return Result.OK(mesXslFormulaSpecSettingService.getRubberContentSetting());
}
@AutoLog(value = "MES配合示方-保存含胶率物料小类配置")
@Operation(summary = "MES配合示方-保存含胶率物料小类配置")
@RequiresPermissions("xslmes:mes_xsl_formula_spec:edit")
@PostMapping(value = "/saveRubberContentSetting")
public Result<String> saveRubberContentSetting(@RequestBody MesXslFormulaRubberContentSettingVO setting) {
mesXslFormulaSpecSettingService.saveRubberContentSetting(setting);
return Result.OK("保存成功");
}
//update-end---author:cursor ---date:20260521 for【配合示方】含胶率物料小类可配置-----------
//update-begin---author:cursor ---date:20260522 for【XSLMES-20260522-A38】配合示方生成混炼示方-----------
@Operation(summary = "MES配合示方-生成混炼示方预览")
@GetMapping(value = "/buildMixingGeneratePreview")
public Result<MesXslFormulaMixingGeneratePreviewVO> buildMixingGeneratePreview(
@RequestParam(name = "formulaSpecId", required = true) String formulaSpecId) {
try {
return Result.OK(mesXslFormulaSpecService.buildMixingGeneratePreview(formulaSpecId));
} catch (IllegalArgumentException ex) {
return Result.error(ex.getMessage());
}
}
@AutoLog(value = "MES配合示方-生成混炼示方")
@Operation(summary = "MES配合示方-生成混炼示方")
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:add")
@PostMapping(value = "/generateMixingSpec")
public Result<Map<String, Object>> generateMixingSpec(@RequestBody MesXslFormulaMixingGenerateRequestVO request) {
try {
int count = mesXslFormulaSpecService.generateMixingSpecFromFormula(request);
return Result.OK("成功生成 " + count + " 条混炼示方", Map.of("count", count));
} catch (IllegalArgumentException ex) {
return Result.error(ex.getMessage());
}
}
//update-end---author:cursor ---date:20260522 for【XSLMES-20260522-A38】配合示方生成混炼示方-----------
@RequiresPermissions("xslmes:mes_xsl_formula_spec:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslFormulaSpec model) {
return super.exportXls(request, model, MesXslFormulaSpec.class, "配合示方");
}
@RequiresPermissions("xslmes:mes_xsl_formula_spec:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslFormulaSpec.class);
}
//update-begin---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
private String validateMain(MesXslFormulaSpecPage page) {
if (oConvertUtils.isEmpty(page.getSpecCode())) {
return "请输入示方编号";
}
if (oConvertUtils.isEmpty(page.getRubberCode())) {
return "请选择胶料并生成胶料代号";
}
if (oConvertUtils.isEmpty(page.getRubberMaterialId())) {
return "请选择胶料信息";
}
if (page.getMixingStages() != null && (page.getMixingStages() < 1 || page.getMixingStages() > 7)) {
return "混合段数必须在1-7之间";
}
if (page.getLineList() == null || page.getLineList().isEmpty()) {
return "请至少添加一行配合明细";
}
return null;
}
//update-end---author:jiangxh ---date:20260521 for【配合示方】主子表保存校验-----------
}

View File

@@ -0,0 +1,63 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpecEditLog;
import org.jeecg.modules.xslmes.service.IMesXslFormulaSpecEditLogService;
import org.jeecg.modules.xslmes.vo.MesXslFormulaSpecEditLogDetailVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
/**
* 配方示方修改日志(只读查询)
*/
@Tag(name = "配方日志查询")
@RestController
@RequestMapping("/xslmes/mesXslFormulaSpecEditLog")
@Slf4j
public class MesXslFormulaSpecEditLogController
extends JeecgController<MesXslFormulaSpecEditLog, IMesXslFormulaSpecEditLogService> {
@Operation(summary = "配方日志查询-分页列表")
@RequiresPermissions("xslmes:mes_xsl_formula_spec_edit_log:list")
@GetMapping(value = "/list")
public Result<IPage<MesXslFormulaSpecEditLog>> queryPageList(
MesXslFormulaSpecEditLog entity,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslFormulaSpecEditLog> qw = QueryGenerator.initQueryWrapper(entity, req.getParameterMap());
qw.orderByDesc("modify_time");
Page<MesXslFormulaSpecEditLog> page = new Page<>(pageNo, pageSize);
return Result.OK(service.page(page, qw));
}
@Operation(summary = "配方日志查询-详情(含对比项)")
@RequiresPermissions("xslmes:mes_xsl_formula_spec_edit_log:list")
@GetMapping(value = "/queryById")
public Result<MesXslFormulaSpecEditLogDetailVO> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslFormulaSpecEditLogDetailVO detail = service.getDetail(id);
if (detail == null) {
return Result.error("未找到对应数据");
}
return Result.OK(detail);
}
@RequiresPermissions("xslmes:mes_xsl_formula_spec_edit_log:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslFormulaSpecEditLog entity) {
return super.exportXls(request, entity, MesXslFormulaSpecEditLog.class, "配方日志查询");
}
}

View File

@@ -0,0 +1,301 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentCategory;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentPart;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentSubPart;
import org.jeecg.modules.xslmes.entity.MesXslEquipmentType;
import org.jeecg.modules.xslmes.entity.MesXslInspectMaintainItem;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentCategoryService;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentPartService;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentSubPartService;
import org.jeecg.modules.xslmes.service.IMesXslEquipmentTypeService;
import org.jeecg.modules.xslmes.service.IMesXslInspectMaintainItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 点检及保养项目
*/
@Tag(name = "MES点检及保养项目")
@RestController
@RequestMapping("/xslmes/mesXslInspectMaintainItem")
@Slf4j
public class MesXslInspectMaintainItemController
extends JeecgController<MesXslInspectMaintainItem, IMesXslInspectMaintainItemService> {
private static final Set<String> ITEM_CATEGORY = Set.of("inspect", "maintain");
private static final Set<String> ITEM_TYPE = Set.of("mechanical", "electrical");
private static final Set<String> INSPECT_METHOD = Set.of("visual", "sight", "hearing");
@Autowired
private IMesXslInspectMaintainItemService mesXslInspectMaintainItemService;
@Autowired
private IMesXslEquipmentCategoryService mesXslEquipmentCategoryService;
@Autowired
private IMesXslEquipmentTypeService mesXslEquipmentTypeService;
@Autowired
private IMesXslEquipmentPartService mesXslEquipmentPartService;
@Autowired
private IMesXslEquipmentSubPartService mesXslEquipmentSubPartService;
@Operation(summary = "MES点检及保养项目-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslInspectMaintainItem>> queryPageList(
MesXslInspectMaintainItem model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslInspectMaintainItem> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<MesXslInspectMaintainItem> page = new Page<>(pageNo, pageSize);
IPage<MesXslInspectMaintainItem> pageList = mesXslInspectMaintainItemService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES点检及保养项目-添加")
@Operation(summary = "MES点检及保养项目-添加")
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslInspectMaintainItem model) {
//update-begin---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存前校验-----------
String err = validateForSave(model, null);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存前校验-----------
mesXslInspectMaintainItemService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "MES点检及保养项目-编辑")
@Operation(summary = "MES点检及保养项目-编辑")
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslInspectMaintainItem model) {
//update-begin---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存前校验-----------
String err = validateForSave(model, model.getId());
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存前校验-----------
mesXslInspectMaintainItemService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES点检及保养项目-删除")
@Operation(summary = "MES点检及保养项目-通过id删除")
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslInspectMaintainItemService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES点检及保养项目-批量删除")
@Operation(summary = "MES点检及保养项目-批量删除")
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslInspectMaintainItemService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES点检及保养项目-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslInspectMaintainItem> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslInspectMaintainItem entity = mesXslInspectMaintainItemService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "校验项目名称是否重复同租户未删除数据dataId 为编辑时当前主键)")
@GetMapping(value = "/checkItemName")
public Result<String> checkItemName(
@RequestParam(name = "itemName", required = true) String itemName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(itemName) || itemName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslInspectMaintainItem ctx = new MesXslInspectMaintainItem();
if (mesXslInspectMaintainItemService.isItemNameDuplicated(itemName.trim(), dataId, ctx)) {
return Result.error("项目名称不能重复");
}
return Result.OK("该值可用!");
}
@Operation(summary = "校验项目编号是否重复同租户未删除数据dataId 为编辑时当前主键)")
@GetMapping(value = "/checkItemCode")
public Result<String> checkItemCode(
@RequestParam(name = "itemCode", required = true) String itemCode,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(itemCode) || itemCode.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslInspectMaintainItem ctx = new MesXslInspectMaintainItem();
if (mesXslInspectMaintainItemService.isItemCodeDuplicated(itemCode.trim(), dataId, ctx)) {
return Result.error("项目编号不能重复");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslInspectMaintainItem model) {
return super.exportXls(request, model, MesXslInspectMaintainItem.class, "MES点检及保养项目");
}
@RequiresPermissions("mes:mes_xsl_inspect_maintain_item:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslInspectMaintainItem.class);
}
//update-begin---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存校验唯一性、设备关联、字典-----------
private String validateForSave(MesXslInspectMaintainItem model, String excludeId) {
if (model == null) {
return "参数不能为空";
}
String itemName = model.getItemName();
if (itemName != null) {
itemName = itemName.trim();
}
if (oConvertUtils.isEmpty(itemName)) {
return "项目名称不能为空";
}
model.setItemName(itemName);
String itemCode = model.getItemCode();
if (itemCode != null) {
itemCode = itemCode.trim();
}
if (oConvertUtils.isEmpty(itemCode)) {
return "项目编号不能为空";
}
model.setItemCode(itemCode);
if (mesXslInspectMaintainItemService.isItemNameDuplicated(itemName, excludeId, model)) {
return "项目名称不能重复";
}
if (mesXslInspectMaintainItemService.isItemCodeDuplicated(itemCode, excludeId, model)) {
return "项目编号不能重复";
}
if (oConvertUtils.isEmpty(model.getEquipmentCategoryId())) {
return "请选择设备类别";
}
if (oConvertUtils.isEmpty(model.getEquipmentTypeId())) {
return "请选择设备类型";
}
if (oConvertUtils.isEmpty(model.getEquipmentPartId())) {
return "请选择设备部位";
}
if (oConvertUtils.isEmpty(model.getEquipmentSubPartId())) {
return "请选择设备小部位";
}
MesXslEquipmentCategory cat = mesXslEquipmentCategoryService.getById(model.getEquipmentCategoryId());
if (cat == null || isDeleted(cat.getDelFlag())) {
return "设备类别不存在或已删除";
}
model.setEquipmentCategoryName(cat.getCategoryName());
MesXslEquipmentType type = mesXslEquipmentTypeService.getById(model.getEquipmentTypeId());
if (type == null || isDeleted(type.getDelFlag())) {
return "设备类型不存在或已删除";
}
if (!model.getEquipmentCategoryId().equals(type.getEquipmentCategoryId())) {
return "设备类型与所选设备类别不匹配";
}
model.setEquipmentTypeName(type.getTypeName());
MesXslEquipmentPart part = mesXslEquipmentPartService.getById(model.getEquipmentPartId());
if (part == null || isDeleted(part.getDelFlag())) {
return "设备部位不存在或已删除";
}
if (!model.getEquipmentCategoryId().equals(part.getEquipmentCategoryId())) {
return "设备部位与所选设备类别不匹配";
}
model.setEquipmentPartName(part.getPartName());
MesXslEquipmentSubPart sub = mesXslEquipmentSubPartService.getById(model.getEquipmentSubPartId());
if (sub == null || isDeleted(sub.getDelFlag())) {
return "设备小部位不存在或已删除";
}
if (!model.getEquipmentCategoryId().equals(sub.getEquipmentCategoryId())) {
return "设备小部位与所选设备类别不匹配";
}
if (!model.getEquipmentPartId().equals(sub.getEquipmentPartId())) {
return "设备小部位与所选设备部位不匹配";
}
model.setEquipmentSubPartName(sub.getSubPartName());
String itemCategory = model.getItemCategory();
if (itemCategory != null) {
itemCategory = itemCategory.trim();
}
if (oConvertUtils.isEmpty(itemCategory) || !ITEM_CATEGORY.contains(itemCategory)) {
return "项目类别无效,请选择点检或保养";
}
model.setItemCategory(itemCategory);
String itemType = model.getItemType();
if (itemType != null) {
itemType = itemType.trim();
}
if (oConvertUtils.isEmpty(itemType) || !ITEM_TYPE.contains(itemType)) {
return "项目类型无效,请选择机械类或电气类";
}
model.setItemType(itemType);
String inspectMethod = model.getInspectMethod();
if (inspectMethod != null) {
inspectMethod = inspectMethod.trim();
}
if (oConvertUtils.isEmpty(inspectMethod) || !INSPECT_METHOD.contains(inspectMethod)) {
return "点检方式无效,请选择视觉、目测或听觉";
}
model.setInspectMethod(inspectMethod);
if (model.getJudgmentCriteria() != null) {
model.setJudgmentCriteria(model.getJudgmentCriteria().trim());
}
if (oConvertUtils.isEmpty(model.getJudgmentCriteria())) {
return "判断基准不能为空";
}
if (model.getMaintainCycleDays() != null && model.getMaintainCycleDays() < 0) {
return "保养周期(天)不能为负数";
}
return null;
}
private static boolean isDeleted(Integer delFlag) {
return delFlag != null && delFlag.equals(CommonConstant.DEL_FLAG_1);
}
//update-end---author:jiangxh ---date:20260519 for【MES】点检及保养项目保存校验唯一性、设备关联、字典-----------
}

View File

@@ -0,0 +1,167 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslMixerAction;
import org.jeecg.modules.xslmes.service.IMesXslMixerActionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@Tag(name = "密炼机动作维护")
@RestController
@RequestMapping("/xslmes/mesXslMixerAction")
public class MesXslMixerActionController extends JeecgController<MesXslMixerAction, IMesXslMixerActionService> {
@Autowired private IMesXslMixerActionService mesXslMixerActionService;
@Operation(summary = "密炼机动作维护-分页列表查询")
@GetMapping("/list")
public Result<IPage<MesXslMixerAction>> queryPageList(
MesXslMixerAction model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslMixerAction> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
IPage<MesXslMixerAction> pageList = mesXslMixerActionService.page(new Page<>(pageNo, pageSize), queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "密炼机动作维护-添加")
@Operation(summary = "密炼机动作维护-添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_action:add")
@PostMapping("/add")
public Result<String> add(@RequestBody MesXslMixerAction model) {
String err = validateForSave(model, null);
if (err != null) {
return Result.error(err);
}
mesXslMixerActionService.fillEquipmentName(model);
if (StringUtils.isBlank(model.getEquipmentName())) {
return Result.error("请选择有效的设备名称");
}
mesXslMixerActionService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "密炼机动作维护-编辑")
@Operation(summary = "密炼机动作维护-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixer_action:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixerAction model) {
String err = validateForSave(model, model.getId());
if (err != null) {
return Result.error(err);
}
mesXslMixerActionService.fillEquipmentName(model);
if (StringUtils.isBlank(model.getEquipmentName())) {
return Result.error("请选择有效的设备名称");
}
mesXslMixerActionService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "密炼机动作维护-通过id删除")
@Operation(summary = "密炼机动作维护-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_action:delete")
@DeleteMapping("/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslMixerActionService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "密炼机动作维护-批量删除")
@Operation(summary = "密炼机动作维护-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_action:deleteBatch")
@DeleteMapping("/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslMixerActionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "密炼机动作维护-通过id查询")
@GetMapping("/queryById")
public Result<MesXslMixerAction> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixerAction entity = mesXslMixerActionService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "校验动作名称是否重复")
@GetMapping("/checkActionName")
public Result<String> checkActionName(
@RequestParam(name = "actionName", required = true) String actionName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(actionName) || actionName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
if (mesXslMixerActionService.isActionNameDuplicated(actionName, dataId)) {
return Result.error("动作名称不能重复");
}
return Result.OK("该值可用!");
}
@Operation(summary = "校验动作代号是否重复")
@GetMapping("/checkActionCode")
public Result<String> checkActionCode(
@RequestParam(name = "actionCode", required = true) String actionCode,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(actionCode) || actionCode.trim().isEmpty()) {
return Result.OK("该值可用!");
}
if (mesXslMixerActionService.isActionCodeDuplicated(actionCode, dataId)) {
return Result.error("动作代号不能重复");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("xslmes:mes_xsl_mixer_action:exportXls")
@RequestMapping("/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixerAction model) {
return super.exportXls(request, model, MesXslMixerAction.class, "密炼机动作维护");
}
private String validateForSave(MesXslMixerAction model, String excludeId) {
if (oConvertUtils.isEmpty(model.getEquipmentId()) || StringUtils.isBlank(model.getEquipmentId())) {
return "设备名称不能为空";
}
model.setEquipmentId(model.getEquipmentId().trim());
if (oConvertUtils.isEmpty(model.getActionName()) || StringUtils.isBlank(model.getActionName())) {
return "动作名称不能为空";
}
model.setActionName(model.getActionName().trim());
if (mesXslMixerActionService.isActionNameDuplicated(model.getActionName(), excludeId)) {
return "动作名称不能重复";
}
if (oConvertUtils.isEmpty(model.getActionCode()) || StringUtils.isBlank(model.getActionCode())) {
return "动作代号不能为空";
}
model.setActionCode(model.getActionCode().trim());
if (mesXslMixerActionService.isActionCodeDuplicated(model.getActionCode(), excludeId)) {
return "动作代号不能重复";
}
return null;
}
}

View File

@@ -0,0 +1,168 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslMixerCondition;
import org.jeecg.modules.xslmes.service.IMesXslMixerConditionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@Tag(name = "密炼机条件维护")
@RestController
@RequestMapping("/xslmes/mesXslMixerCondition")
public class MesXslMixerConditionController
extends JeecgController<MesXslMixerCondition, IMesXslMixerConditionService> {
@Autowired private IMesXslMixerConditionService mesXslMixerConditionService;
@Operation(summary = "密炼机条件维护-分页列表查询")
@GetMapping("/list")
public Result<IPage<MesXslMixerCondition>> queryPageList(
MesXslMixerCondition model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslMixerCondition> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
IPage<MesXslMixerCondition> pageList = mesXslMixerConditionService.page(new Page<>(pageNo, pageSize), queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "密炼机条件维护-添加")
@Operation(summary = "密炼机条件维护-添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_condition:add")
@PostMapping("/add")
public Result<String> add(@RequestBody MesXslMixerCondition model) {
String err = validateForSave(model, null);
if (err != null) {
return Result.error(err);
}
mesXslMixerConditionService.fillEquipmentName(model);
if (StringUtils.isBlank(model.getEquipmentName())) {
return Result.error("请选择有效的设备名称");
}
mesXslMixerConditionService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "密炼机条件维护-编辑")
@Operation(summary = "密炼机条件维护-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixer_condition:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixerCondition model) {
String err = validateForSave(model, model.getId());
if (err != null) {
return Result.error(err);
}
mesXslMixerConditionService.fillEquipmentName(model);
if (StringUtils.isBlank(model.getEquipmentName())) {
return Result.error("请选择有效的设备名称");
}
mesXslMixerConditionService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "密炼机条件维护-通过id删除")
@Operation(summary = "密炼机条件维护-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_condition:delete")
@DeleteMapping("/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslMixerConditionService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "密炼机条件维护-批量删除")
@Operation(summary = "密炼机条件维护-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_condition:deleteBatch")
@DeleteMapping("/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslMixerConditionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "密炼机条件维护-通过id查询")
@GetMapping("/queryById")
public Result<MesXslMixerCondition> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixerCondition entity = mesXslMixerConditionService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "校验条件名称是否重复")
@GetMapping("/checkConditionName")
public Result<String> checkConditionName(
@RequestParam(name = "conditionName", required = true) String conditionName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(conditionName) || conditionName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
if (mesXslMixerConditionService.isConditionNameDuplicated(conditionName, dataId)) {
return Result.error("条件名称不能重复");
}
return Result.OK("该值可用!");
}
@Operation(summary = "校验条件代码是否重复")
@GetMapping("/checkConditionCode")
public Result<String> checkConditionCode(
@RequestParam(name = "conditionCode", required = true) String conditionCode,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(conditionCode) || conditionCode.trim().isEmpty()) {
return Result.OK("该值可用!");
}
if (mesXslMixerConditionService.isConditionCodeDuplicated(conditionCode, dataId)) {
return Result.error("条件代码不能重复");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("xslmes:mes_xsl_mixer_condition:exportXls")
@RequestMapping("/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixerCondition model) {
return super.exportXls(request, model, MesXslMixerCondition.class, "密炼机条件维护");
}
private String validateForSave(MesXslMixerCondition model, String excludeId) {
if (oConvertUtils.isEmpty(model.getEquipmentId()) || StringUtils.isBlank(model.getEquipmentId())) {
return "设备名称不能为空";
}
model.setEquipmentId(model.getEquipmentId().trim());
if (oConvertUtils.isEmpty(model.getConditionName()) || StringUtils.isBlank(model.getConditionName())) {
return "条件名称不能为空";
}
model.setConditionName(model.getConditionName().trim());
if (mesXslMixerConditionService.isConditionNameDuplicated(model.getConditionName(), excludeId)) {
return "条件名称不能重复";
}
if (oConvertUtils.isEmpty(model.getConditionCode()) || StringUtils.isBlank(model.getConditionCode())) {
return "条件代码不能为空";
}
model.setConditionCode(model.getConditionCode().trim());
if (mesXslMixerConditionService.isConditionCodeDuplicated(model.getConditionCode(), excludeId)) {
return "条件代码不能重复";
}
return null;
}
}

View File

@@ -0,0 +1,200 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslMixerMaterialKindCfg;
import org.jeecg.modules.xslmes.service.IMesXslMixerMaterialKindCfgService;
import org.jeecg.modules.xslmes.vo.MesXslMixerMaterialKindLookupVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 密炼物料种类配置
*/
@Tag(name = "MES密炼物料种类配置")
@RestController
@RequestMapping("/xslmes/mesXslMixerMaterialKindCfg")
@Slf4j
public class MesXslMixerMaterialKindCfgController
extends JeecgController<MesXslMixerMaterialKindCfg, IMesXslMixerMaterialKindCfgService> {
@Autowired
private IMesXslMixerMaterialKindCfgService mesXslMixerMaterialKindCfgService;
@Operation(summary = "MES密炼物料种类配置-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslMixerMaterialKindCfg>> queryPageList(
MesXslMixerMaterialKindCfg model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslMixerMaterialKindCfg> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByAsc("priority").orderByDesc("create_time");
Page<MesXslMixerMaterialKindCfg> page = new Page<>(pageNo, pageSize);
IPage<MesXslMixerMaterialKindCfg> pageList = mesXslMixerMaterialKindCfgService.page(page, queryWrapper);
return Result.OK(pageList);
}
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置展开与批量保存-----------
@Operation(summary = "MES密炼物料种类配置-按根字典/分类展开明细")
@GetMapping(value = "/expandLines")
public Result<List<MesXslMixerMaterialKindCfg>> expandLines(
@RequestParam(name = "sourceType") String sourceType,
@RequestParam(name = "sourceRootCode") String sourceRootCode,
@RequestParam(name = "tenantId", required = false) Integer tenantId) {
List<MesXslMixerMaterialKindCfg> lines =
mesXslMixerMaterialKindCfgService.expandLines(sourceType, sourceRootCode, tenantId);
return Result.OK(lines);
}
@AutoLog(value = "MES密炼物料种类配置-批量添加")
@Operation(summary = "MES密炼物料种类配置-批量添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:add")
@PostMapping(value = "/addBatch")
public Result<String> addBatch(@RequestBody List<MesXslMixerMaterialKindCfg> lines) {
mesXslMixerMaterialKindCfgService.saveBatchLines(lines, null);
return Result.OK("添加成功!");
}
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置展开与批量保存-----------
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A52】密炼物料种类配置关联解析-----------
@Operation(summary = "MES密炼物料种类配置-加载种类查找表")
@GetMapping(value = "/kindLookup")
public Result<MesXslMixerMaterialKindLookupVO> kindLookup(
@RequestParam(name = "tenantId", required = false) Integer tenantId) {
return Result.OK(mesXslMixerMaterialKindCfgService.loadKindLookup(tenantId));
}
@Operation(summary = "MES密炼物料种类配置-解析混炼示方明细种类")
@GetMapping(value = "/resolveKind")
public Result<String> resolveKind(
@RequestParam(name = "minorCategoryId", required = false) String minorCategoryId,
@RequestParam(name = "weighMode", required = false) String weighMode,
@RequestParam(name = "minorCategoryName", required = false) String minorCategoryName,
@RequestParam(name = "tenantId", required = false) Integer tenantId) {
MesXslMixerMaterialKindLookupVO lookup = mesXslMixerMaterialKindCfgService.loadKindLookup(tenantId);
String kind = mesXslMixerMaterialKindCfgService.resolveMixingMaterialKind(
lookup, minorCategoryId, weighMode, minorCategoryName);
return Result.OK(kind);
}
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A52】密炼物料种类配置关联解析-----------
@AutoLog(value = "MES密炼物料种类配置-添加")
@Operation(summary = "MES密炼物料种类配置-添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslMixerMaterialKindCfg model) {
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
String err = validateForSave(model, false);
if (err != null) {
return Result.error(err);
}
model.setDelFlag(CommonConstant.DEL_FLAG_0);
mesXslMixerMaterialKindCfgService.save(model);
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
return Result.OK("添加成功!");
}
@AutoLog(value = "MES密炼物料种类配置-编辑")
@Operation(summary = "MES密炼物料种类配置-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixerMaterialKindCfg model) {
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
String err = validateForSave(model, true);
if (err != null) {
return Result.error(err);
}
mesXslMixerMaterialKindCfgService.updateById(model);
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES密炼物料种类配置-删除")
@Operation(summary = "MES密炼物料种类配置-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslMixerMaterialKindCfgService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES密炼物料种类配置-批量删除")
@Operation(summary = "MES密炼物料种类配置-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslMixerMaterialKindCfgService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES密炼物料种类配置-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslMixerMaterialKindCfg> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixerMaterialKindCfg entity = mesXslMixerMaterialKindCfgService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixerMaterialKindCfg model) {
return super.exportXls(request, model, MesXslMixerMaterialKindCfg.class, "密炼物料种类配置");
}
@RequiresPermissions("xslmes:mes_xsl_mixer_material_kind_cfg:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslMixerMaterialKindCfg.class);
}
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
private String validateForSave(MesXslMixerMaterialKindCfg model, boolean isUpdate) {
if (model == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(model.getKindKey())) {
return "种类键值不能为空";
}
if (oConvertUtils.isEmpty(model.getKindName())) {
return "种类名称不能为空";
}
if (oConvertUtils.isEmpty(model.getSourceType())) {
return "数据源类型不能为空";
}
if (oConvertUtils.isEmpty(model.getCategoryRefId())) {
return "对应分类不能为空";
}
if (model.getPriority() == null) {
model.setPriority(999);
}
if (isUpdate && oConvertUtils.isEmpty(model.getId())) {
return "主键不能为空";
}
try {
mesXslMixerMaterialKindCfgService.checkDuplicate(model, isUpdate ? model.getId() : null);
} catch (Exception e) {
return e.getMessage();
}
return null;
}
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A51】密炼物料种类配置保存校验-----------
}

View File

@@ -0,0 +1,172 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.mes.material.entity.MesMixerMaterial;
import org.jeecg.modules.mes.material.service.IMesMixerMaterialService;
import org.jeecg.modules.xslmes.entity.MesXslMixerMaterialSubstitute;
import org.jeecg.modules.xslmes.service.IMesXslMixerMaterialSubstituteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 密炼物料替代对应关系
*/
@Tag(name = "MES密炼物料替代对应关系")
@RestController
@RequestMapping("/xslmes/mesXslMixerMaterialSubstitute")
@Slf4j
public class MesXslMixerMaterialSubstituteController
extends JeecgController<MesXslMixerMaterialSubstitute, IMesXslMixerMaterialSubstituteService> {
@Autowired
private IMesXslMixerMaterialSubstituteService mesXslMixerMaterialSubstituteService;
@Autowired
private IMesMixerMaterialService mesMixerMaterialService;
@Operation(summary = "MES密炼物料替代对应关系-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslMixerMaterialSubstitute>> queryPageList(
MesXslMixerMaterialSubstitute model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
customeRuleMap.put("mixerMaterialId", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("substituteMaterialId", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<MesXslMixerMaterialSubstitute> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap(), customeRuleMap);
queryWrapper.orderByAsc("serial_no");
Page<MesXslMixerMaterialSubstitute> page = new Page<>(pageNo, pageSize);
IPage<MesXslMixerMaterialSubstitute> pageList = mesXslMixerMaterialSubstituteService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES密炼物料替代对应关系-添加")
@Operation(summary = "MES密炼物料替代对应关系-添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslMixerMaterialSubstitute model) {
//update-begin---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
String err = validateAndFillMaterials(model, false);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
mesXslMixerMaterialSubstituteService.saveWithSerialNo(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "MES密炼物料替代对应关系-编辑")
@Operation(summary = "MES密炼物料替代对应关系-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixerMaterialSubstitute model) {
//update-begin---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
String err = validateAndFillMaterials(model, true);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
mesXslMixerMaterialSubstituteService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES密炼物料替代对应关系-删除")
@Operation(summary = "MES密炼物料替代对应关系-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslMixerMaterialSubstituteService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES密炼物料替代对应关系-批量删除")
@Operation(summary = "MES密炼物料替代对应关系-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslMixerMaterialSubstituteService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES密炼物料替代对应关系-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslMixerMaterialSubstitute> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixerMaterialSubstitute entity = mesXslMixerMaterialSubstituteService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixerMaterialSubstitute model) {
return super.exportXls(request, model, MesXslMixerMaterialSubstitute.class, "密炼物料替代对应关系");
}
@RequiresPermissions("xslmes:mes_xsl_mixer_material_substitute:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslMixerMaterialSubstitute.class);
}
//update-begin---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
private String validateAndFillMaterials(MesXslMixerMaterialSubstitute model, boolean isUpdate) {
if (oConvertUtils.isEmpty(model.getMixerMaterialId())) {
return "请选择密炼物料";
}
if (oConvertUtils.isEmpty(model.getSubstituteMaterialId())) {
return "请选择替代密炼物料";
}
if (model.getMixerMaterialId().equals(model.getSubstituteMaterialId())) {
return "密炼物料与替代密炼物料不能相同";
}
MesMixerMaterial mixerMaterial = mesMixerMaterialService.getById(model.getMixerMaterialId());
if (mixerMaterial == null) {
return "所选密炼物料不存在,请重新选择";
}
MesMixerMaterial substituteMaterial = mesMixerMaterialService.getById(model.getSubstituteMaterialId());
if (substituteMaterial == null) {
return "所选替代密炼物料不存在,请重新选择";
}
model.setMixerMaterialCode(mixerMaterial.getMaterialCode());
model.setMixerMaterialName(mixerMaterial.getMaterialName());
model.setSubstituteMaterialCode(substituteMaterial.getMaterialCode());
model.setSubstituteMaterialName(substituteMaterial.getMaterialName());
LambdaQueryWrapper<MesXslMixerMaterialSubstitute> dupQw = new LambdaQueryWrapper<>();
dupQw.eq(MesXslMixerMaterialSubstitute::getMixerMaterialId, model.getMixerMaterialId())
.eq(MesXslMixerMaterialSubstitute::getSubstituteMaterialId, model.getSubstituteMaterialId());
if (isUpdate && oConvertUtils.isNotEmpty(model.getId())) {
dupQw.ne(MesXslMixerMaterialSubstitute::getId, model.getId());
}
if (mesXslMixerMaterialSubstituteService.count(dupQw) > 0) {
return "该密炼物料与替代密炼物料的对应关系已存在";
}
return null;
}
//update-end---author:jiangxh ---date:20260520 for【密炼物料替代对应关系】保存前校验与物料冗余回填-----------
}

View File

@@ -0,0 +1,261 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile;
import org.jeecg.modules.xslmes.service.IMesXslMixerPsCompileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 密炼PS编制
*/
@Tag(name = "MES密炼PS编制")
@RestController
@RequestMapping("/xslmes/mesXslMixerPsCompile")
@Slf4j
public class MesXslMixerPsCompileController extends JeecgController<MesXslMixerPsCompile, IMesXslMixerPsCompileService> {
@Autowired
private IMesXslMixerPsCompileService mesXslMixerPsCompileService;
@Autowired
private ISysDepartService sysDepartService;
@Operation(summary = "MES密炼PS编制-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslMixerPsCompile>> queryPageList(
MesXslMixerPsCompile model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
customeRuleMap.put("psCode", QueryRuleEnum.LIKE);
customeRuleMap.put("title", QueryRuleEnum.LIKE);
QueryWrapper<MesXslMixerPsCompile> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap(), customeRuleMap);
queryWrapper.orderByDesc("issue_date", "create_time");
Page<MesXslMixerPsCompile> page = new Page<>(pageNo, pageSize);
IPage<MesXslMixerPsCompile> pageList = mesXslMixerPsCompileService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES密炼PS编制-添加")
@Operation(summary = "MES密炼PS编制-添加")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslMixerPsCompile model) {
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
String err = validateAndFill(model);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
mesXslMixerPsCompileService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "MES密炼PS编制-编辑")
@Operation(summary = "MES密炼PS编制-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixerPsCompile model) {
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
String err = validateAndFill(model);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(model.getId());
if (existing == null) {
return Result.error("未找到对应数据");
}
if (!"compile".equals(existing.getStatus())) {
return Result.error("仅编制状态的单据允许编辑");
}
model.setStatus("compile");
model.setProofreadBy(existing.getProofreadBy());
model.setProofreadTime(existing.getProofreadTime());
model.setAuditBy(existing.getAuditBy());
model.setAuditTime(existing.getAuditTime());
model.setApproveBy(existing.getApproveBy());
model.setApproveTime(existing.getApproveTime());
mesXslMixerPsCompileService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES密炼PS编制-删除")
@Operation(summary = "MES密炼PS编制-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(id);
String err = assertCompileStatusForDelete(existing);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
mesXslMixerPsCompileService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES密炼PS编制-批量删除")
@Operation(summary = "MES密炼PS编制-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
if (oConvertUtils.isEmpty(ids)) {
return Result.error("请选择要删除的记录");
}
for (String id : ids.split(",")) {
if (oConvertUtils.isEmpty(id)) {
continue;
}
MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(id.trim());
String err = assertCompileStatusForDelete(existing);
if (err != null) {
return Result.error(err);
}
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
mesXslMixerPsCompileService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES密炼PS编制-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslMixerPsCompile> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixerPsCompile entity = mesXslMixerPsCompileService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixerPsCompile model) {
return super.exportXls(request, model, MesXslMixerPsCompile.class, "密炼PS编制");
}
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslMixerPsCompile.class);
}
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】校对/审核/批准-----------
@AutoLog(value = "MES密炼PS编制-校对")
@Operation(summary = "MES密炼PS编制-校对")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:proofread")
@PostMapping(value = "/proofread")
public Result<String> proofread(@RequestParam(name = "ids") String ids) {
return doChangeStatus(ids, "compile", "proofread", "校对");
}
@AutoLog(value = "MES密炼PS编制-审核")
@Operation(summary = "MES密炼PS编制-审核")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:audit")
@PostMapping(value = "/audit")
public Result<String> audit(@RequestParam(name = "ids") String ids) {
return doChangeStatus(ids, "proofread", "audit", "审核");
}
@AutoLog(value = "MES密炼PS编制-批准")
@Operation(summary = "MES密炼PS编制-批准")
@RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:approve")
@PostMapping(value = "/approve")
public Result<String> approve(@RequestParam(name = "ids") String ids) {
return doChangeStatus(ids, "audit", "approve", "批准");
}
private Result<String> doChangeStatus(String ids, String expectedStatus, String targetStatus, String actionLabel) {
String err = mesXslMixerPsCompileService.changeStatusBatch(
ids, expectedStatus, targetStatus, actionLabel, getOperatorName());
if (err != null) {
return Result.error(err);
}
return Result.OK(actionLabel + "成功!");
}
private String getOperatorName() {
LoginUser loginUser = null;
try {
loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
} catch (Exception e) {
log.debug("获取当前登录用户失败", e);
}
if (loginUser == null) {
return null;
}
if (oConvertUtils.isNotEmpty(loginUser.getRealname())) {
return loginUser.getRealname();
}
return loginUser.getUsername();
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】校对/审核/批准-----------
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
private String validateAndFill(MesXslMixerPsCompile model) {
if (oConvertUtils.isEmpty(model.getReceiveDeptId())) {
return "请选择收信部门";
}
if (oConvertUtils.isEmpty(model.getReferenceDeptId())) {
return "请选择参照部门";
}
if (oConvertUtils.isEmpty(model.getTitle())) {
return "请输入标题";
}
if (oConvertUtils.isEmpty(model.getStatus())) {
model.setStatus("compile");
}
if (oConvertUtils.isNotEmpty(model.getFactoryId())) {
SysDepart factory = sysDepartService.getById(model.getFactoryId());
if (factory == null) {
return "所选所属工厂不存在,请重新选择";
}
model.setFactoryName(factory.getDepartName());
} else {
model.setFactoryName(null);
}
return null;
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】保存前校验与冗余回填-----------
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
private String assertCompileStatusForDelete(MesXslMixerPsCompile entity) {
if (entity == null) {
return "记录不存在或已删除";
}
String status = entity.getStatus() == null ? "" : entity.getStatus();
if (!"compile".equals(status)) {
String psCode = oConvertUtils.isEmpty(entity.getPsCode()) ? entity.getId() : entity.getPsCode();
return "PS编码[" + psCode + "]当前状态不允许删除,仅编制状态可删除";
}
return null;
}
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】仅编制状态允许删除-----------
}

View File

@@ -0,0 +1,210 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslMixingSpec;
import org.jeecg.modules.xslmes.service.IMesXslMixingSpecService;
import org.jeecg.modules.xslmes.vo.MesXslMixingSpecPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 混炼示方
*/
@Tag(name = "MES混炼示方")
@RestController
@RequestMapping("/xslmes/mesXslMixingSpec")
@Slf4j
public class MesXslMixingSpecController extends JeecgController<MesXslMixingSpec, IMesXslMixingSpecService> {
@Autowired
private IMesXslMixingSpecService mesXslMixingSpecService;
@Operation(summary = "MES混炼示方-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslMixingSpec>> queryPageList(
MesXslMixingSpec model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "keyword", required = false) String keyword,
HttpServletRequest req) {
QueryWrapper<MesXslMixingSpec> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
//update-begin---author:cursor ---date:20260522 for【XSLMES-20260522-A17】混炼示方列表关键字查询-----------
if (oConvertUtils.isNotEmpty(keyword)) {
queryWrapper.and(w -> w.like("spec_name", keyword).or().like("issue_number", keyword).or().like("purpose", keyword).or().like("machine_name", keyword));
}
//update-end---author:cursor ---date:20260522 for【XSLMES-20260522-A17】混炼示方列表关键字查询-----------
queryWrapper.orderByDesc("update_time").orderByDesc("create_time");
Page<MesXslMixingSpec> page = new Page<>(pageNo, pageSize);
return Result.OK(mesXslMixingSpecService.page(page, queryWrapper));
}
@AutoLog(value = "MES混炼示方-添加")
@Operation(summary = "MES混炼示方-添加")
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslMixingSpecPage page) {
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
long requestStartMs = System.currentTimeMillis();
log.info(
"[混炼示方保存性能] 接口/add 收到请求 specName={}, payload=[material={}, step={}, downStep={}, tcu={}]",
page != null ? page.getSpecName() : null,
countChildRows(page != null ? page.getMaterialList() : null),
countChildRows(page != null ? page.getStepList() : null),
countChildRows(page != null ? page.getDownStepList() : null),
countChildRows(page != null ? page.getTcuList() : null));
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
String err = validateMain(page);
if (err != null) {
return Result.error(err);
}
long validateMs = System.currentTimeMillis();
MesXslMixingSpec main = new MesXslMixingSpec();
BeanUtils.copyProperties(page, main);
long copyMs = System.currentTimeMillis();
mesXslMixingSpecService.saveMain(main, page.getMaterialList(), page.getStepList(), page.getDownStepList(), page.getTcuList());
long serviceMs = System.currentTimeMillis();
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
log.info(
"[混炼示方保存性能] 接口/add 完成 specName={}, mainId={}, validate={}ms, copy={}ms, service={}ms, total={}ms返回响应前不含AutoLog等切面",
main.getSpecName(),
main.getId(),
validateMs - requestStartMs,
copyMs - validateMs,
serviceMs - copyMs,
serviceMs - requestStartMs);
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
return Result.OK("添加成功!");
}
@AutoLog(value = "MES混炼示方-编辑")
@Operation(summary = "MES混炼示方-编辑")
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslMixingSpecPage page) {
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
long requestStartMs = System.currentTimeMillis();
log.info(
"[混炼示方保存性能] 接口/edit 收到请求 id={}, specName={}, payload=[material={}, step={}, downStep={}, tcu={}]",
page != null ? page.getId() : null,
page != null ? page.getSpecName() : null,
countChildRows(page != null ? page.getMaterialList() : null),
countChildRows(page != null ? page.getStepList() : null),
countChildRows(page != null ? page.getDownStepList() : null),
countChildRows(page != null ? page.getTcuList() : null));
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
String err = validateMain(page);
if (err != null) {
return Result.error(err);
}
long validateMs = System.currentTimeMillis();
MesXslMixingSpec main = new MesXslMixingSpec();
BeanUtils.copyProperties(page, main);
long copyMs = System.currentTimeMillis();
mesXslMixingSpecService.updateMain(main, page.getMaterialList(), page.getStepList(), page.getDownStepList(), page.getTcuList());
long serviceMs = System.currentTimeMillis();
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
log.info(
"[混炼示方保存性能] 接口/edit 完成 id={}, specName={}, validate={}ms, copy={}ms, service={}ms, total={}ms返回响应前不含AutoLog等切面",
main.getId(),
main.getSpecName(),
validateMs - requestStartMs,
copyMs - validateMs,
serviceMs - copyMs,
serviceMs - requestStartMs);
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES混炼示方-删除")
@Operation(summary = "MES混炼示方-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslMixingSpecService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES混炼示方-批量删除")
@Operation(summary = "MES混炼示方-批量删除")
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslMixingSpecService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES混炼示方-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslMixingSpecPage> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslMixingSpecPage page = mesXslMixingSpecService.queryPageById(id);
if (page == null) {
return Result.error("未找到对应数据");
}
return Result.OK(page);
}
@Operation(summary = "MES混炼示方-发行编号候选")
@GetMapping(value = "/queryIssueNumberOptions")
public Result<List<Map<String, String>>> queryIssueNumberOptions(
@RequestParam(name = "keyword", required = false) String keyword) {
return Result.OK(mesXslMixingSpecService.queryIssueNumberOptions(keyword));
}
@Operation(summary = "MES混炼示方-用途候选")
@GetMapping(value = "/queryPurposeOptions")
public Result<List<Map<String, String>>> queryPurposeOptions(
@RequestParam(name = "keyword", required = false) String keyword) {
return Result.OK(mesXslMixingSpecService.queryPurposeOptions(keyword));
}
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslMixingSpec model) {
return super.exportXls(request, model, MesXslMixingSpec.class, "混炼示方");
}
@RequiresPermissions("xslmes:mes_xsl_mixing_spec:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslMixingSpec.class);
}
//update-begin---author:cursor ---date:20260522 for【XSLMES-20260522-A17】混炼示方主子保存校验-----------
private String validateMain(MesXslMixingSpecPage page) {
if (oConvertUtils.isEmpty(page.getSpecName())) {
return "请填写规格";
}
if (oConvertUtils.isEmpty(page.getPurpose())) {
return "请选择用途";
}
if (oConvertUtils.isEmpty(page.getIssueNumber())) {
return "请选择发行编号";
}
return null;
}
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
private static int countChildRows(List<?> rows) {
return rows == null ? 0 : rows.size();
}
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A47】混炼示方保存分步骤性能日志-----------
//update-end---author:cursor ---date:20260522 for【XSLMES-20260522-A17】混炼示方主子保存校验-----------
}

View File

@@ -0,0 +1,181 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.mes.material.entity.MesMaterial;
import org.jeecg.modules.mes.material.service.IMesMaterialService;
import org.jeecg.modules.xslmes.entity.MesXslOpenMillParam;
import org.jeecg.modules.xslmes.service.IMesXslOpenMillParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 开炼机参数维护
*/
@Tag(name = "MES开炼机参数维护")
@RestController
@RequestMapping("/xslmes/mesXslOpenMillParam")
@Slf4j
public class MesXslOpenMillParamController extends JeecgController<MesXslOpenMillParam, IMesXslOpenMillParamService> {
@Autowired
private IMesXslOpenMillParamService mesXslOpenMillParamService;
@Autowired
private IMesMaterialService mesMaterialService;
@Operation(summary = "MES开炼机参数维护-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslOpenMillParam>> queryPageList(
MesXslOpenMillParam model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
customeRuleMap.put("materialId", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<MesXslOpenMillParam> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap(), customeRuleMap);
Page<MesXslOpenMillParam> page = new Page<>(pageNo, pageSize);
IPage<MesXslOpenMillParam> pageList = mesXslOpenMillParamService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES开炼机参数维护-添加")
@Operation(summary = "MES开炼机参数维护-添加")
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslOpenMillParam model) {
//update-begin---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
String err = validateAndFillMaterial(model);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
mesXslOpenMillParamService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "MES开炼机参数维护-编辑")
@Operation(summary = "MES开炼机参数维护-编辑")
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslOpenMillParam model) {
//update-begin---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
String err = validateAndFillMaterial(model);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
mesXslOpenMillParamService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES开炼机参数维护-删除")
@Operation(summary = "MES开炼机参数维护-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslOpenMillParamService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES开炼机参数维护-批量删除")
@Operation(summary = "MES开炼机参数维护-批量删除")
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslOpenMillParamService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES开炼机参数维护-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslOpenMillParam> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslOpenMillParam entity = mesXslOpenMillParamService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslOpenMillParam model) {
return super.exportXls(request, model, MesXslOpenMillParam.class, "开炼机参数维护");
}
@RequiresPermissions("xslmes:mes_xsl_open_mill_param:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslOpenMillParam.class);
}
//update-begin---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
private String validateAndFillMaterial(MesXslOpenMillParam model) {
if (oConvertUtils.isEmpty(model.getMaterialId())) {
return "请选择胶料";
}
MesMaterial material = mesMaterialService.getById(model.getMaterialId());
if (material == null) {
return "所选胶料不存在,请重新选择";
}
model.setMaterialName(material.getMaterialName());
model.setMaterialCode(oConvertUtils.isEmpty(material.getAliasName()) ? "" : material.getAliasName());
String timeErr = validateTimeFields(model);
if (timeErr != null) {
return timeErr;
}
return null;
}
private String validateTimeFields(MesXslOpenMillParam model) {
if (isNegative(model.getR0FeedTime())) {
return "R0进胶时间不能为负数";
}
if (isNegative(model.getR0RingTime())) {
return "R0成环时间不能为负数";
}
if (isNegative(model.getR0BreakTime())) {
return "R0拉断时间不能为负数";
}
if (isNegative(model.getR0DischargeTime())) {
return "R0排胶时间不能为负数";
}
if (isNegative(model.getR1FeedTime())) {
return "R1进胶时间不能为负数";
}
if (isNegative(model.getR1RingTime())) {
return "R1成环时间不能为负数";
}
if (isNegative(model.getR1BreakTime())) {
return "R1拉断时间不能为负数";
}
if (isNegative(model.getR1DischargeTime())) {
return "R1排胶时间不能为负数";
}
return null;
}
private static boolean isNegative(BigDecimal value) {
return value != null && value.compareTo(BigDecimal.ZERO) < 0;
}
//update-end---author:jiangxh ---date:20260520 for【开炼机参数维护】保存前校验与胶料冗余回填-----------
}

View File

@@ -0,0 +1,100 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import java.util.Arrays;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.xslmes.entity.MesXslProductionOrder;
import org.jeecg.modules.xslmes.service.IMesXslProductionOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@Tag(name = "生产订单")
@RestController
@RequestMapping("/xslmes/mesXslProductionOrder")
public class MesXslProductionOrderController
extends JeecgController<MesXslProductionOrder, IMesXslProductionOrderService> {
@Autowired private IMesXslProductionOrderService mesXslProductionOrderService;
@Operation(summary = "生产订单-分页列表查询")
@GetMapping("/list")
public Result<IPage<MesXslProductionOrder>> queryPageList(
MesXslProductionOrder model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslProductionOrder> queryWrapper = QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
IPage<MesXslProductionOrder> pageList = mesXslProductionOrderService.page(new Page<>(pageNo, pageSize), queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "生产订单-添加")
@Operation(summary = "生产订单-添加")
@RequiresPermissions("xslmes:mes_xsl_production_order:add")
@PostMapping("/add")
public Result<String> add(@RequestBody MesXslProductionOrder model) {
mesXslProductionOrderService.save(model);
return Result.OK("添加成功!");
}
@AutoLog(value = "生产订单-编辑")
@Operation(summary = "生产订单-编辑")
@RequiresPermissions("xslmes:mes_xsl_production_order:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslProductionOrder model) {
mesXslProductionOrderService.updateById(model);
return Result.OK("编辑成功!");
}
@AutoLog(value = "生产订单-通过id删除")
@Operation(summary = "生产订单-通过id删除")
@RequiresPermissions("xslmes:mes_xsl_production_order:delete")
@DeleteMapping("/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslProductionOrderService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "生产订单-批量删除")
@Operation(summary = "生产订单-批量删除")
@RequiresPermissions("xslmes:mes_xsl_production_order:deleteBatch")
@DeleteMapping("/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslProductionOrderService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "生产订单-通过id查询")
@GetMapping("/queryById")
public Result<MesXslProductionOrder> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslProductionOrder entity = mesXslProductionOrderService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@RequiresPermissions("xslmes:mes_xsl_production_order:exportXls")
@RequestMapping("/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslProductionOrder model) {
return super.exportXls(request, model, MesXslProductionOrder.class, "生产订单");
}
}

View File

@@ -0,0 +1,73 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.xslmes.service.IMesXslRackTrainCountSettingService;
import org.jeecg.modules.xslmes.vo.MesXslRackTrainCountSettingVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 架子车数设定(数据来源于混炼示方,不建独立业务表)
*/
@Tag(name = "架子车数设定")
@RestController
@RequestMapping("/xslmes/mesXslRackTrainCountSetting")
@Slf4j
public class MesXslRackTrainCountSettingController {
@Autowired
private IMesXslRackTrainCountSettingService rackTrainCountSettingService;
//update-begin---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定分页列表-----------
@Operation(summary = "架子车数设定-分页列表查询")
@RequiresPermissions("xslmes:mes_xsl_rack_train_count_setting:list")
@GetMapping(value = "/list")
public Result<IPage<MesXslRackTrainCountSettingVO>> queryPageList(
MesXslRackTrainCountSettingVO query,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "keyword", required = false) String keyword) {
return Result.OK(rackTrainCountSettingService.queryPage(pageNo, pageSize, query, keyword));
}
//update-end---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定分页列表-----------
//update-begin---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定详情查询-----------
@Operation(summary = "架子车数设定-通过id查询")
@RequiresPermissions("xslmes:mes_xsl_rack_train_count_setting:list")
@GetMapping(value = "/queryById")
public Result<MesXslRackTrainCountSettingVO> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRackTrainCountSettingVO detail = rackTrainCountSettingService.queryById(id);
if (detail == null) {
return Result.error("未找到对应数据");
}
return Result.OK(detail);
}
//update-end---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定详情查询-----------
//update-begin---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定保存-----------
@AutoLog(value = "架子车数设定-保存")
@Operation(summary = "架子车数设定-保存设定车数")
@RequiresPermissions("xslmes:mes_xsl_rack_train_count_setting:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRackTrainCountSettingVO setting) {
try {
rackTrainCountSettingService.saveSetting(setting);
return Result.OK("保存成功!");
} catch (IllegalArgumentException ex) {
return Result.error(ex.getMessage());
}
}
//update-end---author:cursor ---date:20260528 for【XSLMES-20260528-A01】架子车数设定保存-----------
}

View File

@@ -0,0 +1,297 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestDataPoint;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestType;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestDataPointService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestTypeService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 胶料快检数据点
*/
@Tag(name = "MES胶料快检数据点")
@RestController
@RequestMapping("/xslmes/mesXslRubberQuickTestDataPoint")
@Slf4j
public class MesXslRubberQuickTestDataPointController
extends JeecgController<MesXslRubberQuickTestDataPoint, IMesXslRubberQuickTestDataPointService> {
@Autowired
private IMesXslRubberQuickTestDataPointService mesXslRubberQuickTestDataPointService;
@Autowired
private IMesXslRubberQuickTestTypeService mesXslRubberQuickTestTypeService;
@Operation(summary = "MES胶料快检数据点-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslRubberQuickTestDataPoint>> queryPageList(
MesXslRubberQuickTestDataPoint model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslRubberQuickTestDataPoint> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap());
Page<MesXslRubberQuickTestDataPoint> page = new Page<>(pageNo, pageSize);
IPage<MesXslRubberQuickTestDataPoint> pageList = mesXslRubberQuickTestDataPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES胶料快检数据点-添加")
@Operation(summary = "MES胶料快检数据点-添加")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslRubberQuickTestDataPoint model) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检数据点保存校验、实验类型回填-----------
String err = validateForSave(model, null);
if (err != null) {
return Result.error(err);
}
try {
mesXslRubberQuickTestDataPointService.save(model);
} catch (JeecgBootException e) {
return Result.error(e.getMessage());
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检数据点保存校验、实验类型回填-----------
return Result.OK("添加成功!");
}
@AutoLog(value = "MES胶料快检数据点-编辑")
@Operation(summary = "MES胶料快检数据点-编辑")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRubberQuickTestDataPoint model) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检数据点编辑校验-----------
if (oConvertUtils.isEmpty(model.getId())) {
return Result.error("缺少主键");
}
MesXslRubberQuickTestDataPoint old = mesXslRubberQuickTestDataPointService.getById(model.getId());
if (old == null) {
return Result.error("未找到对应数据");
}
String err = validateForSave(model, model.getId());
if (err != null) {
return Result.error(err);
}
old.setPointName(model.getPointName());
old.setQuickTestTypeId(model.getQuickTestTypeId());
old.setQuickTestTypeName(model.getQuickTestTypeName());
old.setUnitType(model.getUnitType());
old.setPointDesc(model.getPointDesc());
try {
mesXslRubberQuickTestDataPointService.updateById(old);
} catch (JeecgBootException e) {
return Result.error(e.getMessage());
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检数据点编辑校验-----------
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES胶料快检数据点-删除")
@Operation(summary = "MES胶料快检数据点-通过id删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslRubberQuickTestDataPointService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES胶料快检数据点-批量删除")
@Operation(summary = "MES胶料快检数据点-批量删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslRubberQuickTestDataPointService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES胶料快检数据点-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslRubberQuickTestDataPoint> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRubberQuickTestDataPoint entity = mesXslRubberQuickTestDataPointService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "校验数据点名称是否重复")
@GetMapping(value = "/checkPointName")
public Result<String> checkPointName(
@RequestParam(name = "pointName", required = true) String pointName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(pointName) || pointName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslRubberQuickTestDataPoint ctx = new MesXslRubberQuickTestDataPoint();
if (mesXslRubberQuickTestDataPointService.isPointNameDuplicated(pointName.trim(), dataId, ctx)) {
return Result.error("该数据点名称已存在");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslRubberQuickTestDataPoint model) {
return super.exportXls(request, model, MesXslRubberQuickTestDataPoint.class, "MES胶料快检数据点");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_data_point:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检数据点导入校验-----------
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> ent : fileMap.entrySet()) {
MultipartFile file = ent.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<MesXslRubberQuickTestDataPoint> list =
ExcelImportUtil.importExcel(file.getInputStream(), MesXslRubberQuickTestDataPoint.class, params);
if (list == null) {
list = List.of();
}
Set<String> namesInFile = new HashSet<>();
for (int i = 0; i < list.size(); i++) {
MesXslRubberQuickTestDataPoint row = list.get(i);
int rowNo = i + 1;
if (row == null) {
return Result.error("文件导入失败:第 " + rowNo + " 条数据无效(空行)");
}
String err = validateImportRow(row, rowNo, namesInFile);
if (err != null) {
return Result.error(err);
}
}
for (MesXslRubberQuickTestDataPoint row : list) {
try {
mesXslRubberQuickTestDataPointService.save(row);
} catch (JeecgBootException e) {
return Result.error("文件导入失败:" + e.getMessage());
}
}
log.info("胶料快检数据点Excel导入完成行数={}", list.size());
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
String msg = e.getMessage();
log.error(msg, e);
return Result.error("文件导入失败:" + e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检数据点导入校验-----------
return Result.error("文件导入失败!");
}
private String validateForSave(MesXslRubberQuickTestDataPoint model, String excludeId) {
if (oConvertUtils.isEmpty(model.getPointName()) || model.getPointName().trim().isEmpty()) {
return "数据点名称不能为空";
}
model.setPointName(model.getPointName().trim());
if (mesXslRubberQuickTestDataPointService.isPointNameDuplicated(model.getPointName(), excludeId, model)) {
return "数据点名称已存在";
}
if (oConvertUtils.isNotEmpty(model.getUnitType())) {
model.setUnitType(model.getUnitType().trim());
}
if (oConvertUtils.isNotEmpty(model.getPointDesc())) {
model.setPointDesc(model.getPointDesc().trim());
}
return resolveAndFillQuickTestType(model);
}
private String validateImportRow(MesXslRubberQuickTestDataPoint row, int rowNo, Set<String> namesInFile) {
if (oConvertUtils.isEmpty(row.getPointName()) || row.getPointName().trim().isEmpty()) {
return "文件导入失败:第 " + rowNo + " 条数据点名称不能为空";
}
row.setPointName(row.getPointName().trim());
if (!namesInFile.add(row.getPointName())) {
return "文件导入失败:数据点名称【" + row.getPointName() + "】在导入文件中重复";
}
if (mesXslRubberQuickTestDataPointService.isPointNameDuplicated(row.getPointName(), null, row)) {
return "文件导入失败:第 " + rowNo + " 条数据点名称【" + row.getPointName() + "】已存在";
}
if (oConvertUtils.isEmpty(row.getQuickTestTypeId()) && oConvertUtils.isNotEmpty(row.getImportQuickTestTypeName())) {
row.setQuickTestTypeName(row.getImportQuickTestTypeName().trim());
}
if (oConvertUtils.isEmpty(row.getQuickTestTypeId()) && oConvertUtils.isNotEmpty(row.getQuickTestTypeName())) {
MesXslRubberQuickTestType type = findQuickTestTypeByName(row.getQuickTestTypeName(), row);
if (type == null) {
return "文件导入失败:第 " + rowNo + " 条实验类型【" + row.getQuickTestTypeName() + "】不存在";
}
row.setQuickTestTypeId(type.getId());
}
String typeErr = resolveAndFillQuickTestType(row);
if (typeErr != null) {
return "文件导入失败:第 " + rowNo + "" + typeErr;
}
if (oConvertUtils.isNotEmpty(row.getUnitType())) {
row.setUnitType(row.getUnitType().trim());
}
return null;
}
private String resolveAndFillQuickTestType(MesXslRubberQuickTestDataPoint model) {
if (oConvertUtils.isEmpty(model.getQuickTestTypeId())) {
return "请选择实验类型";
}
MesXslRubberQuickTestType type = mesXslRubberQuickTestTypeService.getById(model.getQuickTestTypeId());
if (type == null) {
return "实验类型不存在或已删除";
}
model.setQuickTestTypeName(type.getTypeName());
return null;
}
private MesXslRubberQuickTestType findQuickTestTypeByName(String typeName, MesXslRubberQuickTestDataPoint context) {
LambdaQueryWrapper<MesXslRubberQuickTestType> w = new LambdaQueryWrapper<>();
w.eq(MesXslRubberQuickTestType::getTypeName, typeName.trim());
w.and(
q ->
q.eq(MesXslRubberQuickTestType::getDelFlag, CommonConstant.DEL_FLAG_0)
.or()
.isNull(MesXslRubberQuickTestType::getDelFlag));
Integer tenantId = context != null ? context.getTenantId() : null;
if (tenantId != null) {
w.eq(MesXslRubberQuickTestType::getTenantId, tenantId);
}
w.last("LIMIT 1");
return mesXslRubberQuickTestTypeService.getOne(w, false);
}
}

View File

@@ -0,0 +1,508 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestDataPoint;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestMethod;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestMethodLine;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestType;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestDataPointService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestMethodService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestTypeService;
import org.jeecg.modules.xslmes.vo.MesXslRubberQuickTestMethodPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 胶料快检实验方法(主子表)
*/
@Tag(name = "MES胶料快检实验方法")
@RestController
@RequestMapping("/xslmes/mesXslRubberQuickTestMethod")
@Slf4j
public class MesXslRubberQuickTestMethodController
extends JeecgController<MesXslRubberQuickTestMethod, IMesXslRubberQuickTestMethodService> {
@Autowired
private IMesXslRubberQuickTestMethodService mesXslRubberQuickTestMethodService;
@Autowired
private IMesXslRubberQuickTestTypeService mesXslRubberQuickTestTypeService;
@Autowired
private IMesXslRubberQuickTestDataPointService mesXslRubberQuickTestDataPointService;
@Operation(summary = "MES胶料快检实验方法-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslRubberQuickTestMethod>> queryPageList(
MesXslRubberQuickTestMethod model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslRubberQuickTestMethod> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<MesXslRubberQuickTestMethod> page = new Page<>(pageNo, pageSize);
IPage<MesXslRubberQuickTestMethod> pageList = mesXslRubberQuickTestMethodService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES胶料快检实验方法-添加")
@Operation(summary = "MES胶料快检实验方法-添加")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslRubberQuickTestMethodPage page) {
MesXslRubberQuickTestMethod main = new MesXslRubberQuickTestMethod();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
String err = validateForSave(main, page.getLineList(), null);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
try {
mesXslRubberQuickTestMethodService.saveMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("添加成功!");
}
@AutoLog(value = "MES胶料快检实验方法-编辑")
@Operation(summary = "MES胶料快检实验方法-编辑")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRubberQuickTestMethodPage page) {
MesXslRubberQuickTestMethod main = new MesXslRubberQuickTestMethod();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
String err = validateForSave(main, page.getLineList(), main.getId());
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
try {
mesXslRubberQuickTestMethodService.updateMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES胶料快检实验方法-删除")
@Operation(summary = "MES胶料快检实验方法-通过id删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslRubberQuickTestMethodService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES胶料快检实验方法-批量删除")
@Operation(summary = "MES胶料快检实验方法-批量删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslRubberQuickTestMethodService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES胶料快检实验方法-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslRubberQuickTestMethod> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRubberQuickTestMethod entity = mesXslRubberQuickTestMethodService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES胶料快检实验方法-查询明细")
@GetMapping(value = "/queryLineListByMethodId")
public Result<List<MesXslRubberQuickTestMethodLine>> queryLineListByMethodId(
@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslRubberQuickTestMethodService.selectLinesByMethodId(id));
}
@Operation(summary = "MES胶料快检实验方法-下一编号")
@GetMapping(value = "/nextMethodCode")
public Result<String> nextMethodCode() {
MesXslRubberQuickTestMethod ctx = new MesXslRubberQuickTestMethod();
return Result.OK(mesXslRubberQuickTestMethodService.generateNextMethodCode(ctx));
}
@Operation(summary = "MES胶料快检实验方法-校验名称唯一")
@GetMapping(value = "/checkMethodName")
public Result<?> checkMethodName(
@RequestParam(name = "methodName") String methodName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(methodName) || methodName.trim().isEmpty()) {
return Result.OK();
}
MesXslRubberQuickTestMethod ctx = new MesXslRubberQuickTestMethod();
if (mesXslRubberQuickTestMethodService.isMethodNameDuplicated(methodName.trim(), dataId, ctx)) {
return Result.error("实验方法名称已存在");
}
return Result.OK();
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslRubberQuickTestMethod model) {
return super.exportXls(request, model, MesXslRubberQuickTestMethod.class, "MES胶料快检实验方法");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_method:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslRubberQuickTestMethod.class);
}
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
private String validateForSave(
MesXslRubberQuickTestMethod main, List<MesXslRubberQuickTestMethodLine> lineList, String excludeId) {
if (main == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(main.getMethodName())) {
return "实验方法名称不能为空";
}
main.setMethodName(main.getMethodName().trim());
if (mesXslRubberQuickTestMethodService.isMethodNameDuplicated(main.getMethodName(), excludeId, main)) {
return "实验方法名称已存在";
}
if (oConvertUtils.isEmpty(main.getQuickTestTypeId())) {
return "请选择实验类型";
}
MesXslRubberQuickTestType type = mesXslRubberQuickTestTypeService.getById(main.getQuickTestTypeId());
if (type == null || isDeleted(type.getDelFlag())) {
return "实验类型不存在或已删除";
}
main.setQuickTestTypeName(type.getTypeName());
if (lineList == null || lineList.isEmpty()) {
return "请通过「选择数据点」至少添加一条明细";
}
Set<String> pointIds = new HashSet<>();
int sort = 0;
for (int i = 0; i < lineList.size(); i++) {
MesXslRubberQuickTestMethodLine line = lineList.get(i);
if (line == null) {
continue;
}
int rowNo = i + 1;
if (oConvertUtils.isEmpty(line.getDataPointId())) {
return "" + rowNo + " 行未选择数据点";
}
String pointId = line.getDataPointId().trim();
if (!pointIds.add(pointId)) {
return "" + rowNo + " 行数据点与前面行重复,同一方法中数据点不能重复";
}
MesXslRubberQuickTestDataPoint point = mesXslRubberQuickTestDataPointService.getById(pointId);
if (point == null || isDeleted(point.getDelFlag())) {
return "" + rowNo + " 行数据点不存在或已删除";
}
if (!main.getQuickTestTypeId().equals(point.getQuickTestTypeId())) {
return "" + rowNo + " 行数据点的实验类型与主表实验类型不一致";
}
line.setDataPointId(pointId);
line.setPointName(point.getPointName());
line.setUnitType(point.getUnitType());
if (oConvertUtils.isEmpty(line.getTorqueUnitType())) {
return "" + rowNo + " 行请选择扭矩单位类型";
}
if (oConvertUtils.isEmpty(line.getTimeUnitType())) {
return "" + rowNo + " 行请选择时间单位类型";
}
if (oConvertUtils.isEmpty(line.getMooneyUnitType())) {
return "" + rowNo + " 行请选择门尼单位类型";
}
line.setSortNo(sort++);
}
if (pointIds.isEmpty()) {
return "请通过「选择数据点」至少添加一条明细";
}
return null;
}
private static boolean isDeleted(Integer delFlag) {
return delFlag != null && delFlag.equals(CommonConstant.DEL_FLAG_1);
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验方法保存校验与明细从数据点带出-----------
}

View File

@@ -0,0 +1,200 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.mes.material.entity.MesMaterial;
import org.jeecg.modules.mes.material.service.IMesMaterialService;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestRecord;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestRecordLine;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestType;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestRecordService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestTypeService;
import org.jeecg.modules.xslmes.vo.MesXslRubberQuickTestRecordBatchFromMaterialVO;
import org.jeecg.modules.xslmes.vo.MesXslRubberQuickTestRecordPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 胶料快检记录(主子表)
*/
@Tag(name = "MES胶料快检记录")
@RestController
@RequestMapping("/xslmes/mesXslRubberQuickTestRecord")
@Slf4j
public class MesXslRubberQuickTestRecordController
extends JeecgController<MesXslRubberQuickTestRecord, IMesXslRubberQuickTestRecordService> {
@Autowired
private IMesXslRubberQuickTestRecordService mesXslRubberQuickTestRecordService;
@Autowired
private IMesMaterialService mesMaterialService;
@Autowired
private IMesXslRubberQuickTestTypeService mesXslRubberQuickTestTypeService;
@Operation(summary = "MES胶料快检记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslRubberQuickTestRecord>> queryPageList(
MesXslRubberQuickTestRecord model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslRubberQuickTestRecord> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("inspect_time", "create_time");
Page<MesXslRubberQuickTestRecord> page = new Page<>(pageNo, pageSize);
IPage<MesXslRubberQuickTestRecord> pageList = mesXslRubberQuickTestRecordService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES胶料快检记录-添加")
@Operation(summary = "MES胶料快检记录-添加")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslRubberQuickTestRecordPage page) {
MesXslRubberQuickTestRecord main = new MesXslRubberQuickTestRecord();
BeanUtils.copyProperties(page, main);
String err = validateForSave(main, page.getLineList());
if (err != null) {
return Result.error(err);
}
try {
mesXslRubberQuickTestRecordService.saveMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("添加成功!");
}
@AutoLog(value = "MES胶料快检记录-编辑")
@Operation(summary = "MES胶料快检记录-编辑")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRubberQuickTestRecordPage page) {
MesXslRubberQuickTestRecord main = new MesXslRubberQuickTestRecord();
BeanUtils.copyProperties(page, main);
String err = validateForSave(main, page.getLineList());
if (err != null) {
return Result.error(err);
}
try {
mesXslRubberQuickTestRecordService.updateMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES胶料快检记录-从胶料批量生成")
@Operation(summary = "MES胶料快检记录-从胶料信息批量生成")
@RequiresPermissions("mes:mes_material:rubberQuickTestInspect")
@PostMapping(value = "/batchFromMaterial")
public Result<List<String>> batchFromMaterial(@RequestBody MesXslRubberQuickTestRecordBatchFromMaterialVO vo) {
try {
List<String> ids = mesXslRubberQuickTestRecordService.batchFromMaterial(vo);
return Result.OK("成功生成 " + ids.size() + " 条快检记录", ids);
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
}
@AutoLog(value = "MES胶料快检记录-删除")
@Operation(summary = "MES胶料快检记录-通过id删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslRubberQuickTestRecordService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES胶料快检记录-批量删除")
@Operation(summary = "MES胶料快检记录-批量删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslRubberQuickTestRecordService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES胶料快检记录-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslRubberQuickTestRecord> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRubberQuickTestRecord entity = mesXslRubberQuickTestRecordService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES胶料快检记录-查询明细")
@GetMapping(value = "/queryLineListByRecordId")
public Result<List<MesXslRubberQuickTestRecordLine>> queryLineListByRecordId(
@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslRubberQuickTestRecordService.selectLinesByRecordId(id));
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslRubberQuickTestRecord model) {
return super.exportXls(request, model, MesXslRubberQuickTestRecord.class, "MES胶料快检记录");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_record:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslRubberQuickTestRecord.class);
}
private String validateForSave(MesXslRubberQuickTestRecord main, List<MesXslRubberQuickTestRecordLine> lineList) {
if (main == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(main.getRubberMaterialId())) {
return "请选择胶料";
}
MesMaterial material = mesMaterialService.getById(main.getRubberMaterialId());
if (material == null) {
return "所选胶料不存在";
}
main.setRubberMaterialName(material.getMaterialName());
if (oConvertUtils.isNotEmpty(main.getQuickTestTypeId())) {
MesXslRubberQuickTestType type = mesXslRubberQuickTestTypeService.getById(main.getQuickTestTypeId());
if (type == null) {
return "所选检验类型不存在";
}
main.setQuickTestTypeName(type.getTypeName());
}
if (lineList == null || lineList.isEmpty()) {
return "请维护检验明细";
}
for (int i = 0; i < lineList.size(); i++) {
MesXslRubberQuickTestRecordLine line = lineList.get(i);
if (line == null || oConvertUtils.isEmpty(line.getInspectItem())) {
return "" + (i + 1) + " 行检验项目不能为空";
}
}
return null;
}
}

View File

@@ -0,0 +1,322 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.mes.material.entity.MesMaterial;
import org.jeecg.modules.mes.material.service.IMesMaterialService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.xslmes.common.XslMesBizConstants;
import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestMethod;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestMethodLine;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestStd;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestStdLine;
import org.jeecg.modules.xslmes.service.IMesXslMixerPsCompileService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestMethodService;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestStdService;
import org.jeecg.modules.xslmes.vo.MesXslRubberQuickTestStdPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 胶料快检实验标准(主子表)
*/
@Tag(name = "MES胶料快检实验标准")
@RestController
@RequestMapping("/xslmes/mesXslRubberQuickTestStd")
@Slf4j
public class MesXslRubberQuickTestStdController
extends JeecgController<MesXslRubberQuickTestStd, IMesXslRubberQuickTestStdService> {
private static final String ENABLE_IN_USE = "1";
private static final String ENABLE_STOPPED = "0";
@Autowired
private IMesXslRubberQuickTestStdService mesXslRubberQuickTestStdService;
@Autowired
private IMesXslRubberQuickTestMethodService mesXslRubberQuickTestMethodService;
@Autowired
private IMesMaterialService mesMaterialService;
@Autowired
private IMesXslMixerPsCompileService mesXslMixerPsCompileService;
@Autowired
private ISysDepartService sysDepartService;
@Operation(summary = "MES胶料快检实验标准-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslRubberQuickTestStd>> queryPageList(
MesXslRubberQuickTestStd model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslRubberQuickTestStd> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<MesXslRubberQuickTestStd> page = new Page<>(pageNo, pageSize);
IPage<MesXslRubberQuickTestStd> pageList = mesXslRubberQuickTestStdService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES胶料快检实验标准-添加")
@Operation(summary = "MES胶料快检实验标准-添加")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslRubberQuickTestStdPage page) {
MesXslRubberQuickTestStd main = new MesXslRubberQuickTestStd();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
String err = validateForSave(main, page.getLineList(), null);
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
try {
mesXslRubberQuickTestStdService.saveMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("添加成功!");
}
@AutoLog(value = "MES胶料快检实验标准-编辑")
@Operation(summary = "MES胶料快检实验标准-编辑")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRubberQuickTestStdPage page) {
MesXslRubberQuickTestStd main = new MesXslRubberQuickTestStd();
BeanUtils.copyProperties(page, main);
//update-begin---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
String err = validateForSave(main, page.getLineList(), main.getId());
if (err != null) {
return Result.error(err);
}
//update-end---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
try {
mesXslRubberQuickTestStdService.updateMain(main, page.getLineList());
} catch (Exception e) {
log.error(e.getMessage(), e);
return Result.error(e.getMessage());
}
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES胶料快检实验标准-删除")
@Operation(summary = "MES胶料快检实验标准-通过id删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslRubberQuickTestStdService.delMain(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES胶料快检实验标准-批量删除")
@Operation(summary = "MES胶料快检实验标准-批量删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslRubberQuickTestStdService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES胶料快检实验标准-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslRubberQuickTestStd> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRubberQuickTestStd entity = mesXslRubberQuickTestStdService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "MES胶料快检实验标准-查询明细")
@GetMapping(value = "/queryLineListByStdId")
public Result<List<MesXslRubberQuickTestStdLine>> queryLineListByStdId(
@RequestParam(name = "id", required = true) String id) {
return Result.OK(mesXslRubberQuickTestStdService.selectLinesByStdId(id));
}
@AutoLog(value = "MES胶料快检实验标准-启用/停用")
@Operation(summary = "MES胶料快检实验标准-启用/停用(字典 xslmes_rubber_quick_test_std_enable_status1使用中 0已停用")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:updateStatus")
@PostMapping(value = "/updateStatus")
public Result<String> updateStatus(
@RequestParam(name = "id", required = true) String id,
@RequestParam(name = "enableStatus", required = true) String enableStatus) {
if (enableStatus != null) {
enableStatus = enableStatus.trim();
}
if (!ENABLE_IN_USE.equals(enableStatus) && !ENABLE_STOPPED.equals(enableStatus)) {
return Result.error("启用状态参数非法");
}
boolean updated = mesXslRubberQuickTestStdService.lambdaUpdate()
.eq(MesXslRubberQuickTestStd::getId, id)
.set(MesXslRubberQuickTestStd::getEnableStatus, enableStatus)
.update();
if (updated) {
return Result.OK("操作成功");
}
MesXslRubberQuickTestStd cur = mesXslRubberQuickTestStdService.getById(id);
if (cur != null && java.util.Objects.equals(enableStatus, cur.getEnableStatus())) {
return Result.OK("操作成功");
}
return Result.error("操作失败,请确认记录存在");
}
@Operation(summary = "MES胶料快检实验标准-校验名称唯一")
@GetMapping(value = "/checkStdName")
public Result<?> checkStdName(
@RequestParam(name = "stdName") String stdName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(stdName) || stdName.trim().isEmpty()) {
return Result.OK();
}
MesXslRubberQuickTestStd ctx = new MesXslRubberQuickTestStd();
if (mesXslRubberQuickTestStdService.isStdNameDuplicated(stdName.trim(), dataId, ctx)) {
return Result.error("实验标准名称已存在");
}
return Result.OK();
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslRubberQuickTestStd model) {
return super.exportXls(request, model, MesXslRubberQuickTestStd.class, "MES胶料快检实验标准");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_std:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MesXslRubberQuickTestStd.class);
}
//update-begin---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
private String validateForSave(
MesXslRubberQuickTestStd main, List<MesXslRubberQuickTestStdLine> lineList, String excludeId) {
if (main == null) {
return "参数不能为空";
}
if (oConvertUtils.isEmpty(main.getStdName())) {
return "实验标准名称不能为空";
}
main.setStdName(main.getStdName().trim());
if (mesXslRubberQuickTestStdService.isStdNameDuplicated(main.getStdName(), excludeId, main)) {
return "实验标准名称已存在";
}
if (oConvertUtils.isEmpty(main.getTestMethodId())) {
return "请选择实验方法";
}
MesXslRubberQuickTestMethod method = mesXslRubberQuickTestMethodService.getById(main.getTestMethodId());
if (method == null || isDeleted(method.getDelFlag())) {
return "实验方法不存在或已删除";
}
main.setTestMethodName(method.getMethodName());
if (oConvertUtils.isNotEmpty(main.getRubberMaterialId())) {
MesMaterial material = mesMaterialService.getById(main.getRubberMaterialId());
if (material == null) {
return "所选胶料不存在";
}
main.setRubberMaterialName(material.getMaterialName());
}
if (oConvertUtils.isNotEmpty(main.getPsCompileId())) {
MesXslMixerPsCompile ps = mesXslMixerPsCompileService.getById(main.getPsCompileId());
if (ps == null) {
return "所选密炼PS不存在";
}
if (!XslMesBizConstants.PS_TYPE_RAW_INSPECT_STD.equals(ps.getPsType())) {
return "发行编号须选择类型为原材料检验标准的密炼PS";
}
main.setIssueNumber(ps.getPsCode());
if (main.getIssueDate() == null && ps.getIssueDate() != null) {
main.setIssueDate(ps.getIssueDate());
}
}
if (oConvertUtils.isNotEmpty(main.getIssueDeptId())) {
SysDepart depart = sysDepartService.getById(main.getIssueDeptId());
if (depart != null) {
main.setIssueDeptName(depart.getDepartName());
}
}
List<MesXslRubberQuickTestMethodLine> methodLines =
mesXslRubberQuickTestMethodService.selectLinesByMethodId(main.getTestMethodId());
if (methodLines == null || methodLines.isEmpty()) {
return "所选实验方法未维护数据点明细,请先在实验方法中配置数据点";
}
if (lineList == null || lineList.isEmpty()) {
return "请保存与实验方法一致的数据点明细";
}
Map<String, MesXslRubberQuickTestMethodLine> methodLineByPointId = new HashMap<>();
for (MesXslRubberQuickTestMethodLine ml : methodLines) {
if (ml != null && oConvertUtils.isNotEmpty(ml.getDataPointId())) {
methodLineByPointId.put(ml.getDataPointId().trim(), ml);
}
}
Set<String> submittedPointIds = new HashSet<>();
int sort = 0;
for (int i = 0; i < lineList.size(); i++) {
MesXslRubberQuickTestStdLine line = lineList.get(i);
if (line == null) {
continue;
}
int rowNo = i + 1;
if (oConvertUtils.isEmpty(line.getDataPointId())) {
return "" + rowNo + " 行未关联数据点";
}
String pointId = line.getDataPointId().trim();
if (!submittedPointIds.add(pointId)) {
return "" + rowNo + " 行数据点重复";
}
MesXslRubberQuickTestMethodLine methodLine = methodLineByPointId.get(pointId);
if (methodLine == null) {
return "" + rowNo + " 行数据点不属于所选实验方法,请重新选择实验方法后保存";
}
line.setDataPointId(pointId);
line.setPointName(methodLine.getPointName());
line.setSortNo(sort++);
}
if (submittedPointIds.size() != methodLineByPointId.size()) {
return "明细须包含实验方法中的全部数据点,且不可新增或删除数据点";
}
return null;
}
private static boolean isDeleted(Integer delFlag) {
return delFlag != null && delFlag.equals(CommonConstant.DEL_FLAG_1);
}
//update-end---author:jiangxh ---date:20260525 for【MES】胶料快检实验标准保存校验与明细从实验方法带出-----------
}

View File

@@ -0,0 +1,235 @@
package org.jeecg.modules.xslmes.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.xslmes.entity.MesXslRubberQuickTestType;
import org.jeecg.modules.xslmes.service.IMesXslRubberQuickTestTypeService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
/**
* MES 胶料快检实验类型
*/
@Tag(name = "MES胶料快检实验类型")
@RestController
@RequestMapping("/xslmes/mesXslRubberQuickTestType")
@Slf4j
public class MesXslRubberQuickTestTypeController
extends JeecgController<MesXslRubberQuickTestType, IMesXslRubberQuickTestTypeService> {
@Autowired
private IMesXslRubberQuickTestTypeService mesXslRubberQuickTestTypeService;
@Operation(summary = "MES胶料快检实验类型-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MesXslRubberQuickTestType>> queryPageList(
MesXslRubberQuickTestType model,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MesXslRubberQuickTestType> queryWrapper =
QueryGenerator.initQueryWrapper(model, req.getParameterMap());
Page<MesXslRubberQuickTestType> page = new Page<>(pageNo, pageSize);
IPage<MesXslRubberQuickTestType> pageList = mesXslRubberQuickTestTypeService.page(page, queryWrapper);
return Result.OK(pageList);
}
@AutoLog(value = "MES胶料快检实验类型-添加")
@Operation(summary = "MES胶料快检实验类型-添加")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MesXslRubberQuickTestType model) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型新增校验与自动编号-----------
if (oConvertUtils.isEmpty(model.getTypeName()) || model.getTypeName().trim().isEmpty()) {
return Result.error("实验类型名称不能为空");
}
model.setTypeName(model.getTypeName().trim());
if (mesXslRubberQuickTestTypeService.isTypeNameDuplicated(model.getTypeName(), null, model)) {
return Result.error("实验类型名称已存在");
}
model.setTypeCode(null);
try {
mesXslRubberQuickTestTypeService.save(model);
} catch (JeecgBootException e) {
return Result.error(e.getMessage());
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型新增校验与自动编号-----------
return Result.OK("添加成功!");
}
@AutoLog(value = "MES胶料快检实验类型-编辑")
@Operation(summary = "MES胶料快检实验类型-编辑")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody MesXslRubberQuickTestType model) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型编辑仅改名称、编号只读-----------
if (oConvertUtils.isEmpty(model.getId())) {
return Result.error("缺少主键");
}
if (oConvertUtils.isEmpty(model.getTypeName()) || model.getTypeName().trim().isEmpty()) {
return Result.error("实验类型名称不能为空");
}
model.setTypeName(model.getTypeName().trim());
if (mesXslRubberQuickTestTypeService.isTypeNameDuplicated(model.getTypeName(), model.getId(), model)) {
return Result.error("实验类型名称已存在");
}
MesXslRubberQuickTestType old = mesXslRubberQuickTestTypeService.getById(model.getId());
if (old == null) {
return Result.error("未找到对应数据");
}
old.setTypeName(model.getTypeName());
try {
mesXslRubberQuickTestTypeService.updateById(old);
} catch (JeecgBootException e) {
return Result.error(e.getMessage());
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型编辑仅改名称、编号只读-----------
return Result.OK("编辑成功!");
}
@AutoLog(value = "MES胶料快检实验类型-删除")
@Operation(summary = "MES胶料快检实验类型-通过id删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
mesXslRubberQuickTestTypeService.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "MES胶料快检实验类型-批量删除")
@Operation(summary = "MES胶料快检实验类型-批量删除")
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
mesXslRubberQuickTestTypeService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@Operation(summary = "MES胶料快检实验类型-通过id查询")
@GetMapping(value = "/queryById")
public Result<MesXslRubberQuickTestType> queryById(@RequestParam(name = "id", required = true) String id) {
MesXslRubberQuickTestType entity = mesXslRubberQuickTestTypeService.getById(id);
if (entity == null) {
return Result.error("未找到对应数据");
}
return Result.OK(entity);
}
@Operation(summary = "预览下一实验类型编号001起")
@GetMapping(value = "/nextTypeCode")
public Result<String> nextTypeCode() {
MesXslRubberQuickTestType ctx = new MesXslRubberQuickTestType();
return Result.OK(mesXslRubberQuickTestTypeService.generateNextTypeCode(ctx));
}
@Operation(summary = "校验实验类型名称是否重复")
@GetMapping(value = "/checkTypeName")
public Result<String> checkTypeName(
@RequestParam(name = "typeName", required = true) String typeName,
@RequestParam(name = "dataId", required = false) String dataId) {
if (oConvertUtils.isEmpty(typeName) || typeName.trim().isEmpty()) {
return Result.OK("该值可用!");
}
MesXslRubberQuickTestType ctx = new MesXslRubberQuickTestType();
if (mesXslRubberQuickTestTypeService.isTypeNameDuplicated(typeName.trim(), dataId, ctx)) {
return Result.error("该实验类型名称已存在");
}
return Result.OK("该值可用!");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MesXslRubberQuickTestType model) {
return super.exportXls(request, model, MesXslRubberQuickTestType.class, "MES胶料快检实验类型");
}
@RequiresPermissions("mes:mes_xsl_rubber_quick_test_type:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
//update-begin---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型导入名称必填且不重复编号可空则自动生成-----------
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> ent : fileMap.entrySet()) {
MultipartFile file = ent.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<MesXslRubberQuickTestType> list =
ExcelImportUtil.importExcel(file.getInputStream(), MesXslRubberQuickTestType.class, params);
if (list == null) {
list = List.of();
}
Set<String> namesInFile = new HashSet<>();
for (int i = 0; i < list.size(); i++) {
MesXslRubberQuickTestType row = list.get(i);
int rowNo = i + 1;
if (row == null) {
return Result.error("文件导入失败:第 " + rowNo + " 条数据无效(空行)");
}
if (oConvertUtils.isEmpty(row.getTypeName()) || row.getTypeName().trim().isEmpty()) {
return Result.error("文件导入失败:第 " + rowNo + " 条实验类型名称不能为空");
}
row.setTypeName(row.getTypeName().trim());
if (!namesInFile.add(row.getTypeName())) {
return Result.error("文件导入失败:实验类型名称【" + row.getTypeName() + "】在导入文件中重复");
}
if (mesXslRubberQuickTestTypeService.isTypeNameDuplicated(row.getTypeName(), null, row)) {
return Result.error("文件导入失败:第 " + rowNo + " 条实验类型名称【" + row.getTypeName() + "】已存在");
}
if (oConvertUtils.isNotEmpty(row.getTypeCode())) {
row.setTypeCode(row.getTypeCode().trim());
} else {
row.setTypeCode(null);
}
}
for (MesXslRubberQuickTestType row : list) {
try {
mesXslRubberQuickTestTypeService.save(row);
} catch (JeecgBootException e) {
return Result.error("文件导入失败:" + e.getMessage());
}
}
log.info("胶料快检实验类型Excel导入完成行数={}", list.size());
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
String msg = e.getMessage();
log.error(msg, e);
return Result.error("文件导入失败:" + e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
//update-end---author:jiangxh ---date:20260522 for【MES】胶料快检实验类型导入名称必填且不重复编号可空则自动生成-----------
return Result.error("文件导入失败!");
}
}

View File

@@ -0,0 +1,90 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 日罐物料对应信息
*/
@Data
@TableName("mes_xsl_day_tank_material_map")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES日罐物料对应信息")
public class MesXslDayTankMaterialMap implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "机台名称", width = 20, dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Dict(dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Schema(description = "设备台账ID")
private String equipmentId;
@Excel(name = "机台代码", width = 20)
@Schema(description = "机台代码(设备编号冗余)")
private String machineCode;
@Excel(name = "机台名称", width = 20)
@Schema(description = "机台名称冗余")
private String machineName;
@Excel(name = "料仓分类", width = 20, dictTable = "sys_category", dicText = "name", dicCode = "id")
@Dict(dictTable = "sys_category", dicText = "name", dicCode = "id")
@Schema(description = "料仓分类ID分类字典")
private String siloCategoryId;
@Excel(name = "工位", width = 20)
@Schema(description = "工位")
private String station;
@Excel(name = "料仓号", width = 20)
@Schema(description = "料仓号")
private String siloNo;
@Excel(name = "物料名称", width = 20, dictTable = "mes_material", dicText = "material_name", dicCode = "id")
@Dict(dictTable = "mes_material", dicText = "material_name", dicCode = "id")
@Schema(description = "胶料信息ID")
private String materialId;
@Excel(name = "物料名称", width = 20)
@Schema(description = "物料名称冗余")
private String materialName;
@Excel(name = "使用状态", width = 12, replace = {"使用中_1", "停用_0"})
@Schema(description = "使用状态1使用中 0停用")
private Integer useStatus;
@Excel(name = "是否允许同步", width = 12, replace = {"允许_1", "不允许_0"})
@Schema(description = "是否允许同步1允许 0不允许")
private Integer allowSync;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,65 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 设备点检配置主表(表 mes_xsl_equip_inspect_config
*/
@Data
@TableName("mes_xsl_equip_inspect_config")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES设备点检配置")
public class MesXslEquipInspectConfig implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "设备台账主键 mes_xsl_equipment_ledger.id")
private String equipmentLedgerId;
@Excel(name = "设备名称", width = 22)
@Schema(description = "设备名称冗余")
private String equipmentName;
@Excel(name = "设备编号", width = 18)
@Schema(description = "设备编号冗余")
private String equipmentCode;
@Excel(name = "类型", width = 12, dicCode = "xslmes_im_item_category")
@Dict(dicCode = "xslmes_im_item_category")
@Schema(description = "配置类型字典xslmes_im_item_categoryinspect点检/maintain保养同设备同类型唯一")
private String configType;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
@TableField(exist = false)
@Schema(description = "点检项目明细")
private List<MesXslEquipInspectConfigLine> lineList;
}

View File

@@ -0,0 +1,73 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 设备点检配置明细(表 mes_xsl_equip_inspect_config_line
*/
@Data
@TableName("mes_xsl_equip_inspect_config_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES设备点检配置明细")
public class MesXslEquipInspectConfigLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表主键 mes_xsl_equip_inspect_config.id")
private String configId;
@Schema(description = "点检及保养项目主键 mes_xsl_inspect_maintain_item.id")
private String inspectMaintainItemId;
@Schema(description = "点检项目编号冗余")
private String itemCode;
@Schema(description = "项目名称冗余")
private String itemName;
@Dict(dicCode = "xslmes_im_item_category")
@Schema(description = "项目类别冗余")
private String itemCategory;
@Dict(dicCode = "xslmes_im_item_type")
@Schema(description = "项目类型冗余")
private String itemType;
@Schema(description = "设备部位名称冗余")
private String equipmentPartName;
@Schema(description = "设备小部位名称冗余")
private String equipmentSubPartName;
@Dict(dicCode = "xslmes_im_inspect_method")
@Schema(description = "点检方式冗余")
private String inspectMethod;
@Schema(description = "判断基准冗余")
private String judgmentCriteria;
private Integer sortNo;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,126 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 点检/保养记录主表(表 mes_xsl_equip_inspect_record
*/
@Data
@TableName("mes_xsl_equip_inspect_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES点检保养记录")
public class MesXslEquipInspectRecord implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "记录编号", width = 20)
@Schema(description = "记录编号 EC+yyyyMMdd+4位流水")
private String recordNo;
@Excel(name = "计划单号", width = 18)
@Schema(description = "计划单号")
private String planNo;
@Schema(description = "计划主键")
private String planId;
@Schema(description = "设备台账主键")
private String equipmentLedgerId;
@Excel(name = "设备编码", width = 16)
@Schema(description = "设备编码冗余")
private String equipmentCode;
@Excel(name = "设备名称", width = 20)
@Schema(description = "设备名称冗余")
private String equipmentName;
@Schema(description = "设备点检配置主键")
private String equipInspectConfigId;
@Excel(name = "类型", width = 10, dicCode = "xslmes_im_item_category")
@Dict(dicCode = "xslmes_im_item_category")
@Schema(description = "点检/保养类型")
private String recordType;
@Excel(name = "点检日期", width = 12, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "点检日期")
private Date inspectDate;
@Schema(description = "点检人用户ID")
private String inspectorUserId;
@Schema(description = "点检人账号")
private String inspectorUsername;
@Excel(name = "点检人", width = 12)
@Schema(description = "点检人姓名")
private String inspectorRealname;
@Excel(name = "点检结果", width = 10, dicCode = "xslmes_im_inspect_result")
@Dict(dicCode = "xslmes_im_inspect_result")
@Schema(description = "点检结果 pass/fail")
private String inspectResult;
@Excel(name = "状态", width = 10, dicCode = "xslmes_im_record_status")
@Dict(dicCode = "xslmes_im_record_status")
@Schema(description = "记录状态 pending/done")
private String recordStatus;
@Excel(name = "是否已处理", width = 10, dicCode = "yn")
@Dict(dicCode = "yn")
@Schema(description = "是否已处理字典yn1是0否不合格记录使用")
private String handledFlag;
@Schema(description = "处理人用户ID")
private String handlerUserId;
@Schema(description = "处理人账号")
private String handlerUsername;
@Excel(name = "处理人", width = 12)
@Schema(description = "处理人姓名")
private String handlerRealname;
@Excel(name = "处理时间", width = 18, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "处理时间")
private Date handleTime;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
@TableField(exist = false)
@Schema(description = "点检明细")
private List<MesXslEquipInspectRecordLine> lineList;
}

View File

@@ -0,0 +1,82 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 点检/保养记录明细(表 mes_xsl_equip_inspect_record_line
*/
@Data
@TableName("mes_xsl_equip_inspect_record_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES点检保养记录明细")
public class MesXslEquipInspectRecordLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表主键")
private String recordId;
@Schema(description = "设备点检配置明细主键")
private String equipInspectConfigLineId;
@Schema(description = "点检及保养项目主键冗余")
private String inspectMaintainItemId;
@Schema(description = "点检项目编号")
private String itemCode;
@Schema(description = "项目名称")
private String itemName;
@Dict(dicCode = "xslmes_im_item_category")
@Schema(description = "项目类别")
private String itemCategory;
@Dict(dicCode = "xslmes_im_item_type")
@Schema(description = "项目类型")
private String itemType;
@Schema(description = "设备部位")
private String equipmentPartName;
@Schema(description = "设备小部位")
private String equipmentSubPartName;
@Dict(dicCode = "xslmes_im_inspect_method")
@Schema(description = "点检方式")
private String inspectMethod;
@Schema(description = "判断基准")
private String judgmentCriteria;
@Schema(description = "明细点检结果文本")
private String lineInspectResult;
@Schema(description = "图片路径,逗号分隔")
private String pictureFiles;
private Integer sortNo;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,168 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 设备台账(表 mes_xsl_equipment_ledger
*/
@Data
@TableName("mes_xsl_equipment_ledger")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES设备台账")
public class MesXslEquipmentLedger implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "所属工序主键")
private String processOperationId;
@Excel(name = "工序名称", width = 20)
@Schema(description = "工序名称冗余")
private String processOperationName;
@Excel(name = "设备名称", width = 22)
@Schema(description = "设备名称(同租户未删除数据中唯一)")
private String equipmentName;
@Excel(name = "设备编号", width = 18)
@Schema(description = "设备编号(同租户未删除数据中唯一)")
private String equipmentCode;
@Schema(description = "所属设备厂家主键")
private String manufacturerId;
@Excel(name = "设备厂家", width = 20)
@Schema(description = "设备厂家名称冗余")
private String manufacturerName;
@Schema(description = "设备类别主键")
private String equipmentCategoryId;
@Excel(name = "设备类别", width = 16)
@Schema(description = "设备类别名称冗余")
private String equipmentCategoryName;
@Schema(description = "设备类型主键")
private String equipmentTypeId;
@Excel(name = "设备类型", width = 16)
@Schema(description = "设备类型名称冗余")
private String equipmentTypeName;
@Schema(description = "所属工厂主键(厂家信息)")
private String factoryId;
@Excel(name = "所属工厂", width = 20)
@Schema(description = "所属工厂名称冗余")
private String factoryName;
@Excel(name = "设备型号", width = 16)
@Schema(description = "设备型号")
private String equipmentModel;
@Excel(name = "设备状态", width = 12, dicCode = "xslmes_equipment_ledger_status")
@Dict(dicCode = "xslmes_equipment_ledger_status")
@Schema(description = "设备状态(字典:在用/停用/报废)")
private String equipmentStatus;
@Excel(name = "序列号", width = 18)
@Schema(description = "序列号")
private String serialNo;
@Excel(name = "铭牌", width = 18)
@Schema(description = "铭牌")
private String nameplate;
@Excel(name = "维修部门", width = 16, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "维修部门主键")
private String maintainDeptId;
@Excel(name = "维修人员", width = 12)
@Schema(description = "维修人员")
private String maintainPerson;
@Excel(name = "主管部门", width = 16, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "主管部门主键")
private String manageDeptId;
@Excel(name = "资料文件编号", width = 18)
@Schema(description = "资料文件编号")
private String docFileNo;
@Excel(name = "生产日期", width = 14, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "生产日期")
private Date productionDate;
@Excel(name = "购买日期", width = 14, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "购买日期")
private Date purchaseDate;
@Excel(name = "使用日期", width = 14, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "使用日期")
private Date useDate;
@Excel(name = "厂商联系人", width = 14)
@Schema(description = "厂商联系人")
private String vendorContact;
@Excel(name = "价值", width = 14)
@Schema(description = "价值")
private String assetValue;
@Excel(name = "受控PDA", width = 14)
@Schema(description = "受控PDA")
private String controlledPda;
@Excel(name = "超产比率", width = 12)
@Schema(description = "超产比率")
private String overproductionRatio;
@Excel(name = "有效体积", width = 12)
@Schema(description = "有效体积")
private String effectiveVolume;
@Excel(name = "是否启用", width = 10, dicCode = "yn")
@Dict(dicCode = "yn")
@Schema(description = "是否启用字典yn1是0否")
private String enabledFlag;
@Excel(name = "设备描述", width = 30)
@Schema(description = "设备描述")
private String equipmentDesc;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,220 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 配合示方
*/
@Data
@TableName("mes_xsl_formula_spec")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES配合示方")
public class MesXslFormulaSpec implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "分类", width = 10, dicCode = "xslmes_formula_spec_category")
@Dict(dicCode = "xslmes_formula_spec_category")
@Schema(description = "分类")
private String category;
@Excel(name = "示方编号", width = 18)
@Schema(description = "示方编号")
private String specCode;
@Excel(name = "胶料代号", width = 18)
@Schema(description = "胶料代号")
private String rubberCode;
@Schema(description = "胶料ID关联mes_material.id")
private String rubberMaterialId;
@Excel(name = "基本配合", width = 15)
@Schema(description = "基本配合")
private String basicFormula;
@Excel(name = "发行日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "发行日期")
private Date issueDate;
@Excel(name = "用途", width = 20)
@Schema(description = "用途")
private String purpose;
@Excel(name = "发行编号", width = 15)
@Schema(description = "发行编号")
private String issueNumber;
@Excel(name = "混合段数", width = 10)
@Schema(description = "混合段数")
private Integer mixingStages;
@Excel(name = "混合机器", width = 15)
@Schema(description = "混合机器")
private String mixingMachine;
@Schema(description = "发行部门ID")
private String issueDeptId;
@Excel(name = "发行部门", width = 15)
@Schema(description = "发行部门名称")
private String issueDeptName;
@Excel(name = "A胶TOTAL PHR", width = 14)
@Schema(description = "A胶TOTAL PHR")
private BigDecimal aRubberTotalPhr;
@Excel(name = "TOTAL PHR", width = 12)
@Schema(description = "TOTAL PHR")
private BigDecimal totalPhr;
//update-begin---author:jiangxh ---date:20260521 for【配合示方】主表新增混合段1-7合计字段-----------
@Excel(name = "混合段1合计", width = 12)
@Schema(description = "混合段1合计")
private BigDecimal stage1Total;
@Excel(name = "混合段2合计", width = 12)
@Schema(description = "混合段2合计")
private BigDecimal stage2Total;
@Excel(name = "混合段3合计", width = 12)
@Schema(description = "混合段3合计")
private BigDecimal stage3Total;
@Excel(name = "混合段4合计", width = 12)
@Schema(description = "混合段4合计")
private BigDecimal stage4Total;
@Excel(name = "混合段5合计", width = 12)
@Schema(description = "混合段5合计")
private BigDecimal stage5Total;
@Excel(name = "混合段6合计", width = 12)
@Schema(description = "混合段6合计")
private BigDecimal stage6Total;
@Excel(name = "混合段7合计", width = 12)
@Schema(description = "混合段7合计")
private BigDecimal stage7Total;
//update-end---author:jiangxh ---date:20260521 for【配合示方】主表新增混合段1-7合计字段-----------
@Excel(name = "发行理由", width = 30)
@Schema(description = "发行理由")
private String issueReason;
@Excel(name = "天然橡胶", width = 12)
@Schema(description = "天然橡胶")
private BigDecimal naturalRubber;
@Excel(name = "合成橡胶", width = 12)
@Schema(description = "合成橡胶")
private BigDecimal syntheticRubber;
@Excel(name = "合计", width = 12)
@Schema(description = "合计")
private BigDecimal totalAmount;
@Excel(name = "重量单价", width = 12)
@Schema(description = "重量单价")
private BigDecimal weightUnitPrice;
@Excel(name = "体积单价", width = 12)
@Schema(description = "体积单价")
private BigDecimal volumeUnitPrice;
@Excel(name = "Q胶比重", width = 12)
@Schema(description = "Q胶比重")
@TableField("q_rubber_sg")
private BigDecimal qRubberSg;
@Excel(name = "A胶比重", width = 12)
@Schema(description = "A胶比重")
@TableField("a_rubber_sg")
private BigDecimal aRubberSg;
@Excel(name = "人工配料", width = 10, replace = {"是_1", "否_0"})
@Schema(description = "是否有人工配料0否 1是")
private Integer hasManualBatch;
@Excel(name = "状态", width = 12, dicCode = "xslmes_formula_spec_status")
@Dict(dicCode = "xslmes_formula_spec_status")
@Schema(description = "状态")
private String status;
@Excel(name = "校对人", width = 12)
@Schema(description = "校对人")
private String proofreadBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "校对时间")
private Date proofreadTime;
@Excel(name = "审核人", width = 12)
@Schema(description = "审核人")
private String auditBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "审核时间")
private Date auditTime;
@Excel(name = "批准人", width = 12)
@Schema(description = "批准人")
private String approveBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "批准时间")
private Date approveTime;
@Excel(name = "创建人", width = 12, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
private String createBy;
/** queryById 等非分页接口补充创建人姓名DictAspect 仅翻译分页列表) */
@TableField(exist = false)
@Schema(description = "创建人姓名")
private String createBy_dictText;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "租户ID")
private Integer tenantId;
private String sysOrgCode;
private Integer delFlag;
@TableField(exist = false)
@Schema(description = "配合明细")
private List<MesXslFormulaSpecLine> lineList;
}

View File

@@ -0,0 +1,79 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 配方示方修改日志(配合示方/混炼示方)
*/
@Data
@TableName("mes_xsl_formula_spec_edit_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "配方示方修改日志")
public class MesXslFormulaSpecEditLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
@Excel(name = "示方分类", width = 12, dicCode = "xslmes_formula_spec_edit_log_type")
@Dict(dicCode = "xslmes_formula_spec_edit_log_type")
@Schema(description = "示方分类 formula=配合示方 mixing=混炼示方")
private String specType;
@Schema(description = "示方主表ID")
private String specId;
@Excel(name = "示方标识", width = 22)
@Schema(description = "示方标识(胶料代号/规格名)")
private String specTitle;
@Excel(name = "发行编号", width = 16)
@Schema(description = "发行编号")
private String issueNumber;
@Excel(name = "操作类型", width = 10, dicCode = "xslmes_formula_spec_edit_log_action")
@Dict(dicCode = "xslmes_formula_spec_edit_log_action")
@Schema(description = "操作类型 create=新增 update=修改 delete=删除")
private String actionType;
@Excel(name = "修改内容", width = 50)
@Schema(description = "修改内容摘要")
private String changeSummary;
@Schema(description = "变更前快照JSON")
private String beforeSnapshot;
@Schema(description = "变更后快照JSON")
private String afterSnapshot;
@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "修改时间")
private Date modifyTime;
@Schema(description = "修改人账号")
private String modifyBy;
@Excel(name = "修改人", width = 14)
@Schema(description = "修改人姓名")
private String modifyByName;
@Schema(description = "租户ID")
private Integer tenantId;
}

View File

@@ -0,0 +1,105 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 配合示方明细
*/
@Data
@TableName("mes_xsl_formula_spec_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES配合示方明细")
public class MesXslFormulaSpecLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "配合示方主表ID")
private String formulaSpecId;
@Schema(description = "行序号")
private Integer sortNo;
@Schema(description = "PHR")
private BigDecimal phr;
@Schema(description = "密炼物料ID")
private String mixerMaterialId;
@Schema(description = "密炼物料编码")
private String mixerMaterialCode;
@Schema(description = "密炼物料名称")
private String mixerMaterialName;
@Schema(description = "物料描述")
private String materialDesc;
@Dict(dicCode = "xslmes_formula_spec_step")
@Schema(description = "STEP")
private String step;
@Dict(dicCode = "xslmes_formula_spec_weigh_mode")
@Schema(description = "称量方式")
private String weighMode;
@Schema(description = "重量%")
private BigDecimal weightPercent;
@Schema(description = "体积")
private BigDecimal volume;
@Schema(description = "备注")
private String remark;
@Schema(description = "混合段1")
private BigDecimal stage1;
@Schema(description = "混合段2")
private BigDecimal stage2;
@Schema(description = "混合段3")
private BigDecimal stage3;
@Schema(description = "混合段4")
private BigDecimal stage4;
@Schema(description = "混合段5")
private BigDecimal stage5;
@Schema(description = "混合段6")
private BigDecimal stage6;
@Schema(description = "混合段7")
private BigDecimal stage7;
@Schema(description = "租户ID")
private Integer tenantId;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,48 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 配合示方模块配置
*/
@Data
@TableName("mes_xsl_formula_spec_setting")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "配合示方模块配置")
public class MesXslFormulaSpecSetting implements Serializable {
private static final long serialVersionUID = 1L;
public static final String DEFAULT_ID = "1993000000000000991";
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "天然橡胶物料小类ID逗号分隔")
private String naturalMinorCategoryIds;
@Schema(description = "合成橡胶物料小类ID逗号分隔")
private String syntheticMinorCategoryIds;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,102 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 点检及保养项目(表 mes_xsl_inspect_maintain_item
*/
@Data
@TableName("mes_xsl_inspect_maintain_item")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES点检及保养项目")
public class MesXslInspectMaintainItem implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "项目名称", width = 22)
@Schema(description = "项目名称(同租户未删除数据中唯一)")
private String itemName;
@Excel(name = "项目编号", width = 18)
@Schema(description = "项目编号(同租户未删除数据中唯一)")
private String itemCode;
@Schema(description = "设备类别主键 mes_xsl_equipment_category.id")
private String equipmentCategoryId;
@Excel(name = "设备类别", width = 20)
@Schema(description = "设备类别名称冗余")
private String equipmentCategoryName;
@Schema(description = "设备类型主键 mes_xsl_equipment_type.id")
private String equipmentTypeId;
@Excel(name = "设备类型", width = 20)
@Schema(description = "设备类型名称冗余")
private String equipmentTypeName;
@Schema(description = "设备部位主键 mes_xsl_equipment_part.id")
private String equipmentPartId;
@Excel(name = "设备部位", width = 20)
@Schema(description = "设备部位名称冗余")
private String equipmentPartName;
@Schema(description = "设备小部位主键 mes_xsl_equipment_sub_part.id")
private String equipmentSubPartId;
@Excel(name = "设备小部位", width = 20)
@Schema(description = "设备小部位名称冗余")
private String equipmentSubPartName;
@Excel(name = "项目类别", width = 12, dicCode = "xslmes_im_item_category")
@Dict(dicCode = "xslmes_im_item_category")
@Schema(description = "项目类别字典xslmes_im_item_categoryinspect点检/maintain保养")
private String itemCategory;
@Excel(name = "项目类型", width = 12, dicCode = "xslmes_im_item_type")
@Dict(dicCode = "xslmes_im_item_type")
@Schema(description = "项目类型字典xslmes_im_item_typemechanical机械类/electrical电气类")
private String itemType;
@Excel(name = "点检方式", width = 12, dicCode = "xslmes_im_inspect_method")
@Dict(dicCode = "xslmes_im_inspect_method")
@Schema(description = "点检方式字典xslmes_im_inspect_methodvisual视觉/sight目测/hearing听觉")
private String inspectMethod;
@Excel(name = "判断基准", width = 28)
@Schema(description = "判断基准")
private String judgmentCriteria;
@Excel(name = "保养周期(天)", width = 14)
@Schema(description = "保养周期(天)")
private Integer maintainCycleDays;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,68 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 密炼机动作维护
*/
@Data
@TableName("mes_xsl_mixer_action")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES密炼机动作维护")
public class MesXslMixerAction implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "设备名称", width = 20, dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Dict(dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Schema(description = "设备台账ID")
private String equipmentId;
@Excel(name = "设备名称", width = 20)
@Schema(description = "设备名称冗余")
private String equipmentName;
@Excel(name = "动作名称", width = 20)
@Schema(description = "动作名称")
private String actionName;
@Excel(name = "动作代号", width = 20)
@Schema(description = "动作代号")
private String actionCode;
@Excel(name = "备注", width = 30)
@Schema(description = "备注")
private String remark;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,68 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 密炼机条件维护
*/
@Data
@TableName("mes_xsl_mixer_condition")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES密炼机条件维护")
public class MesXslMixerCondition implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "设备名称", width = 20, dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Dict(dictTable = "mes_xsl_equipment_ledger", dicText = "equipment_name", dicCode = "id")
@Schema(description = "设备台账ID")
private String equipmentId;
@Excel(name = "设备名称", width = 20)
@Schema(description = "设备名称冗余")
private String equipmentName;
@Excel(name = "条件名称", width = 20)
@Schema(description = "条件名称")
private String conditionName;
@Excel(name = "条件代码", width = 20)
@Schema(description = "条件代码")
private String conditionCode;
@Excel(name = "备注", width = 30)
@Schema(description = "备注")
private String remark;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,89 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 密炼物料种类配置
*/
@Data
@TableName("mes_xsl_mixer_material_kind_cfg")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES密炼物料种类配置")
public class MesXslMixerMaterialKindCfg implements Serializable {
private static final long serialVersionUID = 1L;
public static final String SOURCE_TYPE_DICT = "dict";
public static final String SOURCE_TYPE_CATEGORY = "category";
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "种类键值", width = 15)
@Schema(description = "种类键值")
private String kindKey;
@Excel(name = "种类名称", width = 20)
@Schema(description = "种类名称")
private String kindName;
@Excel(name = "数据源类型", width = 12)
@Schema(description = "数据源类型dict/category")
private String sourceType;
@Excel(name = "根编码", width = 15)
@Schema(description = "根字典编码或分类pcode")
private String sourceRootCode;
@Excel(name = "根名称", width = 20)
@Schema(description = "根名称冗余")
private String sourceRootName;
@Schema(description = "对应分类/字典项ID")
private String categoryRefId;
@Excel(name = "对应编码", width = 15)
@Schema(description = "对应分类编码/字典项值")
private String categoryRefCode;
@Excel(name = "对应分类", width = 20)
@Schema(description = "对应分类名称冗余")
private String categoryRefName;
@Excel(name = "优先级", width = 10)
@Schema(description = "优先级(数字越小越优先)")
private Integer priority;
@Schema(description = "租户ID")
private Integer tenantId;
private String sysOrgCode;
@Excel(name = "创建人", width = 15)
private String createBy;
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,82 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 密炼物料替代对应关系
*/
@Data
@TableName("mes_xsl_mixer_material_substitute")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES密炼物料替代对应关系")
public class MesXslMixerMaterialSubstitute implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "编号", width = 10)
@Schema(description = "编号租户内自动累加从1开始")
private Integer serialNo;
@Excel(name = "密炼物料ID", width = 15, dictTable = "mes_mixer_material", dicText = "material_name", dicCode = "id")
@Dict(dictTable = "mes_mixer_material", dicText = "material_name", dicCode = "id")
@Schema(description = "密炼物料ID关联 mes_mixer_material.id")
private String mixerMaterialId;
@Excel(name = "密炼物料编码", width = 15)
@Schema(description = "密炼物料编码冗余")
private String mixerMaterialCode;
@Excel(name = "密炼物料名称", width = 20)
@Schema(description = "密炼物料名称冗余")
private String mixerMaterialName;
@Excel(name = "替代密炼物料ID", width = 15, dictTable = "mes_mixer_material", dicText = "material_name", dicCode = "id")
@Dict(dictTable = "mes_mixer_material", dicText = "material_name", dicCode = "id")
@Schema(description = "替代密炼物料ID关联 mes_mixer_material.id")
private String substituteMaterialId;
@Excel(name = "替代密炼物料编码", width = 15)
@Schema(description = "替代密炼物料编码冗余")
private String substituteMaterialCode;
@Excel(name = "替代密炼物料名称", width = 20)
@Schema(description = "替代密炼物料名称冗余")
private String substituteMaterialName;
@Excel(name = "创建人", width = 15)
private String createBy;
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Excel(name = "修改人", width = 15)
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "租户ID")
private Integer tenantId;
private String sysOrgCode;
private Integer delFlag;
}

View File

@@ -0,0 +1,152 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 密炼PS编制
*/
@Data
@TableName("mes_xsl_mixer_ps_compile")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES密炼PS编制")
public class MesXslMixerPsCompile implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "所属工厂", width = 20)
@Schema(description = "所属工厂名称冗余(公司)")
private String factoryName;
@Schema(description = "所属工厂IDsys_depart.id公司")
private String factoryId;
@Excel(name = "PS编码", width = 18)
@Schema(description = "PS编码")
private String psCode;
@Excel(name = "类型", width = 15, dicCode = "xslmes_ps_belong")
@Dict(dicCode = "xslmes_ps_belong")
@Schema(description = "类型字典PS归属")
private String psType;
@Excel(name = "施工代号", width = 15, dicCode = "xslmes_construction_code")
@Dict(dicCode = "xslmes_construction_code")
@Schema(description = "施工代号")
private String constructionCode;
@Excel(name = "发放日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "发放日期")
private Date issueDate;
@Excel(name = "发送部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "发送部门ID")
private String sendDeptId;
@Excel(name = "收信部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "收信部门ID")
private String receiveDeptId;
@Excel(name = "参照部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "参照部门ID")
private String referenceDeptId;
@Excel(name = "标题", width = 25)
@Schema(description = "标题")
private String title;
@Excel(name = "目的", width = 30)
@Schema(description = "目的")
private String purpose;
@Excel(name = "依据", width = 30)
@Schema(description = "依据")
private String basis;
@Excel(name = "内容", width = 40)
@Schema(description = "内容")
private String content;
@Excel(name = "担当", width = 12)
@Schema(description = "担当")
private String responsiblePerson;
@Excel(name = "状态", width = 10, dicCode = "xslmes_mixer_ps_status")
@Dict(dicCode = "xslmes_mixer_ps_status")
@Schema(description = "状态")
private String status;
@Excel(name = "校对人", width = 15)
@Schema(description = "校对人")
private String proofreadBy;
@Excel(name = "校对时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "校对时间")
private Date proofreadTime;
@Excel(name = "审核人", width = 15)
@Schema(description = "审核人")
private String auditBy;
@Excel(name = "审核时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "审核时间")
private Date auditTime;
@Excel(name = "批准人", width = 15)
@Schema(description = "批准人")
private String approveBy;
@Excel(name = "批准时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "批准时间")
private Date approveTime;
@Excel(name = "创建人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
//update-begin---author:jiangxh ---date:20260520 for【密炼PS编制】创建人翻译为姓名供编制人展示-----------
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
//update-end---author:jiangxh ---date:20260520 for【密炼PS编制】创建人翻译为姓名供编制人展示-----------
private String createBy;
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Excel(name = "修改人", width = 15)
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "租户ID")
private Integer tenantId;
private String sysOrgCode;
private Integer delFlag;
}

View File

@@ -0,0 +1,165 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 混炼示方主表
*/
@Data
@TableName("mes_xsl_mixing_spec")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES混炼示方")
public class MesXslMixingSpec implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "租户ID")
private Integer tenantId;
@Excel(name = "规格", width = 16)
@Schema(description = "规格")
private String specName;
@Excel(name = "用途", width = 24)
@Schema(description = "用途")
private String purpose;
@Schema(description = "机台ID")
private String machineId;
@Excel(name = "机台", width = 14)
@Schema(description = "机台")
private String machineName;
@Excel(name = "制作日期", width = 14, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "制作日期")
private Date makeDate;
@Excel(name = "发行编号", width = 16)
@Schema(description = "发行编号")
private String issueNumber;
@Schema(description = "换算系数")
private BigDecimal convertFactor;
@Schema(description = "填充体积")
private BigDecimal fillVolume;
@Schema(description = "回收炭黑(秒)")
private Integer recycleCarbonSec;
@Schema(description = "母胶比重")
private BigDecimal motherRubberSg;
@Schema(description = "终炼胶比重")
private BigDecimal finalRubberSg;
@Schema(description = "适用工厂")
private String applyFactory;
@Schema(description = "段数(当前/总如2/3)")
private String stageCount;
@Schema(description = "纯混炼时间(秒)")
private Integer pureMixSec;
@Schema(description = "回收炭黑(KG)")
private BigDecimal recycleCarbonKg;
@Schema(description = "自动小料打印设定")
private String autoSmallPrintSetting;
@Schema(description = "设定车数")
private Integer setTrainCount;
@Schema(description = "侧壁水温")
private BigDecimal sideWallWaterTemp;
@Schema(description = "超时排胶时间")
private Integer overtimeDischargeSec;
@Schema(description = "超温排胶时间")
private Integer overtempDischargeSec;
@Schema(description = "超温排胶温度")
private BigDecimal overtempDischargeTemp;
@Schema(description = "卸料门水温")
private BigDecimal doorWaterTemp;
@Schema(description = "转子水温")
private BigDecimal rotorWaterTemp;
@Schema(description = "最高进料温度")
private BigDecimal maxFeedTemp;
@Schema(description = "起草人")
private String draftBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "起草时间")
private Date draftTime;
@Schema(description = "校对人")
private String proofreadBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "校对时间")
private Date proofreadTime;
@Schema(description = "审核人")
private String auditBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "审核时间")
private Date auditTime;
@Schema(description = "批准人")
private String approveBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "批准时间")
private Date approveTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "变更日期")
private Date changeDate;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,71 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 混炼示方明细3下密炼机混炼条件
*/
@Data
@TableName("mes_xsl_mixing_spec_down_step")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "混炼示方下密炼机混炼条件")
public class MesXslMixingSpecDownStep implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表ID")
private String mixingSpecId;
@Schema(description = "行序")
private Integer sortNo;
@Schema(description = "动作")
private String actionName;
@Schema(description = "时间(秒)")
private Integer actionSec;
@Schema(description = "保护时间")
private Integer protectSec;
@Schema(description = "温度(℃)")
private BigDecimal tempC;
@Schema(description = "功率(Kw)")
private BigDecimal powerKw;
@Schema(description = "能量(Kwh)")
private BigDecimal energyKwh;
@Schema(description = "组合")
private String comboMode;
@Schema(description = "转速(rpm)")
private BigDecimal speedRpm;
@Schema(description = "压力(Mpa)")
private BigDecimal pressureMpa;
@Schema(description = "栓(%)")
private BigDecimal boltPercent;
@Schema(description = "租户ID")
private Integer tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
}

View File

@@ -0,0 +1,70 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 混炼示方明细1橡胶及配合剂
*/
@Data
@TableName("mes_xsl_mixing_spec_material")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "混炼示方橡胶及配合剂")
public class MesXslMixingSpecMaterial implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表ID")
private String mixingSpecId;
@Schema(description = "行序")
private Integer sortNo;
@Schema(description = "物料大类")
private String materialMajor;
@Schema(description = "物料小类")
private String materialMinor;
@Schema(description = "种类")
private String materialKind;
//update-begin---author:cursor ---date:20260525 for【XSLMES-20260525-A55】混炼示方明细关联密炼物料ID-----------
@Schema(description = "密炼物料ID关联mes_mixer_material.id")
private String mixerMaterialId;
//update-end---author:cursor ---date:20260525 for【XSLMES-20260525-A55】混炼示方明细关联密炼物料ID-----------
@Schema(description = "密炼物料名称")
private String mixerMaterialName;
@Schema(description = "密炼物料描述")
private String mixerMaterialDesc;
@Schema(description = "单重")
private BigDecimal unitWeight;
@Schema(description = "累计")
private BigDecimal accumWeight;
@Schema(description = "顺序")
private Integer seqNo;
@Schema(description = "租户ID")
private Integer tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
}

View File

@@ -0,0 +1,71 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 混炼示方明细2混合步骤
*/
@Data
@TableName("mes_xsl_mixing_spec_step")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "混炼示方混合步骤")
public class MesXslMixingSpecStep implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表ID")
private String mixingSpecId;
@Schema(description = "行序")
private Integer sortNo;
@Schema(description = "动作")
private String actionName;
@Schema(description = "时间(秒)")
private Integer actionSec;
@Schema(description = "保护时间")
private Integer protectSec;
@Schema(description = "温度(℃)")
private BigDecimal tempC;
@Schema(description = "功率(Kw)")
private BigDecimal powerKw;
@Schema(description = "能量(Kwh)")
private BigDecimal energyKwh;
@Schema(description = "组合")
private String comboMode;
@Schema(description = "转速(rpm)")
private BigDecimal speedRpm;
@Schema(description = "压力(Mpa)")
private BigDecimal pressureMpa;
@Schema(description = "栓(%)")
private BigDecimal boltPercent;
@Schema(description = "租户ID")
private Integer tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
}

View File

@@ -0,0 +1,62 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 混炼示方明细4TCU温度条件
*/
@Data
@TableName("mes_xsl_mixing_spec_tcu")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "混炼示方TCU温度条件")
public class MesXslMixingSpecTcu implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表ID")
private String mixingSpecId;
@Schema(description = "行序")
private Integer sortNo;
@Schema(description = "区分(字典xslmes_mixing_tcu_section)")
private String sectionType;
@Schema(description = "前转子温度")
private BigDecimal frontRotorTemp;
@Schema(description = "后转子温度")
private BigDecimal rearRotorTemp;
@Schema(description = "前混炼室温度")
private BigDecimal frontChamberTemp;
@Schema(description = "后混炼室温度")
private BigDecimal rearChamberTemp;
@Schema(description = "上下顶栓温度")
private BigDecimal topPlugTemp;
@Schema(description = "药品称量位置(字典xslmes_mixing_drug_weigh_pos)")
private String drugWeighPos;
@Schema(description = "租户ID")
private Integer tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
}

View File

@@ -0,0 +1,98 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 开炼机参数维护
*/
@Data
@TableName("mes_xsl_open_mill_param")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES开炼机参数维护")
public class MesXslOpenMillParam implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "胶料ID", width = 15, dictTable = "mes_material", dicText = "material_name", dicCode = "id")
@Dict(dictTable = "mes_material", dicText = "material_name", dicCode = "id")
@Schema(description = "胶料ID关联 mes_material.id")
private String materialId;
@Excel(name = "胶料名称", width = 20)
@Schema(description = "胶料名称冗余")
private String materialName;
@Excel(name = "胶料别名", width = 15)
@Schema(description = "胶料别名冗余(取自 mes_material.alias_name")
private String materialCode;
@Excel(name = "R0进胶时间(秒)", width = 14)
@Schema(description = "R0进胶时间")
private BigDecimal r0FeedTime;
@Excel(name = "R0成环时间(秒)", width = 14)
@Schema(description = "R0成环时间")
private BigDecimal r0RingTime;
@Excel(name = "R0拉断时间(秒)", width = 14)
@Schema(description = "R0拉断时间")
private BigDecimal r0BreakTime;
@Excel(name = "R0排胶时间(秒)", width = 14)
@Schema(description = "R0排胶时间")
private BigDecimal r0DischargeTime;
@Excel(name = "R1进胶时间(秒)", width = 14)
@Schema(description = "R1进胶时间")
private BigDecimal r1FeedTime;
@Excel(name = "R1成环时间(秒)", width = 14)
@Schema(description = "R1成环时间")
private BigDecimal r1RingTime;
@Excel(name = "R1拉断时间(秒)", width = 14)
@Schema(description = "R1拉断时间")
private BigDecimal r1BreakTime;
@Excel(name = "R1排胶时间(秒)", width = 14)
@Schema(description = "R1排胶时间")
private BigDecimal r1DischargeTime;
@Excel(name = "创建人", width = 15)
private String createBy;
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Excel(name = "修改人", width = 15)
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "租户ID")
private Integer tenantId;
private String sysOrgCode;
private Integer delFlag;
}

View File

@@ -0,0 +1,82 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 生产订单
*/
@Data
@TableName("mes_xsl_production_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES生产订单")
public class MesXslProductionOrder implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "销售订单号", width = 20)
private String salesOrderNo;
@Excel(name = "生产订单号", width = 20)
private String productionOrderNo;
@Excel(name = "订单日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date orderDate;
@Excel(name = "生产车间", width = 20)
private String productionWorkshop;
@Excel(name = "加工段数", width = 12)
private Integer processSegmentCount;
@Excel(name = "物料编号", width = 20)
private String materialCode;
@Excel(name = "MES胶料名称", width = 20)
private String mesMaterialName;
@Excel(name = "金蝶物料名称", width = 20)
private String kingdeeMaterialName;
@Excel(name = "金蝶物料规格", width = 20)
private String kingdeeMaterialSpec;
@Excel(name = "计划数量", width = 15)
private BigDecimal planQty;
@Excel(name = "拆分状态", width = 12, replace = {"已拆分_1", "未拆分_0"})
private Integer splitStatus;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private Integer delFlag;
}

View File

@@ -0,0 +1,74 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检数据点
*/
@Data
@TableName("mes_xsl_rubber_quick_test_data_point")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检数据点")
public class MesXslRubberQuickTestDataPoint implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "数据点名称", width = 24)
@Schema(description = "数据点名称(同租户未删除唯一)")
private String pointName;
@Excel(name = "实验类型", width = 20, dictTable = "mes_xsl_rubber_quick_test_type", dicText = "type_name", dicCode = "id")
@Dict(dictTable = "mes_xsl_rubber_quick_test_type", dicText = "type_name", dicCode = "id")
@Schema(description = "实验类型ID")
private String quickTestTypeId;
@Excel(name = "实验类型名称", width = 20)
@Schema(description = "实验类型名称冗余")
private String quickTestTypeName;
@Excel(name = "单位类型", width = 16)
@Schema(description = "单位类型(手填)")
private String unitType;
@Excel(name = "描述", width = 40)
@Schema(description = "描述")
private String pointDesc;
@TableField(exist = false)
@Excel(name = "实验类型名称导入", width = 20)
@Schema(description = "导入用实验类型名称")
private String importQuickTestTypeName;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableLogic
@Schema(description = "删除状态0正常 1已删除")
private Integer delFlag;
}

View File

@@ -0,0 +1,208 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检实验方法主表
*/
@Data
@TableName("mes_xsl_rubber_quick_test_method")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检实验方法")
public class MesXslRubberQuickTestMethod implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "方法编号", width = 14)
@Schema(description = "方法编号租户内从001递增自动生成只读")
private String methodCode;
@Excel(name = "实验方法名称", width = 24)
@Schema(description = "实验方法名称(同租户未删除唯一)")
private String methodName;
@Excel(name = "实验类型", width = 20, dictTable = "mes_xsl_rubber_quick_test_type", dicText = "type_name", dicCode = "id")
@Dict(dictTable = "mes_xsl_rubber_quick_test_type", dicText = "type_name", dicCode = "id")
@Schema(description = "实验类型ID")
private String quickTestTypeId;
@Excel(name = "实验类型名称", width = 20)
@Schema(description = "实验类型名称冗余")
private String quickTestTypeName;
@Excel(name = "实验温度°C", width = 14, type = 10)
@Schema(description = "实验温度°C")
private BigDecimal testTempC;
@Excel(name = "预热时间min", width = 14, type = 10)
@Schema(description = "预热时间min")
private BigDecimal preheatTimeMin;
@Excel(name = "实验时间min", width = 14, type = 10)
@Schema(description = "实验时间min")
private BigDecimal testTimeMin;
@Excel(name = "实验角度Deg", width = 14, type = 10)
@Schema(description = "实验角度Deg")
private BigDecimal testAngleDeg;
@Excel(name = "实验频率Hz", width = 14, type = 10)
@Schema(description = "实验频率Hz")
private BigDecimal testFreqHz;
@Excel(name = "转子类型", width = 12, dicCode = "xslmes_rubber_quick_test_rotor_type")
@Dict(dicCode = "xslmes_rubber_quick_test_rotor_type")
@Schema(description = "转子类型字典xslmes_rubber_quick_test_rotor_type")
private String rotorType;
@Excel(name = "转子速度rpm", width = 14, type = 10)
@Schema(description = "转子速度rpm")
private BigDecimal rotorSpeedRpm;
@Excel(name = "方法描述", width = 40)
@Schema(description = "方法描述")
private String methodDesc;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableLogic
@Schema(description = "删除状态0正常 1已删除")
private Integer delFlag;
@TableField(exist = false)
@Schema(description = "数据点明细")
private List<MesXslRubberQuickTestMethodLine> lineList;
}

View File

@@ -0,0 +1,128 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检实验方法明细
*/
@Data
@TableName("mes_xsl_rubber_quick_test_method_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检实验方法明细")
public class MesXslRubberQuickTestMethodLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表主键 mes_xsl_rubber_quick_test_method.id")
private String methodId;
@Schema(description = "数据点主键 mes_xsl_rubber_quick_test_data_point.id")
private String dataPointId;
@Schema(description = "数据点名称冗余(只读带出)")
private String pointName;
@Schema(description = "单位类型冗余(只读带出)")
private String unitType;
@Dict(dicCode = "xslmes_rubber_quick_test_torque_unit")
@Schema(description = "扭矩单位类型")
private String torqueUnitType;
@Dict(dicCode = "xslmes_rubber_quick_test_time_unit")
@Schema(description = "时间单位类型")
private String timeUnitType;
@Dict(dicCode = "xslmes_rubber_quick_test_mooney_unit")
@Schema(description = "门尼单位类型")
private String mooneyUnitType;
private Integer sortNo;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,132 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检记录主表
*/
@Data
@TableName("mes_xsl_rubber_quick_test_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检记录")
public class MesXslRubberQuickTestRecord implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "单号", width = 16)
@Schema(description = "单号JL+yyyyMMdd+4位流水")
private String recordNo;
@Schema(description = "胶料ID mes_material.id")
private String rubberMaterialId;
@Excel(name = "胶料名称", width = 20)
@Schema(description = "胶料名称冗余")
private String rubberMaterialName;
@Schema(description = "引用的实验标准ID")
private String stdId;
@Schema(description = "生产机台ID")
private String prodEquipmentLedgerId;
@Excel(name = "生产机台", width = 16)
@Schema(description = "生产机台名称冗余")
private String prodEquipmentName;
@Excel(name = "生产日期", width = 12, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date productionDate;
@Excel(name = "车次编号", width = 14)
private String trainNo;
@Excel(name = "班次", width = 10, dicCode = "xslmes_rubber_quick_test_work_shift")
@Dict(dicCode = "xslmes_rubber_quick_test_work_shift")
private String workShift;
@Excel(name = "班组", width = 10, dicCode = "xslmes_rubber_quick_test_work_team")
@Dict(dicCode = "xslmes_rubber_quick_test_work_team")
private String workTeam;
@Excel(name = "检验次数", width = 10)
private Integer inspectTimes;
@Excel(name = "检验时间", width = 18, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date inspectTime;
@Schema(description = "检验人用户ID")
private String inspectorUserId;
private String inspectorUsername;
@Excel(name = "检验人", width = 12)
private String inspectorRealname;
@Schema(description = "检验类型ID")
private String quickTestTypeId;
@Excel(name = "检验类型", width = 16)
private String quickTestTypeName;
@Excel(name = "检验结果", width = 10, dicCode = "xslmes_rubber_quick_test_record_result")
@Dict(dicCode = "xslmes_rubber_quick_test_record_result")
private String inspectResult;
@Excel(name = "生产计划号", width = 16)
private String productionPlanNo;
@Schema(description = "检验机台ID")
private String inspectEquipmentLedgerId;
@Excel(name = "检验机台", width = 16)
private String inspectEquipmentName;
@Excel(name = "胶料卡片号", width = 16)
private String rubberCardNo;
@Excel(name = "胶料批次", width = 16)
private String rubberBatchNo;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableLogic
private Integer delFlag;
@TableField(exist = false)
private List<MesXslRubberQuickTestRecordLine> lineList;
}

View File

@@ -0,0 +1,60 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检记录明细
*/
@Data
@TableName("mes_xsl_rubber_quick_test_record_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检记录明细")
public class MesXslRubberQuickTestRecordLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
private String recordId;
private String dataPointId;
@Excel(name = "检验项目", width = 18)
private String inspectItem;
@Excel(name = "检验下限", width = 12, type = 10)
private BigDecimal lowerLimit;
@Excel(name = "检验值", width = 12, type = 10)
private BigDecimal inspectValue;
@Excel(name = "检验上限", width = 12, type = 10)
private BigDecimal upperLimit;
private Integer sortNo;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,109 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检实验标准主表
*/
@Data
@TableName("mes_xsl_rubber_quick_test_std")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检实验标准")
public class MesXslRubberQuickTestStd implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "实验标准名称", width = 24)
@Schema(description = "实验标准名称(同租户未删除唯一)")
private String stdName;
@Schema(description = "实验方法ID mes_xsl_rubber_quick_test_method.id")
private String testMethodId;
@Excel(name = "实验方法", width = 20)
@Schema(description = "实验方法名称冗余")
private String testMethodName;
@Excel(name = "密炼机类型", width = 14, dicCode = "xslmes_rubber_quick_test_mixer_type")
@Dict(dicCode = "xslmes_rubber_quick_test_mixer_type")
@Schema(description = "密炼机类型字典xslmes_rubber_quick_test_mixer_type")
private String mixerType;
@Schema(description = "胶料ID mes_material.id")
private String rubberMaterialId;
@Excel(name = "胶料名称", width = 20)
@Schema(description = "胶料名称冗余")
private String rubberMaterialName;
@Schema(description = "密炼PS编制ID mes_xsl_mixer_ps_compile.id")
private String psCompileId;
@Excel(name = "发行编号", width = 16)
@Schema(description = "发行编号密炼PS编码冗余")
private String issueNumber;
@Excel(name = "发行日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Schema(description = "发行日期")
private Date issueDate;
@Schema(description = "发行部门ID")
private String issueDeptId;
@Excel(name = "发行部门", width = 18)
@Schema(description = "发行部门名称冗余")
private String issueDeptName;
@Excel(name = "启用状态", width = 10, dicCode = "xslmes_rubber_quick_test_std_enable_status")
@Dict(dicCode = "xslmes_rubber_quick_test_std_enable_status")
@Schema(description = "启用状态字典1使用中0已停用")
private String enableStatus;
@Excel(name = "审核状态", width = 10, dicCode = "xslmes_rubber_quick_test_std_audit_status")
@Dict(dicCode = "xslmes_rubber_quick_test_std_audit_status")
@Schema(description = "审核状态字典0草稿1已批准")
private String auditStatus;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableLogic
@Schema(description = "删除状态0正常 1已删除")
private Integer delFlag;
@TableField(exist = false)
@Schema(description = "标准明细")
private List<MesXslRubberQuickTestStdLine> lineList;
}

View File

@@ -0,0 +1,74 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检实验标准明细
*/
@Data
@TableName("mes_xsl_rubber_quick_test_std_line")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检实验标准明细")
public class MesXslRubberQuickTestStdLine implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Schema(description = "主表主键 mes_xsl_rubber_quick_test_std.id")
private String stdId;
@Schema(description = "数据点主键 mes_xsl_rubber_quick_test_data_point.id")
private String dataPointId;
@Excel(name = "数据点", width = 18)
@Schema(description = "数据点名称冗余(只读带出)")
private String pointName;
@Excel(name = "下限值", width = 12, type = 10)
@Schema(description = "下限值")
private BigDecimal lowerLimit;
@Excel(name = "下警告值", width = 12, type = 10)
@Schema(description = "下警告值")
private BigDecimal lowerWarn;
@Excel(name = "目标值", width = 12, type = 10)
@Schema(description = "目标值")
private BigDecimal targetValue;
@Excel(name = "上警告值", width = 12, type = 10)
@Schema(description = "上警告值")
private BigDecimal upperWarn;
@Excel(name = "上限值", width = 12, type = 10)
@Schema(description = "上限值")
private BigDecimal upperLimit;
private Integer sortNo;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -0,0 +1,54 @@
package org.jeecg.modules.xslmes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/**
* MES 胶料快检实验类型
*/
@Data
@TableName("mes_xsl_rubber_quick_test_type")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES胶料快检实验类型")
public class MesXslRubberQuickTestType implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private String id;
@Excel(name = "实验类型编号", width = 16)
@Schema(description = "实验类型编号租户内从001递增自动生成只读")
private String typeCode;
@Excel(name = "实验类型名称", width = 24)
@Schema(description = "实验类型名称")
private String typeName;
private Integer tenantId;
private String sysOrgCode;
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableLogic
@Schema(description = "删除状态0正常 1已删除")
private Integer delFlag;
}

View File

@@ -0,0 +1,6 @@
package org.jeecg.modules.xslmes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.xslmes.entity.MesXslDayTankMaterialMap;
public interface MesXslDayTankMaterialMapMapper extends BaseMapper<MesXslDayTankMaterialMap> {}

View File

@@ -0,0 +1,6 @@
package org.jeecg.modules.xslmes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectConfigLine;
public interface MesXslEquipInspectConfigLineMapper extends BaseMapper<MesXslEquipInspectConfigLine> {}

View File

@@ -0,0 +1,6 @@
package org.jeecg.modules.xslmes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.xslmes.entity.MesXslEquipInspectConfig;
public interface MesXslEquipInspectConfigMapper extends BaseMapper<MesXslEquipInspectConfig> {}

Some files were not shown because too many files have changed in this diff Show More