IP地址取消来函增加取消来函信息添加,展示
This commit is contained in:
@@ -139,6 +139,10 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
* 来函id
|
||||
*/
|
||||
protected Integer requestId;
|
||||
/**
|
||||
* 取消审核来函id
|
||||
*/
|
||||
protected Integer cancelRequestId;
|
||||
/**
|
||||
* 来函
|
||||
*/
|
||||
@@ -884,5 +888,11 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
public void setUserRegion5(String userRegion5) {
|
||||
this.userRegion5 = userRegion5;
|
||||
}
|
||||
public Integer getCancelRequestId() {
|
||||
return cancelRequestId;
|
||||
}
|
||||
public void setCancelRequestId(Integer cancelRequestId) {
|
||||
this.cancelRequestId = cancelRequestId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
*/
|
||||
private static final long serialVersionUID = 2796500715438264119L;
|
||||
private static final String tableName="cfg_index_info";
|
||||
private String indexTable="cfg_index_info";
|
||||
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
|
||||
private List<AsnIpCfg> asnIpCfgs;//Add表单使用
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
@@ -308,4 +309,11 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.nis.web.controller.basics;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -15,7 +17,9 @@ import org.apache.zookeeper.ZooDefs.Ids;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
@@ -24,6 +28,8 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigDictUtils;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.StringUtil;
|
||||
@@ -46,6 +52,63 @@ public class ServiceDictInfoController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value="requestSelectInfo")
|
||||
public String requestSelectInfo(Model model){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
return "/basics/requestSelectInfo";
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping(value="requestCancleInfoAjax", method = RequestMethod.POST)
|
||||
public String requestCancleInfoAjax(Integer cancelRequestId,String ids,String indexTable){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
try {
|
||||
serviceDictInfoService.auditCancleRequestInfo(cancelRequestId,indexTable,id);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("审核添加取消来函信息失败",e);
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
/**
|
||||
*
|
||||
* 根据id获取取消审核时的来函号信息
|
||||
* @param ids
|
||||
* @param indexTable
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value="requestCancleInfoNumber")
|
||||
public Map requestCancleInfoNumber(String ids,String indexTable){
|
||||
List list = new ArrayList();
|
||||
String requestTitle="";
|
||||
Map map=new HashMap();
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
// for(String id :idArray){
|
||||
try {
|
||||
Integer cancelRequestId= serviceDictInfoService.requestCancleInfoNumber(indexTable.trim(),Long.parseLong(ids));
|
||||
if(cancelRequestId!=null) {
|
||||
requestTitle = requestInfoService.getRequestTitleById(cancelRequestId.longValue());
|
||||
if(StringUtils.isBlank(requestTitle)) {
|
||||
return map;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("查询取消审核来函信息失败",e);
|
||||
return map;
|
||||
}
|
||||
// }
|
||||
}
|
||||
map.put("requestTitle", requestTitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(无条件分页查询)
|
||||
|
||||
@@ -76,6 +76,9 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
List<ServiceDictInfo> findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid,@Param("isLeaf")Integer isLeaf);
|
||||
List<ServiceDictInfo> findAllItemDictByItemType(@Param("itemType")int itemType,@Param("isLeaf")Integer isLeaf);
|
||||
|
||||
void auditCancleRequestInfo(@Param("cancelRequestId")Integer cancelRequestId, @Param("indexTable")String indexTable,@Param("id") String id);
|
||||
Integer requestCancleInfoNumber(@Param("indexTable")String indexTable,@Param("id")Long id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -307,8 +307,11 @@
|
||||
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="auditCancleRequestInfo">
|
||||
UPDATE ${indexTable} SET cancel_request_id = #{cancelRequestId} WHERE cfg_id = #{id}
|
||||
</update>
|
||||
<select id="requestCancleInfoNumber" resultType="Integer">
|
||||
select cancel_request_id cancelRequestId from ${indexTable} where cfg_id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -25,5 +25,7 @@ public interface RequestInfoDao extends CrudDao {
|
||||
|
||||
void delete(@Param("id") Long id);
|
||||
|
||||
String getRequestTitleById(@Param("id")Long id);
|
||||
|
||||
|
||||
}
|
||||
@@ -217,4 +217,8 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from request_info
|
||||
</select>
|
||||
|
||||
<select id="getRequestTitleById" resultType="string">
|
||||
select request_title requestTitle from request_info where id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -302,6 +302,23 @@ public class ServiceDictInfoService extends BaseService{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 取消审核的时候增加取消来函
|
||||
* @param cancelRequestId
|
||||
* @param indexTable
|
||||
* @param id
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditCancleRequestInfo(Integer cancelRequestId, String indexTable, String id) {
|
||||
serviceDictInfoDao.auditCancleRequestInfo(cancelRequestId, indexTable, id);
|
||||
}
|
||||
public Integer requestCancleInfoNumber(String indexTable, Long id) {
|
||||
Integer cancleRequestId = serviceDictInfoDao.requestCancleInfoNumber( indexTable, id);
|
||||
return cancleRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -118,4 +118,9 @@ public class RequestInfoService extends BaseService{
|
||||
public List<TaskInfo> showTask(TaskInfo taskInfo) {
|
||||
return taskInfoDao.findList(taskInfo);
|
||||
}
|
||||
|
||||
public String getRequestTitleById(Long id) {
|
||||
return requestInfoDao.getRequestTitleById(id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,8 +1223,8 @@ area_group_manage=Grouping Area Manage
|
||||
stream_media_protocol=Stream Media Protocol
|
||||
new_link=New Link
|
||||
active_link=Active Link
|
||||
traffic_ipactive_hour_trend=Active IPTOP10 Trend In Nearly One Hour
|
||||
traffic_ipactive_hour_max=Active IPTOP10 Maximum In Nearly One Hour
|
||||
traffic_ipactive_hour_trend=Active IP TOP10 Trend In Nearly One Hour
|
||||
traffic_ipactive_hour_max=Active IP TOP10 Maximum In Nearly One Hour
|
||||
ip_addr=IP
|
||||
area_id=Area
|
||||
link_num=Link Number
|
||||
@@ -1273,3 +1273,4 @@ ipv4_subnet=IPv4/Subnet Mask
|
||||
ipv6_range=IPv6 Range
|
||||
ipv6_subnet=IPv6/Subnet Mask
|
||||
example=For Example
|
||||
letter_cancel_info=Cancel Letter Info
|
||||
@@ -1224,8 +1224,8 @@ area_group_manage=Group Area Manage
|
||||
stream_media_protocol=Stream Media Protocol
|
||||
new_link=New Link
|
||||
active_link=Active Link
|
||||
traffic_ipactive_hour_trend=Active IPTOP10 Trend In Nearly One Hour
|
||||
traffic_ipactive_hour_max=Active IPTOP10 Maximum In Nearly One Hour
|
||||
traffic_ipactive_hour_trend=Active IP TOP10 Trend In Nearly One Hour
|
||||
traffic_ipactive_hour_max=Active IP TOP10 Maximum In Nearly One Hour
|
||||
ip_addr=IP
|
||||
area_id=Area
|
||||
link_num=Link Number
|
||||
@@ -1293,3 +1293,4 @@ ipv4_subnet=IPv4/Subnet mask
|
||||
ipv6_range=IPv6 Range
|
||||
ipv6_subnet=IPv6/Subnet mask
|
||||
example=For Example
|
||||
letter_cancel_info=Cancel Letter Info
|
||||
@@ -1217,8 +1217,8 @@ area_group_manage=\u5206\u7EC4\u5730\u7406\u4FE1\u606F\u7BA1\u7406
|
||||
stream_media_protocol=\u6D41\u5A92\u4F53\u534F\u8BAE
|
||||
new_link=\u65B0\u5EFA
|
||||
active_link=\u6D3B\u8DC3
|
||||
traffic_ipactive_hour_trend=\u6D3B\u8DC3IPTOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u8D8B\u52BF
|
||||
traffic_ipactive_hour_max=\u6D3B\u8DC3IPTOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u6700\u5927\u503C
|
||||
traffic_ipactive_hour_trend=\u6D3B\u8DC3IP TOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u8D8B\u52BF
|
||||
traffic_ipactive_hour_max=\u6D3B\u8DC3IP TOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u6700\u5927\u503C
|
||||
ip_addr=IP\u5730\u5740
|
||||
area_id=\u5730\u57DF
|
||||
link_num=\u8FDE\u63A5\u6B21\u6570
|
||||
@@ -1268,3 +1268,4 @@ ipv4_subnet=IPv4/Subnet mask
|
||||
ipv6_range=IPv6 Range
|
||||
ipv6_subnet=IPv6/Subnet mask
|
||||
example=\u4F8B\u5982
|
||||
letter_cancel_info=\u53D6\u6D88\u5BA1\u6838\u6765\u51FD
|
||||
@@ -199,7 +199,107 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if((url.indexOf("?isAudit=3") > 1)){
|
||||
// 审核中区分是否有添加取消来函
|
||||
|
||||
var reobj=JSON.parse(JSON.stringify("${page.list[0]}"));
|
||||
var indexTableNameArr=reobj.match(/indexTable=(\w*),/);
|
||||
var requestNameArr=reobj.match(/requestName=(\w*),/);
|
||||
// 有来函业务的取消审核
|
||||
if(reobj!=null&&reobj.indexOf("requestName")!=-1&&requestNameArr!=null&&requestNameArr.length>1&&indexTableNameArr!=null&&indexTableNameArr.length>1){
|
||||
var indexTableName =indexTableNameArr[1];
|
||||
var requestName =requestNameArr[1];
|
||||
|
||||
if(requestName.indexOf("null")==-1&&typeof(indexTableName)!="undefined"&&indexTableName!=null&&indexTableName!=''&&indexTableName.indexOf("null")==-1){
|
||||
$.jBox.open("iframe:${ctx}/basics/serviceDictInfo/requestSelectInfo", "取消审核通过", 400, 500, { buttons: { '确定': 1, '取消': 0 },
|
||||
submit: function (v, h, f) {
|
||||
if (v == 0) {
|
||||
return true; // close the window
|
||||
} else {
|
||||
h.find('.errorBlock').hide('fast', function () { $(this).remove(); });
|
||||
var cancelRequestId = h.find("iframe")[0].contentWindow.requestIsAudit.value;
|
||||
if (!cancelRequestId) {
|
||||
$('<div class="errorBlock" style="display: none;font-size:18px;color:red;text-align:center;margin-top:10px">请选择来函信息!</div>').prependTo(h).show('fast');
|
||||
return false;
|
||||
}
|
||||
if(url.indexOf("?")>0){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/serviceDictInfo/requestCancleInfoAjax',
|
||||
data:{"cancelRequestId":cancelRequestId,"ids":ids,"indexTable":indexTableName},
|
||||
async:false,
|
||||
success:function(data,textStatus){//处理返回结果
|
||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||
}
|
||||
if(url.indexOf("?isAudit") > 1){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
}else if(url.indexOf("export") > 1){
|
||||
closeTip();
|
||||
}
|
||||
//$("#searchForm").submit();
|
||||
|
||||
top.$.jBox.tip("审核---"+(cancelRequestId), "<spring:message code='info'/>");
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
loaded:function(h){
|
||||
$(".jbox-content,top.document").css("overflow-y","hidden")
|
||||
$(".jbox-content,top.document.children").css("clear","both")
|
||||
$(".jbox-content,top.document.children").css("z-index","999999")
|
||||
$(".jbox-content,top.document.children").css("overflow;","auto")
|
||||
$(".jbox-content,top.document").css("width","90%")
|
||||
}
|
||||
});
|
||||
}else{
|
||||
// 防止有来函无表名的取消审核操作
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if(v=="ok"){
|
||||
if(url.indexOf("?")>0){
|
||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||
}else{
|
||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||
}
|
||||
if(url.indexOf("?isAudit") > 1){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
}else if(url.indexOf("export") > 1){
|
||||
closeTip();
|
||||
}
|
||||
//$("#searchForm").submit();
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}
|
||||
}else{
|
||||
// 无来函选项的取消审核操作
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if(v=="ok"){
|
||||
if(url.indexOf("?")>0){
|
||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||
}else{
|
||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||
}
|
||||
if(url.indexOf("?isAudit") > 1){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
}else if(url.indexOf("export") > 1){
|
||||
closeTip();
|
||||
}
|
||||
//$("#searchForm").submit();
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}
|
||||
//除取消审核之外的业务
|
||||
}else{
|
||||
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if(v=="ok"){
|
||||
if(url.indexOf("?")>0){
|
||||
@@ -216,7 +316,7 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}
|
||||
}
|
||||
//验证选择的配置,是否可删除或者审核未通过或者审核通过,只有未审核的配置可删除或审核未通过或审核通过
|
||||
function validateAllNoAudit(checkboxes){
|
||||
|
||||
32
src/main/webapp/WEB-INF/views/basics/requestSelectInfo.jsp
Normal file
32
src/main/webapp/WEB-INF/views/basics/requestSelectInfo.jsp
Normal file
@@ -0,0 +1,32 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
function changesel(){
|
||||
if($("#requestIsAudit").val()!=''&&$("#requestIsAudit").val()!=null){
|
||||
$(".errorBlock").hide()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="row"
|
||||
style="scrolling:auto;z-index:999;position:relative;height: 25px; font-size: 18px; text-align: center; margin-top: 30px; margin-left: 20px; line-height: 30px;">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font> 来函 </label>
|
||||
<div class="col-md-6">
|
||||
|
||||
<select id="requestIsAudit" name="requestId" onchange="changesel()"
|
||||
class="selectpicker field required form-control" data-live-search="true"
|
||||
data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo">
|
||||
<option value="${requestInfo.id}"><spring:message
|
||||
code="${requestInfo.requestTitle}"></spring:message></option>
|
||||
</c:forEach>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
@@ -465,7 +465,9 @@
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}">
|
||||
<span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
|
||||
@@ -1,4 +1,33 @@
|
||||
$(function(){
|
||||
var leff =$("span[class~='le-ca-fo']").attr("data-original-title")
|
||||
|
||||
$("#contentTable").not(".logTb").find("tbody tr").each(function(i){
|
||||
if($(this).find("input[type='checkbox']").attr("value")==3){
|
||||
var ids = $(this).find("span").attr("cfgId");
|
||||
var resetLeff =$(this).find("span[class~='le-ca-fo']");
|
||||
var indexTableName = $("#contentTable tbody tr td span[class~='le-ca-fo']").attr("indexTable");
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/nis")+4);
|
||||
if(ids!=null&&indexTableName!=null){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:pathName+'/basics/serviceDictInfo/requestCancleInfoNumber',
|
||||
data:{"ids":ids,"indexTable":indexTableName},
|
||||
dataType:'json',
|
||||
success:function(data){//处理返回结果
|
||||
//根据表名跟cfgid获取 requestNumber;
|
||||
if(data.requestTitle!=null){
|
||||
resetLeff.attr("data-original-title",leff+data.requestTitle)
|
||||
}else{
|
||||
resetLeff.attr("data-original-title",leff+"")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
//增加描述新增时的文字长度限制
|
||||
$("form input[name='cfgDesc']").attr("maxlength","128");
|
||||
$("form input[name$='cfgKeywords']").attr("maxlength","1024");
|
||||
|
||||
Reference in New Issue
Block a user