| | |
| | | package org.jeecg.modules.dnc.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.collections4.ListUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; |
| | | import org.jeecg.modules.dnc.entity.*; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | | import org.jeecg.modules.dnc.mapper.PartsInfoMapper; |
| | | import org.jeecg.modules.dnc.mapper.WorkStepMapper; |
| | | import org.jeecg.modules.dnc.request.DocInfoQueryRequest; |
| | | import org.jeecg.modules.dnc.request.TreeInfoRequest; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.ProcessInfoCode; |
| | | import org.jeecg.modules.dnc.response.ProductInfoCode; |
| | | import org.jeecg.modules.dnc.response.UcenterCode; |
| | | import org.jeecg.modules.dnc.service.IPartsInfoService; |
| | | import org.jeecg.modules.dnc.service.IPermissionStreamService; |
| | | import org.jeecg.modules.dnc.service.IWorkStepService; |
| | | import org.jeecg.modules.dnc.service.*; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: TODO |
| | | * @Author: zhangherong |
| | | * @Date: Created in 2020/9/20 9:19 |
| | | * @Version: 1.0 |
| | | * @Modified By: |
| | | */ |
| | | @Service |
| | | public class WorkStepServiceImpl extends ServiceImpl<WorkStepMapper, WorkStep> implements IWorkStepService { |
| | | @Autowired |
| | | private IPermissionStreamNewService permissionStreamNewService; |
| | | |
| | | @Autowired |
| | | private IPermissionStreamService permissionStreamService; |
| | | private IWorkStepDepartmentService workStepDepartmentService; |
| | | |
| | | @Autowired |
| | | private IWorkStepPermissionService workStepPermissionService; |
| | | |
| | | @Autowired |
| | | private IDocRelativeService iDocRelativeService; |
| | | |
| | | @Autowired |
| | | private IProductPermissionService productPermissionService; |
| | | |
| | | @Autowired |
| | | private IProductMixService productMixService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private IDocInfoService docInfoService; |
| | | @Autowired |
| | | private IDeviceTypeService deviceTypeService; |
| | | |
| | | @Override |
| | | public List<WorkStep> getByUserPerms(String userId) { |
| | |
| | | boolean b =super.save(workStep); |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | //添加权限验证 |
| | | PermissionStream permissionStream = new PermissionStream(); |
| | | permissionStream.setUserId(userId); |
| | | permissionStream.setProductId(workStep.getProductId()); |
| | | permissionStream.setComponentId(workStep.getComponentId()); |
| | | if (StrUtil.isNotEmpty(workStep.getPartsId())){ |
| | | permissionStream.setPartsId(workStep.getPartsId()); |
| | | //添加部门权限 |
| | | List<PermissionStreamNew> oldDepartPermList = permissionStreamNewService.loadPermissionStreamNewByBusinessId(workStep.getProcessId(), DocAttributionTypeEnum.PROCESS.getCode().toString(),"1"); |
| | | if(oldDepartPermList != null && !oldDepartPermList.isEmpty()) { |
| | | List<WorkStepDepartment> workStepDepartmentList = new ArrayList<>(); |
| | | List<PermissionStreamNew> permissionStreamList = new ArrayList<>(); |
| | | oldDepartPermList.forEach(item -> { |
| | | WorkStepDepartment pd = new WorkStepDepartment(); |
| | | pd.setDepartId(item.getDepartId()); |
| | | pd.setStepId(workStep.getId()); |
| | | workStepDepartmentList.add(pd); |
| | | PermissionStreamNew perm = new PermissionStreamNew(); |
| | | perm.setDepartId(item.getDepartId()); |
| | | perm.setBusinessId(workStep.getId()); |
| | | perm.setBusinessType(DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | permissionStreamList.add(perm); |
| | | }); |
| | | if(!workStepDepartmentList.isEmpty()) { |
| | | b = workStepDepartmentService.saveBatch(workStepDepartmentList); |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | } |
| | | if(!permissionStreamList.isEmpty()) { |
| | | b = permissionStreamNewService.saveBatch(permissionStreamList); |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | } |
| | | } |
| | | permissionStream.setProcessId(workStep.getProcessId()); |
| | | permissionStream.setStepId(workStep.getStepId()); |
| | | return permissionStreamService.save(permissionStream); |
| | | //添加用户权限 |
| | | b = productPermissionService.add(workStep.getId(), userId,DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | if (!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); |
| | | } |
| | | //添加结构树 |
| | | ProductMix productMix = new ProductMix(Long.parseLong(workStep.getId()),Long.parseLong(workStep.getProcessId()) |
| | | ,workStep.getStepName(),workStep.getStepCode(),DocAttributionTypeEnum.WORKSITE.getCode(),new Date()); |
| | | productMixService.save(productMix); |
| | | //添加权限验证 |
| | | PermissionStreamNew permissionStream = new PermissionStreamNew(); |
| | | permissionStream.setUserId(userId); |
| | | permissionStream.setBusinessId(workStep.getId()); |
| | | permissionStream.setBusinessType(DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | return permissionStreamNewService.addPermissionStreamNew(permissionStream); |
| | | } |
| | | |
| | | /** |
| | |
| | | WorkStep en = super.getById(id); |
| | | if(en == null) |
| | | ExceptionCast.cast(ProcessInfoCode.WORKSTEP_NOT_EXIST); |
| | | // workStep.setStepId(id); |
| | | // workStep.setProductId(null); |
| | | // workStep.setComponentId(null); |
| | | // workStep.setPartsId(null); |
| | | // workStep.setProcessId(null); |
| | | // workStep.setStepName(workStep.getStepName().toUpperCase()); |
| | | // workStep.setStepCode(null); |
| | | //同步修改结构树 |
| | | ProductMix productMix = productMixService.getById(Long.parseLong(id)); |
| | | productMix.setTreeName(workStep.getStepName()); |
| | | productMix.setTreeCode(workStep.getStepCode()); |
| | | productMixService.updateById(productMix); |
| | | return super.updateById(workStep); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean assignAddDepart(WorkStep workStep, Collection<MdcProduction> departmentList) { |
| | | if(workStep == null || departmentList == null || departmentList.isEmpty()) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | List<WorkStepDepartment> workStepDepartmentList = new ArrayList<>(); |
| | | List<PermissionStreamNew> permissionStreamList = new ArrayList<>(); |
| | | departmentList.forEach(item -> { |
| | | WorkStepDepartment en = workStepDepartmentService.getByStepIdAndDepartId(workStep.getId(), item.getId()); |
| | | if(en == null) { |
| | | en = new WorkStepDepartment(); |
| | | en.setDepartId(item.getId()); |
| | | en.setStepId(workStep.getId()); |
| | | workStepDepartmentList.add(en); |
| | | } |
| | | PermissionStreamNew stream = permissionStreamNewService.loadPermissionStreamNewByBusinessIdAndDepartId(workStep.getId(),item.getId(),DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | if(stream == null) { |
| | | stream = new PermissionStreamNew(); |
| | | stream.setDepartId(item.getId()); |
| | | stream.setBusinessId(workStep.getId()); |
| | | stream.setBusinessType(DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | permissionStreamList.add(stream); |
| | | } |
| | | }); |
| | | if(!workStepDepartmentList.isEmpty()) { |
| | | boolean b = workStepDepartmentService.saveBatch(workStepDepartmentList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | if(!permissionStreamList.isEmpty()) { |
| | | boolean b = permissionStreamNewService.saveBatch(permissionStreamList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public List<WorkStep> getByProcessIds(String productId,List<String> processIds) { |
| | | if(!ValidateUtil.validateString(productId) || processIds == null || processIds.isEmpty()) |
| | | return null; |
| | | List<WorkStep> list = new ArrayList<>(); |
| | | if(processIds.size() > 1000){ |
| | | List<List<String>> processListArr = ListUtils.partition(processIds, 100); |
| | | for(List<String> processList : processListArr){ |
| | | List<WorkStep> workStepList = super.lambdaQuery().eq(WorkStep::getProductId, productId).in(WorkStep::getProcessId, processList).list(); |
| | | if(workStepList != null && !workStepList.isEmpty()){ |
| | | list.addAll(workStepList); |
| | | } |
| | | } |
| | | }else { |
| | | list = super.lambdaQuery().eq(WorkStep::getProductId, productId).in(WorkStep::getProcessId, processIds).list(); |
| | | } |
| | | if(list == null || list.isEmpty()) |
| | | return null; |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 分配部门权限 |
| | | * @param workStep |
| | | * @param departmentList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean assignRemoveDepart(WorkStep workStep, Collection<MdcProduction> departmentList){ |
| | | if(workStep == null || departmentList == null || departmentList.isEmpty()) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | List<WorkStepDepartment> workStepDepartmentList = new ArrayList<>(); |
| | | List<PermissionStreamNew> permissionStreamList = new ArrayList<>(); |
| | | departmentList.forEach(item -> { |
| | | WorkStepDepartment en = workStepDepartmentService.getByStepIdAndDepartId(workStep.getId(), item.getId()); |
| | | if(en != null) { |
| | | workStepDepartmentList.add(en); |
| | | } |
| | | PermissionStreamNew stream = permissionStreamNewService.loadPermissionStreamNewByBusinessIdAndDepartId(workStep.getId(),item.getId(),DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | if(stream != null) { |
| | | permissionStreamList.add(stream); |
| | | } |
| | | }); |
| | | if(!workStepDepartmentList.isEmpty()) { |
| | | boolean b = workStepDepartmentService.removeByCollection(workStepDepartmentList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | if(!permissionStreamList.isEmpty()) { |
| | | boolean b = permissionStreamNewService.deletePermissionStreamNewByList(permissionStreamList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 删除工步信息 逻辑删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public boolean deleteWorkStep(String id){ |
| | | if(!ValidateUtil.validateString(id)) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | WorkStep en = super.getById(id); |
| | | if(en == null) |
| | | ExceptionCast.cast(ProcessInfoCode.PROCESS_NOT_EXIST); |
| | | //验证是否存在文档 |
| | | List<DocRelative> docRelativeList=iDocRelativeService.list(new QueryWrapper<DocRelative>().eq("attribution_type",DocAttributionTypeEnum.WORKSITE.getCode().toString()).eq("attribution_id",id)); |
| | | if (!docRelativeList.isEmpty()){ |
| | | ExceptionCast.cast(ProcessInfoCode.WORKSTEP_HAS_DOC); |
| | | } |
| | | boolean b=productMixService.removeById(id); |
| | | if(!b) { |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | } |
| | | return super.removeById(id); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean assignAddUser(WorkStep workStep, Collection<SysUser> userList) { |
| | | if(workStep == null || userList == null || userList.isEmpty()) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | List<WorkStepPermission> permissionList = new ArrayList<>(); |
| | | List<PermissionStreamNew> permissionStreamList = new ArrayList<>(); |
| | | userList.forEach(item -> { |
| | | WorkStepPermission en = workStepPermissionService.getByStepIdAndUserId(workStep.getId(), item.getId()); |
| | | if(en == null) { |
| | | en = new WorkStepPermission(); |
| | | en.setUserId(item.getId()); |
| | | en.setStepId(workStep.getId()); |
| | | permissionList.add(en); |
| | | } |
| | | PermissionStreamNew stream = permissionStreamNewService.loadPermissionStreamNewByBusinessIdAndUserId(workStep.getId(),item.getId(),DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | if(stream == null) { |
| | | stream = new PermissionStreamNew(); |
| | | stream.setUserId(item.getId()); |
| | | stream.setBusinessId(workStep.getId()); |
| | | stream.setBusinessType(DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | permissionStreamList.add(stream); |
| | | } |
| | | }); |
| | | if(!permissionList.isEmpty()) { |
| | | boolean b = workStepPermissionService.saveBatch(permissionList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | if(!permissionStreamList.isEmpty()) { |
| | | boolean b = permissionStreamNewService.saveBatch(permissionStreamList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean assignRemoveUser(WorkStep workStep, Collection<SysUser> userList) { |
| | | if(workStep == null || userList == null || userList.isEmpty()) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | List<WorkStepPermission> permissionList = new ArrayList<>(); |
| | | List<PermissionStreamNew> permissionStreamList = new ArrayList<>(); |
| | | userList.forEach(item -> { |
| | | WorkStepPermission en = workStepPermissionService.getByStepIdAndUserId(workStep.getId(), item.getId()); |
| | | if(en != null) { |
| | | permissionList.add(en); |
| | | } |
| | | PermissionStreamNew stream = permissionStreamNewService.loadPermissionStreamNewByBusinessIdAndUserId(workStep.getId(),item.getId(),DocAttributionTypeEnum.WORKSITE.getCode().toString()); |
| | | if(stream != null) { |
| | | permissionStreamList.add(stream); |
| | | } |
| | | }); |
| | | //清空用户权限校验 |
| | | if(!permissionList.isEmpty()) { |
| | | boolean b = workStepPermissionService.removeByCollection(permissionList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | if(!permissionStreamList.isEmpty()) { |
| | | boolean b = permissionStreamNewService.deletePermissionStreamNewByList(permissionStreamList); |
| | | if(!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_USER_PERM_ERROR); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 通过工步号、工步名称等查询对应NC文件 |
| | | * NC文件存在设备类下面 |
| | | * @param treeInfoRequest |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DocInfo> getByWorkStepOtherFile(TreeInfoRequest treeInfoRequest){ |
| | | LambdaQueryWrapper<WorkStep> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (treeInfoRequest.getProductIds() != null && !treeInfoRequest.getProductIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getProductId, treeInfoRequest.getProductIds()); |
| | | } |
| | | if (treeInfoRequest.getComponentIds() != null && !treeInfoRequest.getComponentIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getComponentId, treeInfoRequest.getComponentIds()); |
| | | } |
| | | if (treeInfoRequest.getPartsIds() != null && !treeInfoRequest.getPartsIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getPartsId, treeInfoRequest.getPartsIds()); |
| | | } |
| | | if (treeInfoRequest.getPsvIds() != null && !treeInfoRequest.getPsvIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getPsvId, treeInfoRequest.getPsvIds()); |
| | | } |
| | | if (treeInfoRequest.getProcessIds() != null && !treeInfoRequest.getProcessIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getProcessId, treeInfoRequest.getProcessIds()); |
| | | } |
| | | if (Objects.equals(treeInfoRequest.getAttributionType(), DocAttributionTypeEnum.WORKSITE.getCode())){ |
| | | queryWrapper.eq(StrUtil.isNotEmpty(treeInfoRequest.getAttributionId()),WorkStep::getId,treeInfoRequest.getAttributionId()); |
| | | } |
| | | queryWrapper.like(StrUtil.isNotEmpty(treeInfoRequest.getTreeName()),WorkStep::getStepName, treeInfoRequest.getTreeName()); |
| | | queryWrapper.like(StrUtil.isNotEmpty(treeInfoRequest.getTreeCode()),WorkStep::getStepCode, treeInfoRequest.getTreeName()); |
| | | queryWrapper.orderByDesc(WorkStep::getCreateTime); |
| | | List<WorkStep> list = super.list(queryWrapper); |
| | | List<DocInfo> docInfos; |
| | | if (list == null || list.isEmpty() || StrUtil.isNotBlank(treeInfoRequest.getStructureType())){ |
| | | return new ArrayList<>(); |
| | | }else { |
| | | String ids=list.stream().map(WorkStep::getId).collect(Collectors.joining(",")); |
| | | DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); |
| | | BeanUtil.copyProperties(treeInfoRequest,docQuery); |
| | | docQuery.setAttributionIds(ids); |
| | | docQuery.setDocClassCode("OTHER"); |
| | | docQuery.setAttributionType(DocAttributionTypeEnum.WORKSITE.getCode()); |
| | | docInfos=docInfoService.findListByDocQuery(docQuery); |
| | | } |
| | | return docInfos; |
| | | } |
| | | |
| | | /** |
| | | * 通过工步号、工步名称等查询对应NC文件 |
| | | * NC文件存在设备类下面 |
| | | * @param treeInfoRequest |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DocInfo> getByWorkStepNCFile(TreeInfoRequest treeInfoRequest){ |
| | | LambdaQueryWrapper<WorkStep> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (treeInfoRequest.getProductIds() != null && !treeInfoRequest.getProductIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getProductId, treeInfoRequest.getProductIds()); |
| | | } |
| | | if (treeInfoRequest.getComponentIds() != null && !treeInfoRequest.getComponentIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getComponentId, treeInfoRequest.getComponentIds()); |
| | | } |
| | | if (treeInfoRequest.getPartsIds() != null && !treeInfoRequest.getPartsIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getPartsId, treeInfoRequest.getPartsIds()); |
| | | } |
| | | if (treeInfoRequest.getPsvIds() != null && !treeInfoRequest.getPsvIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getPsvId, treeInfoRequest.getPsvIds()); |
| | | } |
| | | if (treeInfoRequest.getProcessIds() != null && !treeInfoRequest.getProcessIds().isEmpty()) { |
| | | queryWrapper.in(WorkStep::getProcessId, treeInfoRequest.getProcessIds()); |
| | | } |
| | | if (Objects.equals(treeInfoRequest.getAttributionType(), DocAttributionTypeEnum.WORKSITE.getCode())){ |
| | | queryWrapper.eq(StrUtil.isNotEmpty(treeInfoRequest.getAttributionId()),WorkStep::getProcessId,treeInfoRequest.getAttributionId()); |
| | | } |
| | | queryWrapper.like(StrUtil.isNotEmpty(treeInfoRequest.getTreeName()),WorkStep::getStepName, treeInfoRequest.getTreeName()); |
| | | queryWrapper.like(StrUtil.isNotEmpty(treeInfoRequest.getTreeCode()),WorkStep::getStepCode, treeInfoRequest.getTreeName()); |
| | | queryWrapper.orderByDesc(WorkStep::getCreateTime); |
| | | List<WorkStep> list = super.list(queryWrapper); |
| | | List<DocInfo> docInfos = new ArrayList<>(); |
| | | //NC文件存在对应的设备类下,所以需要过滤 |
| | | if (!list.isEmpty()) { |
| | | List<String> workStepIds = list.stream().map(WorkStep::getId).collect(Collectors.toList()); |
| | | List<DeviceType> deviceTypeList = deviceTypeService.getDeviceTypeByAttribution(workStepIds, |
| | | DocAttributionTypeEnum.WORKSITE.getCode(),treeInfoRequest.getDeviceManagementName(),treeInfoRequest.getDeviceManagementCode()); |
| | | if (deviceTypeList != null && !deviceTypeList.isEmpty()) { |
| | | List<String> deviceManagementIds=deviceTypeList.stream().map(DeviceType::getDeviceManagementId).collect(Collectors.toList()); |
| | | DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); |
| | | BeanUtil.copyProperties(treeInfoRequest,docQuery); |
| | | docQuery.setAttributionIds(String.join(",",deviceManagementIds)); |
| | | docQuery.setDocClassCode("NC"); |
| | | docQuery.setAttributionType(DocAttributionTypeEnum.WORKSITE.getCode()); |
| | | docInfos=docInfoService.findListByDocQuery(docQuery); |
| | | } |
| | | return docInfos; |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | } |