| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -31,6 +31,8 @@ import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.Arrays; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.List; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.Map; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.concurrent.atomic.AtomicInteger; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.stream.Collectors; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					/** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * 备忘录-难点读点 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -84,7 +86,7 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        insert(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.新增备忘录记录数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        MemoAttrEntity memoAttr = new MemoAttrEntity(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttr.setId(entity.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttr.setId(entity.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttr.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttr.setRemindTime(dto.getRemindTime()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttr.setType("difficulty"); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -92,8 +94,14 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttrService.insert(memoAttr); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.新增难点堵点附件数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<MemoAttachmentEntity> list = ConvertUtils.sourceToTarget(dto.getAttachmentList(), MemoAttachmentEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            list.forEach(l -> l.setRemindMsgId(entity.getId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AtomicInteger i = new AtomicInteger(NumConstant.ZERO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setRemindMsgId(entity.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setSort(i.getAndIncrement()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return e; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            memoAttachmentService.insertBatch(list); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -107,8 +115,14 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.附件表数据全删全增
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        memoAttachmentService.deleteByMemoId(dto.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<MemoAttachmentEntity> list = ConvertUtils.sourceToTarget(dto.getAttachmentList(), MemoAttachmentEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            list.forEach(l -> l.setRemindMsgId(entity.getId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AtomicInteger i = new AtomicInteger(NumConstant.ZERO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setCustomerId(dto.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setRemindMsgId(dto.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                e.setSort(i.getAndIncrement()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return e; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            memoAttachmentService.insertBatch(list); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.判断更新提醒记录表提醒时间
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |