|
|
@@ -97,11 +97,15 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendKeyPwdNotice(KeyPwd keyPwd) {
|
|
|
+ public boolean sendKeyPwdNotice(KeyPwd keyPwd, boolean isEdit) {
|
|
|
//有關XXX(分類+種類+鎖匙/密碼)的交接登記已於X年X月X日完成;交出人﹕XXX;接收人﹕XXX
|
|
|
String categoryName = getCategoryName(keyPwd);
|
|
|
String now = DateUtil.formatDate(DateUtil.now());
|
|
|
- String title = "有關[" + categoryName + "]的交接登記已於" + now + "完成;交出人:" + keyPwd.getHandoverPersonName() + ";接收人:" + keyPwd.getReceiverName();
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += "有關[" + categoryName + "]的交接登記已於" + now + "完成;交出人:" + keyPwd.getHandoverPersonName() + ";接收人:" + keyPwd.getReceiverName();
|
|
|
User user1 = userService.getUserByEhr(keyPwd.getHandoverPersonNo());
|
|
|
User user2 = userService.getUserByEhr(keyPwd.getReceiverNo());
|
|
|
|
|
|
@@ -121,12 +125,16 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendCardSwallowNotice(CardSwallow cardSwallow) {
|
|
|
-
|
|
|
+ public boolean sendCardSwallowNotice(CardSwallow cardSwallow, boolean isEdit) {
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += "營運部已發佈新消息,請查閱";
|
|
|
Dept dept = deptService.getByOrgNo(cardSwallow.getSendOrgNo());
|
|
|
|
|
|
Notice notice = new Notice();
|
|
|
- notice.setTitle("營運部已發佈新消息,請查閱");
|
|
|
+ notice.setTitle(title);
|
|
|
notice.setBusinessType("cardswallow");
|
|
|
notice.setDeptId(dept.getId()+"");
|
|
|
notice.setRoleId(null);
|
|
|
@@ -134,12 +142,16 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendReturnsNotice(Returns returns) {
|
|
|
-
|
|
|
+ public boolean sendReturnsNotice(Returns returns, boolean isEdit) {
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += "營運部已發佈新消息,請查閱";
|
|
|
Dept dept = deptService.getByOrgNo(returns.getSubOrgNo());
|
|
|
|
|
|
Notice notice = new Notice();
|
|
|
- notice.setTitle("營運部已發佈新消息,請查閱");
|
|
|
+ notice.setTitle(title);
|
|
|
notice.setBusinessType("returns");
|
|
|
notice.setDeptId(dept.getId()+"");
|
|
|
notice.setRoleId(null);
|
|
|
@@ -147,9 +159,14 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendMessageNotice(Message message) {
|
|
|
+ public boolean sendMessageNotice(Message message, boolean isEdit) {
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += "營運部已發佈新消息,請查閱";
|
|
|
Notice notice = new Notice();
|
|
|
- notice.setTitle("營運部已發佈新消息,請查閱");
|
|
|
+ notice.setTitle(title);
|
|
|
notice.setBusinessType("message");
|
|
|
notice.setDeptId(message.getDeptId());
|
|
|
notice.setRoleId(message.getRoleId());
|
|
|
@@ -158,7 +175,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendSealNotice(SealHandover sealHandover) {
|
|
|
+ public boolean sendSealNotice(SealHandover sealHandover, boolean isEdit) {
|
|
|
//有關XXX(印章種類+印章編號)的交接登記已於X年X月X日完成;交出人﹕XXX;接收人﹕XXX
|
|
|
String seal_type = dictService.getValue("seal_type", sealHandover.getSealType());
|
|
|
String now = DateUtil.formatDate(DateUtil.now());
|
|
|
@@ -172,7 +189,11 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
userList.add(user2.getId());
|
|
|
}
|
|
|
|
|
|
- String title = "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記已於" + now + "完成;交出人:" + sealHandover.getHandoverPersonName() + ";接收人:" + sealHandover.getReceiverName();
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記已於" + now + "完成;交出人:" + sealHandover.getHandoverPersonName() + ";接收人:" + sealHandover.getReceiverName();
|
|
|
Notice notice = new Notice();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("sealhandover");
|
|
|
@@ -181,9 +202,13 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendPostChangeNotice(PostChange postChange) {
|
|
|
+ public boolean sendPostChangeNotice(PostChange postChange, boolean isEdit) {
|
|
|
Dept dept = deptService.getByOrgNo(postChange.getOrgNo());
|
|
|
- String title = dept.getDeptName() + "機構已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += dept.getDeptName() + "機構已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
|
|
|
|
|
|
Notice notice = new Notice();
|
|
|
notice.setTitle(title);
|
|
|
@@ -193,9 +218,13 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean sendGoodsUseNotice(GoodsUse goodsUse) {
|
|
|
+ public boolean sendGoodsUseNotice(GoodsUse goodsUse, boolean isEdit) {
|
|
|
//用戶1指派XXX請登入系統進行確認
|
|
|
- String title = goodsUse.getFillingName() + "指派" + goodsUse.getPersonName() + "請登入系統進行確認";
|
|
|
+ String title = "";
|
|
|
+ if (isEdit){
|
|
|
+ title = "更正:";
|
|
|
+ }
|
|
|
+ title += goodsUse.getFillingName() + "指派" + goodsUse.getPersonName() + "請登入系統進行確認";
|
|
|
|
|
|
Notice notice = new Notice();
|
|
|
notice.setTitle(title);
|