From efd6a955d5fa558f9bd04005cf83118279cc10a1 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期二, 22 七月 2025 09:37:07 +0800 Subject: [PATCH] art: 设备台账-设备选择接口 --- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java index 00ccb1a..8ce714f 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java @@ -14,25 +14,22 @@ import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; -import org.jeecg.modules.eam.tree.FindsEquipmentEamCenterUtil; -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.AssetStatusEnum; -import org.jeecg.modules.eam.constant.EquipmentMaintenanceStatus; -import org.jeecg.modules.eam.constant.EquipmentOperationTagEnum; -import org.jeecg.modules.eam.constant.EquipmentRepairStatus; +import org.jeecg.modules.eam.constant.*; import org.jeecg.modules.eam.entity.EamEquipment; import org.jeecg.modules.eam.entity.EamEquipmentExtend; import org.jeecg.modules.eam.mapper.EamEquipmentMapper; import org.jeecg.modules.eam.request.EamEquipmentQuery; import org.jeecg.modules.eam.service.IEamEquipmentExtendService; import org.jeecg.modules.eam.service.IEamEquipmentService; +import org.jeecg.modules.eam.tree.FindsEquipmentEamCenterUtil; import org.jeecg.modules.eam.tree.FindsEquipmentProductionUtil; import org.jeecg.modules.eam.vo.EamEquipmentTree; import org.jeecg.modules.eam.vo.EquipmentSearchResult; +import org.jeecg.modules.system.entity.BaseFactory; +import org.jeecg.modules.system.entity.BaseFactoryUser; import org.jeecg.modules.system.entity.MdcProduction; +import org.jeecg.modules.system.service.IBaseFactoryService; +import org.jeecg.modules.system.service.IBaseFactoryUserService; import org.jeecg.modules.system.service.IMdcProductionService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -238,7 +235,7 @@ } @Override - public List<EquipmentSearchResult> asyncLoadEquipment(String keyword, Integer pageSize, String id) { + public List<EquipmentSearchResult> asyncLoadEquipment(String keyword, Integer pageSize, String id, String factoryOrgCode) { if (StringUtils.isNotBlank(id)) { EamEquipment eamEquipment = eamEquipmentMapper.selectById(id); if (eamEquipment != null) { @@ -272,10 +269,13 @@ } if (StringUtils.isNotBlank(keyword)) { - queryWrapper.like("equipment_code", keyword); - queryWrapper.or().like("equipment_name", keyword); + queryWrapper.like("e.equipment_code", keyword); + queryWrapper.or().like("e.equipment_name", keyword); } - queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); + if(StringUtils.isNotBlank(factoryOrgCode)){ + queryWrapper.eq("e.factory_org_code", factoryOrgCode); + } + queryWrapper.eq("e.del_flag", CommonConstant.DEL_FLAG_0); IPage<EamEquipment> pageResult = eamEquipmentMapper.queryPageList(page, queryWrapper); if (pageResult != null && CollectionUtil.isNotEmpty(pageResult.getRecords())) { List<EquipmentSearchResult> resultList = new ArrayList<>(); @@ -407,6 +407,16 @@ return eamEquipmentMapper.queryList(queryWrapper); } + @Override + public List<EamEquipment> selectTechnicalEquipmentList() { + QueryWrapper<EamEquipment> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("e.del_flag", CommonConstant.DEL_FLAG_0); + queryWrapper.ne("ext.technology_status", TechnologyStatusEnum.PROHIBITED.name()); + queryWrapper.isNotNull("ext.technology_check_period"); + queryWrapper.isNotNull("ext.next_technology_check"); + return this.getBaseMapper().selectTechnicalEquipmentList(queryWrapper); + } + /** * 鑾峰彇鎵�鏈夌殑浜х嚎id锛堝寘鍚墍鏈変笂绾э級 */ -- Gitblit v1.9.3