| | |
| | | package org.jeecg.modules.system.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | import org.jeecg.common.constant.FillRuleConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.util.FillRuleUtil; |
| | | import org.jeecg.common.util.OrgCodeSplitUtil; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.system.entity.BaseFactory; |
| | | import org.jeecg.modules.system.entity.BaseFactoryUser; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: 设备车间管理 |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> queryFactoryIdsByOrgCode(String orgCode) { |
| | | //分割 orgCode |
| | | List<String> orgCodeArr = OrgCodeSplitUtil.splitOrgCode(orgCode); |
| | | if(CollectionUtil.isEmpty(orgCodeArr)){ |
| | | return Collections.emptyList(); |
| | | } |
| | | LambdaQueryWrapper<BaseFactory> query = new LambdaQueryWrapper<>(); |
| | | query.in(BaseFactory::getOrgCode, orgCodeArr); |
| | | query.eq(BaseFactory::getDelFlag, CommonConstant.DEL_FLAG_0); |
| | | List<BaseFactory> list = this.getBaseMapper().selectList(query); |
| | | Set<String> collect = list.stream().map(BaseFactory::getId).collect(Collectors.toSet()); |
| | | if(CollectionUtil.isEmpty(collect)){ |
| | | return Collections.emptyList(); |
| | | } |
| | | return new ArrayList<>(collect); |
| | | } |
| | | } |