函数功能
@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 "";
}