diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index 962c6fe22..3e339c2c9 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -139,6 +139,10 @@ public class BaseCfg extends BaseEntity implements Cloneable{ * 来函id */ protected Integer requestId; + /** + * 取消审核来函id + */ + protected Integer cancelRequestId; /** * 来函 */ @@ -884,5 +888,11 @@ public class BaseCfg extends BaseEntity implements Cloneable{ public void setUserRegion5(String userRegion5) { this.userRegion5 = userRegion5; } + public Integer getCancelRequestId() { + return cancelRequestId; + } + public void setCancelRequestId(Integer cancelRequestId) { + this.cancelRequestId = cancelRequestId; + } } diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index caf00fc58..b56b5acde 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -28,6 +28,7 @@ public class CfgIndexInfo extends BaseCfg { */ private static final long serialVersionUID = 2796500715438264119L; private static final String tableName="cfg_index_info"; + private String indexTable="cfg_index_info"; private List voipAccounts;//Add表单使用 private List asnIpCfgs;//Add表单使用 private List voipIps; //Add表单使用 @@ -308,4 +309,11 @@ public class CfgIndexInfo extends BaseCfg { public static String getTablename() { return tableName; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } + } diff --git a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java index 351396a5e..03b161717 100644 --- a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java @@ -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 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; + } /** * 查询业务辅助表-业务字典信息列表(无条件分页查询) diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java index 1a2f9cc20..8e7e3ae07 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java @@ -76,6 +76,9 @@ public interface ServiceDictInfoDao extends CrudDao { List findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid,@Param("isLeaf")Integer isLeaf); List 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); + diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml index 356c031e8..5a656754d 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml @@ -306,9 +306,12 @@ LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id - - - + + UPDATE ${indexTable} SET cancel_request_id = #{cancelRequestId} WHERE cfg_id = #{id} + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java index 4394f9dae..205854335 100644 --- a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java +++ b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java @@ -24,6 +24,8 @@ public interface RequestInfoDao extends CrudDao { List showTask(TaskInfo taskInfo); void delete(@Param("id") Long id); + + String getRequestTitleById(@Param("id")Long id); } \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml index c08b6396b..875a2d6f4 100644 --- a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml @@ -217,4 +217,8 @@ from request_info + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java b/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java index 6c1e0c5fa..7605fdca9 100644 --- a/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java +++ b/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java @@ -300,6 +300,23 @@ public class ServiceDictInfoService extends BaseService{ public List findAllLableDict() { return serviceDictInfoDao.findAllItemDictByItemType(Constants.ITEM_TYPE_LABEL,null); } + + + /** + * + * 取消审核的时候增加取消来函 + * @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; + } diff --git a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java index 42279a193..c922de8f1 100644 --- a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java +++ b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java @@ -118,4 +118,9 @@ public class RequestInfoService extends BaseService{ public List showTask(TaskInfo taskInfo) { return taskInfoDao.findList(taskInfo); } + + public String getRequestTitleById(Long id) { + return requestInfoDao.getRequestTitleById(id); + + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 9e6bd8d6b..fcce7861b 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -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 @@ -1272,4 +1272,5 @@ ipv4_range=IPv4 Range ipv4_subnet=IPv4/Subnet Mask ipv6_range=IPv6 Range ipv6_subnet=IPv6/Subnet Mask -example=For Example \ No newline at end of file +example=For Example +letter_cancel_info=Cancel Letter Info \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 72e58d2d8..401a12250 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -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 @@ -1292,4 +1292,5 @@ ipv4_range=IPv4 Range ipv4_subnet=IPv4/Subnet mask ipv6_range=IPv6 Range ipv6_subnet=IPv6/Subnet mask -example=For Example \ No newline at end of file +example=For Example +letter_cancel_info=Cancel Letter Info \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index a43e0e008..c624f2b14 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -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 @@ -1267,4 +1267,5 @@ ipv4_range=IPv4 Range ipv4_subnet=IPv4/Subnet mask ipv6_range=IPv6 Range ipv6_subnet=IPv6/Subnet mask -example=\u4F8B\u5982 \ No newline at end of file +example=\u4F8B\u5982 +letter_cancel_info=\u53D6\u6D88\u5BA1\u6838\u6765\u51FD \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 8b1d10746..f127aaea2 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -199,7 +199,107 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); top.$.jBox.tip("", ""); return; } - top.$.jBox.confirm("","",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) { + $('').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(''); + }else if(url.indexOf("export") > 1){ + closeTip(); + } + //$("#searchForm").submit(); + + top.$.jBox.tip("审核---"+(cancelRequestId), ""); + } + + 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("","",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(''); + }else if(url.indexOf("export") > 1){ + closeTip(); + } + //$("#searchForm").submit(); + } + },{buttonsFocus:1}); + top.$('.jbox-body .jbox-icon').css('top','55px'); + } + }else{ + // 无来函选项的取消审核操作 + top.$.jBox.confirm("","",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(''); + }else if(url.indexOf("export") > 1){ + closeTip(); + } + //$("#searchForm").submit(); + } + },{buttonsFocus:1}); + top.$('.jbox-body .jbox-icon').css('top','55px'); + } + //除取消审核之外的业务 + }else{ + + top.$.jBox.confirm("","",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){ diff --git a/src/main/webapp/WEB-INF/views/basics/requestSelectInfo.jsp b/src/main/webapp/WEB-INF/views/basics/requestSelectInfo.jsp new file mode 100644 index 000000000..65c9b47d8 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/basics/requestSelectInfo.jsp @@ -0,0 +1,32 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + +
+
+
+ +
+ + +
+ +
+
+
+ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index 7c28b292a..9a52fa3fe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -465,7 +465,9 @@ - + + +
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index a75c96988..f3ad73883 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -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");