1、配置预置初始需要在配置表中插入一条记录,并初始下发服务接口;

2、配置修改action后需要审核流程,才可下发更新服务接口配置内容或配置状态。
This commit is contained in:
zhangwei
2018-10-16 15:28:27 +08:00
parent bc0b5cf850
commit 09181c6764
4 changed files with 234 additions and 201 deletions

View File

@@ -293,40 +293,40 @@ public class AvController extends BaseController {
} }
//修改标志样例配置审核状态 //修改标志样例配置审核状态
/** /**
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次 * 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
* @param isAudit * @param isAudit
* @param isValid * @param isValid
* @param ids * @param ids
* @param functionId * @param functionId
* @return * @return
*/ */
@RequestMapping(value = {"/sample/auditAvAudioSignSample"}) @RequestMapping(value = {"/sample/auditAvAudioSignSample"})
public String auditAvAudioSignSample(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes){ public String auditAvAudioSignSample(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes){
// avCfgService.auditAvSignSample(isAudit,isValid,ids); // avCfgService.auditAvSignSample(isAudit,isValid,ids);
AvSignSampleCfg entity = new AvSignSampleCfg(); AvSignSampleCfg entity = new AvSignSampleCfg();
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
for(String id :idArray){ for(String id :idArray){
entity = avCfgService.getAvSignSampleById(Long.parseLong(id)); entity = avCfgService.getAvSignSampleById(Long.parseLong(id));
entity.setIsAudit(isAudit); entity.setIsAudit(isAudit);
entity.setIsValid(isValid); entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId()); entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date()); entity.setAuditTime(new Date());
try { try {
avCfgService.audioAuditAvSignSample(entity,isAudit); avCfgService.audioAuditAvSignSample(entity,isAudit,false);
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
if(e instanceof MaatConvertException) { if(e instanceof MaatConvertException) {
logger.info("音视频标识样例配置下发失败:"+e.getMessage()); logger.info("音视频标识样例配置下发失败:"+e.getMessage());
addMessage(redirectAttributes,e.getMessage()); addMessage(redirectAttributes,e.getMessage());
}else { }else {
logger.error("auditAvAudioSignSample failed",e); logger.error("auditAvAudioSignSample failed",e);
addMessage(redirectAttributes,"audit_failed"); addMessage(redirectAttributes,"audit_failed");
}
} }
} }
return "redirect:" + adminPath +"/ntc/av/sample/audioSignSampleList?functionId="+functionId;
} }
return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+functionId;
}
//修改标志样例配置审核状态 //修改标志样例配置审核状态
/** /**
* 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次 * 审核配置下发,为了保证配置下发过程事务正确,一条配置提交一次
@@ -340,9 +340,11 @@ public class AvController extends BaseController {
public String auditAvSignSample(Integer preset,AvSignSampleCfgModel cfg,Integer functionId,RedirectAttributes redirectAttributes){ public String auditAvSignSample(Integer preset,AvSignSampleCfgModel cfg,Integer functionId,RedirectAttributes redirectAttributes){
//预置配置 //预置配置
try { try {
if(preset!=null&&1==preset){ if(preset!=null&&1==preset){//预置信息需要在数据库中插入一条记录
avCfgService.auditAvSignSample(); for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) {
addMessage(redirectAttributes,"audit_success"); avCfgService.saveOrUpdateAvSignSample(avSignSampleCfg);
}
addMessage(redirectAttributes,"save_success");
return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+functionId; return "redirect:" + adminPath +"/ntc/av/sample/signSampleList?functionId="+functionId;
} }
} catch (Exception e1) { } catch (Exception e1) {
@@ -352,15 +354,15 @@ public class AvController extends BaseController {
addMessage(redirectAttributes,"request_service_failed"); addMessage(redirectAttributes,"request_service_failed");
}else { }else {
logger.error("auditAvSignSample failed",e1); logger.error("auditAvSignSample failed",e1);
addMessage(redirectAttributes,"audit_failed"); addMessage(redirectAttributes,"save_failed");
} }
} }
//修改下发配置 //修改下发配置
if(cfg != null && cfg.getCfgs() != null ){ if(cfg != null && cfg.getCfgs() != null ){
for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) { for (AvSignSampleCfg avSignSampleCfg : cfg.getCfgs()) {
if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){ /*if(StringUtil.isEmpty(avSignSampleCfg.getIsValid())){
avSignSampleCfg.setIsValid(0); avSignSampleCfg.setIsValid(0);
} }*/
if(cfg.getAction()!=null){ if(cfg.getAction()!=null){
avSignSampleCfg.setAction(cfg.getAction()); avSignSampleCfg.setAction(cfg.getAction());
} }
@@ -368,7 +370,7 @@ public class AvController extends BaseController {
// if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){ // if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){
try { try {
avCfgService.auditAvSignSample(avSignSampleCfg); avCfgService.auditAvSignSample(avSignSampleCfg);
addMessage(redirectAttributes,"audit_success"); addMessage(redirectAttributes,"save_success");
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
if(e instanceof MaatConvertException) { if(e instanceof MaatConvertException) {
@@ -376,7 +378,7 @@ public class AvController extends BaseController {
addMessage(redirectAttributes,"request_service_failed"); addMessage(redirectAttributes,"request_service_failed");
}else { }else {
logger.error("auditAvSignSample failed",e); logger.error("auditAvSignSample failed",e);
addMessage(redirectAttributes,"audit_failed"); addMessage(redirectAttributes,"save_failed");
} }
} }
} }

View File

@@ -516,6 +516,9 @@
update av_sign_sample_cfg update av_sign_sample_cfg
<set> <set>
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="serviceId!=null"> <if test="serviceId!=null">
service_id=#{serviceId,jdbcType=INTEGER}, service_id=#{serviceId,jdbcType=INTEGER},
</if> </if>

View File

@@ -291,7 +291,7 @@ public class AvCfgService extends BaseService{
entity.setCreateTime(new Date()); entity.setCreateTime(new Date());
//调用服务接口获取compileId //调用服务接口获取compileId
Integer compileId = 0; Integer compileId = 0;
try { /*try {
List<Integer> compileIds = ConfigServiceUtil.getId(1,1); List<Integer> compileIds = ConfigServiceUtil.getId(1,1);
if(!StringUtil.isEmpty(compileIds)){ if(!StringUtil.isEmpty(compileIds)){
compileId = compileIds.get(0); compileId = compileIds.get(0);
@@ -300,13 +300,13 @@ public class AvCfgService extends BaseService{
e.printStackTrace(); e.printStackTrace();
logger.info("获取编译ID出错"); logger.info("获取编译ID出错");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage()); throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
} }*/
if(compileId!=0){ // if(compileId!=0){
entity.setCompileId(compileId); entity.setCompileId(compileId);
avCfgDao.insertAvSignSample(entity); avCfgDao.insertAvSignSample(entity);
}else{ /*}else{
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>"); throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
} }*/
}else{ }else{
entity.setEditorId(UserUtils.getUser().getId()); entity.setEditorId(UserUtils.getUser().getId());
@@ -318,7 +318,7 @@ public class AvCfgService extends BaseService{
//添加即时生效 //添加即时生效
entity.setIsValid(1); entity.setIsValid(1);
entity.setIsAudit(1); entity.setIsAudit(1);
audioAuditAvSignSample(entity,1); audioAuditAvSignSample(entity,1,true);
} }
public void updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids){ public void updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids){
String[] idArray = ids.split(","); String[] idArray = ids.split(",");
@@ -375,18 +375,28 @@ public class AvCfgService extends BaseService{
} }
} }
public void audioAuditAvSignSample(AvSignSampleCfg entity,Integer isAudit) throws MaatConvertException{ public void audioAuditAvSignSample(AvSignSampleCfg entity,Integer isAudit,boolean init) throws MaatConvertException{
entity.setAuditTime(new Date());
entity.setAuditorId(UserUtils.getUser().getId());
avCfgDao.auditAvSignSample(entity); avCfgDao.auditAvSignSample(entity);
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>(); List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
if(isAudit==1){ if(isAudit==1){
list.add(entity); if(init){//预置配置时初始下发配置
//调用服务接口下发配置数据 list.add(entity);
String json=gsonToJson(list); //调用服务接口下发配置数据
logger.info("文件样例下发配置参数:"+json); String json=gsonToJson(list);
//调用服务接口下发配置 logger.info("文件样例下发配置参数:"+json);
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json); //调用服务接口下发配置
logger.info("音视频标志样例配置下发响应信息:"+result.getMsg()); ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频标志样例配置下发响应信息:"+result.getMsg());
}else{
list.add(entity);
String json=gsonToJson(list);
logger.info("标志状态变更:"+json);
//调用服务接口修改配置内容
String result = ConfigServiceUtil.patch(json, 2);
logger.info("视频标志样状态变更响应信息:"+result);
}
}else if(isAudit==3){ }else if(isAudit==3){
AvSignSampleCfg cfg = new AvSignSampleCfg(); AvSignSampleCfg cfg = new AvSignSampleCfg();
cfg.setIsValid(0); cfg.setIsValid(0);
@@ -400,77 +410,56 @@ public class AvCfgService extends BaseService{
ToMaatResult result = ConfigServiceUtil.put(json, 2); ToMaatResult result = ConfigServiceUtil.put(json, 2);
logger.info("音视频标志样例配置取消配置响应信息:"+result.getMsg()); logger.info("音视频标志样例配置取消配置响应信息:"+result.getMsg());
} }
} }
//预置配置下发 //预置配置下发
@Transactional(readOnly=false,rollbackFor=RuntimeException.class) @Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void auditAvSignSample() throws MaatConvertException{ public void auditAvSignSample() throws MaatConvertException{
try { try {
AvSignSampleCfg entity = new AvSignSampleCfg(); AvSignSampleCfg entity = new AvSignSampleCfg();
List<AvSignSampleCfg> avSignSampleList = avCfgDao.getAvSignSampleList(entity); List<AvSignSampleCfg> avSignSampleList = avCfgDao.getAvSignSampleList(entity);
if(avSignSampleList!=null&&avSignSampleList.size()>0){ if(avSignSampleList!=null&&avSignSampleList.size()>0){
// avCfgDao.updateAvSignSampleValid(entity); // avCfgDao.updateAvSignSampleValid(entity);
// avCfgDao.auditAvSignSample(entity); // avCfgDao.auditAvSignSample(entity);
// List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>(); // List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
// avSignSampleList.add(entity); // avSignSampleList.add(entity);
for (AvSignSampleCfg av : avSignSampleList) { for (AvSignSampleCfg av : avSignSampleList) {
av.setAuditTime(new Date()); av.setAuditTime(new Date());
av.setAuditorId(UserUtils.getUser().getId()); av.setAuditorId(UserUtils.getUser().getId());
if(av.getIsValid()!=null&&av.getIsValid()!=1){ if(av.getIsValid()!=null&&av.getIsValid()!=1){
av.setIsValid(1); av.setIsValid(1);
}
avCfgDao.updateAvSignSampleValid(av);
} }
//调用服务接口取消配置 avCfgDao.updateAvSignSampleValid(av);
String json=gsonToJson(avSignSampleList);
logger.info("标志状态变更:"+json);
//调用服务接口取消配置
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频标志样状态变更响应信息:"+result.getMsg());
}else{
logger.info("视频场景预置失败,数据为空");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
} }
} catch (Exception e) { //调用服务接口取消配置
e.printStackTrace(); String json=gsonToJson(avSignSampleList);
logger.info("标志状态变更:"+json);
//调用服务接口取消配置
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频标志样状态变更响应信息:"+result.getMsg());
}else{
logger.info("视频场景预置失败,数据为空"); logger.info("视频场景预置失败,数据为空");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>"); throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
} }
} catch (Exception e) {
e.printStackTrace();
logger.info("视频场景预置失败,数据为空");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
} }
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void auditAvSignSample(AvSignSampleCfg entity) throws Exception{ }
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>(); @Transactional(readOnly=false,rollbackFor=RuntimeException.class)
entity.setAuditTime(new Date()); public void auditAvSignSample(AvSignSampleCfg entity) throws Exception{
entity.setDescription("0"); List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();
list.add(entity); entity.setEditTime(new Date());
try { entity.setDescription("0");
list.add(entity);
try {
avCfgDao.updateAvSignSampleValid(entity); avCfgDao.updateAvSignSampleValid(entity);
} catch (Exception e) {
// avCfgDao.auditAvSignSample(entity); e.printStackTrace();
//更新配置
if(entity.getIsValid()!=null&&entity.getIsValid()==Constants.VALID_YES){
//调用服务接口取消配置
String json=gsonToJson(list);
logger.info("标志状态变更:"+json);
//调用服务接口取消配置
String result = ConfigServiceUtil.patch(json, 2);
logger.info("视频标志样状态变更响应信息:"+result);
}
if(entity.getIsValid()!=null&&entity.getIsValid()==Constants.VALID_NO){
//调用服务接口取消配置
String json=gsonToJson(list);
logger.info("标志状态变更:"+json);
//调用服务接口取消配置
ToMaatResult result = ConfigServiceUtil.put(json, 2);
logger.info("视频标志样状态变更响应信息:"+result.getMsg());
}
} catch (Exception e) {
e.printStackTrace();
}
} }
}
/*public void auditAvSignSample(AvSignSampleCfg entity,Integer isAudit) throws MaatConvertException{ /*public void auditAvSignSample(AvSignSampleCfg entity,Integer isAudit) throws MaatConvertException{
avCfgDao.auditAvSignSample(entity); avCfgDao.auditAvSignSample(entity);
List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>(); List<AvSignSampleCfg> list = new ArrayList<AvSignSampleCfg>();

View File

@@ -60,10 +60,9 @@ $(function(){
</script> </script>
</head> </head>
<body> <body>
<div class="page-content"> <div class="page-content">
<h3 class="page-title"> <h3 class="page-title">
<spring:message code="av_sample_video_porn_control"></spring:message> <spring:message code="av_sample_video_porn_control"></spring:message>
</h3> </h3>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@@ -73,108 +72,148 @@ $(function(){
<i class="fa fa-gift"></i> <i class="fa fa-gift"></i>
</div> </div>
</div> </div>
<div class="portlet-body form "> <div class="portlet-body form">
<sys:message content="${message}" /> <sys:message content="${message}" />
<!-- BEGIN FORM--> <shiro:hasPermission name="avSignSample:preset">
<div class="col-md-2"> <form id="presetFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="get" class="form-horizontal">
<form id="presetFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="get" class="form-horizontal">
<input type="hidden" name="functionId" value="${functionId }"> <input type="hidden" name="functionId" value="${functionId }">
<input type="hidden" name="cfgs[0].functionId" value="${functionId }">
<input type="hidden" name="cfgs[0].isValid" value="1">
<input type="hidden" name="cfgs[0].isAudit" value="1">
<input type="hidden" name="cfgs[0].isAreaEffective" value="0">
<input type="hidden" name="cfgs[0].description" value="0">
<input type="hidden" name="cfgs[0].level" value="0">
<input type="hidden" name="preset" value="1"> <input type="hidden" name="preset" value="1">
<div class="form-actions" style="background-color: #FFFFFF"> <c:if test="${fn:length(serviceList)>0 and fn:length(cfgs)eq 0}">
<div class="row"> <input type="hidden" name="cfgs[0].serviceId" value="${serviceList[0].serviceId}">
<div class="col-md-8"> <input type="hidden" name="cfgs[0].action" value="${serviceList[0].action}">
<div class="row"> <div class="form-body">
<div class="col-md-offset-8 col-md-8"> <!-- BEGIN FORM-->
<button id="preset" type="submit" class="btn-danger"><spring:message code="preset"/></button> <div class="row">
</div> <div class="col-md-6">
</div> <div class="form-group">
</div> <div class="" style="background-color: #FFFFFF">
</div> <div class="row">
</div> <div class="col-md-8">
</form> <div class="row">
</div> <div class="col-md-offset-8 col-md-8">
<button id="preset" type="submit" class="btn-danger"><spring:message code="preset"/></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</c:if>
</form>
</shiro:hasPermission>
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="post" class="form-horizontal"> <form id="cfgFrom" action="${ctx}/ntc/av/sample/auditAvSignSample" method="post" class="form-horizontal">
<input type="hidden" name="functionId" value="${functionId }"> <input type="hidden" name="functionId" value="${functionId}">
<div class="form-body"> <div class="form-body">
<div class="row"> <table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap hidden">
<c:forEach items="${cfgs}" var="_cfg" <tbody>
varStatus="status"> <c:choose>
<div class="col-md-6"> <c:when test="${fn:length(cfgs)>0 }">
<div class="form-group"> <c:forEach items="${cfgs}" var="_cfg" varStatus="status">
<%-- <label class="control-label col-md-3"> <input type="hidden" name="cfgs[${status.index }].cfgId" value="${_cfg.cfgId }">
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq _cfg.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</label> --%>
<input type="hidden" name="cfgs[${status.index }].cfgId" value="${_cfg.cfgId }">
<input type="hidden" id="serviceId" name="cfgs[${status.index }].serviceId" value="${_cfg.serviceId }"> <input type="hidden" id="serviceId" name="cfgs[${status.index }].serviceId" value="${_cfg.serviceId }">
<input type="hidden" name="cfgs[${status.index }].compileId" value="${_cfg.compileId}"> <input type="hidden" name="cfgs[${status.index }].compileId" value="${_cfg.compileId}">
<input type="hidden" name="cfgs[${status.index }].isValidOld" value="${_cfg.isValid}"> <input type="hidden" name="cfgs[${status.index }].isValidOld" value="${_cfg.isValid}">
<input type="hidden" id="oldAction" name="cfgs[${status.index }].actionOld" value="${_cfg.action}"> <input type="hidden" id="oldAction" name="cfgs[${status.index }].actionOld" value="${_cfg.action}">
<input type="hidden" id="isValid" name="cfgs[${status.index }].isValid" value="${_cfg.isValid}"> <input type="hidden" id="isValid" name="cfgs[${status.index }].isValid" value="1">
<%-- <div class="col-md-6"> <input type="hidden" id="isAudit" name="cfgs[${status.index }].isAudit" value="0">
<div class="bootstrap-switch"> <div class="row">
<input type="checkbox" data-on="danger" <div class="col-md-6">
data-off="primary" <div class="form-group">
data-on-label="<spring:message code="on"/>" <label class="control-label col-md-3"><spring:message code="is_audit"/></label>
data-off-label="<spring:message code="off"/>" <div class="col-md-6" style="margin-top:8px">
name="cfgs[${status.index }].isValid" <c:choose>
value="${_cfg.isValid }" <c:when test="${_cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:if test="${_cfg.isValid eq 1}"> <c:when test="${_cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
checked <c:when test="${_cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
</c:if> <c:when test="${_cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
/> </c:choose>
</div> </div>
</div> --%> </div>
<div class="col-md-6"> </div>
<c:forEach items="${serviceList}" var="service" </div>
varStatus="satus"> <div class="row">
<label class=""> <div class="col-md-6">
<c:if test="${_cfg.functionId eq service.functionId}"> <div class="form-group">
<input id="actionOn" type="radio" name="action" <label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
serviceId="${service.serviceId }" <div class="col-md-6">
isValid="${_cfg.isValid}" <c:forEach items="${serviceList}" var="service"
value="${service.action }" class="required action radio-inline radio-on" varStatus="satus">
<c:if test="${(_cfg.action==service.action || (_cfg.action==null && satus.index==0))&&_cfg.isValid!=0}">checked</c:if>> <label class="radio-inline"> <c:if
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> test="${_cfg.functionId eq service.functionId}">
<c:if test="${dict.itemCode eq service.action }"> <input type="radio" name="action"
<spring:message code="${dict.itemValue }"/> serviceId="${service.serviceId }"
protocolId="${service.protocolId }"
value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</c:if> </c:if>
</c:forEach> </label>
</c:if> </c:forEach>
</label> </div>
</c:forEach> <div for="action"></div>
<input id="actionOff" serviceId="${_cfg.serviceId }" </div>
isValid="${_cfg.isValid}" </div>
type="radio" name="action" class="radio-inline action radio-off" value="${_cfg.action }" <c:if test="${_cfg.isValid == 0}">checked</c:if>> <spring:message code="off"/> </div>
</div> <div class="row">
<div for="action"></div> <div class="col-md-6">
<div class="form-group ">
<div class="col-md-6"> <div id="level" class="form-group" hidden="hidden">
<div id="level" class="form-group" hidden="hidden"> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="harm_level"/></label>
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="harm_level"/></label> <div class="col-md-6">
<div class="col-md-6"> <input class="form-control required number" range="[0,100]" type="text" name="cfgs[${status.index }].level" value="${_cfg.level }">
<input class="form-control required number" range="[0,100]" type="text" name="cfgs[${status.index }].level" value="${_cfg.level }"> </div>
</div> </div>
</div> <div for="cfgs[${status.index }].level"></div>
<div for="cfgs[${status.index }].level"></div> </div>
</div> </div>
</div>
</div> <tr>
</div> <td><input type="checkbox" checked="true" class="i-checks" id="${_cfg.cfgId}" value="${_cfg.isAudit}"></td>
</c:forEach> </tr>
</div> </c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tbody></table>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="row"> <div class="row">
<div class="col-md-offset-3 col-md-8"> <div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button> <shiro:hasPermission name="avSignSample:config">
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button> <button id="save" type="submit" class="btn green"><spring:message code="edit"/></button>
</shiro:hasPermission>
<shiro:hasPermission name="avSignSample:confirm">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right">
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=1&isValid=1&functionId=${functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=2&isValid=0&functionId=${functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/ntc/av/sample/auditAvAudioSignSample?isAudit=3&isValid=0&functionId=${functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div>
</shiro:hasPermission>
<%-- <button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button> --%>
</div> </div>
</div> </div>
</div> </div>