java 自定义注解

函数功能
@OperationAnnotation(type = OperationType.CSUSP_CHECK_ADD, description = "撤控领导审核新增")
	public Map<String, String> saveCAudit(final AuditApprove info) throws Exception {

		Map<String, String> result = null;

		try {
			final VehSuspinfo suspInfo = suspinfoEditDao
					.getSuspinfoDetailForBkxh(info.getBkxh());
			if (suspInfo == null) {
				result = Common.messageBox("参数传输异常,未找到相应的对象!", "0");

			}

			Department dp = departmentDao.getDepartment(info.getCzrdw());
			if (dp == null) {

				result = Common.messageBox("参数传输异常,未找到相应的对象!", "0");
			} else {

				if (StringUtils.isBlank(dp.getSsjz()))
					return Common.messageBox("本部门缺少警种信息!", "0");
			}

			String T_JLZT = "1";
			String T_YWZT = null;
			
			if (info.getCzjg().equals("0")) {
				T_YWZT = "14";
				//撤控审核不通过,短信通知布控人
				//sendSmsToBkrByCancelAuditNoPass(info, suspInfo);
				new Thread(){
					@Override
					public void run() {
						sendSmsToBkrByCancelAuditNoPass(info, suspInfo);
					}
				}.start();
			} else if (info.getCzjg().equals("1")) {

				// 管控类审核通过后,流程结束
				if (suspInfo.getBkdl().equals("3")) {

					T_JLZT = "2";
					T_YWZT = "99";
				} else {
					T_YWZT = "42";
					//撤控审核通过,短信通知撤控审批人
					//sendSmsToCancelSuspApprovePeople(info, suspInfo);
					new Thread(){
						@Override
						public void run() {
							sendSmsToCancelSuspApprovePeople(info, suspInfo);
						}
					}.start();
				}
			}

			// 写入审核审批记录表
			info.setBzw("3");// 撤控审核
			this.insertAuditApprove(info);

			// 更新布控表jlzt字段
			this.updateSuspInfo(T_YWZT, T_JLZT, info.getBkxh());

			if (T_JLZT.equals("2") && "2".equals(suspInfo.getBkfwlx())) {

				Syspara syspara = sysparaDao.getSyspara("xzqh", "1", "");
				String xzqh = syspara.getCsz();

				// 未安装新系统地市按原传输机制传输
				String[] bkfws = suspInfo.getBkfw().split(",");
				for (String jsdw : bkfws) {
					CodeUrl url = urlDao.getUrl(jsdw);
					if (StringUtils.isNotBlank(url.getBz())
							&& "0".equals(url.getBz().substring(0, 1))) {
						this.insertTransSusp_test(xzqh, jsdw, info.getBkxh(),
								"13");
					}
				}

				// 联动管控类撤控审核通过(流程结束),写入传输表
				this.insertTransSusp(xzqh, suspInfo.getBkfw(), info.getBkxh(),
						"13");

			}

			// 更新日志表
			this.insertBusinessLog(suspInfo, info, dp.getSsjz(), "21");

			// 发送提醒审批短息
			List<Department> dpList = departmentDao.getHigherDepartmentList(dp
					.getGlbm());
			
		//	if(!suspInfo.getBkdl().equals("3")){
				
			
		//	}
		/*	for (Department department : dpList) {
				if (dp.getJb().equals("2")) {

					if (department.getJb().equals("2")
							&& StringUtils.isNotBlank(department.getLxdh1())) {
						smster.send(department.getLxdh1(), content);
					}
				} else {

					int jb = Integer.parseInt(department.getJb()) - 1;
					if (department.getJb().equals(String.valueOf(jb))
							&& StringUtils.isNotBlank(department.getLxdh1())) {
						smster.send(department.getLxdh1(), content);
					}

				}
			}*/

			result = Common.messageBox("保存成功!", "1");
		} catch (Exception e) {
			e.printStackTrace();
			result = Common.messageBox("程序异常!", "1");
		}

		return result;
	}
自定义注解
package com.sunshine.monitor.comm.log;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 日志操作注解,应用于方法
 * @author OUYANG 2013/7/18
 *
 */
@Documented
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME) 
public @interface OperationAnnotation {
	
	/**
	 * 操作类型
	 * @return
	 */
	public OperationType type();   
    
	/**
	 * 功能操作描述
	 * @return
	 */
	public String description() default "";
	
	
	/**
	 * 用户名
	 * @return
	 */
	public String user() default "";
	
	/**
	 * 部门
	 * @return
	 */
	public String department() default "";
}


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值