一公司新动火消息通知
							parent
							
								
									e127913c6a
								
							
						
					
					
						commit
						6c6c1c77b3
					
				|  | @ -9,6 +9,7 @@ import com.zcloud.dto.TenCorpDto; | |||
| import com.zcloud.entity.Page; | ||||
| import com.zcloud.entity.PageData; | ||||
| import com.zcloud.logs.LogAnno; | ||||
| import com.zcloud.service.bus.NoticeCorpService; | ||||
| import com.zcloud.service.highriskwork.*; | ||||
| import com.zcloud.util.*; | ||||
| import com.zcloud.util.mq.MqSendUtil; | ||||
|  | @ -50,6 +51,9 @@ public class AppHotworkCfdController extends BaseController { | |||
| 	private SendMessageUtil sendMessageUtil; | ||||
| 	@Resource | ||||
| 	private MqSendUtil mqSendUtil; | ||||
| 	@Autowired | ||||
| 	private NoticeCorpService noticeCorpService; | ||||
| 
 | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 获取编码 | ||||
|  | @ -184,10 +188,264 @@ public class AppHotworkCfdController extends BaseController { | |||
| 			} | ||||
| 			System.out.println("amazing:!!!!!" + JSONObject.toJSONString(response)); | ||||
| 		} | ||||
| 		this.sendNotice(pd); | ||||
| 		map.put("result", errInfo); | ||||
| 		return map; | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 发送通知公告 | ||||
| 	 * @param pageData | ||||
| 	 */ | ||||
| 	public void sendNotice(PageData pageData) { | ||||
| 		try{ | ||||
| 			PageData hotworkCfd = hotworkCfdService.findById(pageData); | ||||
| 			String hotworkCfdState = hotworkCfd.getString("APPLY_STATUS"); //状态
 | ||||
| 			if(hotworkCfd != null){ | ||||
| 				if(hotworkCfdState.equals("1")){  //作业负责人待审核
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待确认");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("CONFIRM_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "作业负责人意见"); | ||||
| 					content.put("params3", "审核");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 					//动火监护人发站内信
 | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待签字");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("GUARDIAN_USER_ID"));	// 接收人员ID
 | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "监护人签字"); | ||||
| 					content.put("params3", "签字");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 					//动火安全交底人发站内信
 | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待签字");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("CONFESS_USER_ID"));	// 接收人员ID
 | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "安全交底人签字"); | ||||
| 					content.put("params3", "签字");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 					//动火接收交底人发站内信
 | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待签字");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("ACCEPT_CONFESS_USER_ID"));	// 接收人员ID
 | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "接受交底人签字"); | ||||
| 					content.put("params3", "签字");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 					//动火气体分析发站内信
 | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待进行气体检测");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("ANALYZE_USER_ID"));	// 接收人员ID
 | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "气体分析"); | ||||
| 					content.put("params3", "分析");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} else if(hotworkCfdState.equals("2")){  //所在单位待审核
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待审核");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("LEADER_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "所在单位意见"); | ||||
| 					content.put("params3", "审核");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} else if(hotworkCfdState.equals("4")){  //安全管理部门待审核
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待审核");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("AUDIT_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "安全管理部门意见"); | ||||
| 					content.put("params3", "审核");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} else if(hotworkCfdState.equals("5")){  //动火审批人待审核
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待审核");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("APPROVE_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "动火审批人意见"); | ||||
| 					content.put("params3", "审核");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} else if(hotworkCfdState.equals("6")){ //班长待验票
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待验票");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("MONITOR_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "班长验票"); | ||||
| 					content.put("params3", "验收");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} else if(hotworkCfdState.equals("7")){ //待验收
 | ||||
| 					PageData mes = new PageData(); | ||||
| 					mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 					mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 					mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 					mes.put("SYNOPSIS", "友情提示:有一条动火作业待验收");	// 站内信标题
 | ||||
| 					mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 					mes.put("RECEIVER_ID", hotworkCfd.get("ACCEPT_USER_ID"));	// 接收人员ID
 | ||||
| 					PageData content = new PageData(); | ||||
| 					content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 					content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 					content.put("params2", "完工验收"); | ||||
| 					content.put("params3", "验收");// 作业操作
 | ||||
| 					mes.put("CONTENT", content);// 站内信内容
 | ||||
| 					noticeCorpService.sendNotice(mes); | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
| 			if(hotworkCfdState.equals("-2")){ //作业负责人审核打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} else if(hotworkCfdState.equals("-4")){ //所在单位审核打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} else if(hotworkCfdState.equals("-5")){ //安全管理部门审核打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} else if(hotworkCfdState.equals("-6")){ //动火审批人审核打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} else if (hotworkCfdState.equals("-7")) {//班长验票打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} else if (hotworkCfdState.equals("-8")) {//验收打回
 | ||||
| 				PageData mes = new PageData(); | ||||
| 				mes.put("BIANMA","PROCESS_WORK_001"); | ||||
| 				mes.put("SENDER_ID", "系统管理员");	// 发送人员ID
 | ||||
| 				mes.put("SENDER_NAME", "1");	// 发送人员姓名
 | ||||
| 				mes.put("SYNOPSIS", "友情提示:有一条动火作业打回待处理");	// 站内信标题
 | ||||
| 				mes.put("CORPINFO_ID", hotworkCfd.get("CORPINFO_ID"));// 企业id
 | ||||
| 				mes.put("RECEIVER_ID", hotworkCfd.getString("CREATOR"));	// 接收人员ID
 | ||||
| 				PageData content = new PageData(); | ||||
| 				content.put("number", hotworkCfd.getString("CHECK_NO"));// 作业编号
 | ||||
| 				content.put("params1", "动火申请作业");	// 作业名称
 | ||||
| 				content.put("params2", "动火申请管理"); | ||||
| 				content.put("params3", "处理");// 作业操作
 | ||||
| 				mes.put("CONTENT", content);// 站内信内容
 | ||||
| 				noticeCorpService.sendNotice(mes); | ||||
| 			} | ||||
| 		}catch (Exception e){ | ||||
| //			FHLOG.save("动火审批", "发送站内信失败!");
 | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 删除 | ||||
| 	 * | ||||
|  | @ -1189,7 +1447,7 @@ public class AppHotworkCfdController extends BaseController { | |||
| 				break; | ||||
| 		} | ||||
| 		hotworkLogCfdService.save(log); | ||||
| 
 | ||||
| 		this.sendNotice(pd); | ||||
| 		map.put("result", errInfo); | ||||
| 		return map; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue