fangq 4 жил өмнө
parent
commit
ffec82c206

+ 9 - 0
src/main/java/org/springblade/bank/keypwd/service/impl/KeyPwdServiceImpl.java

@@ -30,6 +30,7 @@ import org.springblade.core.datascope.annotation.DataAuth;
 import org.springblade.core.datascope.enums.DataScopeEnum;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.modules.desk.service.INoticeService;
 import org.springblade.modules.system.entity.Dept;
 import org.springblade.modules.system.entity.User;
@@ -104,6 +105,7 @@ public class KeyPwdServiceImpl extends BaseServiceImpl<KeyPwdMapper, KeyPwd> imp
 			keep.setProcess(3);
 			keep.setIsTurnIn(1);
 			keep.setStatus(1);
+			keep.setRemark(keyPwd.getRemark());
 			keep.setBankNo(keyPwd.getBankNo());
 			keep.setOrgNo(keyPwd.getOrgNo());
 			keep.setOrgName(keyPwd.getOrgName());
@@ -111,6 +113,13 @@ public class KeyPwdServiceImpl extends BaseServiceImpl<KeyPwdMapper, KeyPwd> imp
 			keep.setHandoverPersonId(keyPwd.getHandoverPersonId());
 			keep.setHandoverPersonNo(keyPwd.getHandoverPersonNo());
 			keep.setHandoverPersonName(keyPwd.getHandoverPersonName());
+			keep.setFillingPerson(keyPwd.getHandoverPersonNo());
+			keep.setFillingDate(DateUtil.now());
+			keep.setCreateUser(keyPwd.getCreateUser());
+			keep.setCreateTime(keyPwd.getCreateTime());
+			keep.setCreateDept(keyPwd.getCreateDept());
+
+
 			keep.setRemark(keyPwd.getRemark());
 			updateList.add(keep);
 //			this.updateById(keep);

+ 5 - 2
src/main/java/org/springblade/bank/postchange/controller/PostChangeController.java

@@ -201,12 +201,12 @@ public class PostChangeController extends BladeController {
 				userLog.setOperationType("add");
 
 				//發送通知
-				noticeService.sendPostChangeNotice(postChange, false);
+				noticeService.sendPostChangeNotice(postChange, false, false);
 			}else{
 				userLog.setOperationType("edit");
 				userLog.setOldData(JSONUtil.toJsonStr(old));
 				//發送通知
-				noticeService.sendPostChangeNotice(postChange, true);
+				noticeService.sendPostChangeNotice(postChange, true, false);
 			}
 			userLogService.save(userLog);
 		}
@@ -343,6 +343,9 @@ public class PostChangeController extends BladeController {
 			userLog.setPersonName(user.getName());
 			userLog.setOperationType("approve");
 			userLogService.save(userLog);
+
+			//發送通知
+			noticeService.sendPostChangeNotice(postchange, false, true);
 		}
 
 		return R.status(true);

+ 10 - 0
src/main/java/org/springblade/bank/sealhandover/controller/SealHandoverController.java

@@ -286,6 +286,16 @@ public class SealHandoverController extends BladeController {
 				keep.setReceiverNo(sealHandover.getReceiverNo());
 				keep.setReceiverName(sealHandover.getReceiverName());
 				keep.setCreateDept(sealHandover.getCreateDept());
+
+				keep.setHandoverDate(sealHandover.getHandoverDate());
+				keep.setHandoverPersonId(sealHandover.getHandoverPersonId());
+				keep.setHandoverPersonNo(sealHandover.getHandoverPersonNo());
+				keep.setHandoverPersonName(sealHandover.getHandoverPersonName());
+				keep.setRemark(sealHandover.getRemark());
+				keep.setFillingPerson(sealHandover.getHandoverPersonNo());
+				keep.setFillingDate(sealHandover.getFillingDate());
+				keep.setCreateUser(sealHandover.getCreateUser());
+				keep.setCreateTime(sealHandover.getCreateTime());
 			}
 
 			if (sealHandover.getIsTurnIn().equals(1) && keepId != null){

+ 1 - 1
src/main/java/org/springblade/modules/desk/service/INoticeService.java

@@ -62,7 +62,7 @@ public interface INoticeService extends BaseService<Notice> {
 
 	boolean sendSealNotice(SealHandover sealHandover, boolean isEdit, boolean isComplete);
 
-	boolean sendPostChangeNotice(PostChange postChange, boolean isEdit);
+	boolean sendPostChangeNotice(PostChange postChange, boolean isEdit, boolean isComplete);
 
 	boolean sendGoodsUseNotice(GoodsUse goodsUse, boolean isEdit);
 

+ 54 - 27
src/main/java/org/springblade/modules/desk/service/impl/NoticeServiceImpl.java

@@ -121,20 +121,32 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 	@Override
 	public boolean sendKeyPwdNotice(KeyPwd keyPwd, boolean isEdit, boolean isComplete) {
 		//有關XXX(分類+種類+鎖匙/密碼)的交接登記已於X年X月X日完成;交出人﹕XXX;接收人﹕XXX
+		// ORM-通知
+		//【網點鎖匙/密碼/實物交接登記表】
+		//分行用戶提交了有關(分類種類)的交接登記,請登入系統進行確認。
 		String categoryName = getCategoryName(keyPwd);
 		String now = DateUtil.formatDate(DateUtil.now());
-		String title = "";
+		String title = "ORM-通知【網點鎖匙/密碼/實物交接登記表】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
-		String HandoverName = keyPwd.getHandoverPersonName() != null ? keyPwd.getHandoverPersonName() : "上級單位";
-		String ReceiverName = keyPwd.getReceiverName() != null ? keyPwd.getReceiverName() : "上級單位";
+		Dept dept = deptService.getById(AuthUtil.getDeptId());
+		String HandoverName = (StringUtil.isBlank(keyPwd.getHandoverPersonName()) && dept.getDeptCategory().equals(1)) ? "分行用戶" : keyPwd.getHandoverPersonName();
+		String ReceiverName = (StringUtil.isBlank(keyPwd.getReceiverName()) && dept.getDeptCategory().equals(1)) ? "分行用戶" : keyPwd.getReceiverName();
 
-		if (isComplete){
-			title += "有關(" + categoryName + ")的交接登記已於" + now + "完成;交出人:" + HandoverName + ";接收人:" + ReceiverName;
+		if (!isComplete){
+			title += HandoverName + "提交了" + "有關 (" + categoryName + ") 的交接登記" + ",請登入系統進行確認。";
 		}else{
-			title += HandoverName + "提交了" + "有關 (" + categoryName + ") 的交接登記" + ",請登入系統進行確認";
+			if (keyPwd.getIsTurnIn().equals(0)){
+				//非上繳
+				title += "有關(" + categoryName + ")的交接登記,已於" + now + "完成;交出人:" + HandoverName + ";接收人:" + ReceiverName + "。";
+			}
+			if (keyPwd.getIsTurnIn().equals(1)) {
+				// 上繳
+				title += "有關(" + categoryName + ")的交接登記,已於" + now + "完成上繳。";
+			}
 		}
+
 		User user1 = userService.getUserByEhr(keyPwd.getHandoverPersonNo());
 		User user2 = userService.getUserByEhr(keyPwd.getReceiverNo());
 
@@ -160,9 +172,9 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 
 	@Override
 	public boolean sendCardSwallowNotice(CardSwallow cardSwallow, boolean isEdit) {
-		String title = "";
+		String title = "ORM-通知【自助設備吞卡資料】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
 		title += "營運部已發佈新消息,請查閱";
 		Dept dept = deptService.getByOrgNo(cardSwallow.getSendOrgNo());
@@ -177,9 +189,9 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 
 	@Override
 	public boolean sendReturnsNotice(Returns returns, boolean isEdit) {
-		String title = "";
+		String title = "ORM-通知【新開戶退件登記表】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
 		title += "營運部已發佈新消息,請查閱";
 		Dept dept = deptService.getByOrgNo(returns.getSubOrgNo());
@@ -194,9 +206,9 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 
 	@Override
 	public boolean sendMessageNotice(Message message, boolean isEdit) {
-		String title = "";
+		String title = "ORM-通知【信息發佈】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
 		title += "營運部已發佈新消息,請查閱";
 		Notice notice = new Notice();
@@ -236,16 +248,26 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 			userList.add(user2.getId());
 			userEhrList.add(user2.getEhr());
 		}
-
-		String title = "";
+		String title = "ORM-通知【業務印章交接登記表】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
-		if (isComplete){
-			title += "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記已於" + now + "完成;交出人:" + sealHandover.getHandoverPersonName() + ";接收人:" + sealHandover.getReceiverName();
+		Dept dept = deptService.getById(AuthUtil.getDeptId());
+		String HandoverName = (StringUtil.isBlank(sealHandover.getHandoverPersonName()) && dept.getDeptCategory().equals(1)) ? "分行用戶" : sealHandover.getHandoverPersonName();
+		String ReceiverName = (StringUtil.isBlank(sealHandover.getReceiverName()) && dept.getDeptCategory().equals(1)) ? "分行用戶" : sealHandover.getReceiverName();
+
+		if (!isComplete){
+			if (sealHandover.getIsTurnIn().equals(0)){
+				title += HandoverName + "提交了" + "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記" + ",請登入系統進行確認。";
+			}
 		}else{
-			title += sealHandover.getHandoverPersonName() + "提交了" + "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記" + ",請登入系統進行確認";
+			if (sealHandover.getIsTurnIn().equals(0)){
+				title += "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記已於" + now + "完成;交出人:" + HandoverName + ";接收人:" + ReceiverName + "。";
+			}else{
+				title += "有關 (" + seal_type + sealHandover.getSealNo() + ") 的交接登記已於" + now + "完成上繳;交出人:" + HandoverName + ";接收人:" + ReceiverName + "。";
+			}
 		}
+
 		Notice notice = new Notice();
 		notice.setTitle(title);
 		notice.setBusinessType("sealhandover");
@@ -255,13 +277,18 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 	}
 
 	@Override
-	public boolean sendPostChangeNotice(PostChange postChange, boolean isEdit) {
+	public boolean sendPostChangeNotice(PostChange postChange, boolean isEdit, boolean isComplete) {
 		Dept dept = deptService.getByOrgNo(postChange.getOrgNo());
-		String title = "";
+		String title = "ORM-通知【網點出納主管及專管員崗位變更記錄表】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
+		}
+		if (isComplete){
+			title += dept.getDeptName() + "機構已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
+		}else{
+			User user = userService.getById(postChange.getCreateUser());
+			title += user.getName() + "已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
 		}
-		title += dept.getDeptName() + "機構已提交網點出納主管及專管員崗位變更記錄表,請登陸系統查詢";
 
 		Notice notice = new Notice();
 		notice.setTitle(title);
@@ -277,11 +304,11 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 	@Override
 	public boolean sendGoodsUseNotice(GoodsUse goodsUse, boolean isEdit) {
 		//用戶1指派XXX請登入系統進行確認
-		String title = "";
+		String title = "ORM-通知【使用及出入庫登記表】";
 		if (isEdit){
-			title = "更正:";
+			title += "更正:";
 		}
-		title += goodsUse.getFillingName() + "提交了使用及出入庫登記表,請登入系統進行確認";
+		title += goodsUse.getFillingName() + "提交了使用及出入庫登記表,請登入系統進行確認";
 
 		Notice notice = new Notice();
 		notice.setTitle(title);
@@ -319,7 +346,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
 			checkType = "每週";
 		}
 
-		String title = dept.getDeptName() + "尚未完成" + checkType + "核對工作";
+		String title = "ORM-通知【核對記錄表】" + dept.getDeptName() + "尚未完成" + checkType + "核對工作";
 		Notice notice = new Notice();
 		notice.setTitle(title);
 		notice.setBusinessType("checklist");