From da26a61eee160d63ad99b69bcef0b24565c1a8f7 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期四, 10 七月 2025 15:44:49 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java index 56d59d2..1238b1b 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java +++ b/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) { -- Gitblit v1.9.3