Переглянути джерело

Merge remote-tracking branch 'origin/dev' into dev

fuxubing 3 роки тому
батько
коміт
e07587832c

+ 10 - 0
jz-crm-db/src/main/java/org/linlinjava/jz/db/domain/HmNoticeExt.java

@@ -14,6 +14,16 @@ public class HmNoticeExt {
 	private JzTicket jzTicket;
 	private List<HmNoticeUser> noticeUserList; //HmNoticeEnum.getRelationTypeValue
 	
+	private String status;//通知状态,处理的临时变量
+	
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
 	public Boolean getIsComment() {
 		return isComment;
 	}

+ 36 - 25
jz-crm-db/src/main/java/org/linlinjava/jz/db/service/hm/HmNoticeService.java

@@ -202,32 +202,43 @@ public class HmNoticeService {
 
 		// 处理小程序进度展示,拿第一条数据的最新3个处理记录
 		if (list.size() > 0) {
-			HmNotice hmNotice = list.get(0);
-			List<HmNoticeUser> noticeUserList = new ArrayList<HmNoticeUser>();
-			if (hmNotice.getType().equals(HmCommentEnum.comment_num_2.getType())) {// 2是跟进通知
-				noticeUserList = hmNoticeUserService.getNoticeIduserIdList(hmNotice.getId(),
-						relation.getUserButlerId());// 拿管家id的处理过程
-			}
-			if (hmNotice.getType().equals(HmCommentEnum.comment_num_1.getType())) {// 1是拜访
-				noticeUserList = hmNotice.getNoticeUserList();
-			}
-
-			if (noticeUserList.size() > 3) {
-				noticeUserList = noticeUserList.subList(0, 3);// 取0,1,2
-			}
-
-			boolean boo = true;
-			for (HmNoticeUser e : noticeUserList) {
-				e.setTitle(e.getNoticeContent());
-				e.setDescription(df.format(e.getCreateTime()));
-				if (boo) {
-					e.setSize("14");
-					boo = false;
-				} else {
-					e.setSize("8");
+//			HmNotice hmNotice = list.get(0);
+			for(HmNotice hmNotice:list) {
+				 
+				List<HmNoticeUser> noticeUserList = new ArrayList<HmNoticeUser>();
+				if (hmNotice.getType().equals(HmCommentEnum.comment_num_2.getType())) {// 2是跟进通知
+					noticeUserList = hmNoticeUserService.getNoticeIduserIdList(hmNotice.getId(),
+							relation.getUserButlerId());// 拿管家id的处理过程
 				}
-			}
-			list.get(0).setNoticeUserList(noticeUserList);
+				if (hmNotice.getType().equals(HmCommentEnum.comment_num_1.getType())) {// 1是拜访
+					noticeUserList = hmNotice.getNoticeUserList();
+				}
+				
+				if (noticeUserList.size() > 3) {
+					noticeUserList = noticeUserList.subList(0, 3);// 取0,1,2
+				}
+				
+				boolean boo = true;
+				for (HmNoticeUser e : noticeUserList) {
+					e.setTitle(e.getNoticeContent());
+					e.setDescription(df.format(e.getCreateTime()));
+					if (boo) {
+						e.setSize("14");
+						boo = false;
+					} else {
+						e.setSize("8");
+					}
+				}
+//				list.get(0).setNoticeUserList(noticeUserList);
+				hmNotice.setNoticeUserList(noticeUserList);
+				
+				if(null==noticeUserList||noticeUserList.size()==0) {
+					hmNotice.setStatus("0");
+				}else {
+					hmNotice.setStatus(noticeUserList.get(0).getTicketStatus());
+				}
+				
+			}  
 		}
 
 		// 雇主的要处理评价