|  |  | @ -1,6 +1,7 @@ | 
			
		
	
		
			
				
					|  |  |  | package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.ProjectStaffDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.ProjectEntity; | 
			
		
	
	
		
			
				
					|  |  | @ -8,6 +9,7 @@ import com.epmet.entity.ProjectProcessEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.ProjectStaffEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetThirdOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.BlockChainUploadService; | 
			
		
	
		
			
				
					|  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.collections4.CollectionUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
	
		
			
				
					|  |  | @ -21,6 +23,7 @@ import java.util.stream.Collectors; | 
			
		
	
		
			
				
					|  |  |  |  * 区块链上链service实现 | 
			
		
	
		
			
				
					|  |  |  |  */ | 
			
		
	
		
			
				
					|  |  |  | @Service | 
			
		
	
		
			
				
					|  |  |  | @Slf4j | 
			
		
	
		
			
				
					|  |  |  | public class BlockChainUploadServiceImpl implements BlockChainUploadService { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
	
		
			
				
					|  |  | @ -129,20 +132,27 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService { | 
			
		
	
		
			
				
					|  |  |  |             handledStaff.setProjectId(handledStaffEntity.getProjectId()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         Result result; | 
			
		
	
		
			
				
					|  |  |  |         if (project == null) { | 
			
		
	
		
			
				
					|  |  |  |             // 处理
 | 
			
		
	
		
			
				
					|  |  |  |             BlockChainProcessProjectFormDTO processForm = new BlockChainProcessProjectFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |             processForm.setProcess(process); | 
			
		
	
		
			
				
					|  |  |  |             processForm.setAssignedStaffs(assignedStaffs); | 
			
		
	
		
			
				
					|  |  |  |             processForm.setHandledStaff(handledStaff); | 
			
		
	
		
			
				
					|  |  |  |             thirdOpenFeignClient.blockChainProcessProject(processForm); | 
			
		
	
		
			
				
					|  |  |  |             result = thirdOpenFeignClient.blockChainProcessProject(processForm); | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |             // 立项
 | 
			
		
	
		
			
				
					|  |  |  |             BlockChainCreateProjectFormDTO createForm = new BlockChainCreateProjectFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |             createForm.setProject(project); | 
			
		
	
		
			
				
					|  |  |  |             createForm.setProcess(process); | 
			
		
	
		
			
				
					|  |  |  |             createForm.setAssignedStaffs(assignedStaffs); | 
			
		
	
		
			
				
					|  |  |  |             thirdOpenFeignClient.blockChainCreateProject(createForm); | 
			
		
	
		
			
				
					|  |  |  |             result = thirdOpenFeignClient.blockChainCreateProject(createForm); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if (result == null || !result.success()) { | 
			
		
	
		
			
				
					|  |  |  |             log.error("项目处理信息,上链失败"); | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |             log.info("项目处理信息,上链成功"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |