From f846dfa6e98f5ca07ea25fc235a25138e0f3416d Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 08 七月 2025 16:18:30 +0800 Subject: [PATCH] 保养规范导入 修改 明细项添加排序 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 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 bead1bd..65995b2 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 @@ -10,12 +10,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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; @@ -24,10 +20,10 @@ import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.vo.LoginUser; -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.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.eam.constant.BusinessCodeConst; import org.jeecg.modules.eam.constant.EamMaintenanceStandardDetailCategory; import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum; @@ -251,6 +247,7 @@ newEntity.setMaintenanceCategory(standardRequest.getMaintenanceCategory()); newEntity.setMaintenancePeriod(standardRequest.getMaintenancePeriod()); newEntity.setInitialDate(standardRequest.getInitialDate()); + newEntity.setPeriodUnit(standardRequest.getPeriodUnit()); newEntity.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name()); //鐗堟湰閫掑 //鑾峰彇鏁板瓧 @@ -373,7 +370,7 @@ FlowMyBusiness flowMyBusiness = businessList.get(0); 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.PCR0007); + 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()); flowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList)); @@ -453,7 +450,7 @@ 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); + List<UserSelector> userSelectorList=sysUserService.selectOperatorFactoryList(eamEquipment.getEquipmentCode(),baseFactory.getId(), BusinessCodeConst.PCR0009); if (!CollectionUtils.isEmpty(userSelectorList)) { List<String> usernameList=userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList()); newflowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList)); @@ -1144,7 +1141,7 @@ standard.setStandardName(filename) .setInitialDate(new Date()) .setStandardStatus(MaintenanceStandardStatusEnum.START.name()) - .setStandardVersion("v1.0") + .setStandardVersion("v" + CommonConstant.OPERATE_TYPE_1) .setDelFlag(0) .setStandardCode(businessCodeRuleService.generateBusinessCodeSeq( BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE -- Gitblit v1.9.3