risk_inspection_dicts.sql 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. -- ============================================================
  2. -- 巡检相关字典(按 UI 设计稿)
  3. -- value 一律中文
  4. -- ============================================================
  5. -- 1) 巡检类型
  6. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  7. (12225, '000000', '巡检类型', 'risk_inspection_type', 103, 1, NOW(), '巡检管理-巡检类型下拉');
  8. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  9. (1, '园区巡检打卡', '园区巡检打卡', 'risk_inspection_type', NULL, 'primary', 'N', 103, 1, NOW(), NULL),
  10. (2, '门店闭店检查', '门店闭店检查', 'risk_inspection_type', NULL, 'success', 'N', 103, 1, NOW(), NULL),
  11. (3, '打样设施设备检查', '打样设施设备检查', 'risk_inspection_type', NULL, 'warning', 'N', 103, 1, NOW(), NULL);
  12. -- 2) 打卡状态(任务级 - 已/未打卡)
  13. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  14. (12226, '000000', '打卡状态', 'risk_inspection_status', 103, 1, NOW(), '巡检管理-打卡状态下拉(已/未打卡)');
  15. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  16. (1, '已打卡', '已打卡', 'risk_inspection_status', NULL, 'success', 'N', 103, 1, NOW(), '已有打卡记录'),
  17. (2, '未打卡', '未打卡', 'risk_inspection_status', NULL, 'info', 'N', 103, 1, NOW(), '尚无打卡记录');
  18. -- 3) 打卡结果(任务级 - 正常/异常)
  19. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  20. (12227, '000000', '打卡结果', 'risk_inspection_result', 103, 1, NOW(), '巡检管理-打卡结果下拉(正常/异常)');
  21. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  22. (1, '正常', '正常', 'risk_inspection_result', NULL, 'success', 'N', 103, 1, NOW(), 'record.result = 1'),
  23. (2, '异常', '异常', 'risk_inspection_result', NULL, 'danger', 'N', 103, 1, NOW(), 'record.result = 0');
  24. -- 4) 巡检方式(任务级 - 常规/扫码)
  25. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  26. (12228, '000000', '巡检方式', 'risk_inspection_method', 103, 1, NOW(), '巡检任务-打卡方式');
  27. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  28. (1, '常规', '常规', 'risk_inspection_method', NULL, 'info', 'N', 103, 1, NOW(), NULL),
  29. (2, '扫码', '扫码', 'risk_inspection_method', NULL, 'primary', 'N', 103, 1, NOW(), NULL);
  30. -- 5) 巡检周期
  31. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  32. (12229, '000000', '巡检周期', 'risk_inspection_cycle', 103, 1, NOW(), '巡检任务-巡检周期');
  33. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  34. (1, '每日', '每日', 'risk_inspection_cycle', NULL, 'primary', 'N', 103, 1, NOW(), NULL),
  35. (2, '每周', '每周', 'risk_inspection_cycle', NULL, 'success', 'N', 103, 1, NOW(), NULL),
  36. (3, '每月', '每月', 'risk_inspection_cycle', NULL, 'warning', 'N', 103, 1, NOW(), NULL);
  37. -- 6) 巡检项类型
  38. INSERT INTO sys_dict_type(dict_id, tenant_id, dict_name, dict_type, create_dept, create_by, create_time, remark) VALUES
  39. (12230, '000000', '巡检项类型', 'risk_inspection_item_type', 103, 1, NOW(), '巡检任务项-类型');
  40. INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, create_dept, create_by, create_time, remark) VALUES
  41. (1, '安全', '安全', 'risk_inspection_item_type', NULL, 'danger', 'N', 103, 1, NOW(), NULL),
  42. (2, '卫生', '卫生', 'risk_inspection_item_type', NULL, 'info', 'N', 103, 1, NOW(), NULL),
  43. (3, '设备', '设备', 'risk_inspection_item_type', NULL, 'primary', 'N', 103, 1, NOW(), NULL),
  44. (4, '其他', '其他', 'risk_inspection_item_type', NULL, 'default', 'N', 103, 1, NOW(), NULL);