提交 bcec0b3b authored 作者: xc's avatar xc

xc

上级 7e31f1c7
......@@ -37,9 +37,21 @@ public class NoticeServiceImpl implements NoticeService {
notice.setUpdateTime(new Date());
notice.setDeadline(calendar.getTime());
notice.setUnit(userDo.getUnit());
notice.setStatus(0);
noticeDao.save(notice);
String data = "";
if(notice.getType() == 2){
//如果是草稿
data = "[" +userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName()
+ "]新增关于[" + notice.getTitle() + "草稿";
}else {
//如果是发送,就新增接收
data = "[" +userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName()
+ "]给[" + userDo1.getUnit() + "][" + userDo1.getDepartment() + "]的[" + userDo1.getName()
+ "发送了关于[" + notice.getTitle() + "]的通知";
Notice notice1 = new Notice();
notice1.setType(0);
notice1.setTitle(notice.getTitle());
......@@ -53,19 +65,12 @@ public class NoticeServiceImpl implements NoticeService {
notice1.setUpdateTime(notice.getUpdateTime());
notice1.setUnit(notice.getUnit());
noticeDao.save(notice1);
System.out.println(notice.getSender() + notice.getAddressee());
String data = "[" +userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName()
+ "]给[" + userDo1.getUnit() + "][" + userDo1.getDepartment() + "]的[" + userDo1.getName()
+ "发送了关于[" + notice.getTitle() + "的通知";
String data1 = "[" +userDo1.getUnit() + "][" + userDo1.getDepartment() + "]的[" + userDo1.getName()
+ "]收到了来自[" + userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName()
+ "关于[" + notice.getTitle() + "的通知";
efsLogUtil.addLog(new EfsLog(null, userDo.getId(), data, new Date()));
efsLogUtil.addLog(new EfsLog(null, userDo1.getId(), data1, new Date()));
}
efsLogUtil.addLog(new EfsLog(null, userDo.getId(), data, new Date()));
return true;
}catch (Exception e){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论