已添加20个文件
已修改10个文件
4642 ■■■■■ 文件已修改
db/430设备管理数据库设计.pdma.json 2342 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
db/template/生产设备三级保养规范.docx 补丁 | 查看 | 原始文档 | blame | 历史
db/template/生产设备二级保养规范.docx 补丁 | 查看 | 原始文档 | blame | 历史
db/template/设备台账导入模板.xls 补丁 | 查看 | 原始文档 | blame | 历史
db/template/设备点检标准导入模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamMaintenanceStandardDetailCategory.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/TechnicalStatusEvaluationStandardEnum.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamWeekInspectionDetail.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/ImportException.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java 490 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamTechnicalStatusEvaluationStandardController.java 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamTechnicalStatusEvaluationStandardDetailController.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationStandard.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationStandardDetail.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamTechnicalStatusEvaluationStandardDetailMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamTechnicalStatusEvaluationStandardMapper.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationStandardDetailMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationStandardMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamMaintenanceStandardRequest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamTechnicalStatusEvaluationStandardRequest.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamMaintenanceStandardService.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamTechnicalStatusEvaluationStandardDetailService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamTechnicalStatusEvaluationStandardService.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java 947 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamTechnicalStatusEvaluationStandardDetailServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamTechnicalStatusEvaluationStandardServiceImpl.java 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/model/EamBaseRepairDepartTreeModel.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
db/430É豸¹ÜÀíÊý¾Ý¿âÉè¼Æ.pdma.json
@@ -4,7 +4,7 @@
  "avatar": "",
  "version": "4.9.2",
  "createdTime": "2025-3-10 16:38:19",
  "updatedTime": "2025-7-5 16:08:16",
  "updatedTime": "2025-7-7 21:00:24",
  "dbConns": [],
  "profile": {
    "default": {
@@ -632,7 +632,7 @@
      "#DDE5FF"
    ],
    "DDLToggleCase": "L",
    "menuWidth": "472px"
    "menuWidth": "371px"
  },
  "entities": [
    {
@@ -9778,6 +9778,24 @@
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "854769A0-58E7-4492-A427-683CE6235B78"
        },
        {
          "defKey": "change_order_num",
          "defName": "变更单号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "id": "494EB2D9-8444-44B8-A489-3992EA4FD8B7"
        },
        {
          "defKey": "applicant",
@@ -23703,6 +23721,24 @@
          "id": "2C88A464-AC97-4512-94EE-CCD08ED27A64"
        },
        {
          "defKey": "standard_version",
          "defName": "版本",
          "comment": "V1,V2+",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "1ACB9237-2E42-44F0-AC09-BBB51D55A83D"
        },
        {
          "defKey": "remark",
          "defName": "备注",
          "comment": "",
@@ -25414,7 +25450,7 @@
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_evaluation_change",
      "defKey": "eam_technical_status_evaluation_order_change",
      "defName": "技术状态鉴定工单变更",
      "comment": "",
      "properties": {
@@ -25686,6 +25722,24 @@
          "uiHint": null
        },
        {
          "defKey": "change_order_num",
          "defName": "变更单号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "id": "BA992FDC-2DDA-4435-95B3-2211C2E5D9DD"
        },
        {
          "defKey": "applicant",
          "defName": "申请人",
          "comment": "",
@@ -25950,6 +26004,2281 @@
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "4478B303-EEFF-4F42-A389-0AC012E4DBAD",
          "uiHint": null
        }
      ],
      "correlations": [],
      "indexes": [],
      "type": "P"
    },
    {
      "id": "E5BC8ED5-0FE8-41DB-9A72-AB5414891467",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_change",
      "defName": "技术状态变更申请",
      "comment": "",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "sysProps": {
        "nameTemplate": "{defKey}[{defName}]"
      },
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "primaryKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "refDict",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr1",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr2",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr3",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr4",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr5",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr6",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr7",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr8",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr9",
          "freeze": false,
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "主键",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "C56499D2-37C3-413D-8E4F-17E56085A1EA"
        },
        {
          "defKey": "create_by",
          "defName": "创建人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "9703A9FB-FB51-4240-AF3F-0BFE2AE1A284",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "67CA28C1-27EA-4F24-90AC-75C57C90E82F",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "update_by",
          "defName": "更新人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "AF1AF632-244D-4737-8164-DB1E6880C5EB",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "491A3F21-C6EE-4CA0-ACE5-1C90B57EB487",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "del_flag",
          "defName": "删除标记",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
          "extProps": {},
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "id": "94E9B19F-4609-40EA-94EC-12DD61E442EF"
        },
        {
          "defKey": "change_order_num",
          "defName": "变更单号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "id": "717D4057-4F2C-49DC-9FD8-E9C81700FF66"
        },
        {
          "defKey": "change_status",
          "defName": "变更单状态",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "id": "93F32EBA-AAA0-447E-8245-C00E57E6A2D6"
        },
        {
          "defKey": "designer",
          "defName": "编制人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "282042BC-0C41-4778-985F-0057791BBB1B"
        },
        {
          "defKey": "designer_time",
          "defName": "编制时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "4256A20B-194E-4656-AFC0-C87A1F282D4C"
        },
        {
          "defKey": "depart_header_signature",
          "defName": "使用单位室主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "988E3E7D-0A25-4FDF-A126-01685BCD3BD3"
        },
        {
          "defKey": "depart_header_signature_time",
          "defName": "使用单位室主管签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "E0CF80C5-1DEC-497D-A921-11F8D28FDDDD"
        },
        {
          "defKey": "depart_header_signature_comment",
          "defName": "使用单位室主管意见",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "480E845A-6BD4-48DF-AF39-2B7BD1372B44"
        },
        {
          "defKey": "depart_leader_signature",
          "defName": "使用单位部主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "80AECA33-66B4-4E52-A55E-255128B092D3"
        },
        {
          "defKey": "depart_leader_signature_time",
          "defName": "使用单位部主管签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "C77D4C1E-8FB6-4AA4-984F-98B64E7FFE5E"
        },
        {
          "defKey": "depart_leader_signature_comment",
          "defName": "使用单位部主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "9FB2FB56-7A3D-4B68-B84E-DFE6B41611C8"
        }
      ],
      "correlations": [],
      "indexes": [],
      "type": "P"
    },
    {
      "id": "306F9BF6-990A-44D0-9585-CC5E40E639F0",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_change_detail",
      "defName": "技术状态变更申请明细",
      "comment": "",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "sysProps": {
        "nameTemplate": "{defKey}[{defName}]"
      },
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "primaryKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "refDict",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr1",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr2",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr3",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr4",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr5",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr6",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr7",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr8",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr9",
          "freeze": false,
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "主键",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "DC9BB1FC-D5FF-4367-B77B-32C711A04483"
        },
        {
          "defKey": "create_by",
          "defName": "创建人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "A6D79216-32F3-4012-9BC4-5623379DDEC2",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "7F466F98-692B-43CD-BAAC-2C4226A18F97",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "update_by",
          "defName": "更新人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "B71AB7A6-0FFE-4E62-9DD2-73712112F073",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "AA935277-83FE-4AC6-A827-E10EFD3C8024",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "equipment_id",
          "defName": "设备ID",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "952CD30C-1978-4035-9162-B8E489BA58CC"
        },
        {
          "defKey": "change_category",
          "defName": "变更原因",
          "comment": "搬迁、大修、改造、其他",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "id": "5F9BF524-B568-4604-AD37-3EC6147F224E"
        },
        {
          "defKey": "change_date",
          "defName": "变更日期",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "B52C9982-8BCA-4789-BE42-B1B279563503"
        },
        {
          "defKey": "change_technical_status",
          "defName": "变更后技术状态",
          "comment": "变更通过后默认设备技术状态改为禁用",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "id": "09A5EAF8-377F-47C2-98CF-9B7DEC5C23D1"
        },
        {
          "defKey": "acceptance_checker",
          "defName": "验收检查人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "814CE3EC-0C25-4CC2-982D-DF04CBA755E0"
        },
        {
          "defKey": "acceptance_check_time",
          "defName": "验收检查时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "247046A9-4B28-4B3F-9E32-E2650BCF0001"
        },
        {
          "defKey": "acceptance_check_result",
          "defName": "验收检查结果",
          "comment": "大修、改造 éœ€è¦å¡«å†™éªŒæ”¶ç»“果,搬迁按照技术状态鉴定工单维护,其他暂未使用到,只预留此类型",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "id": "589C45F0-0F8C-4497-8999-A8314DE5D601"
        },
        {
          "defKey": "order_id",
          "defName": "技术状态鉴定工单ID",
          "comment": "搬迁使用",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "153169DD-C196-48EC-B0B4-60626C830D64"
        }
      ],
      "correlations": [],
      "indexes": [],
      "type": "P"
    },
    {
      "id": "6102925D-12F5-42D2-A721-5BBAE73F9087",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_evaluation_application",
      "defName": "加工设备技术鉴定申请",
      "comment": "禁用状态的设备或临时进行技术鉴定时使用",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "sysProps": {
        "nameTemplate": "{defKey}[{defName}]"
      },
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "primaryKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "refDict",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr1",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr2",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr3",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr4",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr5",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr6",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr7",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr8",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr9",
          "freeze": false,
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "主键",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "99FD714F-59B6-4F89-85E4-822D4CF23A9A"
        },
        {
          "defKey": "create_by",
          "defName": "创建人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "2E8ADC73-5A90-463A-B31E-CDF2501F72B5",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "F0794F92-0F46-41F4-A363-B9DD42E41420",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "update_by",
          "defName": "更新人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "48108B34-F5D8-4441-9B2D-8A2FAEEC55FD",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "7C8C3F81-A701-46BD-A482-EA2CA9B9C6B8",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "del_flag",
          "defName": "删除标记",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
          "extProps": {},
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "id": "8F48FD63-57D5-46B4-8C22-DB75D8321E15"
        },
        {
          "defKey": "application_order_num",
          "defName": "申请单号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "id": "054483BD-F2AA-4DD4-9A80-704EE7CDB735"
        },
        {
          "defKey": "applicant",
          "defName": "申请人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "1AC06A69-38F6-41F5-A785-E98ABB9D0685",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "factory_org_code",
          "defName": "申请部门",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "7F94F461-B9D1-47B4-A106-EF89D09E6179",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "apply_date",
          "defName": "申请日期",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "B59FFE5B-DCF7-4AB2-9B43-40F83A5F7730",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "application_status",
          "defName": "申请单状态",
          "comment": "待提交、待单位室级领导审核、生产设备管理主管审核、待保障部领导审核、已作废、已完成",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "D373EC7A-D494-4C85-8BCA-3088A7B77E0F",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "depart_header_signature",
          "defName": "申请单位室级领导签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "2E4BDFC0-31BE-48A8-A426-51D2A03FBA30"
        },
        {
          "defKey": "depart_header_signature_time",
          "defName": "申请单位室级领导签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "69D24654-9C0B-41E5-BACA-8205ADC593B5"
        },
        {
          "defKey": "depart_header_comment",
          "defName": "申请单位室级领导意见",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "AC560696-58C2-4EA1-BE12-739DE6A3356D"
        },
        {
          "defKey": "production_header_signature",
          "defName": "生产设备管理主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "2B1C6619-3072-46A9-BA1A-0016F657A2D7"
        },
        {
          "defKey": "production_header_signature_time",
          "defName": "生产设备管理主管签字四件",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "211441D2-7629-4881-8140-77EBB38A346E"
        },
        {
          "defKey": "production_header_comment",
          "defName": "生产设备管理主管意见",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "A4D30C12-831A-4BA5-95DB-9BE4E2C10157"
        },
        {
          "defKey": "production_support_signature",
          "defName": "生产保障部领导签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "id": "4DC62EE3-BE55-4B2D-92F6-391AC8DBC90B"
        },
        {
          "defKey": "production_support_signature_time",
          "defName": "生产保障部领导签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
          "extProps": {},
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "id": "235E86E2-B79D-456A-AFA0-0402225859F7"
        },
        {
          "defKey": "production_support_comment",
          "defName": "生产保障部领导意见",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "0A1D4698-D332-4747-A96E-EF03DFAD0305"
        }
      ],
      "correlations": [],
      "indexes": [],
      "type": "P"
    },
    {
      "id": "6221E3E7-A119-4AE7-872F-1159192BD6AC",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_deactivate",
      "defName": "停用加工设备申请单",
      "comment": "申请单位申请停用设备,审批通过后修改设备状态为禁用",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "sysProps": {
        "nameTemplate": "{defKey}[{defName}]"
      },
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "primaryKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "refDict",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr1",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr2",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr3",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr4",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr5",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr6",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr7",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr8",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr9",
          "freeze": false,
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "主键",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "F2C88E1C-5120-4886-9E45-CC7B31693BB2"
        },
        {
          "defKey": "create_by",
          "defName": "创建人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "DDDD512B-CCC9-4DE5-B70F-2505EAAE7C62",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "8A3AC3BB-E3CF-4F12-BA3B-77B94C00951B",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "update_by",
          "defName": "更新人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "40C56475-B18E-4C1E-86B9-4401673BE3D4",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "C05A244F-9FEF-4FBC-B7EE-94070551CCFA",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "del_flag",
          "defName": "删除标记",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
          "extProps": {},
          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
          "id": "D68420BF-7F43-4D7F-ABDC-8420A7BEE9D6"
        },
        {
          "defKey": "deactivate_order_num",
          "defName": "停用单号",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "C912ECE4-63A3-43CE-B630-753D22EFD6AA",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "applicant",
          "defName": "申请人",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "DAB38D48-1DCC-4550-A277-92A45EB13A63",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "factory_org_code",
          "defName": "申请部门",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "0562C099-F99E-4E21-95F4-5B549A105090",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "apply_date",
          "defName": "申请日期",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "A63A6872-5871-43FB-B4F1-6F59D5DA67FD",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "application_status",
          "defName": "申请单状态",
          "comment": "待提交、待单位室级领导审核、生产设备管理主管审核、待保障部领导审核、已作废、已完成",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "A1099633-C82F-4231-862C-E54788CA2A7F",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "depart_header_signature",
          "defName": "使用单位室主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "D9162256-DFC0-44BC-A655-C5CAB95CE69A",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "depart_header_signature_time",
          "defName": "使用单位室主管签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "05AE823E-F6F8-4EF9-9D01-A39EB035CFC4",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "depart_header_signature_comment",
          "defName": "使用单位室主管意见",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "A85B1391-4D22-4302-9E20-54E0DC76C7FA",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "depart_leader_signature",
          "defName": "使用单位部主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "5DF1BC4B-116D-4643-B8CC-C49A1FB6C103",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "depart_leader_signature_time",
          "defName": "使用单位部主管签字时间",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "A0B2CBD8-2241-47B7-B80D-E5F91BEFA724",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "depart_leader_signature_comment",
          "defName": "使用单位部主管签字",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "refDict": "",
          "extProps": {},
          "notes": {},
          "attr1": "",
          "attr2": "",
          "attr3": "",
          "attr4": "",
          "attr5": "",
          "attr6": "",
          "attr7": "",
          "attr8": "",
          "attr9": "",
          "id": "D05DDC06-FC09-42DC-B236-CE3E3C748486",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        }
      ],
      "correlations": [],
      "indexes": [],
      "type": "P"
    },
    {
      "id": "CB01E297-3E90-404A-883F-84A36193305F",
      "env": {
        "base": {
          "nameSpace": "",
          "codeRoot": ""
        }
      },
      "defKey": "eam_technical_status_deactivate_detail",
      "defName": "停用加工设备明细",
      "comment": "",
      "properties": {
        "partitioned by": "(date string)",
        "row format delimited": "",
        "fields terminated by ','": "",
        "collection items terminated by '-'": "",
        "map keys terminated by ':'": "",
        "store as textfile;": ""
      },
      "sysProps": {
        "nameTemplate": "{defKey}[{defName}]"
      },
      "notes": {},
      "headers": [
        {
          "refKey": "hideInGraph",
          "hideInGraph": true
        },
        {
          "refKey": "defKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "defName",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "comment",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "primaryKey",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "notNull",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "autoIncrement",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "domain",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "type",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "len",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "scale",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "refDict",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "defaultValue",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "isStandard",
          "freeze": false,
          "hideInGraph": false
        },
        {
          "refKey": "uiHint",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "extProps",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr1",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr2",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr3",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr4",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr5",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr6",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr7",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr8",
          "freeze": false,
          "hideInGraph": true
        },
        {
          "refKey": "attr9",
          "freeze": false,
          "hideInGraph": true
        }
      ],
      "fields": [
        {
          "defKey": "id",
          "defName": "主键",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": true,
          "notNull": true,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "707AA3ED-8295-48C4-B3F8-9E75E5031043"
        },
        {
          "defKey": "create_by",
          "defName": "创建人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "6498C2CC-4BAD-4580-AE67-81F61D0163BB",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "create_time",
          "defName": "创建时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "93855AAD-0A64-4674-967B-B03A16D44E62",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "update_by",
          "defName": "更新人",
          "comment": "",
          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "EC43F0BF-07D0-4B71-82FC-BF642B22A1F2",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
        },
        {
          "defKey": "update_time",
          "defName": "更新时间",
          "comment": "",
          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": true,
          "refDict": "",
          "uiHint": "",
          "id": "C8CA5EE5-181F-4FF8-9D7A-8D07401126FC",
          "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098"
        },
        {
          "defKey": "equipment_id",
          "defName": "设备ID",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
          "id": "814E8815-8591-4E8F-861A-94D4108C5605"
        },
        {
          "defKey": "deactivate_reason",
          "defName": "停用原因",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "EBAC1835-5E2A-4D19-B1C8-0875B3AF5706"
        },
        {
          "defKey": "deactivate_duration",
          "defName": "停用时长",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
          "extProps": {},
          "domain": "FF4459C5-6B45-4DBF-8FC0-E06239BC05B4",
          "id": "2E37AD51-B4B4-4122-99D5-8552F099EF2A"
        },
        {
          "defKey": "deactivate_duration_unit",
          "defName": "停用时长单位",
          "comment": "天、月、年",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
          "id": "583D0E63-78AF-46F4-BD7A-4224161872CF"
        }
      ],
      "correlations": [],
@@ -26702,7 +29031,12 @@
        "73D3544F-E5F5-4C3F-BF5C-84D597C11BC6",
        "2E990330-B98A-450F-A504-96771FDB71F1",
        "882BADD5-3111-401C-9CF0-5ACAE364CA59",
        "191A7D10-95F3-48A9-92DD-CA7C5AEC0A57"
        "191A7D10-95F3-48A9-92DD-CA7C5AEC0A57",
        "E5BC8ED5-0FE8-41DB-9A72-AB5414891467",
        "306F9BF6-990A-44D0-9585-CC5E40E639F0",
        "6102925D-12F5-42D2-A721-5BBAE73F9087",
        "6221E3E7-A119-4AE7-872F-1159192BD6AC",
        "CB01E297-3E90-404A-883F-84A36193305F"
      ],
      "refViews": [],
      "refDiagrams": [],
db/template/Éú²úÉ豸Èý¼¶±£Ñø¹æ·¶.docx
Binary files differ
db/template/Éú²úÉ豸¶þ¼¶±£Ñø¹æ·¶.docx
Binary files differ
db/template/É豸̨Õ˵¼ÈëÄ£°å.xls
Binary files differ
db/template/É豸µã¼ì±ê×¼µ¼ÈëÄ£°å.xlsx
Binary files differ
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamMaintenanceStandardDetailCategory.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package org.jeecg.modules.eam.constant;
public enum EamMaintenanceStandardDetailCategory {
    DAY_INSPECTION,  //日点检
    WEEK_INSPECTION, //周点检
    OPERATOR_MAINTENANCE, //操作工
    REPAIRER_MAINTENANCE //维修工
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/TechnicalStatusEvaluationStandardEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package org.jeecg.modules.eam.constant;
public enum TechnicalStatusEvaluationStandardEnum {
    WAIT_SUBMIT, //待提交
    ENABLE, //启用
    DISABLE, //禁用
    ;
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java
@@ -113,4 +113,8 @@
    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String equipmentName;
    @ApiModelProperty(value = "设备型号")
    @TableField(exist = false)
    private String equipmentModel;
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamWeekInspectionDetail.java
@@ -65,6 +65,14 @@
    /**保养要求*/
    @ApiModelProperty(value = "保养要求")
    private String  itemDemand;
    /**点检人*/
    @Excel(name = "点检人", width = 15)
    @ApiModelProperty(value = "点检人")
    private String inspector;
    /**点检时间*/
    @Excel(name = "点检时间", width = 15)
    @ApiModelProperty(value = "点检时间")
    private String inspectTime;
    public EamWeekInspectionDetail(){}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/ImportException.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package org.jeecg.modules.eam.request;
public class ImportException extends RuntimeException {
    public ImportException(String message) {
        super(message);
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java
@@ -6,37 +6,22 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.jeecg.common.api.vo.FileUploadResult;
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.util.FileUtil;
import org.jeecg.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.eam.constant.MaintenanceCategoryEnum;
import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum;
import org.jeecg.modules.eam.dto.MaintenanceStandardImport;
import org.jeecg.modules.eam.dto.SecondMaintenanceStandardImport;
import org.jeecg.modules.eam.dto.ThirdMaintenanceStandardImport;
import org.jeecg.modules.eam.dto.WeekMaintenanceStandardImport;
import org.jeecg.modules.eam.entity.EamEquipment;
import org.jeecg.modules.eam.entity.EamMaintenanceStandard;
import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail;
import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest;
import org.jeecg.modules.eam.service.IEamEquipmentService;
import org.jeecg.modules.eam.service.IEamMaintenanceStandardService;
import org.jeecg.modules.eam.vo.EamMaintenanceStandardVo;
import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.util.PoiPublicUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -44,10 +29,7 @@
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
/**
 * @Description: ä¿å…»æ ‡å‡†
@@ -69,24 +51,26 @@
    /**
     * æµç¨‹å¯åЍ,保存对应的数据
     *
     * @param id
     * @return
     */
    @ApiOperation(value = "保养标准-流程启动保存对应的数据", notes = "保养标准-流程启动保存对应的数据")
    @GetMapping(value = "/saveEamMaintenanceStandardProcess")
    public Result<?> saveEamMaintenanceStandardProcess(String id){
        return Result.OK(eamMaintenanceStandardService.saveEamMaintenanceStandardProcess(id));
    public Result<?> saveEamMaintenanceStandardProcess(String id) {
        return eamMaintenanceStandardService.saveEamMaintenanceStandardProcess(id);
    }
    /**
     * æµç¨‹å®¡æ ¸
     *
     * @param eamMaintenanceStandardVo
     * @return
     */
    @ApiOperation(value = "保养标准-流程审核", notes = "保养标准-流程审核")
    @PostMapping(value = "/audit")
    public Result<?> auditEamMaintenanceStandard(EamMaintenanceStandardVo eamMaintenanceStandardVo){
        return Result.OK(eamMaintenanceStandardService.auditEamMaintenanceStandard(eamMaintenanceStandardVo));
    public Result<?> auditEamMaintenanceStandard(@RequestBody EamMaintenanceStandardVo eamMaintenanceStandardVo) {
        return eamMaintenanceStandardService.auditEamMaintenanceStandard(eamMaintenanceStandardVo);
    }
    /**
@@ -166,7 +150,7 @@
     */
    @AutoLog(value = "保养标准-升版")
    @ApiOperation(value = "保养标准-升版", notes = "保养标准-升版")
    @RequestMapping(value = "/upgrade", method = {RequestMethod.PUT, RequestMethod.POST})
    @PutMapping(value = "/upgrade")
    public Result<?> upgrade(@RequestBody EamMaintenanceStandardRequest standardRequest) {
        if (standardRequest == null) {
            return Result.error("添加的对象不能为空!");
@@ -185,7 +169,8 @@
    /**
     * æŸ¥è¯¢æ ‡å‡†åˆ—表-前端展示该用户拥有的标准
     * @param keyword è®¾å¤‡ç¼–号
     *
     * @param keyword             è®¾å¤‡ç¼–号
     * @param maintenanceCategory ä¿å…»ç±»åž‹
     * @return
     */
@@ -249,7 +234,8 @@
        List<String> list = Arrays.asList(ids.split(","));
        list.forEach(id -> {
            EamMaintenanceStandard entity = eamMaintenanceStandardService.getById(id);
            if (entity != null) {
            if (entity != null&&entity.getStandardStatus().equals(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name())) {
                //只删除状态为待提交的
                entity.setDelFlag(CommonConstant.DEL_FLAG_1);
                eamMaintenanceStandardService.updateById(entity);
            }
@@ -282,345 +268,149 @@
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/inspectionImportExcel", method = RequestMethod.POST)
    public Result<?> inspectionImportExcel(HttpServletRequest request, HttpServletResponse response) {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
            // èŽ·å–ä¸Šä¼ æ–‡ä»¶å¯¹è±¡
            MultipartFile file = entity.getValue();
            ImportParams params = new ImportParams();
            params.setTitleRows(2);
            params.setHeadRows(1);
            params.setSheetNum(1);
            params.setNeedSave(true);
            EamMaintenanceStandardRequest standardRequest = new EamMaintenanceStandardRequest();
            try {
                //读取设备编号,图片等
                readExcel(file, standardRequest);
                EamEquipment equipment = eamEquipmentService.selectByEquipmentCode(standardRequest.getEquipmentCode());
                if(equipment == null) {
                    log.error("设备不存在:{}", standardRequest.getEquipmentCode());
                    continue;
                }
                standardRequest.setStandardName(standardRequest.getEquipmentName() + "点检标准");
                standardRequest.setMaintenanceCategory(MaintenanceCategoryEnum.POINT_INSPECTION.name());
                standardRequest.setEquipmentId(equipment.getId());
                //读取保养明细内容
                List<MaintenanceStandardImport> list = ExcelImportUtil.importExcel(file.getInputStream(), MaintenanceStandardImport.class, params);
                //明细项
                List<EamMaintenanceStandardDetail> tableList = list.stream().map(EamMaintenanceStandardDetail::new).collect(Collectors.toList());
                standardRequest.setTableDetailList(tableList);
                String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
                standardRequest.setStandardCode(codeSeq);
                boolean b = eamMaintenanceStandardService.addMaintenanceStandard(standardRequest);
                if (!b) {
                    log.error("保存失败! {}", standardRequest.getEquipmentCode());
                }
            } catch (Exception e) {
                //update-begin-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
                String msg = e.getMessage();
                log.error("文件 {} å¤„理异常: {}", file.getOriginalFilename(), msg, e);
                //update-end-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
            } finally {
                try {
                    file.getInputStream().close();
                } catch (IOException e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
        return Result.ok("文件导入完成!");
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/weekMaintenanceImportExcel", method = RequestMethod.POST)
    public Result<?> weekMaintenanceImportExcel(HttpServletRequest request, HttpServletResponse response) {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
            // èŽ·å–ä¸Šä¼ æ–‡ä»¶å¯¹è±¡
            MultipartFile file = entity.getValue();
            ImportParams params = new ImportParams();
            params.setTitleRows(2);
            params.setHeadRows(1);
            params.setSheetNum(1);
            params.setNeedSave(true);
            EamMaintenanceStandardRequest standardRequest = new EamMaintenanceStandardRequest();
            try {
                //读取设备编号,图片等
                readWeekExcel(file, standardRequest);
                EamEquipment equipment = eamEquipmentService.selectByEquipmentCode(standardRequest.getEquipmentCode());
                if(equipment == null) {
                    log.error("设备不存在:{}", standardRequest.getEquipmentCode());
                    continue;
                }
                standardRequest.setStandardName(standardRequest.getEquipmentName() + "周保标准");
                standardRequest.setMaintenanceCategory(MaintenanceCategoryEnum.WEEK_MAINTENANCE.name());
                standardRequest.setEquipmentId(equipment.getId());
                //读取保养明细内容
                List<WeekMaintenanceStandardImport> list = ExcelImportUtil.importExcel(file.getInputStream(), WeekMaintenanceStandardImport.class, params);
                //明细项
                List<EamMaintenanceStandardDetail> tableList = list.stream().map(EamMaintenanceStandardDetail::new).collect(Collectors.toList());
                standardRequest.setTableDetailList(tableList);
                String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
                standardRequest.setStandardCode(codeSeq);
                boolean b = eamMaintenanceStandardService.addMaintenanceStandard(standardRequest);
                if (!b) {
                    log.error("保存失败! {}", standardRequest.getEquipmentCode());
                }
            } catch (Exception e) {
                //update-begin-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
                String msg = e.getMessage();
                log.error("文件 {} å¤„理异常: {}", file.getOriginalFilename(), msg, e);
                //update-end-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
            } finally {
                try {
                    file.getInputStream().close();
                } catch (IOException e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
        return Result.ok("文件导入完成!");
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/secondMaintenanceImportExcel", method = RequestMethod.POST)
    public Result<?> secondMaintenanceImportExcel(HttpServletRequest request, HttpServletResponse response) {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
            // èŽ·å–ä¸Šä¼ æ–‡ä»¶å¯¹è±¡
            MultipartFile file = entity.getValue();
            ImportParams params = new ImportParams();
            params.setTitleRows(2);
            params.setHeadRows(1);
            params.setSheetNum(1);
            params.setNeedSave(true);
            EamMaintenanceStandardRequest standardRequest = new EamMaintenanceStandardRequest();
            try {
                //读取设备编号,图片等
                readWeekExcel(file, standardRequest);
                EamEquipment equipment = eamEquipmentService.selectByEquipmentCode(standardRequest.getEquipmentCode());
                if(equipment == null) {
                    log.error("设备不存在:{}", standardRequest.getEquipmentCode());
                    continue;
                }
                standardRequest.setStandardName(standardRequest.getEquipmentName() + "二保标准");
                standardRequest.setMaintenanceCategory(MaintenanceCategoryEnum.SECOND_MAINTENANCE.name());
                standardRequest.setEquipmentId(equipment.getId());
                //读取保养明细内容
                List<SecondMaintenanceStandardImport> list = ExcelImportUtil.importExcel(file.getInputStream(), SecondMaintenanceStandardImport.class, params);
                //明细项
                List<EamMaintenanceStandardDetail> tableList = list.stream().map(EamMaintenanceStandardDetail::new).collect(Collectors.toList());
                standardRequest.setTableDetailList(tableList);
                String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
                standardRequest.setStandardCode(codeSeq);
                boolean b = eamMaintenanceStandardService.addMaintenanceStandard(standardRequest);
                if (!b) {
                    log.error("保存失败! {}", standardRequest.getEquipmentCode());
                }
            } catch (Exception e) {
                //update-begin-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
                String msg = e.getMessage();
                log.error("文件 {} å¤„理异常: {}", file.getOriginalFilename(), msg, e);
                //update-end-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
            } finally {
                try {
                    file.getInputStream().close();
                } catch (IOException e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
        return Result.ok("文件导入完成!");
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/thirdMaintenanceImportExcel", method = RequestMethod.POST)
    public Result<?> thirdMaintenanceImportExcel(HttpServletRequest request, HttpServletResponse response) {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
            // èŽ·å–ä¸Šä¼ æ–‡ä»¶å¯¹è±¡
            MultipartFile file = entity.getValue();
            ImportParams params = new ImportParams();
            params.setTitleRows(2);
            params.setHeadRows(1);
            params.setSheetNum(1);
            params.setNeedSave(true);
            EamMaintenanceStandardRequest standardRequest = new EamMaintenanceStandardRequest();
            try {
                //读取设备编号,图片等
                readWeekExcel(file, standardRequest);
                EamEquipment equipment = eamEquipmentService.selectByEquipmentCode(standardRequest.getEquipmentCode());
                if(equipment == null) {
                    log.error("设备不存在:{}", standardRequest.getEquipmentCode());
                    continue;
                }
                standardRequest.setStandardName(standardRequest.getEquipmentName() + "三保标准");
                standardRequest.setMaintenanceCategory(MaintenanceCategoryEnum.THIRD_MAINTENANCE.name());
                standardRequest.setEquipmentId(equipment.getId());
                //读取保养明细内容
                List<ThirdMaintenanceStandardImport> list = ExcelImportUtil.importExcel(file.getInputStream(), ThirdMaintenanceStandardImport.class, params);
                //明细项
                List<EamMaintenanceStandardDetail> tableList = list.stream().map(EamMaintenanceStandardDetail::new).collect(Collectors.toList());
                standardRequest.setTableDetailList(tableList);
                String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
                standardRequest.setStandardCode(codeSeq);
                boolean b = eamMaintenanceStandardService.addMaintenanceStandard(standardRequest);
                if (!b) {
                    log.error("保存失败! {}", standardRequest.getEquipmentCode());
                }
            } catch (Exception e) {
                //update-begin-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
                String msg = e.getMessage();
                log.error("文件 {} å¤„理异常: {}", file.getOriginalFilename(), msg, e);
                //update-end-author:taoyan date:20211124 for: å¯¼å…¥æ•°æ®é‡å¤å¢žåŠ æç¤º
            } finally {
                try {
                    file.getInputStream().close();
                } catch (IOException e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
        return Result.ok("文件导入完成!");
    }
    /**
     * è¯»å–Excel ç¬¬ä¸€è¡Œï¼Œ ç¬¬äºŒè¡Œçš„信息,包括图片信息
     * @param file
     * @param request
     */
    private void readExcel(MultipartFile file, EamMaintenanceStandardRequest request) {
        Workbook book = null;
        boolean isXSSFWorkbook = false;
     * ç‚¹æ£€å¯¼å…¥
    */
    @PostMapping("/importPointInspection")
    public Result<?> importPointInspectionExcel(HttpServletRequest request) {
        try {
            book = WorkbookFactory.create(file.getInputStream());
            if (book instanceof XSSFWorkbook) {
                isXSSFWorkbook = true;
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
            Map<String, String> results = new LinkedHashMap<>();
            int successCount = 0;
            int failureCount = 0;
            for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
                MultipartFile file = entity.getValue();
                String fileName = file.getOriginalFilename();
                Result<?> importResult = eamMaintenanceStandardService.importPointInspectionExcel(file);
                if (importResult.isSuccess()) {
                    results.put(fileName, "成功: " + importResult.getMessage());
                    successCount++;
                } else {
                    results.put(fileName, "失败: " + importResult.getMessage());
                    failureCount++;
                }
            }
            Sheet sheet = book.getSheetAt(0);
            //第一行读取
            Row row = sheet.getRow(0);
            //设备编码
            Cell equipmentCode = row.getCell(15);
            if(CellType.NUMERIC.equals(equipmentCode.getCellType())) {
                request.setEquipmentCode(String.valueOf((int) equipmentCode.getNumericCellValue()));
            }else if(CellType.STRING.equals(equipmentCode.getCellType())) {
                request.setEquipmentCode(equipmentCode.getStringCellValue());
            }
            if (StringUtils.isBlank(request.getEquipmentCode())) {
                throw new JeecgBootException("Excel【 " + file.getOriginalFilename() + "】没有读取到设备编号,导入失败!");
            }
            //初始日期
            Cell initialDate = row.getCell(11);
            if (DateUtil.isCellDateFormatted(initialDate)) {
                request.setInitialDate(initialDate.getDateCellValue());
            } else {
                request.setInitialDate(new Date());
            }
            //设备名称
            Cell equipmentName = row.getCell(13);
            request.setEquipmentName(equipmentName.getStringCellValue());
            // æž„建响应
            Map<String, Object> response = new HashMap<>();
            response.put("results", results);
            response.put("totalFiles", fileMap.size());
            response.put("successCount", successCount);
            response.put("failureCount", failureCount);
            //第二行读取
            row = sheet.getRow(1);
            //保养周期
            Cell period = row.getCell(11);
            if (CellType.NUMERIC.equals(period.getCellType())) {
                request.setMaintenancePeriod((int) period.getNumericCellValue());
            if (failureCount == 0) {
                return Result.ok("所有点检文件导入成功"+response);
            } else if (successCount == 0) {
                return Result.error("所有点检文件导入失败", response);
            } else {
                //默认点检周期 1
                request.setMaintenancePeriod(1);
                return Result.error("部分点检文件导入失败", response);
            }
            //文件编码
            Cell fileCode = row.getCell(13);
            request.setFileCode(fileCode.getStringCellValue());
        } catch (Exception e) {
            log.error("读取Excel信息失败:{}", e.getMessage(), e);
            log.error("点检导入处理异常", e);
            return Result.error("点检导入处理失败: " + e.getMessage());
        }
    }
    /**
     * äºŒä¿å¯¼å…¥
     */
    @PostMapping("/importSecondMaintenanceStandard")
    public Result<?> importSecondMaintenanceStandard(HttpServletRequest request) {
        try {
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Map<String, String> results = new LinkedHashMap<>();
            Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
            // ç»Ÿè®¡å¯¼å…¥ç»“æžœ
            int successCount = 0;
            int failureCount = 0;
            for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
                MultipartFile file = entity.getValue();
                String fileName = file.getOriginalFilename();
                Result<?> importResult = eamMaintenanceStandardService.importMaintenanceStandard(file, "SECOND");
                if (importResult.isSuccess()) {
                    results.put(fileName, "成功: " + importResult.getMessage());
                    successCount++;
                } else {
                    results.put(fileName, "失败: " + importResult.getMessage());
                    failureCount++;
                }
            }
            // æž„建最终响应
            Map<String, Object> response = new HashMap<>();
            response.put("results", results);
            response.put("totalFiles", fileMap.size());
            response.put("successCount", successCount);
            response.put("failureCount", failureCount);
            if (failureCount > 0) {
                return Result.error("部分文件导入失败", response);
            }
            return Result.ok("所有文件导入成功"+response);
        } catch (Exception e) {
            log.error("导入处理异常", e);
            return Result.error("导入处理失败: " + e.getMessage());
        }
    }
    /**
     * è¯»å–Excel ç¬¬ä¸€è¡Œï¼Œ ç¬¬äºŒè¡Œçš„信息
     * @param file
     * @param request
     * ä¸‰ä¿å¯¼å…¥
     */
    public void readWeekExcel(MultipartFile file, EamMaintenanceStandardRequest request) {
        Workbook book = null;
        boolean isXSSFWorkbook = false;
    @PostMapping("/importThirdMaintenanceStandard")
    public Result<?> importThirdMaintenanceStandard(HttpServletRequest request) {
        try {
            book = WorkbookFactory.create(file.getInputStream());
            if (book instanceof XSSFWorkbook) {
                isXSSFWorkbook = true;
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Map<String, String> results = new LinkedHashMap<>();
            Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
            // ç»Ÿè®¡å¯¼å…¥ç»“æžœ
            int successCount = 0;
            int failureCount = 0;
            for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
                MultipartFile file = entity.getValue();
                String fileName = file.getOriginalFilename();
                Result<?> importResult = eamMaintenanceStandardService.importMaintenanceStandard(file, "THIRD");
                if (importResult.isSuccess()) {
                    results.put(fileName, "成功: " + importResult.getMessage());
                    successCount++;
                } else {
                    results.put(fileName, "失败: " + importResult.getMessage());
                    failureCount++;
                }
            }
            Sheet sheet = book.getSheetAt(0);
            //第一行读取
            Row row = sheet.getRow(0);
            //设备编码
            Cell equipmentCode = row.getCell(10);
            if(CellType.NUMERIC.equals(equipmentCode.getCellType())) {
                request.setEquipmentCode(String.valueOf((int) equipmentCode.getNumericCellValue()));
            }else if(CellType.STRING.equals(equipmentCode.getCellType())) {
                request.setEquipmentCode(equipmentCode.getStringCellValue());
            }
            if (StringUtils.isBlank(request.getEquipmentCode())) {
                throw new JeecgBootException("Excel【 " + file.getOriginalFilename() + "】没有读取到设备编号,导入失败!");
            }
            //初始日期
            Cell initialDate = row.getCell(6);
            if (DateUtil.isCellDateFormatted(initialDate)) {
                request.setInitialDate(initialDate.getDateCellValue());
            } else {
                request.setInitialDate(new Date());
            }
            //设备名称
            Cell equipmentName = row.getCell(8);
            request.setEquipmentName(equipmentName.getStringCellValue());
            // æž„建最终响应
            Map<String, Object> response = new HashMap<>();
            response.put("results", results);
            response.put("totalFiles", fileMap.size());
            response.put("successCount", successCount);
            response.put("failureCount", failureCount);
            //第二行读取
            row = sheet.getRow(1);
            //保养周期
            Cell period = row.getCell(6);
            if (CellType.NUMERIC.equals(period.getCellType())) {
                request.setMaintenancePeriod((int) period.getNumericCellValue());
            } else {
                request.setMaintenancePeriod(null);
            if (failureCount > 0) {
                return Result.error("部分文件导入失败", response);
            }
            //文件编码
            Cell fileCode = row.getCell(8);
            request.setFileCode(fileCode.getStringCellValue());
            return Result.ok("所有文件导入成功"+response);
        } catch (Exception e) {
            log.error("读取Excel信息失败:{}", e.getMessage(), e);
            log.error("导入处理异常", e);
            return Result.error("导入处理失败: " + e.getMessage());
        }
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamTechnicalStatusEvaluationStandardController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,160 @@
package org.jeecg.modules.eam.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandard;
import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationStandardRequest;
import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationStandardService;
import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒ
 * @Author: jeecg-boot
 * @Date: 2025-07-07
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "技术状态鉴定规范")
@RestController
@RequestMapping("/eam/eamTechnicalStatusEvaluationStandard")
public class EamTechnicalStatusEvaluationStandardController extends JeecgController<EamTechnicalStatusEvaluationStandard, IEamTechnicalStatusEvaluationStandardService> {
    @Autowired
    private IEamTechnicalStatusEvaluationStandardService eamTechnicalStatusEvaluationStandardService;
    @Autowired
    private ISysBusinessCodeRuleService businessCodeRuleService;
    /**
     * åˆ†é¡µåˆ—表查询
     *
     * @param eamTechnicalStatusEvaluationStandard
     * @param pageNo
     * @param pageSize
     * @return
     */
    @ApiOperation(value = "技术状态鉴定规范-分页列表查询", notes = "技术状态鉴定规范-分页列表查询")
    @GetMapping(value = "/list")
    public Result<?> queryPageList(EamTechnicalStatusEvaluationStandard eamTechnicalStatusEvaluationStandard,
                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
        Page<EamTechnicalStatusEvaluationStandard> page = new Page<>(pageNo, pageSize);
        IPage<EamTechnicalStatusEvaluationStandard> pageList = eamTechnicalStatusEvaluationStandardService.queryPageList(page, eamTechnicalStatusEvaluationStandard);
        return Result.OK(pageList);
    }
    /**
     * æ·»åŠ 
     *
     * @param request
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范-添加")
    @ApiOperation(value = "技术状态鉴定规范-添加", notes = "技术状态鉴定规范-添加")
    @PostMapping(value = "/add")
    public Result<?> add(@RequestBody EamTechnicalStatusEvaluationStandardRequest request) {
        if (request == null) {
            return Result.error("添加的对象不能为空!");
        }
        if (CollectionUtil.isEmpty(request.getTableDetailList())) {
            return Result.error("检查项不能为空!");
        }
        String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
        request.setStandardCode(codeSeq);
        boolean b = eamTechnicalStatusEvaluationStandardService.addEamTechnicalStatusEvaluationStandard(request);
        if (!b) {
            return Result.error("添加失败!");
        }
        return Result.OK("添加成功!");
    }
    /**
     * ç¼–辑
     *
     * @param request
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范-编辑")
    @ApiOperation(value = "技术状态鉴定规范-编辑", notes = "技术状态鉴定规范-编辑")
    @PutMapping(value = "/edit")
    public Result<?> edit(@RequestBody EamTechnicalStatusEvaluationStandardRequest request) {
        if (request == null) {
            return Result.error("添加的对象不能为空!");
        }
        if (CollectionUtil.isEmpty(request.getTableDetailList())) {
            return Result.error("检查项不能为空!");
        }
        boolean b = eamTechnicalStatusEvaluationStandardService.editEamTechnicalStatusEvaluationStandard(request);
        if (!b) {
            return Result.error("编辑失败!");
        }
        return Result.OK("编辑成功!");
    }
    /**
     * é€šè¿‡id删除
     *
     * @param id
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范-通过id删除")
    @ApiOperation(value = "技术状态鉴定规范-通过id删除", notes = "技术状态鉴定规范-通过id删除")
    @DeleteMapping(value = "/delete")
    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
        eamTechnicalStatusEvaluationStandardService.removeById(id);
        return Result.OK("删除成功!");
    }
    /**
     * æ‰¹é‡åˆ é™¤
     *
     * @param ids
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范-批量删除")
    @ApiOperation(value = "技术状态鉴定规范-批量删除", notes = "技术状态鉴定规范-批量删除")
    @DeleteMapping(value = "/deleteBatch")
    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
        this.eamTechnicalStatusEvaluationStandardService.removeByIds(Arrays.asList(ids.split(",")));
        return Result.OK("批量删除成功!");
    }
    /**
     * é€šè¿‡id查询
     *
     * @param id
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范-通过id查询")
    @ApiOperation(value = "技术状态鉴定规范-通过id查询", notes = "技术状态鉴定规范-通过id查询")
    @GetMapping(value = "/queryById")
    public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
        EamTechnicalStatusEvaluationStandard eamTechnicalStatusEvaluationStandard = eamTechnicalStatusEvaluationStandardService.getById(id);
        return Result.OK(eamTechnicalStatusEvaluationStandard);
    }
    /**
     * é€šè¿‡excel导入数据
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, EamTechnicalStatusEvaluationStandard.class);
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamTechnicalStatusEvaluationStandardDetailController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,129 @@
package org.jeecg.modules.eam.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.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationStandardDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒæ˜Žç»†
 * @Author: jeecg-boot
 * @Date: 2025-07-07
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "技术状态鉴定规范明细")
@RestController
@RequestMapping("/eam/eamTechnicalStatusEvaluationStandardDetail")
public class EamTechnicalStatusEvaluationStandardDetailController extends JeecgController<EamTechnicalStatusEvaluationStandardDetail, IEamTechnicalStatusEvaluationStandardDetailService> {
    @Autowired
    private IEamTechnicalStatusEvaluationStandardDetailService eamTechnicalStatusEvaluationStandardDetailService;
    /**
     * åˆ†é¡µåˆ—表查询
     *
     * @param eamTechnicalStatusEvaluationStandardDetail
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-分页列表查询")
    @ApiOperation(value = "技术状态鉴定规范明细-分页列表查询", notes = "技术状态鉴定规范明细-分页列表查询")
    @GetMapping(value = "/list")
    public Result<?> queryPageList(EamTechnicalStatusEvaluationStandardDetail eamTechnicalStatusEvaluationStandardDetail,
                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                   HttpServletRequest req) {
        QueryWrapper<EamTechnicalStatusEvaluationStandardDetail> queryWrapper = QueryGenerator.initQueryWrapper(eamTechnicalStatusEvaluationStandardDetail, req.getParameterMap());
        Page<EamTechnicalStatusEvaluationStandardDetail> page = new Page<EamTechnicalStatusEvaluationStandardDetail>(pageNo, pageSize);
        IPage<EamTechnicalStatusEvaluationStandardDetail> pageList = eamTechnicalStatusEvaluationStandardDetailService.page(page, queryWrapper);
        return Result.OK(pageList);
    }
    /**
     * æ·»åŠ 
     *
     * @param eamTechnicalStatusEvaluationStandardDetail
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-添加")
    @ApiOperation(value = "技术状态鉴定规范明细-添加", notes = "技术状态鉴定规范明细-添加")
    @PostMapping(value = "/add")
    public Result<?> add(@RequestBody EamTechnicalStatusEvaluationStandardDetail eamTechnicalStatusEvaluationStandardDetail) {
        eamTechnicalStatusEvaluationStandardDetailService.save(eamTechnicalStatusEvaluationStandardDetail);
        return Result.OK("添加成功!");
    }
    /**
     * ç¼–辑
     *
     * @param eamTechnicalStatusEvaluationStandardDetail
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-编辑")
    @ApiOperation(value = "技术状态鉴定规范明细-编辑", notes = "技术状态鉴定规范明细-编辑")
    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
    public Result<?> edit(@RequestBody EamTechnicalStatusEvaluationStandardDetail eamTechnicalStatusEvaluationStandardDetail) {
        eamTechnicalStatusEvaluationStandardDetailService.updateById(eamTechnicalStatusEvaluationStandardDetail);
        return Result.OK("编辑成功!");
    }
    /**
     * é€šè¿‡id删除
     *
     * @param id
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-通过id删除")
    @ApiOperation(value = "技术状态鉴定规范明细-通过id删除", notes = "技术状态鉴定规范明细-通过id删除")
    @DeleteMapping(value = "/delete")
    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
        eamTechnicalStatusEvaluationStandardDetailService.removeById(id);
        return Result.OK("删除成功!");
    }
    /**
     * æ‰¹é‡åˆ é™¤
     *
     * @param ids
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-批量删除")
    @ApiOperation(value = "技术状态鉴定规范明细-批量删除", notes = "技术状态鉴定规范明细-批量删除")
    @DeleteMapping(value = "/deleteBatch")
    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
        this.eamTechnicalStatusEvaluationStandardDetailService.removeByIds(Arrays.asList(ids.split(",")));
        return Result.OK("批量删除成功!");
    }
    /**
     * é€šè¿‡id查询
     *
     * @param id
     * @return
     */
    @AutoLog(value = "技术状态鉴定规范明细-通过id查询")
    @ApiOperation(value = "技术状态鉴定规范明细-通过id查询", notes = "技术状态鉴定规范明细-通过id查询")
    @GetMapping(value = "/queryById")
    public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
        EamTechnicalStatusEvaluationStandardDetail eamTechnicalStatusEvaluationStandardDetail = eamTechnicalStatusEvaluationStandardDetailService.getById(id);
        return Result.OK(eamTechnicalStatusEvaluationStandardDetail);
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java
@@ -111,7 +111,7 @@
     * æ ‡å‡†ç‰ˆæœ¬
     */
    @ApiModelProperty(value = "标准版本")
    private Integer standardVersion;
    private String standardVersion;
    /**
     * ç¼–制人
     */
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationStandard.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
package org.jeecg.modules.eam.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.Date;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒ
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
@Data
@TableName("eam_technical_status_evaluation_standard")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_standard对象", description="技术状态鉴定规范")
public class EamTechnicalStatusEvaluationStandard {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建时间*/
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新时间*/
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**删除标记*/
    @ApiModelProperty(value = "删除标记")
    private Integer delFlag;
    /**规范名称*/
    @ApiModelProperty(value = "规范名称")
    private String standardName;
    /**规范编码*/
    @ApiModelProperty(value = "规范编码")
    private String standardCode;
    /**鉴定周期*/
    @ApiModelProperty(value = "鉴定周期")
    private Integer evaluationPeriod;
    /**设备ID*/
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**规范状态;待提交、启用、作废*/
    @ApiModelProperty(value = "规范状态;待提交、启用、作废")
    private String standardStatus;
    /**是否有安全装置检查;是否*/
    @ApiModelProperty(value = "是否有安全装置检查;是否")
    private String hasSafetyEquipmentCheck;
    /**是否有设备精度检查;是否*/
    @ApiModelProperty(value = "是否有设备精度检查;是否")
    private String hasPrecisionCheck;
    /**是否有其他检查;是否*/
    @ApiModelProperty(value = "是否有其他检查;是否")
    private String hasOtherCheck;
    /**版本 V1,V2+*/
    @ApiModelProperty(value = "版本 V1,V2")
    private String standardVersion;
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationStandardDetail.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
package org.jeecg.modules.eam.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒæ˜Žç»†
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
@Data
@TableName("eam_technical_status_evaluation_standard_detail")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_standard_detail对象", description="技术状态鉴定规范明细")
public class EamTechnicalStatusEvaluationStandardDetail {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**创建人*/
    @Excel(name = "创建人", width = 15)
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建时间*/
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**更新人*/
    @Excel(name = "更新人", width = 15)
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新时间*/
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**规范ID*/
    @Excel(name = "规范ID", width = 15)
    @ApiModelProperty(value = "规范ID")
    private String standardId;
    /**检查分类;精度检查、安全装置检查、其他检查*/
    @Excel(name = "检查分类;精度检查、安全装置检查、其他检查", width = 15)
    @ApiModelProperty(value = "检查分类;精度检查、安全装置检查、其他检查")
    private String checkCategory;
    /**项目序号*/
    @Excel(name = "项目序号", width = 15)
    @ApiModelProperty(value = "项目序号")
    private Integer itemCode;
    /**检查项目*/
    @Excel(name = "检查项目", width = 15)
    @ApiModelProperty(value = "检查项目")
    private String itemName;
    /**允差值;精度检查展示*/
    @Excel(name = "允差值;精度检查展示", width = 15)
    @ApiModelProperty(value = "允差值;精度检查展示")
    private String toleranceValue;
    /**检查子项目;精度检查展示,可以为空*/
    @Excel(name = "检查子项目;精度检查展示,可以为空", width = 15)
    @ApiModelProperty(value = "检查子项目;精度检查展示,可以为空")
    private String subItemName;
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamTechnicalStatusEvaluationStandardDetailMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
package org.jeecg.modules.eam.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒæ˜Žç»†
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
public interface EamTechnicalStatusEvaluationStandardDetailMapper extends BaseMapper<EamTechnicalStatusEvaluationStandardDetail> {
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamTechnicalStatusEvaluationStandardMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
package org.jeecg.modules.eam.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandard;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒ
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
public interface EamTechnicalStatusEvaluationStandardMapper extends BaseMapper<EamTechnicalStatusEvaluationStandard> {
    /**
     * åˆ†é¡µæŸ¥è¯¢
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<EamTechnicalStatusEvaluationStandard> queryPageList(Page<EamTechnicalStatusEvaluationStandard> page, QueryWrapper<EamTechnicalStatusEvaluationStandard> queryWrapper);
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.eam.mapper.EamInspectionOrderMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamInspectionOrder">
        select wmo.*, e.equipment_code, e.equipment_name
        select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model
        from eam_inspection_order wmo
        inner join eam_equipment e
        on wmo.equipment_id = e.id
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationStandardDetailMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationStandardDetailMapper">
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationStandardMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationStandardMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandard">
        select ems.*, e.equipment_code, e.equipment_name, e.equipment_model
        from eam_technical_status_evaluation_standard ems
        inner join eam_equipment e
        on ems.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamMaintenanceStandardRequest.java
@@ -49,7 +49,7 @@
    private String standardStatus;
    /**标准版本*/
    @ApiModelProperty(value = "标准版本")
    private Integer standardVersion;
    private String standardVersion;
    /**文件编号*/
    @ApiModelProperty(value = "文件编号")
    private String fileCode;
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamTechnicalStatusEvaluationStandardRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
package org.jeecg.modules.eam.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import java.io.Serializable;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_standard对象", description="技术状态鉴定规范")
public class EamTechnicalStatusEvaluationStandardRequest implements Serializable {
    /**主键*/
    @ApiModelProperty(value = "主键")
    private String id;
    /**规范编码*/
    @ApiModelProperty(value = "规范编码")
    private String standardCode;
    /**规范名称*/
    @ApiModelProperty(value = "规范名称")
    private String standardName;
    /**鉴定周期;单位:å¹´*/
    @ApiModelProperty(value = "鉴定周期;单位:å¹´")
    private Integer evaluationPeriod;
    /**设备ID*/
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**列表 æ£€æŸ¥é¡¹æ˜Žç»†*/
    @ApiModelProperty(value = "列表 æ£€æŸ¥é¡¹æ˜Žç»†")
    private List<EamTechnicalStatusEvaluationStandardDetail> tableDetailList;
    /**删除 æ£€æŸ¥é¡¹æ˜Žç»†*/
    @ApiModelProperty(value = "删除 æ£€æŸ¥é¡¹æ˜Žç»†")
    private List<EamTechnicalStatusEvaluationStandardDetail> removeDetailList;
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamMaintenanceStandardService.java
@@ -7,7 +7,9 @@
import org.jeecg.modules.eam.entity.EamMaintenanceStandard;
import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest;
import org.jeecg.modules.eam.vo.EamMaintenanceStandardVo;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
/**
@@ -32,7 +34,7 @@
    boolean addMaintenanceStandard(EamMaintenanceStandardRequest standardRequest);
    /**
     * æ–°å¢ž ä¿å…»æ ‡å‡†
     * ç¼–辑 ä¿å…»æ ‡å‡†
     * @param standardRequest
     */
    boolean editMaintenanceStandard(EamMaintenanceStandardRequest standardRequest);
@@ -74,7 +76,6 @@
     */
    Result<?> saveEamMaintenanceStandardProcess(String id);
    /**
     * å®¡æ‰¹æ“ä½œ
     * @param eamMaintenanceStandardVo
@@ -82,4 +83,12 @@
     */
    Result<?> auditEamMaintenanceStandard(EamMaintenanceStandardVo eamMaintenanceStandardVo);
    /**
     * ç‚¹æ£€è¡¨å¯¼å…¥å…¥å£
     */
    public Result<?> importPointInspectionExcel(MultipartFile file);
    Result<?> importMaintenanceStandard(MultipartFile file, String type);
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamTechnicalStatusEvaluationStandardDetailService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
package org.jeecg.modules.eam.service;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒæ˜Žç»†
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
public interface IEamTechnicalStatusEvaluationStandardDetailService extends IService<EamTechnicalStatusEvaluationStandardDetail> {
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamTechnicalStatusEvaluationStandardService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
package org.jeecg.modules.eam.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandard;
import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationStandardRequest;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒ
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
public interface IEamTechnicalStatusEvaluationStandardService extends IService<EamTechnicalStatusEvaluationStandard> {
    /**
     *
     * @param page
     * @param eamTechnicalStatusEvaluationStandard
     * @return
     */
    IPage<EamTechnicalStatusEvaluationStandard> queryPageList(Page<EamTechnicalStatusEvaluationStandard> page, EamTechnicalStatusEvaluationStandard eamTechnicalStatusEvaluationStandard);
    /**
     * æ–°å¢ž
     * @param request
     * @return
     */
    boolean addEamTechnicalStatusEvaluationStandard(EamTechnicalStatusEvaluationStandardRequest request);
    /**
     * é‡å¤æ ¡éªŒ
     * @param equipmentId
     * @param id
     * @return
     */
    EamTechnicalStatusEvaluationStandard checkDuplicate(String equipmentId, String id);
    /**
     * ç¼–辑
     * @param request
     * @return
     */
    boolean editEamTechnicalStatusEvaluationStandard(EamTechnicalStatusEvaluationStandardRequest request);
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java
@@ -9,13 +9,17 @@
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jeecg.weibo.exception.BusinessException;
import liquibase.pro.packaged.R;
import liquibase.pro.packaged.S;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.shiro.SecurityUtils;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
import org.jeecg.common.api.vo.FileUploadResult;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
@@ -25,31 +29,41 @@
import org.jeecg.modules.eam.base.service.IBaseFactoryService;
import org.jeecg.modules.eam.base.service.IBaseFactoryUserService;
import org.jeecg.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.eam.constant.EamMaintenanceStandardDetailCategory;
import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum;
import org.jeecg.modules.eam.entity.EamEquipment;
import org.jeecg.modules.eam.entity.EamEquipmentExtend;
import org.jeecg.modules.eam.entity.EamMaintenanceStandard;
import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail;
import org.jeecg.modules.eam.mapper.EamMaintenanceStandardMapper;
import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest;
import org.jeecg.modules.eam.request.ImportException;
import org.jeecg.modules.eam.service.IEamEquipmentExtendService;
import org.jeecg.modules.eam.service.IEamEquipmentService;
import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService;
import org.jeecg.modules.eam.service.IEamMaintenanceStandardService;
import org.jeecg.modules.eam.vo.EamMaintenanceStandardVo;
import org.jeecg.modules.eam.vo.*;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService;
import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI;
import org.jeecg.modules.flowable.apithird.service.FlowCommonService;
import org.jeecg.modules.flowable.service.IFlowDefinitionService;
import org.jeecg.modules.flowable.service.IFlowTaskService;
import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.system.vo.UserSelector;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
@@ -83,6 +97,22 @@
    private ISysUserService sysUserService;
    @Autowired
    private IEamEquipmentService eamEquipmentService;
    @Autowired
    private IEamEquipmentExtendService eamEquipmentExtendService;
    @Autowired
    private ISysBusinessCodeRuleService businessCodeRuleService;
    // å¸¸é‡å®šä¹‰
    private static final String REPAIR_TITLE = "维修人员保养内容";
    private static final String OPERATOR_TITLE = "操作人员保养内容";
    private static final Map<String, EamMaintenanceStandardDetailCategory> SECOND_CATEGORY_MAPPING = new HashMap<>();
    // æžšä¸¾æ˜ å°„初始化
    static {
        SECOND_CATEGORY_MAPPING.put(REPAIR_TITLE, EamMaintenanceStandardDetailCategory.REPAIRER_MAINTENANCE);
        SECOND_CATEGORY_MAPPING.put(OPERATOR_TITLE, EamMaintenanceStandardDetailCategory.OPERATOR_MAINTENANCE);
    }
    @Override
    public IPage<EamMaintenanceStandard> queryPageList(Page<EamMaintenanceStandard> page, EamMaintenanceStandard eamMaintenanceStandard) {
        QueryWrapper<EamMaintenanceStandard> queryWrapper = new QueryWrapper<>();
@@ -133,6 +163,10 @@
                        .or()
                        .like("e.equipment_code", eamMaintenanceStandard.getKeyword()));
            }
            //id
            if(StringUtils.isNotBlank(eamMaintenanceStandard.getId())) {
                queryWrapper.eq("ems.id", eamMaintenanceStandard.getId());
            }
        }
        queryWrapper.orderByDesc("ems.create_time");
        return eamMaintenanceStandardMapper.queryPageList(page, queryWrapper);
@@ -145,7 +179,7 @@
        BeanUtils.copyProperties(standardRequest, entity);
        entity.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
        //版本递增
        entity.setStandardVersion(CommonConstant.OPERATE_TYPE_1);
        entity.setStandardVersion("v"+CommonConstant.OPERATE_TYPE_1);
        //设备处理
        entity.setEquipmentId(standardRequest.getEquipmentId());
        //删除标记
@@ -209,9 +243,6 @@
        if(entity == null){
            throw new JeecgBootException("编辑的数据已删除,请刷新重试!");
        }
        entity.setStandardStatus(MaintenanceStandardStatusEnum.ABOLISH.name());
        //原来的作废
        eamMaintenanceStandardMapper.updateById(entity);
        //新增一个版本
        EamMaintenanceStandard newEntity = new EamMaintenanceStandard();
@@ -222,7 +253,16 @@
        newEntity.setInitialDate(standardRequest.getInitialDate());
        newEntity.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
        //版本递增
        newEntity.setStandardVersion(entity.getStandardVersion() + 1);
        //获取数字
        Pattern pattern = Pattern.compile("(\\d+)(?:\\.\\d+)*$");
        Matcher matcher = pattern.matcher(entity.getStandardVersion());
        if (matcher.find()) {
            try {
                int mainVersion = Integer.parseInt(matcher.group(1));
                newEntity.setStandardVersion("v"+(mainVersion+1));
            } catch (NumberFormatException ignored) {
            }
        }
        //设备处理
        newEntity.setEquipmentId(standardRequest.getEquipmentId());
        //删除标记
@@ -277,7 +317,7 @@
        query.setEquipmentId(equipmentId);
        query.setKeyword(keyword);
        query.setMaintenanceCategory(maintenanceCategory);
        query.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
        query.setStandardStatus(MaintenanceStandardStatusEnum.START.name());
        IPage<EamMaintenanceStandard> pageData = this.queryPageList(page, query);
        return pageData.getRecords();
    }
@@ -398,13 +438,27 @@
            // è®¾ç½®æµç¨‹å˜é‡
            Map<String, Object> values = setProcessVariables(eamMaintenanceStandard, userId, eamMaintenanceStandardVo);
            eamMaintenanceStandardVo.setValues(values);
            eamMaintenanceStandardVo.setComment(values.get("comment").toString());
            // å®Œæˆæµç¨‹ä»»åŠ¡
            Result result = flowTaskService.complete(eamMaintenanceStandardVo);
            if (result.isSuccess()) {
                if (eamMaintenanceStandardVo.getRepairManagerApproveResult() != null) {
                    if (eamMaintenanceStandardVo.getRepairManagerApproveResult().equals("1")){
                        List<FlowMyBusiness> newbusinessList = flowMyBusinessService.list(
                                new QueryWrapper<FlowMyBusiness>()
                                        .eq("process_instance_id", eamMaintenanceStandardVo.getInstanceId()));
                        FlowMyBusiness newflowMyBusiness = newbusinessList.get(0);
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_TECHNICAL_DIRECTOR.name());
                        //获取flow的流程实例id,设置下一步的处理人员
                        EamMaintenanceStandard maintenanceStandard=this.getById(eamMaintenanceStandardVo.getDataId());
                        EamEquipment eamEquipment=eamEquipmentService.getById(maintenanceStandard.getEquipmentId());
                        BaseFactory baseFactory=baseFactoryService.getOne(new QueryWrapper<BaseFactory>().eq("org_code", eamEquipment.getFactoryOrgCode()));
                        List<UserSelector> userSelectorList=sysUserService.selectOperatorFactoryList(eamEquipment.getEquipmentCode(),baseFactory.getId(), BusinessCodeConst.PCR0008);
                        if (!CollectionUtils.isEmpty(userSelectorList)) {
                            List<String> usernameList=userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                            newflowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList));
                            flowMyBusinessService.updateById(newflowMyBusiness);
                        }
                    }else {
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
                    }
@@ -416,6 +470,20 @@
                if (eamMaintenanceStandardVo.getTechnicalManagerApproveResult() != null) {
                    if (eamMaintenanceStandardVo.getTechnicalManagerApproveResult().equals("1")){
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.START.name());
                        //判断是否进行升版,通过设备编号、保养分类、状态进行筛选
                        EamMaintenanceStandard maintenanceStandard=this.getById(eamMaintenanceStandardVo.getDataId());
                        QueryWrapper<EamMaintenanceStandard> queryWrapper=new QueryWrapper<>();
                        queryWrapper.eq("equipment_id", maintenanceStandard.getEquipmentId());
                        queryWrapper.eq("maintenance_category", maintenanceStandard.getMaintenanceCategory());
                        queryWrapper.eq("standard_status", MaintenanceStandardStatusEnum.START.name());
                        List<EamMaintenanceStandard> list=eamMaintenanceStandardMapper.selectList(queryWrapper);
                        if (!CollectionUtils.isEmpty(list)) {
                            //作废原有
                            for (EamMaintenanceStandard eamMaintenanceStandard1 : list) {
                                eamMaintenanceStandard1.setStandardStatus(MaintenanceStandardStatusEnum.ABOLISH.name());
                                this.updateById(eamMaintenanceStandard1);
                            }
                        }
                    }else {
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
                    }
@@ -428,7 +496,6 @@
            } else {
                return result;
            }
            return Result.OK("操作成功");
        } catch (Exception e) {
            return Result.error("操作失败:" + e.getMessage());
@@ -439,13 +506,15 @@
        Map<String, Object> values = new HashMap<>();
        values.put("dataId", eamMaintenanceStandard.getId());
        values.put("assignee", userId);
        values.put("organization", eamMaintenanceStandardVo.getComment());
        values.put("comment", eamMaintenanceStandardVo.getComment());
        if (eamMaintenanceStandardVo.getRepairManagerApproveResult() != null) {
            values.put("repairManagerApproveResult", eamMaintenanceStandardVo.getRepairManagerApproveResult());
            values.put("organization", eamMaintenanceStandardVo.getRepairManagerApproveComment());
            values.put("comment", eamMaintenanceStandardVo.getRepairManagerApproveComment());
        }
        if (eamMaintenanceStandardVo.getTechnicalManagerApproveResult() != null) {
            values.put("technicalManagerApproveResult", eamMaintenanceStandardVo.getTechnicalManagerApproveResult());
            values.put("organization", eamMaintenanceStandardVo.getTechnicalManagerApproveComment());
            values.put("comment", eamMaintenanceStandardVo.getTechnicalManagerApproveComment());
        }
        return values;
    }
@@ -475,4 +544,854 @@
    }
    /*流程业务代码--------------------------结束*/
    /*导入点检文件Excel--------------------------开始*/
    /**
        * ç‚¹æ£€è¡¨å¯¼å…¥å…¥å£
    */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Result<?> importPointInspectionExcel(MultipartFile file) {
        try (Workbook workbook = WorkbookFactory.create(file.getInputStream())) {
            Sheet sheet = workbook.getSheetAt(0);
            // æå–名称
            String name = extractInspectionTitle(file) + "点检表";
            // 1. æå–设备信息
            EamMaintenanceStandard eamMaintenanceStandard = extractDeviceInfo(sheet);
            if (eamMaintenanceStandard == null) {
                return Result.error("设备信息提取失败");
            }
            eamMaintenanceStandard.setStandardName(name);
            eamMaintenanceStandardMapper.insert(eamMaintenanceStandard);
            // 2. æå–每日点检项目
            List<EamMaintenanceStandardDetail> dailyDetails = extractDailyItems(sheet, eamMaintenanceStandard);
            if(dailyDetails.isEmpty()){
                return Result.error("未找到每日点检项目");
            }
            // 3. æå–周保养项目
            List<EamMaintenanceStandardDetail> weeklyDetails = extractWeeklyItems(sheet, eamMaintenanceStandard);
            if(weeklyDetails.isEmpty()){
                return Result.error("未找到周保养项目");
            }
            // åˆå¹¶å¹¶ä¿å­˜æ‰€æœ‰é¡¹ç›®
            List<EamMaintenanceStandardDetail> allDetails = new ArrayList<>();
            allDetails.addAll(dailyDetails);
            allDetails.addAll(weeklyDetails);
            if (!CollectionUtils.isEmpty(allDetails)) {
                eamMaintenanceStandardDetailService.saveBatch(allDetails);
            }
            return Result.OK("点检表导入成功");
        } catch (Exception e) {
            throw new BusinessException("点检表导入失败: " + e.getMessage());
        }
    }
    /**
        * æå–点检表标题
    */
    private String extractInspectionTitle(MultipartFile file) {
        try (Workbook workbook = WorkbookFactory.create(file.getInputStream())) {
            Sheet sheet = workbook.getSheetAt(0);
            Row firstRow = sheet.getRow(0);
            if (firstRow == null) {
                return "未找到标题";
            }
            Cell firstCell = firstRow.getCell(0);
            if (firstCell == null) {
                return "";
            }
            String title = getCellStringValue(firstCell);
            return extractTextBeforeInspection(title);
        } catch (Exception e) {
            return "";
        }
    }
    /**
        * æå–点检表之前的文字
     */
    private String extractTextBeforeInspection(String title) {
        if (StringUtils.isBlank(title)) {
            return "";
        }
        int index = title.indexOf("点检表");
        return index > 0 ? title.substring(0, index).trim() : title;
    }
    /**
        * æå–设备信息
    */
    private EamMaintenanceStandard extractDeviceInfo(Sheet sheet) {
        Row headerRow = sheet.getRow(0);
        if (headerRow == null) {
            return null;
        }
        String headerText = getCellStringValue(headerRow.getCell(0));
        if (StringUtils.isBlank(headerText)) {
            return null;
        }
        EamMaintenanceStandard standard = new EamMaintenanceStandard();
        standard.setEquipmentName(extractField(headerText, "设备名称[::]\\s*(\\S+)"));
        standard.setEquipmentId(extractField(headerText, "设备型号[::]\\s*(\\S+)"));
        // æ—¥æœŸå¤„理
        String dateStr = extractField(headerText, "日期[::]\\s*(\\S+)");
        if (StringUtils.isNotBlank(dateStr)) {
            try {
                // æ”¯æŒå¤šç§æ—¥æœŸæ ¼å¼
                Date date = parseDate(dateStr);
                standard.setDesignTime(date);
                standard.setInitialDate(date);
            } catch (ParseException ignored) {
            }
        }
        // å…³è”设备ID
        if (isNotBlank(standard.getEquipmentCode()) &&
                isNotBlank(standard.getEquipmentName())) {
            List<EamEquipment> equipments = eamEquipmentService.list(
                    new QueryWrapper<EamEquipment>()
                            .eq("equipment_code", standard.getEquipmentCode())
                            .eq("equipment_name", standard.getEquipmentName())
            );
            if (!equipments.isEmpty()) {
                standard.setEquipmentId(equipments.get(0).getId());
            }else {
                return null;
            }
        }
        String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE);
        standard.setStandardCode(codeSeq);
        standard.setMaintenanceCategory("POINT_INSPECTION");
        standard.setPeriodUnit("天");
        standard.setStandardStatus(MaintenanceStandardStatusEnum.START.name());
        standard.setStandardVersion("v" + CommonConstant.OPERATE_TYPE_1);
        standard.setDelFlag(0);
        standard.setMaintenancePeriod(1);
        return standard;
    }
    /**
        * è§£æžæ—¥æœŸå­—符串
     */
    private Date parseDate(String dateStr) throws ParseException {
        // å°è¯•多种日期格式
        String[] patterns = {
                "yyyyå¹´MM月",
                "yyyy-MM",
                "yyyy/MM",
                "yyyyMM",
                "yyyyå¹´M月"
        };
        for (String pattern : patterns) {
            try {
                SimpleDateFormat sdf = new SimpleDateFormat(pattern);
                sdf.setLenient(false);
                return sdf.parse(dateStr);
            } catch (ParseException e) {
                // å°è¯•下一个格式
            }
        }
        throw new ParseException("无法解析日期: " + dateStr, 0);
    }
    /**
        * æå–每日点检项目
    */
    private List<EamMaintenanceStandardDetail> extractDailyItems(Sheet sheet, EamMaintenanceStandard standard) {
        return extractItems(sheet, standard, "点检项目", "完成数据/要求", "DAY_INSPECTION");
    }
    /**
        * æå–周保养项目
    */
    private List<EamMaintenanceStandardDetail> extractWeeklyItems(Sheet sheet, EamMaintenanceStandard standard) {
        return extractItems(sheet, standard, "周保养项目", "检查标准", "WEEK_INSPECTION");
    }
    /**
        * é€šç”¨é¡¹ç›®æå–方法
    */
    private List<EamMaintenanceStandardDetail> extractItems(Sheet sheet, EamMaintenanceStandard standard,
                                                            String primaryHeader, String secondaryHeader,
                                                            String itemCategory) {
        int[] section = findTableSection(sheet, primaryHeader, secondaryHeader);
        if (section == null) {
            return Collections.emptyList();
        }
        List<EamMaintenanceStandardDetail> details = new ArrayList<>();
        for (int rowIdx = section[0]; rowIdx <= section[1]; rowIdx++) {
            Row row = sheet.getRow(rowIdx);
            if (row == null || isEmptyRow(row)) {
                continue;
            }
            // ç¡®ä¿ç¬¬ä¸€åˆ—是序号(数字)
            Cell seqCell = row.getCell(0);
            if (seqCell == null || seqCell.getCellType() != CellType.NUMERIC) {
                continue;
            }
            // åˆ›å»ºé¡¹ç›®è¯¦æƒ…
            EamMaintenanceStandardDetail detail = new EamMaintenanceStandardDetail();
            detail.setStandardId(standard.getId());
            detail.setItemName(getCellStringValue(row.getCell(1)));
            detail.setItemCategory(itemCategory);
            // æ ¹æ®é¡¹ç›®ç±»åž‹è®¾ç½®éœ€æ±‚字段
            if ("DAY_INSPECTION".equals(itemCategory)) {
                detail.setItemDemand(getCellStringValue(row.getCell(2)));
            } else if ("WEEK_INSPECTION".equals(itemCategory)) {
                detail.setItemDemand(getCellStringValue(row.getCell(2)));
            }
            details.add(detail);
        }
        return details;
    }
    /**
        * æŸ¥æ‰¾è¡¨æ ¼åŒºåŸŸ
     */
    private int[] findTableSection(Sheet sheet, String primaryHeader, String secondaryHeader) {
        for (int rowIdx = 0; rowIdx <= sheet.getLastRowNum(); rowIdx++) {
            Row row = sheet.getRow(rowIdx);
            if (row == null) continue;
            if (isHeaderRow(row, primaryHeader, secondaryHeader)) {
                int startRow = rowIdx + 1;
                int endRow = findDataEnd(sheet, startRow);
                return new int[]{startRow, endRow};
            }
        }
        return null;
    }
    /**
        * æ£€æŸ¥æ˜¯å¦ä¸ºè¡¨å¤´è¡Œ
    */
    private boolean isHeaderRow(Row row, String header1, String header2) {
        boolean foundHeader1 = false;
        boolean foundHeader2 = false;
        for (int colIdx = 0; colIdx < row.getLastCellNum(); colIdx++) {
            Cell cell = row.getCell(colIdx);
            if (cell == null) continue;
            String cellValue = getCellStringValue(cell);
            if (cellValue.contains(header1)) foundHeader1 = true;
            if (cellValue.contains(header2)) foundHeader2 = true;
        }
        return foundHeader1 && foundHeader2;
    }
    /**
        * æŸ¥æ‰¾æ•°æ®ç»“束位置
     */
    private int findDataEnd(Sheet sheet, int startRow) {
        for (int rowIdx = startRow; rowIdx <= sheet.getLastRowNum(); rowIdx++) {
            Row row = sheet.getRow(rowIdx);
            if (row == null) return rowIdx - 1;
            // æ£€æŸ¥æ˜¯å¦ç»“束标志行(如签字行)
            if (isSignatureRow(row)) {
                return rowIdx - 1;
            }
            // æ£€æŸ¥æ˜¯å¦æ–°çš„表头开始
            if (isNewHeaderStart(row)) {
                return rowIdx - 1;
            }
        }
        return sheet.getLastRowNum();
    }
    /**
        * è¯†åˆ«ç­¾å­—行特征
    */
    private boolean isSignatureRow(Row row) {
        for (int colIdx = 0; colIdx < row.getLastCellNum(); colIdx++) {
            Cell cell = row.getCell(colIdx);
            if (cell == null) continue;
            String value = getCellStringValue(cell);
            if (value.contains("签字") || value.contains("责任人") ||
                    value.contains("执行") || value.contains("确认")) {
                return true;
            }
        }
        return false;
    }
    /**
     * è¯†åˆ«æ–°è¡¨å¤´å¼€å§‹
    */
    private boolean isNewHeaderStart(Row row) {
        for (int colIdx = 0; colIdx < row.getLastCellNum(); colIdx++) {
            Cell cell = row.getCell(colIdx);
            if (cell == null) continue;
            String value = getCellStringValue(cell);
            if ("序号".equals(value) || "点检项目".equals(value) || "周保养项目".equals(value)) {
                return true;
            }
        }
        return false;
    }
    /**
        * æ£€æŸ¥è¡Œæ˜¯å¦ä¸ºç©º
    */
    private boolean isEmptyRow(Row row) {
        if (row == null) return true;
        for (int colIdx = 0; colIdx < row.getLastCellNum(); colIdx++) {
            Cell cell = row.getCell(colIdx);
            if (cell != null && cell.getCellType() != CellType.BLANK) {
                String value = getCellStringValue(cell);
                if (StringUtils.isNotBlank(value)) {
                    return false;
                }
            }
        }
        return true;
    }
    /**
        * ä½¿ç”¨æ­£åˆ™æå–字段
    */
    private String extractField(String text, String regex) {
        if (StringUtils.isBlank(text)) return "";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(text);
        return matcher.find() ? matcher.group(1) : "";
    }
    /**
        * èŽ·å–å•å…ƒæ ¼å­—ç¬¦ä¸²å€¼
    */
    private String getCellStringValue(Cell cell) {
        if (cell == null) return "";
        switch (cell.getCellType()) {
            case STRING:
                return cell.getStringCellValue().trim();
            case NUMERIC:
                if (DateUtil.isCellDateFormatted(cell)) {
                    return new SimpleDateFormat("yyyyå¹´MM月").format(cell.getDateCellValue());
                }
                return String.valueOf((int) cell.getNumericCellValue());
            case BOOLEAN:
                return String.valueOf(cell.getBooleanCellValue());
            case FORMULA:
                return handleFormulaCell(cell);
            default:
                return "";
        }
    }
    /**
        * å¤„理公式单元格
    */
    private String handleFormulaCell(Cell cell) {
        try {
            FormulaEvaluator evaluator = cell.getSheet().getWorkbook().getCreationHelper().createFormulaEvaluator();
            CellValue cellValue = evaluator.evaluate(cell);
            if (cellValue == null) return "";
            switch (cellValue.getCellType()) {
                case STRING: return cellValue.getStringValue();
                case NUMERIC: return String.valueOf((int) cellValue.getNumberValue());
                case BOOLEAN: return String.valueOf(cellValue.getBooleanValue());
                default: return "";
            }
        } catch (Exception e) {
            return "";
        }
    }
    /*导入点检文件Excel--------------------------结束*/
    /*导入二保三保文件Excel--------------------------开始*/
    /**
     * ç»Ÿä¸€ä¿å…»è§„范导入入口
     * @param file ä¸Šä¼ æ–‡ä»¶
     * @param type ä¿å…»ç±»åž‹ (SECOND/THIRD)
     * @return å¯¼å…¥ç»“果(包含成功/失败信息)
     */
    @Override
    @Transactional
    public Result<?> importMaintenanceStandard(MultipartFile file, String type) {
        String fileName = file.getOriginalFilename();
        try (XWPFDocument doc = new XWPFDocument(file.getInputStream())) {
            // åŸºç¡€éªŒè¯
            if (doc.getTables().isEmpty()) {
                return Result.error(fileName + ": æ–‡æ¡£ä¸­æœªæ‰¾åˆ°è¡¨æ ¼");
            }
            XWPFTable table = doc.getTables().get(0);
            // æ–‡æ¡£ç±»åž‹æ ¡éªŒ - é˜²æ­¢äºŒä¿ä¼ å…¥ä¸‰ä¿æˆ–反之
            if (isWrongDocumentType(table, type)) {
                return Result.error(fileName + ": æ–‡æ¡£ç±»åž‹ä¸åŒ¹é… - " +
                        ("SECOND".equals(type) ? "请导入二级保养文档" : "请导入三级保养文档"));
            }
            EamMaintenanceStandard standard = extractDeviceInfo(table);
            if (standard == null) {
                return Result.error(fileName + ": è®¾å¤‡ä¿¡æ¯æå–失败");
            }
            // é…ç½®ç±»åž‹ç›¸å…³å‚æ•°
            configureStandard(standard, type, file);
            eamMaintenanceStandardMapper.insert(standard);
            String standardId = standard.getId();
            // æå–保养项目
            List<EamMaintenanceStandardDetail> items;
            if ("SECOND".equals(type)) {
                items = extractSecondMaintenanceItems(table, standardId);
            } else if ("THIRD".equals(type)) {
                items = extractThirdMaintenanceItems(table, standardId);
            } else {
                return Result.error(fileName + ": ä¸æ”¯æŒçš„保养类型: " + type);
            }
            // é¡¹ç›®éªŒè¯
            if (items.isEmpty()) {
                return Result.error(fileName + ": æœªæå–到任何保养项目");
            }
            // ä¿å­˜é¡¹ç›®
            eamMaintenanceStandardDetailService.saveBatch(items);
            return Result.ok(fileName + ": å¯¼å…¥æˆåŠŸ, é¡¹ç›®æ•°: " + items.size());
        } catch (ImportException e) {
            return Result.error(e.getMessage());
        } catch (Exception e) {
            return Result.error(fileName + ": ç³»ç»Ÿé”™è¯¯ - " + e.getClass().getSimpleName());
        }
    }
    /**
     * æ–‡æ¡£ç±»åž‹æ ¡éªŒ - é˜²æ­¢äºŒä¿ä¼ å…¥ä¸‰ä¿æˆ–反之
    */
    private boolean isWrongDocumentType(XWPFTable table, String requestedType) {
        boolean hasRepairTitle = false;
        boolean hasOperatorTitle = false;
        boolean hasMaintenancePart = false;
        // åªæ£€æŸ¥å‰10行(通常标题在前几行)
        int maxRows = Math.min(table.getNumberOfRows(), 10);
        for (int i = 0; i < maxRows; i++) {
            XWPFTableRow row = table.getRow(i);
            if (row == null) continue;
            // æ£€æŸ¥æ‰€æœ‰å•元格内容
            for (int j = 0; j < row.getTableCells().size(); j++) {
                String cellText = getCellText(row.getCell(j));
                // æ£€æŸ¥äºŒçº§ä¿å…»ç‰¹å¾
                if (cellText.contains(REPAIR_TITLE)) {
                    hasRepairTitle = true;
                }
                if (cellText.contains(OPERATOR_TITLE)) {
                    hasOperatorTitle = true;
                }
                // æ£€æŸ¥ä¸‰çº§ä¿å…»ç‰¹å¾
                if (cellText.contains("保养部位")) {
                    hasMaintenancePart = true;
                }
            }
        }
        // é€»è¾‘判断
        if ("SECOND".equals(requestedType)) {
            // å¦‚果请求导入二级保养,但文档中有三级保养特征
            return !(hasRepairTitle || hasOperatorTitle) || hasMaintenancePart;
        } else if ("THIRD".equals(requestedType)) {
            // å¦‚果请求导入三级保养,但文档中有二级保养特征
            return !hasMaintenancePart || (hasRepairTitle || hasOperatorTitle);
        }
        return false;
    }
    /**
     * æå–设备基本信息
     */
    private EamMaintenanceStandard extractDeviceInfo(XWPFTable table) {
        if (table.getNumberOfRows() < 2) return null;
        // æå–前两行数据
        Map<String, String> row1Data = extractRowData(table.getRow(0));
        Map<String, String> row2Data = extractRowData(table.getRow(1));
        // åˆ›å»ºè®¾å¤‡æ ‡å‡†å¯¹è±¡
        EamMaintenanceStandard standard = new EamMaintenanceStandard();
        standard.setEquipmentText(row1Data.get("设备类别"));
        standard.setEquipmentCode(row1Data.get("设备编号"));
        standard.setEquipmentName(row2Data.get("设备名称"));
        standard.setEquipmentModel(row2Data.get("设备型号"));
        // å…³è”设备ID
        if (isNotBlank(standard.getEquipmentCode()) &&
                isNotBlank(standard.getEquipmentName())) {
            List<EamEquipment> equipments = eamEquipmentService.list(
                    new QueryWrapper<EamEquipment>()
                            .eq("equipment_code", standard.getEquipmentCode())
                            .eq("equipment_name", standard.getEquipmentName())
            );
            if (!equipments.isEmpty()) {
                standard.setEquipmentId(equipments.get(0).getId());
            }else {
                return null;
            }
        }
        return standard;
    }
    // ç®€æ˜“版字符串非空判断
    private boolean isNotBlank(String str) {
        return str != null && !str.trim().isEmpty();
    }
    /**
     * è¡¨æ ¼è¡Œæ•°æ®è§£æž
     */
    private Map<String, String> extractRowData(XWPFTableRow row) {
        Map<String, String> data = new HashMap<>();
        int cellCount = row.getTableCells().size();
        try {
            // é”®å€¼å¯¹æ¨¡å¼ (标签|值|标签|值)
            if (cellCount >= 4 && cellCount % 2 == 0) {
                for (int i = 0; i < cellCount; i += 2) {
                    String key = cleanKey(getCellText(row.getCell(i)));
                    String value = getCellText(row.getCell(i + 1));
                    if (!key.isEmpty()) data.put(key, value);
                }
            }
            // è¿žç»­å•元格模式
            else {
                for (int i = 0; i < cellCount; i++) {
                    String text = getCellText(row.getCell(i));
                    int colonIndex = text.indexOf(':');
                    if (colonIndex > 0) {
                        String key = cleanKey(text.substring(0, colonIndex));
                        String value = text.substring(colonIndex + 1);
                        data.put(key, value);
                    }
                }
            }
        } catch (Exception e) {
            log.error("行数据解析异常", e);
        }
        return data;
    }
    /**
     * é”®åæ ‡å‡†åŒ–处理
     */
    private String cleanKey(String key) {
        if (key == null) return "";
        // ç§»é™¤ç©ºæ ¼å’Œä¸­æ–‡å†’号
        return key.replaceAll("\\s", "").replace(":", "");
    }
    /**
     * é…ç½®ä¿å…»æ ‡å‡†å‚æ•°
     */
    private void configureStandard(EamMaintenanceStandard standard, String type, MultipartFile file) {
        // åŸºç¡€å‚æ•°
        String filename = file.getOriginalFilename();
        if (filename != null && filename.contains(".")) {
            filename = filename.substring(0, filename.lastIndexOf('.'));
        }
        standard.setStandardName(filename)
                .setInitialDate(new Date())
                .setStandardStatus(MaintenanceStandardStatusEnum.START.name())
                .setStandardVersion("v1.0")
                .setDelFlag(0)
                .setStandardCode(businessCodeRuleService.generateBusinessCodeSeq(
                        BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE
                ));
        // ç±»åž‹ç‰¹å®šå‚æ•°
        if ("SECOND".equals(type)) {
            standard.setMaintenanceCategory("SECOND_MAINTENANCE")
                    .setMaintenancePeriod(6)
                    .setPeriodUnit("月");
        } else {
            standard.setMaintenanceCategory("THIRD_MAINTENANCE")
                    .setPeriodUnit("å¹´");
            // èŽ·å–ä¸‰çº§ä¿å…»å‘¨æœŸ
            if (standard.getEquipmentId() != null) {
                EamEquipmentExtend extend = eamEquipmentExtendService.getById(standard.getEquipmentId());
                if (extend != null) {
                    standard.setMaintenancePeriod(extend.getThirdMaintenancePeriod());
                }
            }
        }
    }
    /**
     * æå–二级保养项目
     */
    private List<EamMaintenanceStandardDetail> extractSecondMaintenanceItems(
            XWPFTable table, String standardId) {
        List<EamMaintenanceStandardDetail> items = new ArrayList<>();
        EamMaintenanceStandardDetailCategory currentCategory = null;
        for (int i = 0; i < table.getNumberOfRows(); i++) {
            XWPFTableRow row = table.getRow(i);
            if (row == null) continue;
            // æ£€æŸ¥æ˜¯å¦æ˜¯æ ‡é¢˜è¡Œï¼ˆç»´ä¿®äººå‘˜ä¿å…»å†…容或操作人员保养内容)
            String firstCell = getCellText(row.getCell(0));
            if (firstCell != null) {
                for (String title : SECOND_CATEGORY_MAPPING.keySet()) {
                    if (firstCell.contains(title)) {
                        currentCategory = SECOND_CATEGORY_MAPPING.get(title);
                        // æ£€æŸ¥ç¬¬äºŒåˆ—和第三列是否是"序号"和"保养内容"
                        if (row.getTableCells().size() > 2) {
                            String secondCell = getCellText(row.getCell(1));
                            String thirdCell = getCellText(row.getCell(2));
                            // æ˜Žç¡®è·³è¿‡æ ‡é¢˜è¡Œ
                            if ("序号".equals(secondCell) && "保养内容".equals(thirdCell)) {
                                continue; // è·³è¿‡è¿™ä¸€è¡Œ
                            }
                        }
                        // å°è¯•提取标题行中的项目(如果存在)
                        if (row.getTableCells().size() > 2) {
                            String content = getCellText(row.getCell(2));
                            if (content != null && !content.trim().isEmpty() &&
                                    !"保养内容".equals(content.trim())) { // è¿‡æ»¤æ— æ•ˆå†…容
                                items.add(createItem(currentCategory, content.trim(), standardId));
                            }
                        }
                        continue;
                    }
                }
            }
            // å¤„理普通项目行
            if (currentCategory != null && isValidItemRow(row)) {
                // èŽ·å–å†…å®¹
                String content = row.getTableCells().size() > 2 ?
                        getCellText(row.getCell(2)) : "";
                // æŽ’除标题内容
                if ("保养内容".equals(content) ||
                        "序号".equals(content) ||
                        content.contains("维修人员保养内容") ||
                        content.contains("操作人员保养内容")) {
                    continue;
                }
                EamMaintenanceStandardDetail item = new EamMaintenanceStandardDetail();
                item.setItemCategory(String.valueOf(currentCategory));
                item.setStandardId(standardId);
                item.setItemName(cleanContent(content));
                // å¤„理序号(第二列)
                if (row.getTableCells().size() > 1) {
                    String seqText = getCellText(row.getCell(1));
                    try {
                        if (seqText != null && !seqText.trim().isEmpty()) {
                            item.setItemCode(Integer.parseInt(seqText.trim()));
                        }
                    } catch (NumberFormatException e) {
                        // å¿½ç•¥åºå·è§£æžé”™è¯¯
                    }
                }
                items.add(item);
            }
        }
        return items;
    }
    /**
     * åˆ›å»ºä¿å…»é¡¹ç›®
     */
    private EamMaintenanceStandardDetail createItem(
            EamMaintenanceStandardDetailCategory category,
            String content,
            String standardId) {
        EamMaintenanceStandardDetail item = new EamMaintenanceStandardDetail();
        item.setItemCategory(category.name());
        item.setStandardId(standardId);
        item.setItemName(cleanContent(content));
        return item;
    }
    /**
     * æå–三级保养项目(无类型)
     */
    private List<EamMaintenanceStandardDetail> extractThirdMaintenanceItems(
            XWPFTable table, String standardId) {
        List<EamMaintenanceStandardDetail> items = new ArrayList<>();
        String currentPart = "";
        int itemCount = 1;
        // ä»Žç¬¬ä¸‰è¡Œå¼€å§‹ï¼ˆè·³è¿‡è¡¨å¤´å’Œè®¾å¤‡ä¿¡æ¯ï¼‰
        for (int i = 2; i < table.getNumberOfRows(); i++) {
            XWPFTableRow row = table.getRow(i);
            if (row == null || isRowEmpty(row)) continue;
            // è·³è¿‡"保养部位"标题行
            String firstCell = getCellText(row.getCell(0));
            if ("保养部位".equals(firstCell)) {
                continue;
            }
            EamMaintenanceStandardDetail item = new EamMaintenanceStandardDetail();
            // ä¸‰çº§ä¿å…»ä¸éœ€è¦ç±»åž‹ï¼Œä¸è®¾ç½®itemCategory
            item.setStandardId(standardId);
            item.setItemCode(itemCount++);
            // å¤„理部位列
            if (!row.getTableCells().isEmpty()) {
                String partCell = getCellText(row.getCell(0));
                if (!partCell.trim().isEmpty()) {
                    currentPart = partCell.trim();
                }
            }
            item.setItemPart(currentPart);
            // æ ¹æ®åˆ—数确定内容和标准的位置
            int cellCount = row.getTableCells().size();
            if (cellCount == 3) { // éƒ¨ä½|内容|标准
                item.setItemName(getCellText(row.getCell(1)));
                item.setItemDemand(getCellText(row.getCell(2)));
            }
            else if (cellCount == 2) { // å†…容|标准
                item.setItemName(getCellText(row.getCell(0)));
                item.setItemDemand(getCellText(row.getCell(1)));
            }
            else if (cellCount == 1) { // å•列内容
                item.setItemName(getCellText(row.getCell(0)));
            }
            else if (cellCount > 3) { // å¤šåˆ—处理
                // å–第2列作为内容,最后一列作为标准
                item.setItemName(getCellText(row.getCell(1)));
                item.setItemDemand(getCellText(row.getCell(cellCount - 1)));
            }
            items.add(item);
        }
        return items;
    }
    /**
     * å…¼å®¹ç‰ˆå•元格文本提取
     */
    private String getCellText(XWPFTableCell cell) {
        if (cell == null) return "";
        StringBuilder text = new StringBuilder();
        for (XWPFParagraph para : cell.getParagraphs()) {
            if (para != null) {
                for (XWPFRun run : para.getRuns()) {
                    if (run != null) {
                        String runText = run.getText(0);
                        if (runText != null) {
                            text.append(runText);
                        }
                    }
                }
            }
        }
        return text.toString();
    }
    /**
     * å†…容清理
     */
    private String cleanContent(String text) {
        if (text == null) return "";
        // æ›¿æ¢ç‰¹æ®Šç©ºæ ¼å’Œåˆå¹¶è¿žç»­ç©ºæ ¼
        text = text.replace('\u00A0', ' ')
                .replace('\u2007', ' ')
                .replace('\u202F', ' ')
                .replaceAll("\\s+", " ");
        // è§„范标点符号
        return text.replace(',', '、')
                .replace(',', '、')
                .replace(';', ';')
                .replace(';', ';')
                .replace(':', ':')
                .replace(':', ':')
                .trim();
    }
    /**
     * éªŒè¯æœ‰æ•ˆé¡¹ç›®è¡Œ
     */
    private boolean isValidItemRow(XWPFTableRow row) {
        return row != null &&
                row.getTableCells().size() >= 2 &&
                !getCellText(row.getCell(1)).trim().isEmpty();
    }
    /**
     * ç©ºè¡Œæ£€æµ‹
     */
    private boolean isRowEmpty(XWPFTableRow row) {
        if (row == null) return true;
        for (XWPFTableCell cell : row.getTableCells()) {
            String text = getCellText(cell);
            if (text != null && !text.trim().isEmpty()) {
                return false;
            }
        }
        return true;
    }
    /*导入二保三保文件Excel--------------------------结束*/
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamTechnicalStatusEvaluationStandardDetailServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package org.jeecg.modules.eam.service.impl;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationStandardDetailMapper;
import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationStandardDetailService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒæ˜Žç»†
 * @Author: jeecg-boot
 * @Date:   2025-07-07
 * @Version: V1.0
 */
@Service
public class EamTechnicalStatusEvaluationStandardDetailServiceImpl extends ServiceImpl<EamTechnicalStatusEvaluationStandardDetailMapper, EamTechnicalStatusEvaluationStandardDetail> implements IEamTechnicalStatusEvaluationStandardDetailService {
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamTechnicalStatusEvaluationStandardServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,186 @@
package org.jeecg.modules.eam.service.impl;
import cn.hutool.core.collection.CollectionUtil;
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.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.SimpleVersionGenerateUtil;
import org.jeecg.modules.eam.base.entity.BaseFactory;
import org.jeecg.modules.eam.base.entity.BaseFactoryUser;
import org.jeecg.modules.eam.base.service.IBaseFactoryService;
import org.jeecg.modules.eam.base.service.IBaseFactoryUserService;
import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum;
import org.jeecg.modules.eam.constant.TechnicalStatusEvaluationStandardEnum;
import org.jeecg.modules.eam.entity.EamMaintenanceStandard;
import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandard;
import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationStandardDetail;
import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationStandardMapper;
import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationStandardRequest;
import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationStandardDetailService;
import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationStandardService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description: æŠ€æœ¯çŠ¶æ€é‰´å®šè§„èŒƒ
 * @Author: jeecg-boot
 * @Date: 2025-07-07
 * @Version: V1.0
 */
@Service
public class EamTechnicalStatusEvaluationStandardServiceImpl extends ServiceImpl<EamTechnicalStatusEvaluationStandardMapper, EamTechnicalStatusEvaluationStandard> implements IEamTechnicalStatusEvaluationStandardService {
    @Autowired
    private IBaseFactoryUserService baseFactoryUserService;
    @Autowired
    private IBaseFactoryService baseFactoryService;
    @Autowired
    private IEamTechnicalStatusEvaluationStandardDetailService standardDetailService;
    @Override
    public IPage<EamTechnicalStatusEvaluationStandard> queryPageList(Page<EamTechnicalStatusEvaluationStandard> page, EamTechnicalStatusEvaluationStandard query) {
        QueryWrapper<EamTechnicalStatusEvaluationStandard> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("ems.del_flag", CommonConstant.DEL_FLAG_0);
        //用户数据权限
        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (sysUser == null) {
            return page;
        }
        if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) {
            //选择了设备,根据设备id过滤设备
            List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(","));
            queryWrapper.in("e.equipment_code", equipArr);
        } else {
            //没有选择设备,根据中心过滤设备
            List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService.
                    list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId()));
            if (!CollectionUtils.isEmpty(baseFactoryUserList)) {
                List<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toList());
                List<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getFactoryCode).collect(Collectors.toList());
                queryWrapper.in("e.factory_code", factoryCode);
            } else {
                return page;
            }
        }
        if (query != null) {
            //编码 æ¨¡ç³ŠæŸ¥è¯¢
            if (StringUtils.isNotBlank(query.getStandardCode())) {
                queryWrapper.like("ems.standard_code", query.getStandardCode());
            }
            //名称 æ¨¡ç³ŠæŸ¥è¯¢
            if (StringUtils.isNotBlank(query.getStandardName())) {
                queryWrapper.like("ems.standard_name", query.getStandardName());
            }
            //设备
            if (StringUtils.isNotBlank(query.getEquipmentId())) {
                queryWrapper.eq("ems.equipment_id", query.getEquipmentId());
            }
            //保养分类
            if (StringUtils.isNotBlank(query.getStandardStatus())) {
                queryWrapper.eq("ems.standard_status", query.getStandardStatus());
            }
        }
        queryWrapper.orderByDesc("ems.create_time");
        return this.getBaseMapper().queryPageList(page, queryWrapper);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean addEamTechnicalStatusEvaluationStandard(EamTechnicalStatusEvaluationStandardRequest request) {
        EamTechnicalStatusEvaluationStandard entity = new EamTechnicalStatusEvaluationStandard();
        BeanUtils.copyProperties(request, entity);
        entity.setStandardStatus(TechnicalStatusEvaluationStandardEnum.WAIT_SUBMIT.name());
        //版本递增
        entity.setStandardVersion(SimpleVersionGenerateUtil.getInitVersion());
        //设备处理
        entity.setEquipmentId(request.getEquipmentId());
        //删除标记
        entity.setDelFlag(CommonConstant.DEL_FLAG_0);
        //重复性校验
        EamTechnicalStatusEvaluationStandard exist = checkDuplicate(entity.getEquipmentId(), null);
        if(exist != null){
            throw new JeecgBootException("规范已存在,不能重复添加!");
        }
        this.getBaseMapper().insert(entity);
        //处理明细数据
        if(CollectionUtil.isNotEmpty(request.getTableDetailList())) {
            request.getTableDetailList().forEach(tableDetail -> {
                tableDetail.setStandardId(entity.getId());
            });
            standardDetailService.saveBatch(request.getTableDetailList());
        }
        return true;
    }
    @Override
    public EamTechnicalStatusEvaluationStandard checkDuplicate(String equipmentId, String id) {
        LambdaQueryWrapper<EamTechnicalStatusEvaluationStandard> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(EamTechnicalStatusEvaluationStandard::getEquipmentId, equipmentId);
        queryWrapper.eq(EamTechnicalStatusEvaluationStandard::getDelFlag, CommonConstant.DEL_FLAG_0);
        //待提交、启用状态
        queryWrapper.in(EamTechnicalStatusEvaluationStandard::getStandardStatus, Arrays.asList(TechnicalStatusEvaluationStandardEnum.ENABLE.name(), TechnicalStatusEvaluationStandardEnum.WAIT_SUBMIT.name()));
        queryWrapper.orderByDesc(EamTechnicalStatusEvaluationStandard::getStandardVersion);
        if(StringUtils.isNotBlank(id)){
            queryWrapper.ne(EamTechnicalStatusEvaluationStandard::getId, id);
        }
        List<EamTechnicalStatusEvaluationStandard> list = this.getBaseMapper().selectList(queryWrapper);
        if(CollectionUtil.isEmpty(list)) {
            return null;
        }
        return list.get(0);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean editEamTechnicalStatusEvaluationStandard(EamTechnicalStatusEvaluationStandardRequest request) {
        EamTechnicalStatusEvaluationStandard entity = this.getBaseMapper().selectById(request.getId());
        if(entity == null){
            throw new JeecgBootException("编辑的数据已删除,请刷新重试!");
        }
        entity.setStandardName(request.getStandardName());
        entity.setEvaluationPeriod(request.getEvaluationPeriod());
        this.getBaseMapper().updateById(entity);
        //处理详情
        if(CollectionUtil.isNotEmpty(request.getTableDetailList())) {
            List<EamTechnicalStatusEvaluationStandardDetail> addList = new ArrayList<>();
            List<EamTechnicalStatusEvaluationStandardDetail> updateList = new ArrayList<>();
            request.getTableDetailList().forEach(tableDetail -> {
                tableDetail.setStandardId(entity.getId());
                if(tableDetail.getId() == null){
                    addList.add(tableDetail);
                }else {
                    updateList.add(tableDetail);
                }
            });
            if(CollectionUtil.isNotEmpty(addList)){
                standardDetailService.saveBatch(addList);
            }
            if(CollectionUtil.isNotEmpty(updateList)){
                standardDetailService.updateBatchById(updateList);
            }
        }
        if(CollectionUtil.isNotEmpty(request.getRemoveDetailList())) {
            List<String> ids = request.getRemoveDetailList().stream().map(EamTechnicalStatusEvaluationStandardDetail::getId).collect(Collectors.toList());
            standardDetailService.removeBatchByIds(ids);
        }
        return true;
    }
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/model/EamBaseRepairDepartTreeModel.java
@@ -1,10 +1,12 @@
package org.jeecg.modules.system.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.system.entity.EamBaseRepairDepart;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.ArrayList;
@@ -69,10 +71,14 @@
    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;
    /**