From cc44920da3d40b8248b67560026e891afdd1a6ab Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 08 五月 2025 17:57:14 +0800 Subject: [PATCH] 1.查询可以被引用的部件接口开发完成 2.借用部件(可批量) 开发完成 3.修改原有新增、修改部件接口 完成 4.修改原有删除文档与导入文档接口 完成 5.修改工作流问题 --- lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcUserProductionServiceImpl.java | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcUserProductionServiceImpl.java b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcUserProductionServiceImpl.java index 789406c..f236c24 100644 --- a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcUserProductionServiceImpl.java +++ b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcUserProductionServiceImpl.java @@ -1,14 +1,17 @@ package org.jeecg.modules.system.service.impl; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.entity.MdcUserProduction; +import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.mapper.MdcUserProductionMapper; import org.jeecg.modules.system.model.ProductionIdModel; import org.jeecg.modules.system.service.IMdcProductionService; import org.jeecg.modules.system.service.IMdcUserProductionService; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; @@ -63,4 +66,87 @@ public List<String> queryProductionIdsByUserId(String userId) { return this.baseMapper.queryProductionIdsByUserId(userId); } + + /** + * 鏍规嵁涓�缁勮溅闂磇d鏌ヨ鐢ㄦ埛浜х嚎淇℃伅 + * @param productionIds + */ + @Override + public List<MdcUserProduction> queryByProductionIds(List<String> productionIds){ + if (!productionIds.isEmpty()){ + return super.list(new LambdaQueryWrapper<MdcUserProduction>().in(MdcUserProduction::getProId, productionIds)); + } + return null; + } + + @Override + @Transactional(rollbackFor = {Exception.class}) + public boolean removeByCollection(List<MdcUserProduction> mdcUserProductions) { + if(mdcUserProductions == null || mdcUserProductions.isEmpty()) + return false; + if(mdcUserProductions.size() == 1){ + return super.removeById(mdcUserProductions.get(0).getId()); + } + List<String> ids = new ArrayList<>(); + mdcUserProductions.forEach(item -> { + ids.add(item.getId()); + }); + return super.removeByIds(ids); + } + + /** + * 鑾峰彇宸插垎閰嶇殑鐢ㄦ埛鍒楄〃 + * @param proId + * @return + */ + @Override + public List<SysUser> getUserPermsByGroupId(String proId){ + return super.getBaseMapper().getUserPermsByGroupId(proId); + } + + /** + * 鑾峰彇鏈垎閰嶇殑鐢ㄦ埛鍒楄〃 + * @param proId + * @return + */ + @Override + public List<SysUser> getUserNonPermsByGroupId(String proId){ + return super.getBaseMapper().getUserNonPermsByGroupId(proId); + } + + /** + * 鑾峰彇鏈垎閰嶇殑鐢ㄦ埛 + * @param proId + * @return + */ + @Override + public List<SysUser> getUserNonPermsByDeviceId(String proId){ + return super.getBaseMapper().getUserNonPermsByDeviceId(proId); + } + + @Override + public List<SysUser> getUserPermsByDeviceId(String proId) { + return super.getBaseMapper().getUserPermsByDeviceId(proId); + } + + /** + * 閫氳繃杞﹂棿id涓庡矖浣峣d绛涢�夌敤鎴� + * @param post + * @param proId + * @return + */ + @Override + public List<SysUser> queryByPostAndProId(String post, String proId){ + return super.getBaseMapper().queryByPostAndProId(post, proId); + } + + @Override + public MdcUserProduction getByUserIdAndGroupId(String userId, String proId){ + if(StrUtil.isEmpty(userId) || StrUtil.isEmpty(proId)) + return null; + List<MdcUserProduction> list = super.lambdaQuery().eq(MdcUserProduction::getUserId, userId).eq(MdcUserProduction::getProId, proId).list(); + if(list == null || list.isEmpty()) + return null; + return list.get(0); + } } -- Gitblit v1.9.3