Browse Source

客户转交,订单转交修改公出转交审核人

anderx 2 years ago
parent
commit
5402a04179

+ 13 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1344,11 +1344,22 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				pe.setCreateTime(new Date());
 			}else {
 				//与发起者不一致的就需要修改审核人员
-
 				pe.setAid(aid);
 				pe.setAname(admin.getName());
+				//给新的审核人发送消息
+				PublicReleaseLog log = new PublicReleaseLog(e.getId(), TokenManager.getAdminId(), 5, "转交客户归属人到["+admin.getName()+"]。", new Date());
+				publicReleaseLogMapper.insertSelective(log);
+				systemWebSocketHandler.sendMessageToUser(aid, new TextMessage("unread"));
+				StringBuffer content=new StringBuffer().append("[").append(e.getUserNames()).append("]公司已转交给您,相关公出请尽快审核。");
+				Notice n =new Notice();
+				n.setId(UUID.randomUUID().toString());
+				n.setAid(aid);
+				n.setNoticeType(NoticeStatus.PUBLIC_RELEASE_START.getCode());
+				n.setContent(content.toString());
+				n.setReaded(0);//未读
+				asyncUtils.addNotice(n);
 			}
-				publicExamineMapper.updateByPridSelective(pe);
+			publicExamineMapper.updateByPridSelective(pe);
 		}
 	}