P2_WP01_SPARE_PARTS_DOMAIN_TEMPLATE.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "template_code": "spare_parts",
  3. "name": "备品备件/物料主数据",
  4. "description": "P2-WP00 默认第二业务域的可导入领域模板;企业真实样本和人员在复制验收前绑定。",
  5. "lifecycle_status": "active",
  6. "object_types": [
  7. {
  8. "type_code": "material",
  9. "name": "物料主数据",
  10. "stable_uid_prefix": "MAT",
  11. "source_identity_fields": ["source_system", "material_code"],
  12. "fields": [
  13. {"code": "material_code", "name": "物料编码", "type": "string", "required": true},
  14. {"code": "name", "name": "物料名称", "type": "string", "required": true},
  15. {"code": "specification", "name": "规格", "type": "string", "required": false},
  16. {"code": "uom_code", "name": "计量单位", "type": "string", "required": true},
  17. {"code": "category_code", "name": "分类编码", "type": "string", "required": true},
  18. {"code": "status", "name": "生命周期状态", "type": "string", "required": true}
  19. ]
  20. },
  21. {
  22. "type_code": "material_category",
  23. "name": "物料分类",
  24. "stable_uid_prefix": "MCT",
  25. "source_identity_fields": ["source_system", "category_code"],
  26. "fields": [
  27. {"code": "category_code", "name": "分类编码", "type": "string", "required": true},
  28. {"code": "name", "name": "分类名称", "type": "string", "required": true},
  29. {"code": "parent_code", "name": "上级分类编码", "type": "string", "required": false}
  30. ]
  31. },
  32. {
  33. "type_code": "storage_location",
  34. "name": "仓库与库位",
  35. "stable_uid_prefix": "LOC",
  36. "source_identity_fields": ["source_system", "warehouse_code", "location_code"],
  37. "fields": [
  38. {"code": "warehouse_code", "name": "仓库编码", "type": "string", "required": true},
  39. {"code": "location_code", "name": "库位编码", "type": "string", "required": true},
  40. {"code": "name", "name": "库位名称", "type": "string", "required": true}
  41. ]
  42. },
  43. {
  44. "type_code": "inventory_balance",
  45. "name": "库存余额",
  46. "stable_uid_prefix": "INV",
  47. "source_identity_fields": ["source_system", "material_code", "warehouse_code", "location_code", "snapshot_at"],
  48. "fields": [
  49. {"code": "material_code", "name": "物料编码", "type": "string", "required": true},
  50. {"code": "warehouse_code", "name": "仓库编码", "type": "string", "required": true},
  51. {"code": "location_code", "name": "库位编码", "type": "string", "required": true},
  52. {"code": "quantity", "name": "库存数量", "type": "number", "required": true},
  53. {"code": "snapshot_at", "name": "快照时间", "type": "datetime", "required": true}
  54. ]
  55. },
  56. {
  57. "type_code": "supplier_material_mapping",
  58. "name": "供应商物料映射",
  59. "stable_uid_prefix": "SUM",
  60. "source_identity_fields": ["source_system", "supplier_code", "supplier_material_code"],
  61. "fields": [
  62. {"code": "supplier_code", "name": "供应商编码", "type": "string", "required": true},
  63. {"code": "supplier_material_code", "name": "供应商物料编码", "type": "string", "required": true},
  64. {"code": "material_code", "name": "平台物料编码", "type": "string", "required": true}
  65. ]
  66. },
  67. {
  68. "type_code": "equipment_compatibility",
  69. "name": "设备备件适配关系",
  70. "stable_uid_prefix": "ECP",
  71. "source_identity_fields": ["source_system", "material_code", "equipment_type"],
  72. "fields": [
  73. {"code": "material_code", "name": "物料编码", "type": "string", "required": true},
  74. {"code": "equipment_type", "name": "设备类型", "type": "string", "required": true},
  75. {"code": "evidence_ref", "name": "适配证据引用", "type": "string", "required": true}
  76. ]
  77. }
  78. ],
  79. "responsibility_roles": [
  80. {"code": "material_domain_owner", "name": "物料域负责人", "raci_role": "accountable"},
  81. {"code": "material_data_steward", "name": "物料数据管理员", "raci_role": "responsible"},
  82. {"code": "phase2_acceptance_owner", "name": "第二阶段验收负责人", "raci_role": "consulted"}
  83. ],
  84. "rules": [
  85. {"code": "QR-MAT-001", "name": "物料编码必填", "dimension": "COMPLETENESS", "target_object": "material"},
  86. {"code": "QR-MAT-002", "name": "物料编码全局唯一", "dimension": "UNIQUENESS", "target_object": "material"},
  87. {"code": "QR-MAT-003", "name": "物料名称与规格完整", "dimension": "COMPLETENESS", "target_object": "material"},
  88. {"code": "QR-MAT-004", "name": "计量单位符合代码集", "dimension": "VALIDITY", "target_object": "material"},
  89. {"code": "QR-MAT-005", "name": "物料分类引用有效", "dimension": "REFERENTIAL_INTEGRITY", "target_object": "material"},
  90. {"code": "QR-MAT-006", "name": "库存快照新鲜度", "dimension": "FRESHNESS", "target_object": "inventory_balance"},
  91. {"code": "QR-MAT-007", "name": "库存数量非负", "dimension": "VALIDITY", "target_object": "inventory_balance"},
  92. {"code": "QR-MAT-008", "name": "设备备件适配关系可追溯", "dimension": "TRACEABILITY", "target_object": "equipment_compatibility"}
  93. ],
  94. "metrics": [
  95. {"code": "material_completeness", "name": "物料主数据完整率", "unit": "%"},
  96. {"code": "inventory_freshness", "name": "库存快照新鲜率", "unit": "%"},
  97. {"code": "responsibility_coverage", "name": "责任覆盖率", "unit": "%"}
  98. ],
  99. "seed_data": [
  100. {
  101. "kind": "source_contract",
  102. "records": [
  103. {"id": "SRC-MATERIAL-POSTGRES", "type": "PostgreSQL", "binding_status": "ENTERPRISE_SAMPLE_REQUIRED"},
  104. {"id": "SRC-INVENTORY-MYSQL", "type": "MySQL", "binding_status": "ENTERPRISE_SAMPLE_REQUIRED"},
  105. {"id": "SRC-SUPPLIER-FILE", "type": "controlled_file", "binding_status": "ENTERPRISE_SAMPLE_REQUIRED"}
  106. ]
  107. },
  108. {
  109. "kind": "term_and_code_set",
  110. "records": [
  111. {"id": "TERM-MATERIAL-CATEGORY", "name": "物料分类术语与代码集"},
  112. {"id": "CODE-UOM", "name": "计量单位代码集"},
  113. {"id": "CODE-MATERIAL-STATUS", "name": "物料生命周期状态代码集"},
  114. {"id": "TERM-SPARE-PART-CRITICALITY", "name": "备件关键度术语"}
  115. ]
  116. },
  117. {
  118. "kind": "workflow_contract",
  119. "records": [
  120. {"id": "WF-MAT-001", "name": "物料主数据纠错审批"},
  121. {"id": "WF-MAT-002", "name": "物料质量问题整改"},
  122. {"id": "WF-MAT-003", "name": "术语与代码集变更"}
  123. ]
  124. }
  125. ]
  126. }