| 
						
						
							
								
							
						
						
					 | 
					@ -278,7 +278,7 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      if (projectCorrelationId) {//查指定项目,控制台全局切换
 | 
					 | 
					 | 
					      if (projectCorrelationId) {//查指定项目,控制台全局切换
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         where.projectCorrelationId = projectCorrelationId | 
					 | 
					 | 
					         where.projectCorrelationId = projectCorrelationId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      } | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(1010, limit, page, projectCorrelationId, types); | 
					 | 
					 | 
					    | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					       | 
					 | 
					 | 
					       | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      let news = await models.LatestDynamicList.findAll({//最新动态
 | 
					 | 
					 | 
					      let news = await models.LatestDynamicList.findAll({//最新动态
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         include: [{ | 
					 | 
					 | 
					         include: [{ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -297,12 +297,12 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            model: models.AlarmConfirmLog | 
					 | 
					 | 
					            model: models.AlarmConfirmLog | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         }], | 
					 | 
					 | 
					         }], | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         where: where, | 
					 | 
					 | 
					         where: where, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					         offset: 0, | 
					 | 
					 | 
					         offset: Number(page) * Number(limit), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					         limit: 1, | 
					 | 
					 | 
					         limit: Number(limit), | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					         order: [['time', 'desc']], | 
					 | 
					 | 
					         order: [['time', 'desc']], | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }); | 
					 | 
					 | 
					      }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(111111, news); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      //查项目名称 查用户名
 | 
					 | 
					 | 
					      //查项目名称 查用户名
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      let pepPojectIds = new Set(), notedUserIds = new Set(), emailSendPomsProjectIds = new Set(); | 
					 | 
					 | 
					      let pepPojectIds = new Set(), notedUserIds = new Set(), emailSendPomsProjectIds = new Set(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -322,8 +322,7 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         } | 
					 | 
					 | 
					         } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      } | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(222222, notedUserIds); | 
					 | 
					 | 
					    | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					      console.log(333333, emailSendPomsProjectIds); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      // EM 推送的特殊处理
 | 
					 | 
					 | 
					      // EM 推送的特殊处理
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -337,7 +336,7 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }) : [] | 
					 | 
					 | 
					            }) : [] | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(444444, emailLogProjectCorrelationRes); | 
					 | 
					 | 
					    | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      for (let { dataValues: p } of emailLogProjectCorrelationRes) { | 
					 | 
					 | 
					      for (let { dataValues: p } of emailLogProjectCorrelationRes) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         if (p.pepProjectId) { | 
					 | 
					 | 
					         if (p.pepProjectId) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -345,14 +344,14 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         } | 
					 | 
					 | 
					         } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      } | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(555555, pepPojectIds); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(` | 
					 | 
					 | 
					      let pepProjects = pepPojectIds.size ? await clickHouse.projectManage.query(` | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds].join(',')},-1) | 
					 | 
					 | 
					         SELECT id, project_name FROM t_pim_project WHERE id IN (${[...pepPojectIds].join(',')},-1) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      `).toPromise() : [];
 | 
					 | 
					 | 
					      `).toPromise() : [];
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(666666, pepProjects); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      let userPepRes = notedUserIds.size ? await clickHouse.pepEmis.query( | 
					 | 
					 | 
					      let userPepRes = notedUserIds.size ? await clickHouse.pepEmis.query( | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -401,7 +400,7 @@ async function getLatestDynamic (ctx) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         confirm//确认
 | 
					 | 
					 | 
					         confirm//确认
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }; | 
					 | 
					 | 
					      }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					   } catch (error) { | 
					 | 
					 | 
					   } catch (error) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      console.log(888888, error); | 
					 | 
					 | 
					      | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); | 
					 | 
					 | 
					      ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      ctx.status = 400; | 
					 | 
					 | 
					      ctx.status = 400; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      ctx.body = { | 
					 | 
					 | 
					      ctx.body = { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |