From 6eb74a8815cefd832fbef19c32fa772fa711e3b4 Mon Sep 17 00:00:00 2001 From: lius <Lius2225@163.com> Date: 星期四, 31 八月 2023 14:26:58 +0800 Subject: [PATCH] 基础加班管理功能代码 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java index 45cca50..6214b1d 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java @@ -469,6 +469,9 @@ } } //鏍规嵁浜х嚎闆嗗悎鏌ユ壘鎵�鏈夎澶噄d + if (allDepartIds.isEmpty()) { + return null; + } List<String> equipmentIds = this.baseMapper.queryIdsByDeparts(allDepartIds); if (StringUtils.isNotEmpty(key)) { //key涓嶄负绌猴紝鏌ヨ鎵�鏈変笅绾ч儴闂╥d @@ -515,6 +518,9 @@ } } //鏍规嵁浜х嚎闆嗗悎鏌ユ壘鎵�鏈夎澶噄d + if (allProductionIds.isEmpty()) { + return null; + } List<String> equipmentIds = this.baseMapper.queryIdsByProductions(allProductionIds); if (StringUtils.isNotEmpty(key)) { //key涓嶄负绌猴紝鏌ヨ鎵�鏈変笅绾т骇绾縤d @@ -669,4 +675,16 @@ return this.baseMapper.findEquProList(equipmentIdList); } + /** + * 鏍规嵁閮ㄩ棬灞傜骇鏌ヨ璁惧鍗曚釜 + */ + @Override + public MdcEquipment getEquipmentByDepPid(String pid, String userId) { + List<String> idsByDepart = this.getEquipmentIdsByDepart(userId, pid); + if (idsByDepart != null && !idsByDepart.isEmpty()) { + return super.getOne(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentId, idsByDepart.get(0))); + } + return null; + } + } -- Gitblit v1.9.3