已修改28个文件
915 ■■■■ 文件已修改
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceFurnace.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportThreeNoSpareQuery.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationApplication.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationOrder.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationOrderChange.java 55 ●●●●● 补丁 | 查看 | 原始文档 | 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/EamMaintenanceStandardMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationApplicationMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationOrderChangeMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationOrderMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamThirdMaintenanceChangeMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamThirdMaintenanceFurnaceMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -135,4 +136,56 @@
    /**流程业务实例id 一个流程业务唯一,本表中也唯一*/
    @TableField(exist = false)
    private String processInstanceId;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -171,4 +172,56 @@
    private String equipmentModel;
    @TableField(exist = false)
    private String installationPosition;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -197,4 +198,56 @@
    /**流程业务实例id 一个流程业务唯一,本表中也唯一*/
    @TableField(exist = false)
    private String processInstanceId;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
@@ -212,4 +213,56 @@
    private String equipmentName;
    @TableField(exist = false)
    private String equipmentModel;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryCode;
    public void setFactoryCode(String factoryCode){
        this.factoryCode = factoryCode;
        if(StrUtil.isNotEmpty(factoryCode)){
            if(factoryCode.length()==12){
                this.factoryCode = factoryCode.substring(0,9);
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==9){
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==6){
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceFurnace.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -157,4 +158,56 @@
    private String equipmentName;
    @TableField(exist = false)
    private String equipmentModel;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java
@@ -18,18 +18,6 @@
 * @Date: 2025-04-03
 */
public interface EamRepairOrderMapper extends BaseMapper<EamRepairOrder> {
    /**
     * 分页列表
     *
     * @param page
     * @param eamRepairOrder
     * @param userId
     * @param equipmentIds
     * @return
     */
    IPage<EamRepairOrder> pageList(Page<EamRepairOrder> page, @Param("eamRepairOrder") EamRepairOrderQuery eamRepairOrder, @Param("userId") String userId, @Param("equipmentIds") List<String> equipmentIds);
    /**
     * 分页查询
     * @param page
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java
@@ -20,7 +20,7 @@
 */
public interface EamReportAccidentsRegisterMapper extends BaseMapper<EamReportAccidentsRegister> {
    IPage<EamReportAccidentsRegisterQuery>  queryPageList(IPage<EamReportAccidentsRegisterQuery> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportAccidentsRegisterQuery> eamReportAccidentsRegisterQuery);
    IPage<EamReportAccidentsRegisterQuery> queryPageList(IPage<EamReportAccidentsRegisterQuery> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportAccidentsRegisterQuery> eamReportAccidentsRegisterQuery);
    /**
     * 列表查询
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml
@@ -2,51 +2,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.EamRepairOrderMapper">
    <select id="pageList" resultType="org.jeecg.modules.eam.entity.EamRepairOrder">
        SELECT
            t1.*,
            t2.equipment_name
        FROM
            eam_repair_order t1
                LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id
        <where>
            <choose>
                <when test="equipmentIds != null and equipmentIds.size() > 0 ">
                    AND t2.equipment_code IN
                    <foreach collection="equipmentIds" item="equipmentId" index="index" open="(" close=")" separator=",">
                        #{equipmentId}
                    </foreach>
                </when>
                <otherwise>
                    EXISTS ( SELECT 1 FROM mdc_user_production t3 WHERE t3.user_id = #{userId} AND t3.pro_id= t2.org_id )
                </otherwise>
            </choose>
            <if test="eamRepairOrder.equipmentCode != null and eamRepairOrder.equipmentCode != ''">
                AND t2.equipment_code LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.equipmentCode }),'%')
            </if>
            <if test="eamRepairOrder.equipmentId != null and eamRepairOrder.equipmentId != ''">
                AND t2.id = #{ eamRepairOrder.equipmentId }
            </if>
            <if test="eamRepairOrder.equipmentName != null and eamRepairOrder.equipmentName != ''">
                AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.equipmentName }),'%')
            </if>
            <if test="eamRepairOrder.repairStatus != null and eamRepairOrder.repairStatus != ''">
                AND t1.repair_status = #{ eamRepairOrder.repairStatus }
            </if>
            <if test="eamRepairOrder.repairer != null and eamRepairOrder.repairer != ''">
                AND t1.repairer LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.repairer }),'%')
            </if>
            <if test="eamRepairOrder.repairCode != null and eamRepairOrder.repairCode != ''">
                AND t1.repair_code LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.repairCode }),'%')
            </if>
            <if test="eamRepairOrder.sparePartDescription != null and eamRepairOrder.sparePartDescription != ''">
                AND t1.spare_part_description LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.sparePartDescription }),'%')
            </if>
        </where>
        ORDER BY t1.create_time DESC
    </select>
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamRepairOrder">
        select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position
        select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position,e.factory_org_code
        from eam_repair_order wmo
        inner join eam_equipment e
        on wmo.equipment_id = e.id
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml
@@ -9,6 +9,7 @@
            e.equipment_name,
            e.equipment_model,
            e.installation_position,
            e.factory_org_code,
            wmo.scrap_part_number,
            wmo.scrap_part_quantity,
            wmo.scrap_part_value
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.eam.mapper.EamReportProductHazardsMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.request.EamReportProductHazardsQuery">
        select erph.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position,
        select erph.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position,e.factory_org_code,
               arr.processing_part,arr.batch_number,arr.quantity
        from eam_report_product_hazards erph
                 inner join eam_equipment e
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml
@@ -8,6 +8,7 @@
            e.equipment_code,
            e.equipment_name,
            e.equipment_model,
            e.factory_org_code,
            e.installation_position,
            erar.accident_phenomenon,
            erar.measure,
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.request;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
@@ -337,4 +338,55 @@
    @TableField(exist = false)
    @ApiModelProperty(value = "废品价值")
    private String scrapPartValue;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.request;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -148,4 +149,56 @@
    /**件数*/
    @TableField(exist = false)
    private String quantity;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportThreeNoSpareQuery.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.request;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -140,4 +141,56 @@
    private String installationPosition;
    private String column;
    private String order;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java
@@ -24,6 +24,7 @@
import org.jeecg.modules.eam.service.IEamMaintenanceStandardService;
import org.jeecg.modules.eam.vo.EamMaintenanceStandardVo;
import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -33,6 +34,9 @@
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
 * @Description: 保养标准
@@ -309,40 +313,83 @@
        }
    }
    /**
     * 二保导入
     */
    */
    @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;
            int totalFiles = fileMap.size();
            List<String> successFileNames = new ArrayList<>();
            List<String> failedFileNames = new ArrayList<>();
            Map<String, String> failedFiles = new LinkedHashMap<>();
            int successDeviceCount = 0;
            List<String> notFoundCodes = new ArrayList<>();
            for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
                MultipartFile file = entity.getValue();
                String fileName = file.getOriginalFilename();
                Result<?> importResult=eamMaintenanceStandardService.importMaintenanceStandard(file, "SECOND",null);
                if (importResult.isSuccess()) {
                    successCount++;
                } else {
                    results.put(fileName, importResult.getMessage());
                    failureCount++;
                }
                Result<?> importResult = eamMaintenanceStandardService.importMaintenanceStandard(file, "SECOND", null);
                successDeviceCount = getSuccessDeviceCount(successFileNames, failedFileNames, failedFiles, successDeviceCount, notFoundCodes, fileName, importResult);
            }
            // 构建最终响应
            return getResult(results, fileMap.size(), successCount, failureCount);
            // 构建响应
            return getResult(totalFiles, successFileNames, failedFileNames, failedFiles, successDeviceCount, notFoundCodes);
        } catch (Exception e) {
            log.error("导入处理异常", e);
            return Result.error("导入处理失败: " + e.getMessage());
        }
    }
    @NotNull
    private Result<?> getResult(int totalFiles, List<String> successFileNames, List<String> failedFileNames, Map<String, String> failedFiles, int successDeviceCount, List<String> notFoundCodes) {
        if (!failedFiles.isEmpty()) {
            String errorMsg = String.format("失败文件数:%d,失败文件名:%s,失败原因:%s",
                    totalFiles,
                    String.join(",", failedFileNames),
                    failedFiles.entrySet().stream()
                            .map(e -> e.getKey() + ":" + e.getValue())
                            .collect(Collectors.joining(";")));
            return Result.error(errorMsg);
        }
        if (!notFoundCodes.isEmpty()) {
            return Result.ok(String.format("成功导入文件数:%d,文件名:%s,成功导入设备数:%d,未找到的设备编码:%s",
                    totalFiles,
                    String.join(",", successFileNames),
                    successDeviceCount,
                    String.join(",", notFoundCodes)));
        }
        return Result.ok(String.format("成功导入文件数:%d,文件名:%s,成功导入设备数:%d",
                totalFiles,
                String.join(",", successFileNames),
                successDeviceCount));
    }
    private int getSuccessDeviceCount(List<String> successFileNames, List<String> failedFileNames, Map<String, String> failedFiles, int successDeviceCount, List<String> notFoundCodes, String fileName, Result<?> importResult) {
        if (importResult.isSuccess()) {
            successFileNames.add(fileName);
            String message = importResult.getMessage();
            // 提取设备数
            Pattern devicePattern = Pattern.compile("设备数:(\\d+)");
            Matcher deviceMatcher = devicePattern.matcher(message);
            if (deviceMatcher.find()) {
                successDeviceCount += Integer.parseInt(deviceMatcher.group(1));
            }
            // 检查未找到的设备编码
            if (message.contains("以下设备编码未找到")) {
                int colonIndex = message.indexOf(":", message.indexOf("以下设备编码未找到"));
                if (colonIndex != -1) {
                    String notFoundPart = message.substring(colonIndex + 1).replaceAll("[。;,]", "");
                    notFoundCodes.addAll(Arrays.asList(notFoundPart.split("\\s*,\\s*")));
                }
            }
        } else {
            failedFileNames.add(fileName);
            failedFiles.put(fileName, importResult.getMessage());
        }
        return successDeviceCount;
    }
    /**
@@ -352,28 +399,21 @@
    public Result<?> importThirdMaintenanceStandard(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;
            int totalFiles = fileMap.size();
            List<String> successFileNames = new ArrayList<>();
            List<String> failedFileNames = new ArrayList<>();
            Map<String, String> failedFiles = new LinkedHashMap<>();
            int successDeviceCount = 0;
            List<String> notFoundCodes = new ArrayList<>();
            for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
                MultipartFile file = entity.getValue();
                String fileName = file.getOriginalFilename();
                Result<?> importResult= eamMaintenanceStandardService.importMaintenanceStandard(file, "THIRD",null);
                if (importResult.isSuccess()) {
                    successCount++;
                } else {
                    results.put(fileName, importResult.getMessage());
                    failureCount++;
                }
                Result<?> importResult = eamMaintenanceStandardService.importMaintenanceStandard(file, "THIRD", null);
                successDeviceCount = getSuccessDeviceCount(successFileNames, failedFileNames, failedFiles, successDeviceCount, notFoundCodes, fileName, importResult);
            }
            // 构建最终响应
            return getResult(results, fileMap.size(), successCount, failureCount);
            // 构建响应
            return getResult(totalFiles, successFileNames, failedFileNames, failedFiles, successDeviceCount, notFoundCodes);
        } catch (Exception e) {
            log.error("导入处理异常", e);
            return Result.error("导入处理失败: " + e.getMessage());
@@ -382,17 +422,14 @@
    /**
     * 升版导入
     * @param id,file
     * @return
     */
    @ApiOperation(value = "升版导入", notes = "升版导入")
    @PostMapping(value = "/importUpgrade")
    public Result<?> importUpgrade(String id,MultipartFile file) {
        EamMaintenanceStandard eamMaintenanceStandard=eamMaintenanceStandardService.getById(id);
        if (eamMaintenanceStandard==null) {
    public Result<?> importUpgrade(String id, MultipartFile file) {
        EamMaintenanceStandard eamMaintenanceStandard = eamMaintenanceStandardService.getById(id);
        if (eamMaintenanceStandard == null) {
            return Result.error("请选择需要升版的保养标准");
        }else {
            switch (eamMaintenanceStandard.getMaintenanceCategory()){
        } else {
            switch (eamMaintenanceStandard.getMaintenanceCategory()) {
                case "POINT_INSPECTION":
                    //点检升版导入
                    return eamMaintenanceStandardService.importPointInspectionExcel(file,id);
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -199,4 +200,56 @@
    public String getEquipmentText() {
        return equipmentCode + "[" + equipmentName + "]";
    }
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationApplication.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -27,7 +28,7 @@
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_application对象", description="加工设备技术鉴定申请")
public class EamTechnicalStatusEvaluationApplication {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
@@ -136,4 +137,56 @@
    private String equipmentName;
    @TableField(exist = false)
    private String equipmentModel;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryCode;
    public void setFactoryCode(String factoryCode){
        this.factoryCode = factoryCode;
        if(StrUtil.isNotEmpty(factoryCode)){
            if(factoryCode.length()==12){
                this.factoryCode = factoryCode.substring(0,9);
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==9){
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==6){
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationOrder.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -11,6 +12,7 @@
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@@ -27,7 +29,7 @@
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_order对象", description="技术状态鉴定工单")
public class EamTechnicalStatusEvaluationOrder {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
@@ -265,4 +267,56 @@
    private String equipmentName;
    @TableField(exist = false)
    private String equipmentModel;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryOrgCode;
    public void setFactoryOrgCode(String factoryOrgCode){
        this.factoryOrgCode = factoryOrgCode;
        if(StrUtil.isNotEmpty(factoryOrgCode)){
            if(factoryOrgCode.length()==12){
                this.gqfactoryOrgCode = factoryOrgCode.substring(0,9);
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==9){
                this.zxfactoryOrgCode = factoryOrgCode.substring(0,6);
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
            if(factoryOrgCode.length()==6){
                this.gsfactoryOrgCode = factoryOrgCode.substring(0,3);
            }
        }
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamTechnicalStatusEvaluationOrderChange.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.eam.entity;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -27,7 +28,7 @@
@Accessors(chain = true)
@ApiModel(value="eam_technical_status_evaluation_order_change对象", description="技术状态鉴定工单变更")
public class EamTechnicalStatusEvaluationOrderChange {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
@@ -145,4 +146,56 @@
    private String equipmentModel;
    @TableField(exist = false)
    private Date originalEvaluationDate;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gsfactoryOrgCode;
    /**
     * 中心
     */
    @ApiModelProperty(value = "中心")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String zxfactoryOrgCode;
    /**
     * 工区
     */
    @ApiModelProperty(value = "工区")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private transient String gqfactoryOrgCode;
    /**
     * 工段
     */
    @ApiModelProperty(value = "中心/工区/工段")
    @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code")
    @TableField(exist = false)
    private String factoryCode;
    public void setFactoryCode(String factoryCode){
        this.factoryCode = factoryCode;
        if(StrUtil.isNotEmpty(factoryCode)){
            if(factoryCode.length()==12){
                this.factoryCode = factoryCode.substring(0,9);
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==9){
                this.zxfactoryOrgCode = factoryCode.substring(0,6);
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
            if(factoryCode.length()==6){
                this.gsfactoryOrgCode = factoryCode.substring(0,3);
            }
        }
    }
}
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, e.equipment_model,f.process_instance_id as 'procInstId',
        select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model,e.factory_org_code,f.process_instance_id as 'procInstId',
               f.process_definition_key,
               f.process_definition_id,
               f.process_instance_id
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml
@@ -4,6 +4,7 @@
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamMaintenanceStandard">
        select ems.*, e.equipment_code, e.equipment_name,
               e.equipment_model,f.process_instance_id as 'procInstId',
               e.factory_org_code,
               f.process_definition_key,
               f.process_definition_id,
               f.process_instance_id
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml
@@ -8,6 +8,7 @@
            e.equipment_code,
            e.equipment_name,
            e.equipment_model,
            e.factory_org_code,
            f.process_instance_id AS 'procInstId',
            f.process_definition_key,
            f.process_definition_id,
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationApplicationMapper.xml
@@ -2,11 +2,10 @@
<!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.EamTechnicalStatusEvaluationApplicationMapper">
    <select id="queryPageList"
            resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationApplication">
        select ems.*, e.equipment_code, e.equipment_name, e.equipment_model
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationApplication">
        select ems.*,ems.factory_org_code as 'factoryOrgCode', e.equipment_code, e.equipment_name, e.equipment_model, e.factory_org_code as 'factoryCode'
        from eam_technical_status_evaluation_application ems
        inner join eam_equipment e on ems.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
</mapper>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationOrderChangeMapper.xml
@@ -4,10 +4,11 @@
    <select id="queryPageList"
            resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrderChange">
        select ems.*, e.equipment_code, e.equipment_name, e.equipment_model, emo.evaluation_date as originalEvaluationDate
        select ems.*,ems.factory_org_code as 'factoryOrgCode', e.equipment_code, e.equipment_name, e.equipment_model, e.factory_org_code as factoryCode
             ,emo.evaluation_date as originalEvaluationDate
        from eam_technical_status_evaluation_order_change ems
        inner join eam_technical_status_evaluation_order emo on ems.order_id = emo.id
        inner join eam_equipment e on ems.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
</mapper>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamTechnicalStatusEvaluationOrderMapper.xml
@@ -2,10 +2,10 @@
<!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.EamTechnicalStatusEvaluationOrderMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder">
        select ems.*, e.equipment_code, e.equipment_name, e.equipment_model
        select ems.*, e.equipment_code, e.equipment_name, e.equipment_model ,e.factory_org_code
        from eam_technical_status_evaluation_order ems
        inner join eam_equipment e
        on ems.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
</mapper>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamThirdMaintenanceChangeMapper.xml
@@ -7,11 +7,12 @@
            tmc.*,
            e.equipment_code,
            e.equipment_name,
            e.equipment_model
            e.equipment_model,
            e.factory_org_code as 'factoryCode'
        FROM
            eam_third_maintenance_change tmc
                INNER JOIN eam_third_maintenance_order tmo ON tmc.order_id = tmo.id
                INNER JOIN eam_equipment e ON tmo.equipment_id = e.id
            ${ew.customSqlSegment}
    </select>
</mapper>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamThirdMaintenanceFurnaceMapper.xml
@@ -3,10 +3,10 @@
<mapper namespace="org.jeecg.modules.eam.mapper.EamThirdMaintenanceFurnaceMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace">
        select tmf.*, e.equipment_code, e.equipment_name, e.equipment_model
        select tmf.*, e.equipment_code, e.equipment_name, e.equipment_model,e.factory_org_code
        from eam_third_maintenance_furnace tmf
        inner join eam_equipment e
        on tmf.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
</mapper>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java
@@ -1213,11 +1213,7 @@
        // 检查项目名称列
        Cell nameCell = row.getCell(1);
        if (nameCell != null && nameCell.getCellType() != CellType.BLANK) {
            return false;
        }
        return true;
        return nameCell == null || nameCell.getCellType() == CellType.BLANK;
    }
    /**
@@ -1324,7 +1320,7 @@
            EamMaintenanceStandard oldStandardForRevision = null;
            Map<String, Integer> deviceVersionMap = new HashMap<>();
            Map<String, Integer> compositeVersionMap = new HashMap<>();
            List<String> notFoundEquipmentCodes = new ArrayList<>();
            // 获取文档中的所有段落
            List<XWPFParagraph> paragraphs = doc.getParagraphs();
@@ -1358,6 +1354,21 @@
                    EamMaintenanceStandard standard = extractDeviceInfo(table, type);
                    if (standard == null) {
                        throw new ImportException("表格" + (i+1) + ":设备信息提取失败");
                    }
                    if (StrUtil.isEmpty(standard.getEquipmentId())) {
                        // 记录未找到的设备编码
                        if (StrUtil.isNotEmpty(standard.getEquipmentCode())) {
                            notFoundEquipmentCodes.add(standard.getEquipmentCode());
                        } else {
                            notFoundEquipmentCodes.add("未知编码(表格" + (i+1) + ")");
                        }
                        // 跳过当前设备,继续处理下一个
                        do {
                            i++;
                        } while (i < tables.size() && !isDeviceInfoTable(tables.get(i)));
                        continue;
                    }
                    // 从文档中获取标题(表格前的段落)
@@ -1409,6 +1420,11 @@
            // 校验设备数量
            if (standards.isEmpty()) {
                // 如果所有设备都未找到,返回特定错误
                if (!notFoundEquipmentCodes.isEmpty()) {
                    return Result.error(fileName + ":所有设备编码均未找到:" +
                            String.join(", ", notFoundEquipmentCodes));
                }
                return Result.error(fileName + ":未找到有效的设备信息表格");
            }
@@ -1431,7 +1447,14 @@
            // 作废旧版本(保留最新版本)
            obsoleteOldVersionsByCompositeKey(deviceVersionMap);
            return Result.ok(fileName + "导入成功,设备数:" + standards.size() + ",项目数:" + allItems.size());
            if (!notFoundEquipmentCodes.isEmpty()) {
                String successMsg = fileName + "部分导入成功,设备数:" + standards.size();
                String errorMsg = "以下设备编码未找到:" + String.join(", ", notFoundEquipmentCodes);
                return Result.ok(successMsg + ";但" + errorMsg);
            }
            // 修改点:只返回设备数量
            return Result.ok(fileName + "导入成功,设备数:" + standards.size());
        } catch (ImportException e) {
            return Result.error(fileName + ":" + e.getMessage());
@@ -1471,13 +1494,10 @@
    /**
     * 从表格前的段落中提取标题(修复版)
     * 从表格前的段落中提取标题
     */
    private String extractTitleBeforeTable(XWPFTable table, List<XWPFParagraph> paragraphs) {
        try {
            // 获取表格的CTTbl对象
            CTTbl ctTbl = table.getCTTbl();
            // 获取表格所在的body
            IBody body = table.getBody();
@@ -1513,7 +1533,7 @@
                XWPFTableRow firstRow = table.getRow(0);
                for (XWPFTableCell cell : firstRow.getTableCells()) {
                    String text = getCellText(cell);
                    if (text != null && text.contains("保养规范")) {
                    if (text.contains("保养规范")) {
                        return text.trim();
                    }
                }
@@ -1864,15 +1884,21 @@
        standard.setEquipmentName(row2Data.get("设备名称"));
        standard.setEquipmentModel(row2Data.get("设备型号"));
        // 关联设备ID
        // 关联设备ID - 修改点:设备未找到时不抛出异常
        if (StrUtil.isNotEmpty(standard.getEquipmentCode())) {
            EamEquipment equipment = eamEquipmentService.selectByEquipmentCode(standard.getEquipmentCode());
            if (equipment == null) {
                log.warn("设备编码未找到: {}", standard.getEquipmentCode());
                return null;
                // 记录未找到设备编码的日志
                log.error("设备编码未找到: {}", standard.getEquipmentCode());
                // 返回对象但设备ID为空,表示设备未找到
                return standard;
            } else {
                standard.setEquipmentId(equipment.getId());
            }
        } else {
            // 处理设备编码为空的情况
            log.error("设备编码为空");
            return standard;
        }
        return standard;