lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/constant/DncPassLogPassType.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,39 @@ package org.jeecg.modules.dnc.constant; public enum DncPassLogPassType { //NCæä»¶ DOCUMENT("01", "ncæä»¶"), //ncæä»¶ NCFILE("02", "NCæä»¶"), //产åç»ææ PRODUCTSTRUCTURE("03", "产åç»ææ "), //ç¨åºå 工确认表 PROGRAMPROCESSING("04", "ç¨åºå 工确认表"); private String code; private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } DncPassLogPassType() { } DncPassLogPassType(String code, String name) { this.code = code; this.name = name; } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductMixController.java
@@ -38,6 +38,18 @@ } /** * è·åå ¨é¨äº§åæ ï¼å æ¬è®¾å¤ç±»ä¸ncæä»¶ï¼ * @return */ @AutoLog(value = "è·åå ¨é¨äº§åæ ") @ApiOperation(value = "è·åå ¨é¨äº§åæ ", notes = "è·åå ¨é¨äº§åæ ") @GetMapping(value = "/getAllTree") public Result<?> getAllTree() { List<ProductMix> productMixList = iProductMixService.getProductMixTree(); return Result.OK(productMixList); } /** * è·åå ·ä½å±çº§å®ä½ * @param id,type * @return lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java
@@ -6,5 +6,22 @@ import org.jeecg.modules.dnc.entity.ProductMix; public interface ProductMixMapper extends BaseMapper<ProductMix> { @Select("SELECT * FROM nc_product_mix WHERE id = #{productId} AND tree_type = 1") ProductMix findByProductId(@Param("productId") String productId); @Select("SELECT * FROM nc_product_mix WHERE id = #{componentId} AND tree_type = 2") ProductMix findByComponentId(@Param("componentId") String componentId); @Select("SELECT * FROM nc_product_mix WHERE id = #{partsId} AND tree_type = 3") ProductMix findByPartsId(@Param("partsId") String partsId); @Select("SELECT * FROM nc_product_mix WHERE id = #{operationId} AND tree_type = 4") ProductMix findByOperationId(@Param("operationId") String operationId); @Select("SELECT * FROM nc_product_mix WHERE id = #{processId} AND tree_type = 5") ProductMix findByProcessId(@Param("operationId") String processId); @Select("SELECT * FROM nc_product_mix WHERE id = #{worksiteId} AND tree_type = 6") ProductMix findByWorksiteId(@Param("operationId") String worksiteId); } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/DataPackageStrategy.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,13 @@ package org.jeecg.modules.dnc.service; import org.jeecg.modules.dnc.dto.TransferPackage; // æ°æ®å°è£ çç¥æ¥å£ public interface DataPackageStrategy { /** * å°è£ ä¸å¡æ°æ®ä¸ºä¼ è¾å * @param id ä¸å¡å®ä½IDï¼å·¥åºIDæå·¥æ¥IDï¼ * @return å°è£ 好çä¼ è¾å */ TransferPackage packageData(String id); } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IProductMixService.java
@@ -12,6 +12,23 @@ //è·åå°è£ 产åç»ææ public List<ProductMix> getTree(); //模æçæäº§åç»ææ /** * æ¥è¯¢å¯¹åºidçææç¶çº§(æéåé 使ç¨) * @param id * @return */ List<ProductMix> getParentList(String id); /** * æ¥è¯¢å¯¹åºidçææåèç¹(æéåé 使ç¨) * @param id * @return */ List<ProductMix> getChildrenList(String id); /** * æ¥è¯¢äº§åç»ææ ï¼å æ¬è®¾å¤ç±»ä¸ncæä»¶ï¼ * @return */ List<ProductMix> getProductMixTree(); } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DataImportService.java
@@ -8,6 +8,7 @@ import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.mapper.*; import org.jeecg.modules.dnc.service.*; import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.service.IMdcProductionService; import org.jeecg.modules.system.service.ISysUserService; import org.slf4j.Logger; @@ -295,9 +296,9 @@ } } if (permissionStreamNew.getDepartId() != null) { String id=mdcProductionService.findByOrgCode(permissionStreamNew.getDepartId()).getId(); if (id!=null){ permissionStreamNew.setDepartId(id); MdcProduction mdcProduction=mdcProductionService.findByOrgCode(permissionStreamNew.getDepartId()); if (mdcProduction!=null){ permissionStreamNew.setDepartId(mdcProduction.getId()); } } permissionStreamNewMapper.insert(permissionStreamNew); @@ -449,6 +450,7 @@ private void saveGuideCardBatch(GuideCardBatch guideCardBatch) { if (guideCardBatchMapper.selectById(guideCardBatch.getId()) == null) { guideCardBatch.setFlowStatus("1"); guideCardBatchMapper.insert(guideCardBatch); logger.debug("åçæ¹æ¬¡å·²ä¿å: {}", guideCardBatch.getId()); } else { lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DataPackageService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ package org.jeecg.modules.dnc.service.impl; import org.jeecg.modules.dnc.dto.TransferPackage; import org.jeecg.modules.dnc.service.DataPackageStrategy; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.EnumMap; import java.util.List; import java.util.Map; @Service public class DataPackageService { private final Map<TransferPackage.DataType, DataPackageStrategy> strategies; @Autowired public DataPackageService(List<DataPackageStrategy> strategyList) { strategies = new EnumMap<>(TransferPackage.DataType.class); strategyList.forEach(strategy -> { if (strategy instanceof ProcessPackageStrategy) { strategies.put(TransferPackage.DataType.PROCESS, strategy); } else if (strategy instanceof WorkStepPackageStrategy) { strategies.put(TransferPackage.DataType.WORKSTEP, strategy); } }); } public TransferPackage packageData(TransferPackage.DataType type, String id) { DataPackageStrategy strategy = strategies.get(type); if (strategy == null) { throw new IllegalArgumentException("䏿¯æçæ°æ®ç±»å: " + type); } return strategy.packageData(id); } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java
@@ -62,6 +62,36 @@ @Autowired private IDocRelativeService docRelativeService; @Autowired private DataPackageService dataPackageService; public String exportData(TransferPackage.DataType type, String id,String fileName) { // 1. è·åå°è£ æ°æ® TransferPackage transferPackage = dataPackageService.packageData(type, id); // 2. å缩å±çº§ç»æ compressHierarchy(transferPackage); // 3. JSONåºåå String json = JsonUtils.toJson(transferPackage); // // 4. å缩å å¯ // byte[] compressed = CompressionUtils.gzipCompress(json.getBytes(StandardCharsets.UTF_8)); // byte[] encrypted = securityService.encrypt(compressed); //ææ¶ä¸å å¯ byte[] compressed = json.getBytes(StandardCharsets.UTF_8); // 5. çææä»¶ Path filePath = Paths.get(ferryPath,fileName); try { Files.createDirectories(filePath.getParent()); Files.write(filePath, compressed); return filePath.toString(); } catch (IOException e) { throw new RuntimeException("æä»¶åå ¥å¤±è´¥", e); } } public TransferPackage importData(String filePath) { lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FullHierarchyTraceService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,213 @@ package org.jeecg.modules.dnc.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.dto.ComponentHierarchy; import org.jeecg.modules.dnc.dto.ProcessTraceChain; import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.mapper.*; import org.jeecg.modules.dnc.service.IPermissionStreamNewService; import org.jeecg.modules.system.service.IMdcProductionService; import org.jeecg.modules.system.service.ISysUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; @Service public class FullHierarchyTraceService { @Autowired private ProductMixMapper productMixMapper; @Autowired private ProductInfoMapper productMapper; @Autowired private ComponentInfoMapper componentMapper; @Autowired private PartsInfoMapper partsMapper; @Autowired private ProcessSpecVersionMapper psvMapper; @Autowired private ProcessStreamMapper processMapper; @Autowired private WorkStepMapper workStepMapper; @Autowired private DeviceTypeMapper deviceTypeMapper; @Autowired private DeviceManagementMapper deviceManagementMapper; @Autowired private DocInfoMapper docInfoMapper; @Autowired private DocFileMapper docFileMapper; @Autowired private CutterMapper cutterMapper; @Autowired private GuideCardBatchMapper guideCardBatchMapper; public ProcessTraceChain traceFromProcess(DocRelative docRelative) { ProcessTraceChain chain = initChainWithDocInfo(docRelative); DeviceType deviceType = deviceTypeMapper.selectById(docRelative.getAttributionId()); chain.setDeviceType(deviceType); if (isProcessType(deviceType)) { chain.setDeviceManagement(deviceManagementMapper.selectById(deviceType.getDeviceManagementId())); traceProcessChain(chain, deviceType.getAttributionId()); } completeChainWithProductInfo(chain); List<ProductMix> productMixList=buildFullTreePath(chain); chain.setTreePath(productMixList); return chain; } public ProcessTraceChain traceFromWorkStep(DocRelative docRelative) { ProcessTraceChain chain = initChainWithDocInfo(docRelative); DeviceType deviceType = deviceTypeMapper.selectById(docRelative.getAttributionId()); chain.setDeviceType(deviceType); if (isWorkSiteType(deviceType)) { chain.setDeviceManagement(deviceManagementMapper.selectById(deviceType.getDeviceManagementId())); traceWorkStepChain(chain, deviceType.getAttributionId()); } completeChainWithProductInfo(chain); List<ProductMix> productMixList=buildFullTreePath(chain); chain.setTreePath(productMixList); return chain; } private ProcessTraceChain initChainWithDocInfo(DocRelative docRelative) { ProcessTraceChain chain = ProcessTraceChain.builder().docRelative(docRelative).build(); Optional.ofNullable(docInfoMapper.selectById(docRelative.getDocId())) .ifPresent(doc -> { chain.setDocInfo(doc); chain.setDocFile(docFileMapper.selectById(doc.getPublishFileId())); chain.setCutterList(getCuttersByDocId(doc.getDocId())); getLatestGuideCardBatch(doc.getDocId()).ifPresent(chain::setGuideCardBatch); }); return chain; } private List<Cutter> getCuttersByDocId(String docId) { return cutterMapper.selectList(new QueryWrapper<Cutter>().eq("doc_id", docId)); } private Optional<GuideCardBatch> getLatestGuideCardBatch(String docId) { List<GuideCardBatch> batches = guideCardBatchMapper.selectList( new QueryWrapper<GuideCardBatch>() .eq("doc_id", docId) .orderByDesc("SUBSTRING(serial_number, LEN(serial_number)-3, 4)")); return CollectionUtils.isEmpty(batches) ? Optional.empty() : Optional.of(batches.get(0)); } private boolean isProcessType(DeviceType deviceType) { return deviceType != null && Objects.equals(deviceType.getAttributionType(), DocAttributionTypeEnum.PROCESS.getCode()); } private boolean isWorkSiteType(DeviceType deviceType) { return deviceType != null && Objects.equals(deviceType.getAttributionType(), DocAttributionTypeEnum.WORKSITE.getCode()); } private void traceProcessChain(ProcessTraceChain chain, String processId) { ProcessStream process = processMapper.selectById(processId); if (process == null) return; chain.setProcess(process); if (process.getPsvId() != null) { ProcessSpecVersion psv = psvMapper.selectById(process.getPsvId()); chain.setProcessSpec(psv); if (psv != null && psv.getPartsId() != null) { PartsInfo parts = partsMapper.selectById(psv.getPartsId()); chain.setParts(parts); if (parts != null && parts.getComponentId() != null) { chain.setComponentHierarchy(traceComponentHierarchy(parts.getComponentId())); } } } else if (process.getComponentId() != null) { chain.setComponentHierarchy(traceComponentHierarchy(process.getComponentId())); } } private void traceWorkStepChain(ProcessTraceChain chain, String workStepId) { WorkStep workStep = workStepMapper.selectById(workStepId); if (workStep == null) return; chain.setWorkStep(workStep); traceProcessChain(chain, workStep.getProcessId()); } private ComponentHierarchy traceComponentHierarchy(String componentId) { ComponentHierarchy hierarchy = new ComponentHierarchy(); ComponentInfo current = componentMapper.selectById(componentId); while (current != null) { hierarchy.addComponentToTop(current); if (current.getParentId() == null || current.getParentId().isEmpty()) { Optional.ofNullable(current.getProductId()) .map(productMapper::selectById) .ifPresent(hierarchy::setRootProduct); break; } current = componentMapper.selectById(current.getParentId()); } return hierarchy; } private void completeChainWithProductInfo(ProcessTraceChain chain) { Optional.ofNullable(chain.getComponentHierarchy()) .map(ComponentHierarchy::getComponents) .filter(components -> !components.isEmpty()) .map(components -> components.get(0)) .map(ComponentInfo::getProductId) .map(productMapper::selectById) .ifPresent(chain::setProduct); } private List<ProductMix> buildFullTreePath(ProcessTraceChain chain) { List<ProductMix> path = new ArrayList<>(); Optional.ofNullable(chain.getProduct()) .map(ProductInfo::getProductId) .map(productMixMapper::findByProductId) .ifPresent(path::add); Optional.ofNullable(chain.getComponentHierarchy()) .map(ComponentHierarchy::getComponentsFromTop) .ifPresent(components -> components.stream() .map(ComponentInfo::getComponentId) .map(productMixMapper::findByComponentId) .filter(Objects::nonNull) .forEach(path::add)); Optional.ofNullable(chain.getParts()) .map(PartsInfo::getPartsId) .map(productMixMapper::findByPartsId) .ifPresent(path::add); Optional.ofNullable(chain.getProcessSpec()) .map(ProcessSpecVersion::getId) .map(productMixMapper::findByOperationId) .ifPresent(path::add); Optional.ofNullable(chain.getProcess()) .map(ProcessStream::getProcessId) .map(productMixMapper::findByProcessId) .ifPresent(path::add); Optional.ofNullable(chain.getWorkStep()) .map(WorkStep::getId) .map(productMixMapper::findByWorksiteId) .ifPresent(path::add); return path; } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessPackageStrategy.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,42 @@ package org.jeecg.modules.dnc.service.impl; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.dto.TransferPackage; import org.jeecg.modules.dnc.entity.DeviceType; import org.jeecg.modules.dnc.entity.DocRelative; import org.jeecg.modules.dnc.entity.ProcessStream; import org.jeecg.modules.dnc.mapper.DeviceTypeMapper; import org.jeecg.modules.dnc.mapper.DocRelativeMapper; import org.jeecg.modules.dnc.mapper.ProcessStreamMapper; import org.jeecg.modules.dnc.service.DataPackageStrategy; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class ProcessPackageStrategy implements DataPackageStrategy { @Autowired private ProcessStreamMapper processMapper; @Autowired private DeviceTypeMapper deviceTypeMapper; @Autowired private FullHierarchyTraceService traceService; @Autowired private DocRelativeMapper docRelativeMapper; @Override public TransferPackage packageData(String relativeId) { DocRelative docRelative=docRelativeMapper.selectById(relativeId); DeviceType deviceType=deviceTypeMapper.selectById(docRelative.getAttributionId()); if (deviceType!=null&&deviceType.getAttributionType().equals(DocAttributionTypeEnum.PROCESS.getCode())) { ProcessStream process = processMapper.selectById(deviceType.getAttributionId()); if (process == null) { throw new IllegalArgumentException("设å¤ç±»å¯¹åºçå·¥åºä¸åå¨: " + deviceType.getDeviceManagementId()); } } return TransferPackage.builder() .dataType(TransferPackage.DataType.PROCESS) .docRelative(docRelative) .traceChain(traceService.traceFromProcess(docRelative)) .build(); } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProductMixServiceImpl.java
@@ -1,17 +1,19 @@ package org.jeecg.modules.dnc.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.shiro.SecurityUtils; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.dnc.entity.ProductMix; import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.mapper.ProductMixMapper; import org.jeecg.modules.dnc.service.IPermissionStreamNewService; import org.jeecg.modules.dnc.service.IProductMixService; import org.jeecg.modules.dnc.service.*; import org.jeecg.modules.dnc.utils.TreeBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import java.util.*; import java.util.stream.Collectors; @Service public class ProductMixServiceImpl extends ServiceImpl<ProductMixMapper, ProductMix> implements IProductMixService { @@ -19,6 +21,21 @@ @Autowired private IPermissionStreamNewService permissionStreamNewService; @Autowired @Lazy private IDeviceTypeService deviceTypeService; @Autowired @Lazy private IDeviceManagementService deviceManagementService; @Autowired @Lazy private IDocInfoService docInfoService; @Autowired @Lazy private IDocRelativeService docRelativeService; /** * é»è®¤ç»ææ æ¥è¯¢ * @return @@ -48,4 +65,135 @@ result.sort(Comparator.comparing(ProductMix::getCreateTime, Comparator.nullsLast(Date::compareTo))); return result; } @Override public List<ProductMix> getParentList(String id) { List<ProductMix> parentList = new ArrayList<>(); // 1. æ ¹æ®IDæ¥è¯¢å½åèç¹ ProductMix current = this.getById(id); if (current == null) { return parentList; // èç¹ä¸å卿¶è¿å空å表 } // 2. ä»å½åèç¹å¼å§å䏿¥æ¾ç¶èç¹ Long parentId = current.getParentId(); while ( parentId != 0L) { ProductMix parent = this.getById(parentId.toString()); if (parent == null) { break; } parentList.add(parent); parentId = parent.getParentId(); } return parentList; } @Override public List<ProductMix> getChildrenList(String id) { List<ProductMix> childrenList = new ArrayList<>(); ProductMix current = this.getById(id); if (current == null) { return childrenList; } // 使ç¨éåè¿è¡BFS Queue<ProductMix> queue = new LinkedList<>(); queue.add(current); // å å ¥å½åèç¹ä½ä¸ºèµ·ç¹ // è®°å½å·²è®¿é®èç¹çIDï¼é¿å 循ç¯å¼ç¨ Set<String> visited = new HashSet<>(); visited.add(id); // èµ·å§èç¹å·²è®¿é® while (!queue.isEmpty()) { ProductMix node = queue.poll(); // è·³è¿èµ·å§èç¹ï¼å³ä¼ å ¥çèç¹ï¼ï¼ä¸å å ¥ç»æå表 if (!node.getId().toString().equals(id)) { childrenList.add(node); } // æ¥è¯¢å½åèç¹çç´æ¥åèç¹ List<ProductMix> directChildren = this.lambdaQuery().eq(ProductMix::getParentId, node.getId()).list(); if (directChildren != null && !directChildren.isEmpty()) { for (ProductMix child : directChildren) { String childId = child.getId().toString(); // å¦æè¯¥åèç¹è¿æªè®¿é®è¿ if (!visited.contains(childId)) { visited.add(childId); queue.add(child); } // å¦å忽ç¥ï¼é¿å 循ç¯å¼ç¨å¯¼è´çæ»å¾ªç¯ } } } return childrenList; } /** * æ¥è¯¢äº§åç»ææ ï¼å æ¬è®¾å¤ç±»ä¸ncæä»¶ï¼ * @return */ @Override public List<ProductMix> getProductMixTree() { LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); List<ProductMix> rawData = new ArrayList<>(); if (loginUser.getUsername().equals("admin")) { //ä¸éè¦æéè¿æ»¤ rawData = permissionStreamNewService.loadProductMixAll(loginUser.getId()); } else { //éè¦æéè¿æ»¤ String productIds = loginUser.getProductionIds(); if (productIds != null && !productIds.isEmpty()) { List<String> productIdList = Arrays.asList(productIds.split(",")); rawData = permissionStreamNewService.loadProductMix(loginUser.getId(), productIdList); } } List<Long> ids = rawData.stream() .filter(p -> p.getType() != null) .filter(productMix -> productMix.getType() == 5 || productMix.getType() == 6) .map(ProductMix::getId) .collect(Collectors.toList()); if (ids.isEmpty()) { return rawData; } //è¿æ»¤è®¾å¤ç±»å ³èä¿¡æ¯ List<DeviceType> deviceTypeList = deviceTypeService.list(new QueryWrapper<DeviceType>() .in("attribution_id", ids)); List<ProductMix> productMixList = new ArrayList<>(); deviceTypeList.forEach(item->{ ProductMix productMix = new ProductMix(); productMix.setId(Long.parseLong(item.getId())); productMix.setParentId(Long.parseLong(item.getAttributionId())); DeviceManagement deviceManagement=deviceManagementService.getById(item.getDeviceManagementId()); productMix.setTreeCode(deviceManagement.getDeviceManagementCode()); productMix.setTreeName(deviceManagement.getDeviceManagementName()); productMix.setType(7); productMixList.add(productMix); }); rawData.addAll(productMixList); //è¿æ»¤ææ¡£å ³èä¿¡æ¯ List<String> deviceTypeIds = deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); List<DocRelative> relativeList = docRelativeService.list(new QueryWrapper<DocRelative>() .in("attribution_id", deviceTypeIds)); List<ProductMix> docList = new ArrayList<>(); relativeList.forEach(item->{ ProductMix productMix = new ProductMix(); productMix.setId(Long.parseLong(item.getId())); productMix.setParentId(Long.parseLong(item.getAttributionId())); DocInfo docInfo = docInfoService.getById(item.getDocId()); productMix.setTreeCode(docInfo.getDocSuffix()); productMix.setTreeName(docInfo.getDocName()); productMix.setType(99); docList.add(productMix); }); rawData.addAll(docList); TreeBuilder builder = new TreeBuilder(); TreeBuilder.CleanResult cleanResult = builder.preprocessData(rawData); List<ProductMix> sorted = builder.topologicalSort( cleanResult.getValidNodes(), cleanResult.getNodeMap() ); List<ProductMix> result =builder.assembleTree(sorted, cleanResult.getNodeMap()); result.sort(Comparator.comparing(ProductMix::getCreateTime, Comparator.nullsLast(Date::compareTo))); return result; } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepPackageStrategy.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ package org.jeecg.modules.dnc.service.impl; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.dto.TransferPackage; import org.jeecg.modules.dnc.entity.DeviceType; import org.jeecg.modules.dnc.entity.DocRelative; import org.jeecg.modules.dnc.entity.WorkStep; import org.jeecg.modules.dnc.mapper.DeviceTypeMapper; import org.jeecg.modules.dnc.mapper.DocRelativeMapper; import org.jeecg.modules.dnc.mapper.WorkStepMapper; import org.jeecg.modules.dnc.service.DataPackageStrategy; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class WorkStepPackageStrategy implements DataPackageStrategy { @Autowired private WorkStepMapper workStepMapper; @Autowired private FullHierarchyTraceService traceService; @Autowired private DeviceTypeMapper deviceTypeMapper; @Autowired private DocRelativeMapper docRelativeMapper; @Override public TransferPackage packageData(String relativeId) { DocRelative docRelative=docRelativeMapper.selectById(relativeId); DeviceType deviceType=deviceTypeMapper.selectById(docRelative.getAttributionId()); if (deviceType!=null&&deviceType.getAttributionType().equals(DocAttributionTypeEnum.WORKSITE.getCode())) { WorkStep workStep = workStepMapper.selectById(deviceType.getAttributionId()); if (workStep == null) { throw new IllegalArgumentException("设å¤ç±»å¯¹åºçå·¥æ¥ä¸åå¨: " + deviceType.getDeviceManagementId()); } } return TransferPackage.builder() .dataType(TransferPackage.DataType.WORKSTEP) .docRelative(docRelative) .traceChain(traceService.traceFromWorkStep(docRelative)) .build(); } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/adapter/AssignEquipmentFileStreamAdapter.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,53 @@ package org.jeecg.modules.dncFlow.adapter; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import org.jeecg.modules.dncFlow.service.StreamTarget; public class AssignEquipmentFileStreamAdapter implements StreamTarget { private final AssignEquipmentFileStream file; public AssignEquipmentFileStreamAdapter(AssignEquipmentFileStream file) { this.file = file; } @Override public void setProductId(String productId) { file.setProductId(productId); } @Override public void setComponentId(String componentId) { file.setComponentId(componentId); } @Override public void setPartsId(String partsId) { file.setPartsId(partsId); } @Override public void setProcessId(String processId) { file.setProcessId(processId); } @Override public void setPsvId(String psvId) { file.setPsvId(psvId); } @Override public void setStepId(String stepId) { file.setStepId(stepId); } @Override public void setDeviceTypeId(String deviceTypeId) { file.setDeviceTypeId(deviceTypeId); } @Override public String getAttributionId() { return file.getAttributionId(); } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/AssignEquipmentFileStreamController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,252 @@ package org.jeecg.modules.dncFlow.controller; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.dnc.entity.DeviceManagement; import org.jeecg.modules.dnc.entity.DeviceType; import org.jeecg.modules.dnc.entity.DocInfo; import org.jeecg.modules.dnc.entity.DocRelative; import org.jeecg.modules.dnc.service.IDeviceManagementService; import org.jeecg.modules.dnc.service.IDeviceTypeService; import org.jeecg.modules.dnc.service.IDocInfoService; import org.jeecg.modules.dnc.service.IDocRelativeService; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import org.jeecg.modules.dncFlow.service.IAssignEquipmentFileStreamService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import org.jeecg.modules.dncFlow.vo.AssignEquipmentFileStreamVo; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.jeecg.common.system.base.controller.JeecgController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; import com.alibaba.fastjson.JSON; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: DNC-设å¤ç»ææ ææ´¾äº§åç»ææ * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ @Api(tags="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ ") @RestController @RequestMapping("/dncFlow/assignEquipmentFileStream") @Slf4j public class AssignEquipmentFileStreamController extends JeecgController<AssignEquipmentFileStream, IAssignEquipmentFileStreamService> { @Autowired private IAssignEquipmentFileStreamService assignEquipmentFileStreamService; @Autowired private IDeviceTypeService deviceTypeService; @Autowired private IDeviceManagementService deviceManagementService; @Autowired private IDocRelativeService docRelativeService; @Autowired private IDocInfoService docInfoService; /** * å页å表æ¥è¯¢ * * @param assignEquipmentFileStream * @param pageNo * @param pageSize * @param req * @return */ //@AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -å页å表æ¥è¯¢") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -å页å表æ¥è¯¢", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -å页å表æ¥è¯¢") @GetMapping(value = "/list") public Result<IPage<AssignEquipmentFileStream>> queryPageList(AssignEquipmentFileStream assignEquipmentFileStream, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { QueryWrapper<AssignEquipmentFileStream> queryWrapper = QueryGenerator.initQueryWrapper(assignEquipmentFileStream, req.getParameterMap()); Page<AssignEquipmentFileStream> page = new Page<AssignEquipmentFileStream>(pageNo, pageSize); IPage<AssignEquipmentFileStream> pageList = assignEquipmentFileStreamService.page(page, queryWrapper); return Result.OK(pageList); } /** * æµç¨å¯å¨,ä¿å对åºçæ°æ® * @param assignEquipmentFileStream * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨å¯å¨,ä¿å对åºçæ°æ®") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨å¯å¨,ä¿å对åºçæ°æ®", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨å¯å¨,ä¿å对åºçæ°æ®") @PostMapping(value = "savaFlow") public Result<?> saveAssignEquipmentFileStream(@RequestBody AssignEquipmentFileStream assignEquipmentFileStream){ return assignEquipmentFileStreamService.saveAssignEquipmentFileStream(assignEquipmentFileStream); } /** * æµç¨èç¹å®¡æ ¸ * @param assignEquipmentFileStreamVo * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨èç¹å®¡æ ¸") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨èç¹å®¡æ ¸", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æµç¨èç¹å®¡æ ¸") @PostMapping(value = "audit") public Result<?> auditAssignEquipmentFileStream(@RequestBody AssignEquipmentFileStreamVo assignEquipmentFileStreamVo){ return assignEquipmentFileStreamService.auditAssignEquipmentFileStream(assignEquipmentFileStreamVo); } /** * æ·»å * * @param assignEquipmentFileStream * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ·»å ") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ·»å ", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ·»å ") //@RequiresPermissions("org.jeecg.modules:nc_assign_equipment_file_stream:add") @PostMapping(value = "/add") public Result<String> add(@RequestBody AssignEquipmentFileStream assignEquipmentFileStream) { assignEquipmentFileStreamService.save(assignEquipmentFileStream); return Result.OK("æ·»å æåï¼"); } /** * æ¥è¯¢å®¡ç¾åºæ¬ä¿¡æ¯ * @param id * @return */ @ApiOperation(value = "æ¥è¯¢å®¡ç¾åºæ¬ä¿¡æ¯", notes = "æ¥è¯¢å®¡ç¾åºæ¬ä¿¡æ¯") @GetMapping(value = "/selectVoById") public Result<?> selectVoById(@RequestParam(name="id") String id){ List<AssignEquipmentFileStream> list = assignEquipmentFileStreamService.list(new QueryWrapper<AssignEquipmentFileStream>().eq("id", id)); if (!list.isEmpty()){ list.forEach(item->{ DeviceType deviceType = deviceTypeService.getById(item.getDeviceTypeId()); if (deviceType!=null){ DeviceManagement deviceManagement = deviceManagementService.getById(deviceType.getDeviceManagementId()); if (deviceManagement!=null){ item.setDeviceTypeName(deviceManagement.getDeviceManagementName()); } } DocRelative docRelative=docRelativeService.getById(item.getDocId()); if (docRelative!=null){ DocInfo docInfo = docInfoService.getById(docRelative.getDocId()); item.setDocName(docInfo.getDocName()); } }); return Result.OK(list); } return Result.error("æªæ¾å°å¯¹åºæ°æ®"); } /** * ç¼è¾ * * @param assignEquipmentFileStream * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -ç¼è¾") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -ç¼è¾", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -ç¼è¾") //@RequiresPermissions("org.jeecg.modules:nc_assign_equipment_file_stream:edit") @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) public Result<String> edit(@RequestBody AssignEquipmentFileStream assignEquipmentFileStream) { assignEquipmentFileStreamService.updateById(assignEquipmentFileStream); return Result.OK("ç¼è¾æå!"); } /** * éè¿idå é¤ * * @param id * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idå é¤") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idå é¤", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idå é¤") //@RequiresPermissions("org.jeecg.modules:nc_assign_equipment_file_stream:delete") @DeleteMapping(value = "/delete") public Result<String> delete(@RequestParam(name="id",required=true) String id) { assignEquipmentFileStreamService.removeById(id); return Result.OK("å 餿å!"); } /** * æ¹éå é¤ * * @param ids * @return */ @AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ¹éå é¤") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ¹éå é¤", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -æ¹éå é¤") //@RequiresPermissions("org.jeecg.modules:nc_assign_equipment_file_stream:deleteBatch") @DeleteMapping(value = "/deleteBatch") public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { this.assignEquipmentFileStreamService.removeByIds(Arrays.asList(ids.split(","))); return Result.OK("æ¹éå 餿å!"); } /** * éè¿idæ¥è¯¢ * * @param id * @return */ //@AutoLog(value = "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idæ¥è¯¢") @ApiOperation(value="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idæ¥è¯¢", notes="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ -éè¿idæ¥è¯¢") @GetMapping(value = "/queryById") public Result<AssignEquipmentFileStream> queryById(@RequestParam(name="id",required=true) String id) { AssignEquipmentFileStream assignEquipmentFileStream = assignEquipmentFileStreamService.getById(id); if(assignEquipmentFileStream==null) { return Result.error("æªæ¾å°å¯¹åºæ°æ®"); } return Result.OK(assignEquipmentFileStream); } /** * 导åºexcel * * @param request * @param assignEquipmentFileStream */ //@RequiresPermissions("org.jeecg.modules:nc_assign_equipment_file_stream:exportXls") @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, AssignEquipmentFileStream assignEquipmentFileStream) { return super.exportXls(request, assignEquipmentFileStream, AssignEquipmentFileStream.class, "DNC-设å¤ç»ææ ææ´¾äº§åç»ææ "); } /** * éè¿excelå¯¼å ¥æ°æ® * * @param request * @param response * @return */ //@RequiresPermissions("nc_assign_equipment_file_stream:importExcel") @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { return super.importExcel(request, response, AssignEquipmentFileStream.class); } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/entity/AssignEquipmentFileStream.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,133 @@ package org.jeecg.modules.dncFlow.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.util.Date; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecg.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * @Description: * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ @Data @TableName("nc_assign_equipment_file_stream") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @ApiModel(value="nc_assign_equipment_file_stream对象", description="DNC-设å¤ç»ææ ææ´¾äº§åç»ææ ") public class AssignEquipmentFileStream implements Serializable { private static final long serialVersionUID = 1L; /**主é®*/ @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主é®") private String id; /**设å¤ID*/ @Excel(name = "设å¤ID", width = 15) @ApiModelProperty(value = "设å¤ID") @Dict(dictTable = "mdc_equipment", dicCode = "id", dicText = "equipment_id") private String equipmentId; /**è®¾å¤ææ¡£ID*/ @Excel(name = "è®¾å¤ææ¡£ID", width = 15) @ApiModelProperty(value = "è®¾å¤ææ¡£ID") @Dict(dictTable = "nc_doc_info", dicCode = "doc_id", dicText = "doc_name") private String equipmentDocId; /**è®¾å¤æä»¶ID*/ @Excel(name = "è®¾å¤æä»¶ID", width = 15) @ApiModelProperty(value = "è®¾å¤æä»¶ID") private String equipmentFileId; /**产åID*/ @Excel(name = "产åID", width = 15) @ApiModelProperty(value = "产åID") @Dict(dictTable = "nc_product_info", dicCode = "product_id", dicText = "product_name") private String productId; /**é¨ä»¶ID*/ @Excel(name = "é¨ä»¶ID", width = 15) @ApiModelProperty(value = "é¨ä»¶ID") @Dict(dictTable = "nc_component_info", dicCode = "component_id", dicText = "component_name") private String componentId; /**é¶ä»¶ID*/ @Excel(name = "é¶ä»¶ID", width = 15) @ApiModelProperty(value = "é¶ä»¶ID") @Dict(dictTable = "nc_parts_info", dicCode = "parts_id", dicText = "parts_name") private String partsId; /**å·¥èºè§ç¨çæ¬ID*/ @Excel(name = "å·¥èºè§ç¨çæ¬ID", width = 15) @ApiModelProperty(value = "å·¥èºè§ç¨çæ¬ID") @Dict(dictTable = "nc_process_spec_version", dicCode = "id", dicText = "process_spec_version_name") private String psvId; /**å·¥åºID*/ @Excel(name = "å·¥åºID", width = 15) @ApiModelProperty(value = "å·¥åºID") @Dict(dictTable = "nc_process_stream", dicCode = "process_id", dicText = "process_name") private String processId; /**å·¥æ¥ID*/ @Excel(name = "å·¥æ¥ID", width = 15) @ApiModelProperty(value = "å·¥æ¥ID") @Dict(dictTable = "nc_work_step", dicCode = "id", dicText = "step_name") private String stepId; /**设å¤ç±»ID*/ @Excel(name = "设å¤ç±»ID", width = 15) @ApiModelProperty(value = "设å¤ç±»ID") private String deviceTypeId; /**äº§åææ¡£id*/ @Excel(name = "äº§åææ¡£id", width = 15) @ApiModelProperty(value = "äº§åææ¡£id") @Dict(dictTable = "nc_doc_info", dicCode = "doc_id", dicText = "doc_name") private String docId; /**ææ´¾åå */ @Excel(name = "ææ´¾åå ", width = 15) @ApiModelProperty(value = "ææ´¾åå ") private String applyReason; /**å®¡æ ¸ç±»å*/ @Excel(name = "å®¡æ ¸ç±»å", width = 15) @ApiModelProperty(value = "å®¡æ ¸ç±»å") private String auditType; /**å®¡æ ¸æè§*/ @Excel(name = "å®¡æ ¸æè§", width = 15) @ApiModelProperty(value = "å®¡æ ¸æè§") private String auditReason; /**å建人*/ @ApiModelProperty(value = "å建人") private String createBy; /**åå»ºæ¥æ*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "åå»ºæ¥æ") private Date createTime; /**æ´æ°äºº*/ @ApiModelProperty(value = "æ´æ°äºº") private String updateBy; /**æ´æ°æ¥æ*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "æ´æ°æ¥æ") private Date updateTime; /**æå±é¨é¨*/ @ApiModelProperty(value = "æå±é¨é¨") private String sysOrgCode; /**设å¤ç±»åç§°*/ private transient String deviceTypeName; /**产åæä»¶åç§°*/ private transient String docName; /**æå±id*/ private transient String attributionId; /**æå±type*/ private transient String attributionType; } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/mapper/AssignEquipmentFileStreamMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,17 @@ package org.jeecg.modules.dncFlow.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: DNC-设å¤ç»ææ ææ´¾äº§åç»ææ * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ public interface AssignEquipmentFileStreamMapper extends BaseMapper<AssignEquipmentFileStream> { } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/mapper/xml/AssignEquipmentFileStreamMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.jeecg.modules.dncFlow.mapper.AssignEquipmentFileStreamMapper"> </mapper> lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/IAssignEquipmentFileStreamService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,30 @@ package org.jeecg.modules.dncFlow.service; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.dncFlow.vo.AssignEquipmentFileStreamVo; /** * @Description: DNC-设å¤ç»ææ ææ´¾äº§åç»ææ * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ public interface IAssignEquipmentFileStreamService extends IService<AssignEquipmentFileStream> { /** * æµç¨å¯å¨,ä¿å对åºçæ°æ® * @param assignEquipmentFileStream * @return */ Result<?> saveAssignEquipmentFileStream(AssignEquipmentFileStream assignEquipmentFileStream); /** * æµç¨èç¹å®¡æ ¸ * @param assignEquipmentFileStreamVo * @return */ Result<?> auditAssignEquipmentFileStream(AssignEquipmentFileStreamVo assignEquipmentFileStreamVo); } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignEquipmentFileStreamServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,316 @@ package org.jeecg.modules.dncFlow.service.impl; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.flowable.engine.TaskService; import org.flowable.task.api.Task; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.dnc.constant.DncPassLogPassType; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.dto.TransferPackage; import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.exception.ExceptionCast; import org.jeecg.modules.dnc.response.ActivitiCode; import org.jeecg.modules.dnc.response.CommonCode; import org.jeecg.modules.dnc.response.DocumentCode; import org.jeecg.modules.dnc.response.UcenterCode; import org.jeecg.modules.dnc.service.*; import org.jeecg.modules.dnc.service.impl.FileFerryService; import org.jeecg.modules.dnc.utils.ValidateUtil; import org.jeecg.modules.dnc.utils.date.DateUtil; import org.jeecg.modules.dnc.utils.file.FileUtilS; import org.jeecg.modules.dncFlow.constant.GuideCardBatchEnum; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import org.jeecg.modules.dncFlow.entity.DispatchFile; import org.jeecg.modules.dncFlow.mapper.AssignEquipmentFileStreamMapper; import org.jeecg.modules.dncFlow.service.IAssignEquipmentFileStreamService; import org.jeecg.modules.dncFlow.vo.AssignEquipmentFileStreamVo; import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; import org.jeecg.modules.flowable.apithird.service.FlowCommonService; import org.jeecg.modules.flowable.service.IFlowDefinitionService; import org.jeecg.modules.flowable.service.IFlowTaskService; import org.jeecg.modules.mdc.entity.MdcEquipment; import org.jeecg.modules.mdc.service.IMdcEquipmentService; import org.jeecg.modules.system.service.IMdcProductionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.NoTransactionException; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; import javax.annotation.Resource; import java.io.File; import java.util.*; /** * @Description: DNC-设å¤ç»ææ ææ´¾äº§åç»ææ * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ @Service("IAssignEquipmentFileStreamService") public class AssignEquipmentFileStreamServiceImpl extends ServiceImpl<AssignEquipmentFileStreamMapper, AssignEquipmentFileStream> implements IAssignEquipmentFileStreamService , FlowCallBackServiceI { @Autowired private IDocInfoService docInfoService; @Autowired private IDocFileService docFileService; @Autowired private IMdcEquipmentService mdcEquipmentService; @Autowired private IGuideCardBatchService iGuideCardBatchService; @Resource private FlowCommonService flowCommonService; @Resource private IFlowDefinitionService flowDefinitionService; @Autowired private IFlowTaskService flowTaskService; @Autowired private TaskService taskService; @Autowired private IFlowMyBusinessService flowMyBusinessService; @Autowired private IDocRelativeService docRelativeService; @Autowired private IDeviceTypeService deviceTypeService; @Autowired private PermissionService permissionService; /** * æµç¨å¯å¨,ä¿å对åºçæ°æ® * @param assignEquipmentFileStream * @return */ @Override public Result<?> saveAssignEquipmentFileStream(AssignEquipmentFileStream assignEquipmentFileStream){ //åæ°æ ¡éª checkParam(assignEquipmentFileStream); //è·åè®¾å¤ MdcEquipment equipment = mdcEquipmentService.getById(assignEquipmentFileStream.getEquipmentId()); if(equipment==null){ return Result.error("æªåç°è¯¥è®¾å¤"); } //è·åè®¾å¤ææ¡£ä¿¡æ¯ DocInfo docInfo =docInfoService.getById(assignEquipmentFileStream.getEquipmentDocId()); if(docInfo==null){ return Result.error("æªåç°è¯¥è®¾å¤å¯¹åºææ¡£"); } //è·åè®¾å¤æä»¶ä¿¡æ¯ DocFile docFile =docFileService.getById(assignEquipmentFileStream.getEquipmentFileId()); if(docFile==null){ return Result.error("æªåç°è¯¥è®¾å¤å¯¹åºæä»¶"); } //è·åäº§åææ¡£ä¿¡æ¯ DocRelative docRelative=docRelativeService.getById(assignEquipmentFileStream.getDocId()); //è·å对åºè®¾å¤ç±» DeviceType deviceType = deviceTypeService.getById(docRelative.getAttributionId()); if(deviceType!=null){ assignEquipmentFileStream.setDeviceTypeId(deviceType.getId()); assignEquipmentFileStream.setAttributionId(deviceType.getAttributionId()); assignEquipmentFileStream.setAttributionType(deviceType.getAttributionType().toString()); PermissionStreamNew permissionStreamNew=permissionService.getPermissionStreams(assignEquipmentFileStream); if(permissionStreamNew==null){ return Result.error("ç¨æ·æ ææä½æ¤ä»»å¡"); } } DocInfo productDocInfo =docInfoService.getById(docRelative.getDocId()); if(productDocInfo==null){ return Result.error("æªåç°è¯¥äº§åç»ææ å¯¹åºææ¡£"); } //è·åäº§åææ¡£ä¿¡æ¯å¯¹åºææ°ç¨åºå 工确认表 List<GuideCardBatch> batches = iGuideCardBatchService.list( new QueryWrapper<GuideCardBatch>() .eq("doc_id", productDocInfo.getDocId()) .eq("flow_status", GuideCardBatchEnum.COMPLETE.getCode()) .orderByDesc("SUBSTRING(serial_number, LEN(serial_number)-3, 4)")); if(CollectionUtils.isEmpty(batches)){ return Result.error("è¯¥ææ¡£å¯¹åºçç¨åºå å·¥ç¡®è®¤è¡¨å®¡æ¹æªéè¿ï¼ä¸è½è¿è¡åç"); } this.save(assignEquipmentFileStream); System.out.println("设å¤ç»ææ ææ´¾äº§åç»ææ ï¼" + assignEquipmentFileStream.getId()); flowCommonService.initActBusiness("设å¤ç»ææ ææ´¾äº§åç»ææ :"+docInfo.getDocName()+"->"+productDocInfo.getDocName(), assignEquipmentFileStream.getId(), "IAssignEquipmentFileStreamService", "nc_assign_equipment_file_stream", null); Map<String, Object> variables = new HashMap<>(); variables.put("dataId", assignEquipmentFileStream.getId()); variables.put("organization", assignEquipmentFileStream.getApplyReason()); variables.put("comment", assignEquipmentFileStream.getApplyReason()); variables.put("proofreading",true); Result result= flowDefinitionService.startProcessInstanceByKey("nc_assign_equipment_file_stream", variables); if (!result.isSuccess()) { super.removeById(assignEquipmentFileStream.getId()); } return result; } /** * æµç¨èç¹å®¡æ ¸ * @param assignEquipmentFileStreamVo * @return */ @Transactional(rollbackFor = Exception.class) @Override public Result<?> auditAssignEquipmentFileStream(AssignEquipmentFileStreamVo assignEquipmentFileStreamVo){ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); try { // åæ°æ ¡éª if (!ValidateUtil.validateString(assignEquipmentFileStreamVo.getTaskId()) || !ValidateUtil.validateString(assignEquipmentFileStreamVo.getDataId())) { return Result.error(CommonCode.INVALID_PARAM.toString()); } String userId = user.getId(); assignEquipmentFileStreamVo.setAssignee(user.getUsername()); if (!ValidateUtil.validateString(userId)) { return Result.error(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST.toString()); } // æ°æ®æ¥è¯¢ AssignEquipmentFileStream assignEquipmentFileStream = this.getById(assignEquipmentFileStreamVo.getDataId()); if (assignEquipmentFileStream == null) { return Result.error(CommonCode.INVALID_PARAM.toString()); } //è·åè®¾å¤ MdcEquipment equipment = mdcEquipmentService.getById(assignEquipmentFileStream.getEquipmentId()); if(equipment==null){ return Result.error("æªåç°è¯¥è®¾å¤"); } //è·åè®¾å¤ææ¡£ä¿¡æ¯ DocInfo docInfo =docInfoService.getById(assignEquipmentFileStream.getEquipmentDocId()); if(docInfo==null){ return Result.error("æªåç°è¯¥è®¾å¤å¯¹åºææ¡£"); } //è·åè®¾å¤æä»¶ä¿¡æ¯ DocFile docFile =docFileService.getById(assignEquipmentFileStream.getEquipmentFileId()); if(docFile==null){ return Result.error("æªåç°è¯¥è®¾å¤å¯¹åºæä»¶"); } //è·åäº§åææ¡£ä¿¡æ¯ DocRelative docRelative=docRelativeService.getById(assignEquipmentFileStream.getDocId()); DocInfo productDocInfo =docInfoService.getById(docRelative.getDocId()); if(productDocInfo==null){ return Result.error("æªåç°è¯¥äº§åç»ææ å¯¹åºææ¡£"); } //è·åè®¾å¤ MdcEquipment mdcEquipment =mdcEquipmentService.getById(assignEquipmentFileStream.getEquipmentId()); if (mdcEquipment==null){ return Result.error("æªåç°è¯¥è®¾å¤"); } // 2. æ¥è¯¢æµç¨ä¸å¡è®°å½ï¼å¤çç©ºç»æï¼ List<FlowMyBusiness> businessList = flowMyBusinessService.list( new QueryWrapper<FlowMyBusiness>() .eq("process_instance_id", assignEquipmentFileStreamVo.getInstanceId()) ); if (businessList.isEmpty()) { return Result.error("æµç¨è®°å½ä¸åå¨"); } FlowMyBusiness flowMyBusiness = businessList.get(0); // 3. æ ¡éªç¨æ·æ¯å¦ä¸ºåéå¤ç人 List<String> todoUsers = JSON.parseArray(flowMyBusiness.getTodoUsers(), String.class); if (todoUsers == null || !todoUsers.contains(user.getUsername())) { return Result.error("ç¨æ·æ ææä½æ¤ä»»å¡"); } // 4. 认é¢ä»»å¡ï¼å¤ç已被认é¢çæ åµï¼ String taskId = flowMyBusiness.getTaskId(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); if (task == null) { return Result.error("ä»»å¡ä¸å卿已宿"); } if (task.getAssignee() != null && !task.getAssignee().equals(user.getUsername())) { return Result.error("ä»»å¡å·²è¢«ä»äººè®¤é¢"); } taskService.claim(taskId, user.getUsername()); // 设置æµç¨åé Map<String, Object> values = new HashMap<>(); values.put("dataId", assignEquipmentFileStream.getId()); values.put("assignee", userId); values.put("comment", assignEquipmentFileStreamVo.getComment()); values.put("organization", assignEquipmentFileStreamVo.getComment()); assignEquipmentFileStreamVo.setValues(values); // 宿æµç¨ä»»å¡ Result result = flowTaskService.complete(assignEquipmentFileStreamVo); if (result.isSuccess()) { this.updateById(assignEquipmentFileStream); if (assignEquipmentFileStreamVo.getAuditType().equals("1")) { //1.产åç»ææ ncæä»¶è¿è¡åç DocFile productDocFile = new DocFile(); productDocFile.setDocId(productDocInfo.getDocId()); productDocFile.setFileName(docFile.getFileName()); productDocFile.setFileEncodeName(docFile.getFileEncodeName()); productDocFile.setFilePath(docFile.getFilePath()); productDocFile.setFileSize(docFile.getFileSize()); productDocFile.setFileSuffix(docFile.getFileSuffix()); docFileService.addDocFile(productDocFile); productDocInfo.setPublishVersion(productDocFile.getDocVersion()); productDocInfo.setPublishFileId(productDocFile.getFileId()); docInfoService.updateById(productDocInfo); } } else { return result; } return Result.OK("æä½æå"); } catch (Exception e) { try { TransactionStatus transactionStatus = TransactionAspectSupport.currentTransactionStatus(); if (!transactionStatus.isCompleted()) { transactionStatus.setRollbackOnly(); } } catch (NoTransactionException ex) { // å¿½ç¥æ äºå¡çå¼å¸¸ } log.error("å®¡æ ¸å¤±è´¥", e); return Result.error("æä½å¤±è´¥ï¼" + e.getMessage()); } } //ä¼ åéªè¯ public boolean checkParam(AssignEquipmentFileStream assignEquipmentFileStream) { if (assignEquipmentFileStream == null) { ExceptionCast.cast(CommonCode.INVALID_PARAM); } if (!ValidateUtil.validateString(assignEquipmentFileStream.getEquipmentId()) || !ValidateUtil.validateString(assignEquipmentFileStream.getDocId()) || !ValidateUtil.validateString(assignEquipmentFileStream.getEquipmentFileId()) || !ValidateUtil.validateString(assignEquipmentFileStream.getEquipmentDocId())) { ExceptionCast.cast(CommonCode.INVALID_PARAM); } LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); String userId = user.getId(); if (!ValidateUtil.validateString(userId)) { ExceptionCast.cast(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST); } return true; } @Override public void afterFlowHandle(FlowMyBusiness business) { business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ business.getValues();//åç«¯ä¼ è¿æ¥çåæ° business.getActStatus(); } @Override public Object getBusinessDataById(String dataId) { return this.getById(dataId); } @Override public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { return null; } @Override public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { //ä¸å¡æ¯å¦å¹²é¢æµç¨ï¼ä¸å¡å¹²é¢ï¼æµç¨å¹²é¢ï¼æå®äººåè¿è¡å¤ç return null; } } lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/DispatchFileServiceImpl.java
@@ -13,16 +13,21 @@ import org.flowable.task.api.Task; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.dnc.entity.DocInfo; import org.jeecg.modules.dnc.entity.PermissionStreamNew; import org.jeecg.modules.dnc.constant.DncPassLogPassType; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.dto.TransferPackage; import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.exception.ExceptionCast; import org.jeecg.modules.dnc.mapper.DocInfoMapper; import org.jeecg.modules.dnc.request.DocInfoQueryRequest; import org.jeecg.modules.dnc.response.ActivitiCode; import org.jeecg.modules.dnc.response.CommonCode; import org.jeecg.modules.dnc.response.UcenterCode; import org.jeecg.modules.dnc.service.IDocInfoService; import org.jeecg.modules.dnc.service.*; import org.jeecg.modules.dnc.service.impl.FileFerryService; import org.jeecg.modules.dnc.utils.ValidateUtil; import org.jeecg.modules.dnc.utils.date.DateUtil; import org.jeecg.modules.dnc.utils.file.FileUtilS; import org.jeecg.modules.dncFlow.entity.DispatchFile; import org.jeecg.modules.dncFlow.mapper.DispatchFileMapper; import org.jeecg.modules.dncFlow.service.IDispatchFileService; @@ -35,14 +40,23 @@ import org.jeecg.modules.flowable.service.IFlowDefinitionService; import org.jeecg.modules.flowable.service.IFlowTaskService; import org.jeecg.modules.flowable.service.IHisWorkTaskService; import org.jeecg.modules.mdc.entity.MdcEquipment; import org.jeecg.modules.system.service.IMdcProductionService; import org.jeecg.modules.system.service.ISysUserRoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.*; /** @@ -68,13 +82,29 @@ @Autowired private IFlowMyBusinessService flowMyBusinessService; @Autowired private DocInfoMapper docInfoMapper; @Autowired private ISysUserRoleService sysUserRoleService; @Autowired private PermissionService permissionService; @Autowired private IHisWorkTaskService hisWorkTaskService; @Autowired private IDeviceTypeService deviceTypeService; @Autowired private IDeviceManagementService deviceManagementService; @Autowired private IDncPassLogService dncPassLogService; @Autowired private IDocFileService docFileService; @Autowired private IDocRelativeService docRelativeService; @Autowired @Lazy private FileFerryService ferryService; @Value("${deploy.secretFolder}") private String secretFolder; //å·¥æ§ç½ä¼ è¾ncæä»¶å¤¹ @Value("${fileHomePath}") private String fileHomePath; /** * æµç¨å¯å¨,ä¿å对åºçæ°æ® * @param dispatchFile @@ -380,9 +410,13 @@ @Override public Result<?> submitProccess(DispatchFile dispatchFile) { checkParam(dispatchFile); super.save(dispatchFile); //è·åæä»¶ä¿¡æ¯ DocInfo docInfo = docInfoService.getById(dispatchFile.getDocId()); PermissionStreamNew permissionStreams = getPermissionStreams(dispatchFile); if (permissionStreams==null){ return Result.error("ç¨æ·æ²¡ææé"); } super.save(dispatchFile); flowCommonService.initActBusiness(docInfo.getDocName()+"."+docInfo.getDocSuffix()+"æä»¶è¿è¡å®å", dispatchFile.getId(), "IDispatchFileService", "process_rf27duhy", null); Map<String, Object> variables = new HashMap<>(); @@ -417,7 +451,7 @@ return values; } private void updateStatus(DispatchFile dispatchFile, DocInfo docInfo, DispatchFileFlowTaskVo dispatchFileFlowTaskVo) { private void updateStatus(DispatchFile dispatchFile, DocInfo docInfo, DispatchFileFlowTaskVo dispatchFileFlowTaskVo) throws IOException { if (StrUtil.isNotBlank(dispatchFileFlowTaskVo.getProofreadStatus())) { switch (dispatchFileFlowTaskVo.getProofreadStatus()) { case "1": @@ -448,9 +482,95 @@ if (dispatchFileFlowTaskVo.getStereotype() != null && dispatchFileFlowTaskVo.getStereotype()) { dispatchFile.setCurrentNode("5"); docInfo.setDocDispatchStatus(5); //å®åéè¿ DeviceType deviceType=deviceTypeService.getById(dispatchFile.getDeviceTypeId()); DeviceManagement deviceManagement=deviceManagementService.getById(deviceType.getDeviceManagementId()); DocFile docFile=docFileService.getById(dispatchFile.getFileId()); DocRelative docRelative=docRelativeService.getOne(new QueryWrapper<DocRelative>().eq("doc_id",docInfo.getDocId()) .eq("attribution_id",dispatchFile.getAttributionId()).eq("attribution_type",dispatchFile.getAttributionType())); handleFileProcessing(docFile,deviceManagement,secretFolder); handleProductTree(docInfo,docRelative,deviceManagement); } } //å°è£ å¤çæä»¶ private void handleFileProcessing(DocFile docFile, DeviceManagement deviceManagement, String secretFolder) throws IOException { if (!docFile.getFileSuffix().equals("zip") && !docFile.getFileSuffix().equals("rar")) { DncPassLog passInfoTxt = new DncPassLog(); Date dateFirst = DateUtil.getNow(); passInfoTxt.setDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)); /*æ¥è¯¢æå䏿¡è®°å½*/ //ä¼ç 500æ¯«ç§ DncPassLog dncPassLog = dncPassLogService.findDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)); int fileNc =0; if (dncPassLog !=null) { fileNc = dncPassLog.getSequenceNumber() + 1; } else { fileNc = 1; } //å¤çæä»¶åç§° æä»¶è·¯å¾ String sequenceNc = String.format("%06d",fileNc); DncPassLog passInfoNc = new DncPassLog(); passInfoNc.setSequenceNumber(fileNc); passInfoNc.setSequenceOrder(sequenceNc); passInfoNc.setDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)); passInfoNc.setPassType(DncPassLogPassType.NCFILE.getCode()); passInfoNc.setPassName(docFile.getFileName()); try { Thread.sleep(1000); Date date = new Date(); passInfoNc.setCreateTime(date); System.out.println(DateUtil.format(date,DateUtil.STR_DATE_TIME)); } catch (InterruptedException e) { e.printStackTrace(); } dncPassLogService.save(passInfoNc); // 4. æ§è¡æä»¶æä½,åç¼ä¸ºNC Path source = Paths.get(fileHomePath+docFile.getFilePath(), docFile.getFileEncodeName()); String destFileName = "10A" + DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)+sequenceNc + "_" + deviceManagement.getDeviceManagementCode()+".NC"; Path destination = Paths.get(secretFolder, destFileName); Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING); } } /** * å¤ç对åºäº§åç»ææ ãncæä»¶ãåå ·å表ãç¨åºå 工确认表å°è£ * @param docInfo */ private void handleProductTree(DocInfo docInfo, DocRelative docRelative, DeviceManagement deviceManagement) { /*æ¥è¯¢æå䏿¡è®°å½*/ //ä¼ç 500æ¯«ç§ DncPassLog passInfoTxt = new DncPassLog(); Date dateFirst = DateUtil.getNow(); passInfoTxt.setDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)); DncPassLog dncPassLog = dncPassLogService.findDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)); int fileTxt = 0, fileNc =0; if (dncPassLog !=null) { fileTxt = dncPassLog.getSequenceNumber() + 1; } else { fileTxt = 1; } String sequence = String.format("%06d",fileTxt); passInfoTxt.setSequenceNumber(fileTxt); passInfoTxt.setCreateTime(dateFirst); passInfoTxt.setSequenceOrder(sequence); System.out.println(DateUtil.format(dateFirst,DateUtil.STR_DATE_TIME)); passInfoTxt.setPassType(DncPassLogPassType.PRODUCTSTRUCTURE.getCode()); dncPassLogService.save(passInfoTxt); String fileName="10A"+DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY); if (Objects.equals(docInfo.getAttributionType(), DocAttributionTypeEnum.PROCESS.getCode())){ //å·¥åºå¯¹åºè®¾å¤ç±» String filePath = ferryService.exportData(TransferPackage.DataType.PROCESS, docRelative.getId(),fileName+sequence+"_"+deviceManagement.getDeviceManagementCode()+".ferry"); System.out.println("å·¥åºæ°æ®å·²å¯¼åº: " + filePath); }else { //å·¥æ¥å¯¹åºè®¾å¤ç±» String filePath = ferryService.exportData(TransferPackage.DataType.WORKSTEP, docRelative.getId(),fileName+sequence+"_"+deviceManagement.getDeviceManagementCode()+".ferry"); System.out.println("å·¥æ¥æ°æ®å·²å¯¼åº: " + filePath); } } //ä¼ åéªè¯ public boolean checkParam(DispatchFile dispatchFile) { if (dispatchFile == null) { lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/PermissionService.java
@@ -7,8 +7,10 @@ import org.jeecg.modules.dnc.exception.ExceptionCast; import org.jeecg.modules.dnc.response.ActivitiCode; import org.jeecg.modules.dnc.service.IDeviceTypeService; import org.jeecg.modules.dncFlow.adapter.AssignEquipmentFileStreamAdapter; import org.jeecg.modules.dncFlow.adapter.AssignFileStreamAdapter; import org.jeecg.modules.dncFlow.adapter.DispatchFileAdapter; import org.jeecg.modules.dncFlow.entity.AssignEquipmentFileStream; import org.jeecg.modules.dncFlow.entity.AssignFileStream; import org.jeecg.modules.dncFlow.entity.DispatchFile; import org.jeecg.modules.dncFlow.handler.*; @@ -51,6 +53,10 @@ return processInternal(new AssignFileStreamAdapter(stream), stream.getAttributionType()); } public PermissionStreamNew getPermissionStreams(AssignEquipmentFileStream stream) { return processInternal(new AssignEquipmentFileStreamAdapter(stream), stream.getAttributionType()); } private PermissionStreamNew processInternal(StreamTarget target, String attributionType) { LoginUser user = getCurrentUser(); String resolvedId = resolveAttributionId(target.getAttributionId()); lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/vo/AssignEquipmentFileStreamVo.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package org.jeecg.modules.dncFlow.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; import org.jeecgframework.poi.excel.annotation.Excel; /** * @Description: DNC-设å¤ç»ææ ææ´¾äº§åç»ææ * @Author: jeecg-boot * @Date: 2025-06-17 * @Version: V1.0 */ @Data @ApiModel(value="设å¤ç»ææ ææ´¾äº§åç»ææ --请æ±åæ°") public class AssignEquipmentFileStreamVo extends FlowTaskVo { /** * taskIds */ private String taskIds; /**å®¡æ ¸ç±»å*/ @Excel(name = "å®¡æ ¸ç±»å", width = 15) @ApiModelProperty(value = "å®¡æ ¸ç±»å") private String auditType; }