|  |  | @ -3,6 +3,7 @@ package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.MemoDifficultyDao; | 
			
		
	
	
		
			
				
					|  |  | @ -20,6 +21,7 @@ import com.epmet.service.MemoAttrService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.MemoDifficultyService; | 
			
		
	
		
			
				
					|  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
			
				
					|  |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
			
				
					|  |  |  | import oracle.sql.NUMBER; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.collections4.CollectionUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
	
		
			
				
					|  |  | @ -47,7 +49,7 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public PageData<MemoDifficultyDTO> page(MemoDifficultyFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); | 
			
		
	
		
			
				
					|  |  |  |         List<MemoDifficultyDTO> list =  baseDao.getPage(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         List<MemoDifficultyDTO> list = baseDao.getPage(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         PageInfo<MemoDifficultyDTO> pageInfo = new PageInfo<>(list); | 
			
		
	
		
			
				
					|  |  |  |         return new PageData<>(list, pageInfo.getTotal()); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  | @ -59,8 +61,8 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
			
		
	
		
			
				
					|  |  |  |         return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.class); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     private QueryWrapper<MemoDifficultyEntity> getWrapper(Map<String, Object> params){ | 
			
		
	
		
			
				
					|  |  |  |         String id = (String)params.get(FieldConstant.ID_HUMP); | 
			
		
	
		
			
				
					|  |  |  |     private QueryWrapper<MemoDifficultyEntity> getWrapper(Map<String, Object> params) { | 
			
		
	
		
			
				
					|  |  |  |         String id = (String) params.get(FieldConstant.ID_HUMP); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         QueryWrapper<MemoDifficultyEntity> wrapper = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
			
		
	
	
		
			
				
					|  |  | @ -89,9 +91,9 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
			
		
	
		
			
				
					|  |  |  |         memoAttr.setReceiver(dto.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         memoAttrService.insert(memoAttr); | 
			
		
	
		
			
				
					|  |  |  |         //3.新增难点堵点附件数据
 | 
			
		
	
		
			
				
					|  |  |  |         if(CollectionUtils.isNotEmpty(dto.getAttachmentList())){ | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { | 
			
		
	
		
			
				
					|  |  |  |             List<MemoAttachmentEntity> list = ConvertUtils.sourceToTarget(dto.getAttachmentList(), MemoAttachmentEntity.class); | 
			
		
	
		
			
				
					|  |  |  |             list.forEach(l->l.setRemindMsgId(entity.getId())); | 
			
		
	
		
			
				
					|  |  |  |             list.forEach(l -> l.setRemindMsgId(entity.getId())); | 
			
		
	
		
			
				
					|  |  |  |             memoAttachmentService.insertBatch(list); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  | @ -104,13 +106,13 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
			
		
	
		
			
				
					|  |  |  |         updateById(entity); | 
			
		
	
		
			
				
					|  |  |  |         //2.附件表数据全删全增
 | 
			
		
	
		
			
				
					|  |  |  |         memoAttachmentService.deleteByMemoId(dto.getId()); | 
			
		
	
		
			
				
					|  |  |  |         if(CollectionUtils.isNotEmpty(dto.getAttachmentList())){ | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { | 
			
		
	
		
			
				
					|  |  |  |             List<MemoAttachmentEntity> list = ConvertUtils.sourceToTarget(dto.getAttachmentList(), MemoAttachmentEntity.class); | 
			
		
	
		
			
				
					|  |  |  |             list.forEach(l->l.setRemindMsgId(entity.getId())); | 
			
		
	
		
			
				
					|  |  |  |             list.forEach(l -> l.setRemindMsgId(entity.getId())); | 
			
		
	
		
			
				
					|  |  |  |             memoAttachmentService.insertBatch(list); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //3.判断更新提醒记录表提醒时间
 | 
			
		
	
		
			
				
					|  |  |  |         if(null != dto.getRemindTime()){ | 
			
		
	
		
			
				
					|  |  |  |         if (null != dto.getRemindTime()) { | 
			
		
	
		
			
				
					|  |  |  |             MemoAttrDTO memoAttr = new MemoAttrDTO(); | 
			
		
	
		
			
				
					|  |  |  |             memoAttr.setId(dto.getId()); | 
			
		
	
		
			
				
					|  |  |  |             memoAttr.setRemindTime(dto.getRemindTime()); | 
			
		
	
	
		
			
				
					|  |  | @ -127,6 +129,10 @@ public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public MemoDifficultyDTO detail(MemoDifficultyDetailFromDTO fromDTO) { | 
			
		
	
		
			
				
					|  |  |  |         //0.判断已读,则修改已读标记
 | 
			
		
	
		
			
				
					|  |  |  |         if (fromDTO.getReadFlag() == NumConstant.ONE) { | 
			
		
	
		
			
				
					|  |  |  |             memoAttrService.setReaded(fromDTO.getId()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //1.查询难点堵点主表数据
 | 
			
		
	
		
			
				
					|  |  |  |         MemoDifficultyEntity entity = baseDao.selectById(fromDTO.getId()); | 
			
		
	
		
			
				
					|  |  |  |         MemoDifficultyDTO resultDTO = ConvertUtils.sourceToTarget(entity, MemoDifficultyDTO.class); | 
			
		
	
	
		
			
				
					|  |  | 
 |