lyh
2025-07-10 1f20cdf9822caad4faf286e8a8d78c16de370bc6
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java
@@ -22,8 +22,8 @@
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.system.entity.BaseFactory;
import org.jeecg.modules.system.entity.BaseFactoryUser;
import org.jeecg.modules.system.service.IBaseFactoryService;
import org.jeecg.modules.system.service.IBaseFactoryUserService;
import org.jeecg.modules.system.entity.SysParams;
import org.jeecg.modules.system.service.*;
import org.jeecg.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.eam.constant.EamMaintenanceStandardDetailCategory;
import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum;
@@ -45,8 +45,6 @@
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;
@@ -97,6 +95,8 @@
    private IEamEquipmentExtendService eamEquipmentExtendService;
    @Autowired
    private ISysBusinessCodeRuleService businessCodeRuleService;
    @Autowired
    private ISysParamsService sysParamsService;
    // 常量定义
    private static final String REPAIR_TITLE = "维修人员保养内容";
@@ -598,6 +598,18 @@
                eamMaintenanceStandardDetailService.saveBatch(allDetails);
            }
            SysParams sysParams = sysParamsService.getSysPramBySettingKey("maintenance_import_type");
            if (sysParams != null) {
                if (sysParams.getSettingValue().equals("1")){
                    //触发保养流程
                    eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
                    eamMaintenanceStandardMapper.updateById(eamMaintenanceStandard);
                }
            }else {
                return Result.error("未找到保养流程导入相关配置,请联系管理员");
            }
            return Result.OK("点检表导入成功");
        } catch (Exception e) {
@@ -1023,6 +1035,18 @@
            // 4. 保存项目
            eamMaintenanceStandardDetailService.saveBatch(items);
            SysParams sysParams = sysParamsService.getSysPramBySettingKey("maintenance_import_type");
            if (sysParams != null) {
                if (sysParams.getSettingValue().equals("1")) {
                    standard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
                    eamMaintenanceStandardMapper.updateById(standard);
                }
            }else {
                return Result.error("未找到保养流程导入相关配置,请联系管理员");
            }
            return Result.ok(fileName + ": 导入成功, 项目数: " + items.size());
        } catch (ImportException e) {