Commit 98a977dd1a09f03110015e496184fb2e374b59ac

Authored by YunaiV
1 parent d97b85bb

fix(mes): 修复 SN 码查看条码缺少 bizType

- 新增 SN 码条码业务类型与配置
- 支持按 SN 明细查询对应条码
- 抽离 SN 码明细弹窗组件
- 同步 vben antd/ele 的条码入口

Refs: https://t.zsxq.com/1YCqD
sql/dm/ruoyi-vue-pro-dm8.sql
@@ -1552,9 +1552,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1552,9 +1552,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1552 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1552 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1553 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1553 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1554 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1554 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1555 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1556 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1557 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0'); 1555 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1556 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1557 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
1558 COMMIT; 1558 COMMIT;
1559 SET IDENTITY_INSERT system_dict_data OFF; 1559 SET IDENTITY_INSERT system_dict_data OFF;
1560 -- @formatter:on 1560 -- @formatter:on
@@ -5617,4 +5617,3 @@ INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator, @@ -5617,4 +5617,3 @@ INSERT INTO yudao_demo03_student (id, name, sex, birthday, description, creator,
5617 COMMIT; 5617 COMMIT;
5618 SET IDENTITY_INSERT yudao_demo03_student OFF; 5618 SET IDENTITY_INSERT yudao_demo03_student OFF;
5619 -- @formatter:on 5619 -- @formatter:on
5620 -  
sql/kingbase/ruoyi-vue-pro.sql
@@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1656 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1657 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1658 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0'); 1656 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1657 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1658 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
1659 COMMIT; 1659 COMMIT;
1660 -- @formatter:on 1660 -- @formatter:on
1661 1661
@@ -5943,4 +5943,3 @@ COMMIT; @@ -5943,4 +5943,3 @@ COMMIT;
5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; 5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq;
5944 CREATE SEQUENCE yudao_demo03_student_seq 5944 CREATE SEQUENCE yudao_demo03_student_seq
5945 START 10; 5945 START 10;
5946 -  
sql/mysql/ruoyi-vue-pro.sql
@@ -1374,9 +1374,9 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st @@ -1374,9 +1374,9 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st
1374 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0'); 1374 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0');
1375 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0'); 1375 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0');
1376 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0'); 1376 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', b'0');
1377 -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');  
1378 -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');  
1379 -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0'); 1377 +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
  1378 +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
  1379 +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', b'0');
1380 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3520, 1, '未读', '0', 'im_private_message_status', 0, 'warning', '', '私聊=未读,群聊=正常', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0'); 1380 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3520, 1, '未读', '0', 'im_private_message_status', 0, 'warning', '', '私聊=未读,群聊=正常', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
1381 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3521, 2, '已撤回', '2', 'im_private_message_status', 0, 'danger', '', 'RECALL', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0'); 1381 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3521, 2, '已撤回', '2', 'im_private_message_status', 0, 'danger', '', 'RECALL', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
1382 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3522, 3, '已读', '3', 'im_private_message_status', 0, 'success', '', 'READ(仅私聊)', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0'); 1382 INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3522, 3, '已读', '3', 'im_private_message_status', 0, 'success', '', 'READ(仅私聊)', 'admin', '2026-04-30 11:35:07', 'admin', '2026-04-30 15:14:36', b'0');
sql/opengauss/ruoyi-vue-pro.sql
@@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1656 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1657 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1658 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0'); 1656 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1657 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1658 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
1659 COMMIT; 1659 COMMIT;
1660 -- @formatter:on 1660 -- @formatter:on
1661 1661
@@ -5943,4 +5943,3 @@ COMMIT; @@ -5943,4 +5943,3 @@ COMMIT;
5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; 5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq;
5944 CREATE SEQUENCE yudao_demo03_student_seq 5944 CREATE SEQUENCE yudao_demo03_student_seq
5945 START 10; 5945 START 10;
5946 -  
sql/oracle/ruoyi-vue-pro.sql
@@ -1605,9 +1605,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1605,9 +1605,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1605 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); 1605 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0');
1606 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); 1606 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0');
1607 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0'); 1607 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-05 15:53:46', 'SYYYY-MM-DD HH24:MI:SS'), '0');
1608 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0');  
1609 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0');  
1610 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0'); 1608 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0');
  1609 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0');
  1610 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', to_date('2026-04-16 09:47:00', 'SYYYY-MM-DD HH24:MI:SS'), '0');
1611 COMMIT; 1611 COMMIT;
1612 -- @formatter:on 1612 -- @formatter:on
1613 1613
@@ -5801,4 +5801,3 @@ COMMIT; @@ -5801,4 +5801,3 @@ COMMIT;
5801 5801
5802 CREATE SEQUENCE yudao_demo03_student_seq 5802 CREATE SEQUENCE yudao_demo03_student_seq
5803 START WITH 10; 5803 START WITH 10;
5804 -  
sql/postgresql/ruoyi-vue-pro.sql
@@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -1653,9 +1653,9 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1653 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3443, 1, '草稿', '0', 'mes_wm_product_produce_status', 0, 'info', '', '草稿状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1654 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3444, 2, '已完成', '4', 'mes_wm_product_produce_status', 0, 'success', '', '已完成状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0'); 1655 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, '已取消', '5', 'mes_wm_product_produce_status', 0, 'danger', '', '已取消状态', '1', '2026-04-05 15:53:46', '1', '2026-04-05 15:53:46', '0');
1656 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1657 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');  
1658 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0'); 1656 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, '草稿', '0', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1657 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, '已完成', '4', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
  1658 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, '已取消', '5', 'mes_pro_task_status', 0, '', '', NULL, '1', '2026-04-16 09:47:00', '1', '2026-04-16 09:47:00', '0');
1659 COMMIT; 1659 COMMIT;
1660 -- @formatter:on 1660 -- @formatter:on
1661 1661
@@ -5943,4 +5943,3 @@ COMMIT; @@ -5943,4 +5943,3 @@ COMMIT;
5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq; 5943 DROP SEQUENCE IF EXISTS yudao_demo03_student_seq;
5944 CREATE SEQUENCE yudao_demo03_student_seq 5944 CREATE SEQUENCE yudao_demo03_student_seq
5945 START 10; 5945 START 10;
5946 -  
sql/sqlserver/ruoyi-vue-pro.sql
@@ -3931,11 +3931,11 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t @@ -3931,11 +3931,11 @@ INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_t
3931 GO 3931 GO
3932 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, N'已取消', N'5', N'mes_wm_product_produce_status', 0, N'danger', N'', N'已取消状态', N'1', N'2026-04-05 15:53:46', N'1', N'2026-04-05 15:53:46', N'0') 3932 INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3445, 3, N'已取消', N'5', N'mes_wm_product_produce_status', 0, N'danger', N'', N'已取消状态', N'1', N'2026-04-05 15:53:46', N'1', N'2026-04-05 15:53:46', N'0')
3933 GO 3933 GO
3934 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, N'草稿', N'0', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0') 3934 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3446, 0, N'草稿', N'0', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0')
3935 GO 3935 GO
3936 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, N'已完成', N'4', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0') 3936 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3447, 1, N'已完成', N'4', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0')
3937 GO 3937 GO
3938 -INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, N'已取消', N'5', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0') 3938 +INSERT INTO system_dict_data (id, sort, label, value, dict_type, status, color_type, css_class, remark, creator, create_time, updater, update_time, deleted) VALUES (3448, 2, N'已取消', N'5', N'mes_pro_task_status', 0, N'', N'', NULL, N'1', N'2026-04-16 09:47:00', N'1', N'2026-04-16 09:47:00', N'0')
3939 GO 3939 GO
3940 SET IDENTITY_INSERT system_dict_data OFF 3940 SET IDENTITY_INSERT system_dict_data OFF
3941 GO 3941 GO
@@ -13915,4 +13915,3 @@ GO @@ -13915,4 +13915,3 @@ GO
13915 COMMIT 13915 COMMIT
13916 GO 13916 GO
13917 -- @formatter:on 13917 -- @formatter:on
13918 -  
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/sn/MesWmSnController.java
@@ -65,10 +65,21 @@ public class MesWmSnController { @@ -65,10 +65,21 @@ public class MesWmSnController {
65 if (CollUtil.isEmpty(pageResult.getList())) { 65 if (CollUtil.isEmpty(pageResult.getList())) {
66 return success(PageResult.empty(pageResult.getTotal())); 66 return success(PageResult.empty(pageResult.getTotal()));
67 } 67 }
68 - buildGroupItemInfo(pageResult.getList()); 68 + buildSnGroupItemVO(pageResult.getList());
69 return success(pageResult); 69 return success(pageResult);
70 } 70 }
71 71
  72 + @GetMapping("/list-by-uuid")
  73 + @Operation(summary = "获得批次 SN 码明细列表")
  74 + @Parameter(name = "uuid", description = "批次 UUID", required = true)
  75 + @PreAuthorize("@ss.hasPermission('mes:wm-sn:query')")
  76 + public CommonResult<List<MesWmSnRespVO>> getSnListByUuid(
  77 + @RequestParam("uuid") @NotBlank(message = "批次 UUID 不能为空") String uuid) {
  78 + List<MesWmSnRespVO> list = BeanUtils.toBean(snService.getSnListByUuid(uuid), MesWmSnRespVO.class);
  79 + buildSnItemVO(list);
  80 + return success(list);
  81 + }
  82 +
72 @DeleteMapping("/delete-batch") 83 @DeleteMapping("/delete-batch")
73 @Operation(summary = "批量删除 SN 码(按批次 UUID)") 84 @Operation(summary = "批量删除 SN 码(按批次 UUID)")
74 @Parameter(name = "uuid", description = "批次 UUID", required = true) 85 @Parameter(name = "uuid", description = "批次 UUID", required = true)
@@ -85,7 +96,7 @@ public class MesWmSnController { @@ -85,7 +96,7 @@ public class MesWmSnController {
85 public void exportSnGroupExcel(@Valid MesWmSnPageReqVO reqVO, HttpServletResponse response) throws IOException { 96 public void exportSnGroupExcel(@Valid MesWmSnPageReqVO reqVO, HttpServletResponse response) throws IOException {
86 reqVO.setPageSize(PageParam.PAGE_SIZE_NONE); 97 reqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
87 List<MesWmSnGroupRespVO> list = snService.getSnGroupPage(reqVO).getList(); 98 List<MesWmSnGroupRespVO> list = snService.getSnGroupPage(reqVO).getList();
88 - buildGroupItemInfo(list); 99 + buildSnGroupItemVO(list);
89 ExcelUtils.write(response, "SN码分组.xls", "数据", MesWmSnGroupRespVO.class, list); 100 ExcelUtils.write(response, "SN码分组.xls", "数据", MesWmSnGroupRespVO.class, list);
90 } 101 }
91 102
@@ -96,13 +107,13 @@ public class MesWmSnController { @@ -96,13 +107,13 @@ public class MesWmSnController {
96 @ApiAccessLog(operateType = EXPORT) 107 @ApiAccessLog(operateType = EXPORT)
97 public void exportSnExcel(@RequestParam("uuid") String uuid, HttpServletResponse response) throws IOException { 108 public void exportSnExcel(@RequestParam("uuid") String uuid, HttpServletResponse response) throws IOException {
98 List<MesWmSnRespVO> list = BeanUtils.toBean(snService.getSnListByUuid(uuid), MesWmSnRespVO.class); 109 List<MesWmSnRespVO> list = BeanUtils.toBean(snService.getSnListByUuid(uuid), MesWmSnRespVO.class);
99 - buildItemInfo(list); 110 + buildSnItemVO(list);
100 ExcelUtils.write(response, "SN码明细.xls", "数据", MesWmSnRespVO.class, list); 111 ExcelUtils.write(response, "SN码明细.xls", "数据", MesWmSnRespVO.class, list);
101 } 112 }
102 113
103 // ==================== 拼接 VO ==================== 114 // ==================== 拼接 VO ====================
104 115
105 - private void buildGroupItemInfo(List<MesWmSnGroupRespVO> list) { 116 + private void buildSnGroupItemVO(List<MesWmSnGroupRespVO> list) {
106 if (CollUtil.isEmpty(list)) { 117 if (CollUtil.isEmpty(list)) {
107 return; 118 return;
108 } 119 }
@@ -115,7 +126,7 @@ public class MesWmSnController { @@ -115,7 +126,7 @@ public class MesWmSnController {
115 })); 126 }));
116 } 127 }
117 128
118 - private void buildItemInfo(List<MesWmSnRespVO> list) { 129 + private void buildSnItemVO(List<MesWmSnRespVO> list) {
119 if (CollUtil.isEmpty(list)) { 130 if (CollUtil.isEmpty(list)) {
120 return; 131 return;
121 } 132 }
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/wm/barcode/MesWmBarcodeMapper.java
@@ -7,6 +7,8 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.barcode.vo.MesWmBarcodePa @@ -7,6 +7,8 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.barcode.vo.MesWmBarcodePa
7 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.barcode.MesWmBarcodeDO; 7 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.barcode.MesWmBarcodeDO;
8 import org.apache.ibatis.annotations.Mapper; 8 import org.apache.ibatis.annotations.Mapper;
9 9
  10 +import java.util.Collection;
  11 +
10 /** 12 /**
11 * MES 条码清单 Mapper 13 * MES 条码清单 Mapper
12 * 14 *
@@ -43,4 +45,10 @@ public interface MesWmBarcodeMapper extends BaseMapperX&lt;MesWmBarcodeDO&gt; { @@ -43,4 +45,10 @@ public interface MesWmBarcodeMapper extends BaseMapperX&lt;MesWmBarcodeDO&gt; {
43 return selectCount(MesWmBarcodeDO::getConfigId, configId); 45 return selectCount(MesWmBarcodeDO::getConfigId, configId);
44 } 46 }
45 47
  48 + default int deleteByBizTypeAndBizIds(Integer bizType, Collection<Long> bizIds) {
  49 + return delete(new LambdaQueryWrapperX<MesWmBarcodeDO>()
  50 + .eq(MesWmBarcodeDO::getBizType, bizType)
  51 + .inIfPresent(MesWmBarcodeDO::getBizId, bizIds));
  52 + }
  53 +
46 } 54 }
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/MesBizTypeConstants.java
@@ -29,6 +29,7 @@ public final class MesBizTypeConstants { @@ -29,6 +29,7 @@ public final class MesBizTypeConstants {
29 public static final int WM_STOCK = 106; // 库存:MesWmMaterialStockDO 29 public static final int WM_STOCK = 106; // 库存:MesWmMaterialStockDO
30 public static final int WM_BATCH = 107; // 批次:MesWmBatchDO 30 public static final int WM_BATCH = 107; // 批次:MesWmBatchDO
31 public static final int WM_TRANSACTION = 108; // 库存事务流水:MesWmTransactionDO 31 public static final int WM_TRANSACTION = 108; // 库存事务流水:MesWmTransactionDO
  32 + public static final int WM_SN = 109; // SN 码:MesWmSnDO
32 public static final int WM_ITEM_RECEIPT_IN = 110; // 采购入库:MesWmItemReceiptDO 33 public static final int WM_ITEM_RECEIPT_IN = 110; // 采购入库:MesWmItemReceiptDO
33 public static final int WM_TRANSFER_OUT = 111; // 调拨出库:MesWmTransferDO 34 public static final int WM_TRANSFER_OUT = 111; // 调拨出库:MesWmTransferDO
34 public static final int WM_TRANSFER_IN = 112; // 调拨入库:MesWmTransferDO 35 public static final int WM_TRANSFER_IN = 112; // 调拨入库:MesWmTransferDO
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/enums/wm/BarcodeBizTypeEnum.java
@@ -22,6 +22,7 @@ public enum BarcodeBizTypeEnum implements ArrayValuable&lt;Integer&gt; { @@ -22,6 +22,7 @@ public enum BarcodeBizTypeEnum implements ArrayValuable&lt;Integer&gt; {
22 PACKAGE(MesBizTypeConstants.WM_PACKAGE, "装箱单"), 22 PACKAGE(MesBizTypeConstants.WM_PACKAGE, "装箱单"),
23 STOCK(MesBizTypeConstants.WM_STOCK, "库存"), 23 STOCK(MesBizTypeConstants.WM_STOCK, "库存"),
24 BATCH(MesBizTypeConstants.WM_BATCH, "批次"), 24 BATCH(MesBizTypeConstants.WM_BATCH, "批次"),
  25 + SN(MesBizTypeConstants.WM_SN, "SN 码"),
25 PROCARD(MesBizTypeConstants.PRO_CARD, "流转卡"), 26 PROCARD(MesBizTypeConstants.PRO_CARD, "流转卡"),
26 WORKORDER(MesBizTypeConstants.PRO_WORKORDER, "工单"), 27 WORKORDER(MesBizTypeConstants.PRO_WORKORDER, "工单"),
27 TRANSORDER(MesBizTypeConstants.PRO_TRANS_ORDER, "流转单"), 28 TRANSORDER(MesBizTypeConstants.PRO_TRANS_ORDER, "流转单"),
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/barcode/MesWmBarcodeService.java
@@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.barcode.vo.MesWmBarcodeSa @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.barcode.vo.MesWmBarcodeSa
6 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.barcode.MesWmBarcodeDO; 6 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.barcode.MesWmBarcodeDO;
7 import jakarta.validation.Valid; 7 import jakarta.validation.Valid;
8 8
  9 +import java.util.Collection;
  10 +
9 /** 11 /**
10 * MES 条码清单 Service 接口 12 * MES 条码清单 Service 接口
11 * 13 *
@@ -36,6 +38,14 @@ public interface MesWmBarcodeService { @@ -36,6 +38,14 @@ public interface MesWmBarcodeService {
36 void deleteBarcode(Long id); 38 void deleteBarcode(Long id);
37 39
38 /** 40 /**
  41 + * 基于业务类型和业务编号数组,删除条码
  42 + *
  43 + * @param bizType 业务类型
  44 + * @param bizIds 业务编号数组
  45 + */
  46 + void deleteBarcodeByBizTypeAndBizIds(Integer bizType, Collection<Long> bizIds);
  47 +
  48 + /**
39 * 获得条码 49 * 获得条码
40 * 50 *
41 * @param id 编号 51 * @param id 编号
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/barcode/MesWmBarcodeServiceImpl.java
1 package cn.iocoder.yudao.module.mes.service.wm.barcode; 1 package cn.iocoder.yudao.module.mes.service.wm.barcode;
2 2
  3 +import cn.hutool.core.collection.CollUtil;
3 import cn.hutool.core.util.ObjUtil; 4 import cn.hutool.core.util.ObjUtil;
4 import cn.hutool.core.util.StrUtil; 5 import cn.hutool.core.util.StrUtil;
5 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 6 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
@@ -14,6 +15,8 @@ import jakarta.annotation.Resource; @@ -14,6 +15,8 @@ import jakarta.annotation.Resource;
14 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
15 import org.springframework.validation.annotation.Validated; 16 import org.springframework.validation.annotation.Validated;
16 17
  18 +import java.util.Collection;
  19 +
17 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; 20 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
18 import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*; 21 import static cn.iocoder.yudao.module.mes.enums.ErrorCodeConstants.*;
19 22
@@ -165,6 +168,14 @@ public class MesWmBarcodeServiceImpl implements MesWmBarcodeService { @@ -165,6 +168,14 @@ public class MesWmBarcodeServiceImpl implements MesWmBarcodeService {
165 barcodeMapper.deleteById(id); 168 barcodeMapper.deleteById(id);
166 } 169 }
167 170
  171 + @Override
  172 + public void deleteBarcodeByBizTypeAndBizIds(Integer bizType, Collection<Long> bizIds) {
  173 + if (CollUtil.isEmpty(bizIds)) {
  174 + return;
  175 + }
  176 + barcodeMapper.deleteByBizTypeAndBizIds(bizType, bizIds);
  177 + }
  178 +
168 private MesWmBarcodeDO validateBarcodeExists(Long id) { 179 private MesWmBarcodeDO validateBarcodeExists(Long id) {
169 MesWmBarcodeDO barcode = barcodeMapper.selectById(id); 180 MesWmBarcodeDO barcode = barcodeMapper.selectById(id);
170 if (barcode == null) { 181 if (barcode == null) {
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/sn/MesWmSnServiceImpl.java
1 package cn.iocoder.yudao.module.mes.service.wm.sn; 1 package cn.iocoder.yudao.module.mes.service.wm.sn;
2 2
  3 +import cn.hutool.core.collection.CollUtil;
3 import cn.hutool.core.util.IdUtil; 4 import cn.hutool.core.util.IdUtil;
4 import cn.iocoder.yudao.framework.common.pojo.PageResult; 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 import cn.iocoder.yudao.module.mes.controller.admin.wm.sn.vo.MesWmSnGenerateReqVO; 6 import cn.iocoder.yudao.module.mes.controller.admin.wm.sn.vo.MesWmSnGenerateReqVO;
@@ -8,9 +9,11 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.sn.vo.MesWmSnPageReqVO; @@ -8,9 +9,11 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.sn.vo.MesWmSnPageReqVO;
8 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.sn.MesWmSnDO; 9 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.sn.MesWmSnDO;
9 import cn.iocoder.yudao.module.mes.dal.mysql.wm.sn.MesWmSnMapper; 10 import cn.iocoder.yudao.module.mes.dal.mysql.wm.sn.MesWmSnMapper;
10 import cn.iocoder.yudao.module.mes.enums.md.autocode.MesMdAutoCodeRuleCodeEnum; 11 import cn.iocoder.yudao.module.mes.enums.md.autocode.MesMdAutoCodeRuleCodeEnum;
  12 +import cn.iocoder.yudao.module.mes.enums.wm.BarcodeBizTypeEnum;
11 import cn.iocoder.yudao.module.mes.service.md.autocode.MesMdAutoCodeRecordService; 13 import cn.iocoder.yudao.module.mes.service.md.autocode.MesMdAutoCodeRecordService;
12 import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; 14 import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService;
13 import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; 15 import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService;
  16 +import cn.iocoder.yudao.module.mes.service.wm.barcode.MesWmBarcodeService;
14 import jakarta.annotation.Resource; 17 import jakarta.annotation.Resource;
15 import lombok.extern.slf4j.Slf4j; 18 import lombok.extern.slf4j.Slf4j;
16 import org.springframework.stereotype.Service; 19 import org.springframework.stereotype.Service;
@@ -20,6 +23,8 @@ import org.springframework.validation.annotation.Validated; @@ -20,6 +23,8 @@ import org.springframework.validation.annotation.Validated;
20 import java.util.ArrayList; 23 import java.util.ArrayList;
21 import java.util.List; 24 import java.util.List;
22 25
  26 +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
  27 +
23 /** 28 /**
24 * MES SN 码 Service 实现类 29 * MES SN 码 Service 实现类
25 * 30 *
@@ -39,6 +44,8 @@ public class MesWmSnServiceImpl implements MesWmSnService { @@ -39,6 +44,8 @@ public class MesWmSnServiceImpl implements MesWmSnService {
39 private MesMdItemService itemService; 44 private MesMdItemService itemService;
40 @Resource 45 @Resource
41 private MesProWorkOrderService workOrderService; 46 private MesProWorkOrderService workOrderService;
  47 + @Resource
  48 + private MesWmBarcodeService barcodeService;
42 49
43 @Override 50 @Override
44 @Transactional(rollbackFor = Exception.class) 51 @Transactional(rollbackFor = Exception.class)
@@ -62,6 +69,9 @@ public class MesWmSnServiceImpl implements MesWmSnService { @@ -62,6 +69,9 @@ public class MesWmSnServiceImpl implements MesWmSnService {
62 } 69 }
63 // 批量插入 70 // 批量插入
64 snMapper.insertBatch(sns); 71 snMapper.insertBatch(sns);
  72 + // 自动生成条码
  73 + sns.forEach(sn -> barcodeService.autoGenerateBarcode(BarcodeBizTypeEnum.SN.getValue(),
  74 + sn.getId(), sn.getCode(), sn.getCode()));
65 } 75 }
66 76
67 @Override 77 @Override
@@ -77,7 +87,16 @@ public class MesWmSnServiceImpl implements MesWmSnService { @@ -77,7 +87,16 @@ public class MesWmSnServiceImpl implements MesWmSnService {
77 @Override 87 @Override
78 @Transactional(rollbackFor = Exception.class) 88 @Transactional(rollbackFor = Exception.class)
79 public void deleteSnByUuid(String uuid) { 89 public void deleteSnByUuid(String uuid) {
  90 + List<MesWmSnDO> sns = snMapper.selectListByUuid(uuid);
  91 + if (CollUtil.isEmpty(sns)) {
  92 + return;
  93 + }
  94 +
  95 + // 删除 SN 码关联的条码记录
  96 + barcodeService.deleteBarcodeByBizTypeAndBizIds(BarcodeBizTypeEnum.SN.getValue(),
  97 + convertList(sns, MesWmSnDO::getId));
  98 + // 删除 SN 码
80 snMapper.deleteByUuid(uuid); 99 snMapper.deleteByUuid(uuid);
81 } 100 }
82 101
83 -}  
84 \ No newline at end of file 102 \ No newline at end of file
  103 +}