p2p配置提交以及相关国际化代码.
This commit is contained in:
@@ -485,7 +485,7 @@ public final class Constants {
|
||||
//P2P配置域
|
||||
public static final String P2P_HASH_BIN_REGION = Configurations.getStringProperty("p2p_hash_bin_region","NTC_P2P_HASH_BIN");
|
||||
public static final String P2P_KEYWORDS_REGION = Configurations.getStringProperty("p2p_keywords_region","NTC_P2P_KEYWORDS");
|
||||
|
||||
public static final String NTC_SUBSCRIBE_ID_REGION = Configurations.getStringProperty("ntc_subscribe_id_region","NTC_SUBSCRIBE_ID");
|
||||
/**
|
||||
* 样例文件URL关键字
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,13 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
@@ -226,4 +230,154 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pList"})
|
||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = fileTransferCfgService.getP2pList(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/fileTransfer/p2pList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pForm"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String p2pForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
// 跳转操作页面(根据ids判断是新增 or 修改)
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids));
|
||||
|
||||
// 添加配置域Key,用于新增页面判断
|
||||
P2pHashCfg hashCfg = new P2pHashCfg();
|
||||
hashCfg.setCfgType(Constants.P2P_HASH_BIN_REGION);
|
||||
entity.setP2pHash(hashCfg);
|
||||
P2pKeywordCfg keywordCfg = new P2pKeywordCfg();
|
||||
keywordCfg.setCfgType(Constants.P2P_KEYWORDS_REGION);
|
||||
entity.setP2pKeyword(keywordCfg);
|
||||
NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg();
|
||||
subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID_REGION);
|
||||
entity.setNtcSubscribeIdCfg(subscribeIdCfg);
|
||||
|
||||
if(entity.getP2pHashList().size() == 0) {
|
||||
entity.getP2pHashList().add(hashCfg);
|
||||
}
|
||||
if(entity.getP2pKeywordList().size() == 0) {
|
||||
entity.getP2pKeywordList().add(keywordCfg);
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList().size() == 0) {
|
||||
entity.getNtcSubscribeIdCfgList().add(subscribeIdCfg);
|
||||
}
|
||||
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
// 添加配置域Key,用于修改页面判断
|
||||
P2pHashCfg hashCfg = new P2pHashCfg();
|
||||
hashCfg.setCfgType(Constants.P2P_HASH_BIN_REGION);
|
||||
entity.setP2pHash(hashCfg);
|
||||
P2pKeywordCfg keywordCfg = new P2pKeywordCfg();
|
||||
keywordCfg.setCfgType(Constants.P2P_KEYWORDS_REGION);
|
||||
entity.setP2pKeyword(keywordCfg);
|
||||
NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg();
|
||||
subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID_REGION);
|
||||
entity.setNtcSubscribeIdCfg(subscribeIdCfg);
|
||||
|
||||
List<P2pHashCfg> hashList = new ArrayList<P2pHashCfg>();
|
||||
hashList.add(hashCfg);
|
||||
entity.setP2pHashList(hashList);
|
||||
List<P2pKeywordCfg> keywordList = new ArrayList<P2pKeywordCfg>();
|
||||
keywordList.add(keywordCfg);
|
||||
entity.setP2pKeywordList(keywordList);
|
||||
ArrayList<NtcSubscribeIdCfg> subscribeIdList = new ArrayList<NtcSubscribeIdCfg>();
|
||||
subscribeIdList.add(subscribeIdCfg);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/fileTransfer/p2pForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"saveP2pCfg"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
fileTransferCfgService.saveP2pCfg(entity);
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"updateP2pCfgValid"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"ajaxP2pSubList"})
|
||||
public String ajaxP2pSubList(Model model,Long cfgId,Integer index) {
|
||||
CfgIndexInfo cfg = fileTransferCfgService.getP2pCfg(cfgId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
if(cfg.getIpPortList()!=null){
|
||||
String cfgType = null;
|
||||
for(IpPortCfg ip:cfg.getIpPortList()){
|
||||
if(!ip.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",ip.getCfgType()});
|
||||
cfgType = ip.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getP2pHashList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg hash:cfg.getP2pHashList()){
|
||||
if(!hash.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",hash.getCfgType()});
|
||||
cfgType = hash.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getP2pKeywordList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg keyword:cfg.getP2pKeywordList()){
|
||||
if(!keyword.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",keyword.getCfgType()});
|
||||
cfgType = keyword.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){
|
||||
if(!subscribeId.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",subscribeId.getCfgType()});
|
||||
cfgType = subscribeId.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/p2pSubList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"auditP2pCfg"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:confirm"})
|
||||
public String auditP2pCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
fileTransferCfgService.auditP2pCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("p2p配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -35,4 +38,19 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
||||
public void auditCfg(BaseCfg entity);
|
||||
public FileDigestCfg getFileDigest(Long id);
|
||||
public void updateFileDigestCfg(FileDigestCfg entity);
|
||||
|
||||
// P2P域配置新增
|
||||
public void saveP2pHashCfg(BaseStringCfg cfg);
|
||||
public void saveP2pKeywordCfg(BaseStringCfg cfg);
|
||||
public void saveP2pSubscribeIdCfg(NtcSubscribeIdCfg cfg);
|
||||
// 获取P2P域配置信息
|
||||
public List<CfgIndexInfo> getP2pList(CfgIndexInfo entity);
|
||||
public List<P2pHashCfg> getP2pHashList(CfgIndexInfo entity);
|
||||
public List<P2pKeywordCfg> getP2pKeywordList(CfgIndexInfo entity);
|
||||
public List<NtcSubscribeIdCfg> getP2pSubscribeidList(CfgIndexInfo entity);
|
||||
// P2P修改配置操作时,先删除旧域配置信息
|
||||
public void deleteP2pIpCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="complexCfgMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -144,6 +149,11 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="ConfigIndex_Column" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
@@ -157,13 +167,15 @@
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code,
|
||||
a.user_region1,a.user_region2,a.user_region3,a.user_region4,a.user_region5
|
||||
</sql>
|
||||
<sql id="StrCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code,
|
||||
a.user_region1,a.user_region2,a.user_region3,a.user_region4,a.user_region5
|
||||
</sql>
|
||||
<sql id="ComplexCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,
|
||||
@@ -393,7 +405,12 @@
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -425,7 +442,12 @@
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -575,6 +597,357 @@
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="getP2pList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="ipPort!=null">
|
||||
AND a.compile_id in (select t.compile_id from ip_port_cfg t
|
||||
<where>
|
||||
and t.protocol_id=4
|
||||
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
|
||||
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.srcPort != null and ipPort.srcPort != ''">
|
||||
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
|
||||
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destPort != null and ipPort.destPort != ''">
|
||||
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="p2pHash!=null">
|
||||
AND a.compile_id in (select f.compile_id from p2p_hash_cfg h
|
||||
<where>
|
||||
<if test="p2pHash.cfgKeywords != null and p2pHash.cfgKeywords != ''">
|
||||
and h.cfg_keywords like concat(concat('%',#{p2pHash.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="p2pKeyword!=null">
|
||||
AND a.compile_id in (select f.compile_id from p2p_keyword_cfg k
|
||||
<where>
|
||||
<if test="p2pKeyword.cfgKeywords != null and p2pKeyword.cfgKeywords != ''">
|
||||
and k.cfg_keywords like concat(concat('%',#{p2pKeyword.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg!=null">
|
||||
AND a.compile_id in (select f.compile_id from ntc_subscribe_id_cfg s
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
|
||||
and s.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getP2pHashList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM p2p_hash_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getP2pKeywordList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM p2p_keyword_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getP2pSubscribeidList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM ntc_subscribe_id_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- insert p2p_hash_cfg表信息 -->
|
||||
<insert id="saveP2pHashCfg" parameterType="com.nis.domain.configuration.P2pHashCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into p2p_hash_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert p2p_keyword_cfg表信息 -->
|
||||
<insert id="saveP2pKeywordCfg" parameterType="com.nis.domain.configuration.P2pKeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into p2p_keyword_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert p2p ntc_subscribe_id_cfg表信息 -->
|
||||
<insert id="saveP2pSubscribeIdCfg" parameterType="com.nis.domain.configuration.P2pKeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ntc_subscribe_id_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 文件摘要配置 -->
|
||||
<insert id="saveFileDigestCfg" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
@@ -647,6 +1020,22 @@
|
||||
delete from file_digest_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
<!-- 删除p2p ip子配置 -->
|
||||
<delete id="deleteP2pIpCfg" >
|
||||
delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2pHash配置 -->
|
||||
<delete id="deleteP2pHashCfg">
|
||||
delete from p2p_hash_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2p关键字配置 -->
|
||||
<delete id="deleteP2pKeywordCfg">
|
||||
delete from p2p_keyword_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2pSubscribeId配置 -->
|
||||
<delete id="deleteP2pSubscribeIdCfg">
|
||||
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- File Digest Cfg -->
|
||||
|
||||
@@ -22,6 +22,9 @@ import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.configuration.FtpKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
@@ -527,4 +530,348 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
}
|
||||
|
||||
public Page<CfgIndexInfo> getP2pList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list = fileTransferCfgDao.getP2pList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public CfgIndexInfo getP2pCfg(Long cfgId){
|
||||
// 查询各域配置信息
|
||||
CfgIndexInfo entity = fileTransferCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = fileTransferCfgDao.getIpPortList(entity);
|
||||
List<P2pHashCfg> hashList = fileTransferCfgDao.getP2pHashList(entity);
|
||||
List<P2pKeywordCfg> keywordList = fileTransferCfgDao.getP2pKeywordList(entity);
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = fileTransferCfgDao.getP2pSubscribeidList(entity);
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setP2pHashList(hashList);
|
||||
entity.setP2pKeywordList(keywordList);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存p2p配置
|
||||
* @param entity
|
||||
*/
|
||||
public void saveP2pCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
fileTransferCfgDao.saveCfgIndex(entity);
|
||||
// 保存IP域配置信息
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存Hash类型域配置信息
|
||||
if(entity.getP2pHashList()!=null){
|
||||
for(BaseStringCfg cfg:entity.getP2pHashList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 保存关键字域配置信息
|
||||
if(entity.getP2pKeywordList()!=null){
|
||||
for(P2pKeywordCfg cfg:entity.getP2pKeywordList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pKeywordCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 保存SubscribeId域配置信息
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
}else{
|
||||
fileTransferCfgDao.updateCfgIndex(entity);
|
||||
//无效子配置后,再新增子配置
|
||||
fileTransferCfgDao.deleteP2pIpCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pHashCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pKeywordCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pSubscribeIdCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getP2pHashList()!=null){
|
||||
for(BaseStringCfg cfg:entity.getP2pHashList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null){
|
||||
for(P2pKeywordCfg cfg:entity.getP2pKeywordList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pKeywordCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateP2pCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
fileTransferCfgDao.updateCfgValid(entity);
|
||||
//查询子配置
|
||||
entity = this.getP2pCfg(Long.parseLong(id));
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getP2pHashList()!=null && entity.getP2pHashList().size()>0){
|
||||
P2pHashCfg cfg = new P2pHashCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pHashCfg.getTablename());
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null && entity.getP2pKeywordList().size()>0){
|
||||
P2pKeywordCfg cfg = new P2pKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pKeywordCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void auditP2pCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
fileTransferCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getP2pCfg(entity.getCfgId());
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
ipRegionList=map.get("dstList");
|
||||
if(map.get("numRegionList")!=null){
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getP2pHashList()!=null && entity.getP2pHashList().size()>0){
|
||||
P2pHashCfg cfg = new P2pHashCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pHashCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getP2pHashList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null && entity.getP2pKeywordList().size()>0){
|
||||
P2pKeywordCfg cfg = new P2pKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pKeywordCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getP2pKeywordList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
areaIpRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
|
||||
//设置自定义域参数
|
||||
String userRegion = "";
|
||||
for (IpPortCfg ipPortCfg : entity.getIpPortList()) {
|
||||
if(!ipPortCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+ipPortCfg.getUserRegion1();
|
||||
}
|
||||
for (BaseStringCfg p2pHashCfg : entity.getP2pHashList()) {
|
||||
if(!p2pHashCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+p2pHashCfg.getUserRegion1();
|
||||
}else {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"=";
|
||||
}
|
||||
}
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("p2p配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("p2p配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("p2p配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("p2p配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1064,4 +1064,8 @@ req_hdr_key=Request Header File Key
|
||||
req_body_key=Request Body File Key
|
||||
res_hdr_key=Response Header File Key
|
||||
res_body_key=Response Body File Key
|
||||
website=Website
|
||||
website=Website
|
||||
|
||||
p2p_ip_config_type=IP Config Type
|
||||
p2p_hash_type=Hash Type
|
||||
NTC_SUBSCRIBE_ID=Certification Mark Configuration
|
||||
@@ -1062,4 +1062,8 @@ req_hdr_key=\u8BF7\u6C42\u5934\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
req_body_key=\u8BF7\u6C42\u4F53\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
res_hdr_key=\u5E94\u7B54\u5934\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
res_body_key=\u5E94\u7B54\u4F53\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
website=\u7F51\u7AD9\u57DF\u540D
|
||||
website=\u7F51\u7AD9\u57DF\u540D
|
||||
|
||||
p2p_ip_config_type=IP\u914D\u7F6E\u7C7B\u578B
|
||||
p2p_hash_type=HASH\u7C7B\u578B
|
||||
NTC_SUBSCRIBE_ID=\u8BA4\u8BC1\u6807\u8BC6\u914D\u7F6E
|
||||
378
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp
Normal file
378
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pForm.jsp
Normal file
@@ -0,0 +1,378 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<style type="text/css">
|
||||
.boxSolid {
|
||||
border: 1px solid #eeeeee
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ element.attr("name")
|
||||
+ "']").append(error);
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
|
||||
var flag = true;
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
//代表所有区域都隐藏了,提示必须增加个区域信息
|
||||
if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){
|
||||
if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click();
|
||||
if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click();
|
||||
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
//keywords非空校验完成校验二进制字符串
|
||||
$(".boxSolid:visible").find("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){ //十六进制
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
if(keywords != ''){
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".boxSolid").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
});
|
||||
//业务内容增加
|
||||
/* $("span[title='add']").on("click", function() {
|
||||
$(".ipPort0").removeClass("hidden");
|
||||
}); */
|
||||
|
||||
});
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
/* $("."+contentClassName+"0").find("input,select").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
}); */
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
/* $("."+contentClassName).find("input,select").each(function(){
|
||||
$(this).attr("disabled","true");
|
||||
}); */
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="p2p_control"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/fileTransfer/saveP2pCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId"
|
||||
value="${_cfg.serviceId}">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
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>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="hashCfgIndex" value="0"></c:set>
|
||||
<c:set var="keywordCfgIndex" value="0"></c:set>
|
||||
<c:set var="subscribeIdCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<!--ip info-->
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ipPortList[${ipCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.ipPortList)>0 and ipCfgIndex<fn:length(_cfg.ipPortList) }">
|
||||
<c:forEach items="${_cfg.ipPortList}" var="ipPort">
|
||||
<c:if test="${region.configRegionValue eq ipPort.cfgType }">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="${ipCfgIndex+1}"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<!--/ip info-->
|
||||
</c:if>
|
||||
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<!-- P2P Hash 域配置 -->
|
||||
<c:if test="${region.configRegionValue eq _cfg.p2pHash.cfgType }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="p2pHashList[${hashCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.p2pHashList)>0 and (!empty _cfg.p2pHashList[hashCfgIndex].cfgId)}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.p2pHashList}" var="strCfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq strCfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="hashCfgIndex" value="${hashCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="hashCfgIndex" value="${hashCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="hashCfgIndex" value="${hashCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<!-- P2P keyword 域配置 -->
|
||||
<c:if test="${region.configRegionValue eq _cfg.p2pKeyword.cfgType}">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="p2pKeywordList[${keywordCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.p2pKeywordList)>0 and (!empty _cfg.p2pKeywordList[keywordCfgIndex].cfgId)}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.p2pKeywordList}" var="strCfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq strCfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="keywordCfgIndex" value="${keywordCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="keywordCfgIndex" value="${keywordCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="keywordCfgIndex" value="${keywordCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<!-- P2P SubscribeId 域配置 -->
|
||||
<c:if test="${region.configRegionValue eq _cfg.ntcSubscribeIdCfg.cfgType }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdCfgIndex}]"></c:set>
|
||||
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0 and (!empty _cfg.ntcSubscribeIdCfgList[subscribeIdCfgIndex].cfgId)}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="strCfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq strCfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
439
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp
Normal file
439
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp
Normal file
@@ -0,0 +1,439 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
//var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/fileTransfer/ajaxP2pSubList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="fileTransfer:p2p:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/fileTransfer/p2pForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="p2p_control"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/fileTransfer/p2pList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="fileTransfer:p2p:config">
|
||||
<sys:delRow url="${ctx}/ntc/fileTransfer/p2pForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/fileTransfer/updateP2pCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="fileTransfer:p2p: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/fileTransfer/auditP2pCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/fileTransfer/auditP2pCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/fileTransfer/auditP2pCfg?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<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:choose>
|
||||
</td>
|
||||
<td functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}"><div class="loading-total"></div></td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
305
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp
Normal file
305
src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp
Normal file
@@ -0,0 +1,305 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||
<spring:message code='${region[1]}' />
|
||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
<c:forEach items="${tabList}" var="region">
|
||||
<c:if test="${region[0] eq 1 }">
|
||||
<c:forEach items="${_cfg.ipPortList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_type'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<c:if test="${cfg.ipType==ipTypeC.itemCode}"><spring:message code="${ipTypeC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='ip_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<c:if test="${cfg.ipPattern==ipPatternC.itemCode}"><spring:message code="${ipPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_ip'/>:</label>
|
||||
<label>
|
||||
${cfg.srcIpAddress}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='port_pattern'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<c:if test="${cfg.portPattern eq portPatternC.itemCode}"><spring:message code="${portPatternC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='client_port'/>:</label><label>${cfg.srcPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_ip'/>:</label><label>${cfg.destIpAddress }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='server_port'/>:</label><label>${cfg.destPort }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='direction'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<c:if test="${cfg.direction eq directionC.itemCode}"><spring:message code="${directionC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='protocol'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${cfg.protocol eq protocolC.itemCode}"><spring:message code="${protocolC.itemValue }"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='p2p_ip_config_type'/>:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('P2P_IP_TYPE')}" var="ipType">
|
||||
<c:if test="${_cfg.ipPortList[0].userRegion1==ipType.itemCode}"><spring:message code="${ipType.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${region[0] eq 2 }">
|
||||
<c:forEach items="${_cfg.p2pHashList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label><label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='p2p_hash_type' />:</label><label>
|
||||
<c:forEach items="${fns:getDictList('P2P_HASH_TYPE')}" var="hashType">
|
||||
<c:if test="${_cfg.p2pHashList[0].userRegion1==hashType.itemCode}"><spring:message code="${hashType.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label><label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach items="${_cfg.p2pKeywordList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label><label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</html>
|
||||
@@ -38,6 +38,22 @@
|
||||
<div for="${cfgName}.ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${region.configRegionValue eq 'NTC_P2P_IP'}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="p2p_ip_config_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name=userRegion1 class="selectpicker show-tick form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('P2P_IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}" <c:if test="${_cfg.ipPortList[0].userRegion1==ipType.itemCode}">selected</c:if> ><spring:message code="${ipType.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row ip">
|
||||
<div class="col-md-6">
|
||||
@@ -155,6 +171,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button type="button" class="btn btn-red-hollow center-block"
|
||||
onClick="more(this);" data-click-times="0">
|
||||
|
||||
@@ -26,6 +26,22 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${region.configRegionValue eq 'NTC_P2P_HASH_BIN'}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="p2p_hash_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion2" class="selectpicker show-tick form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('P2P_HASH_TYPE')}" var="hashType">
|
||||
<option value="${hashType.itemCode}" <c:if test="${_cfg.p2pHashList[0].userRegion1==hashType.itemCode}">selected</c:if> ><spring:message code="${hashType.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -38,7 +54,7 @@ $(function(){
|
||||
<div for="${cfgName}.cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -82,13 +98,14 @@ $(function(){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="1" class="required"
|
||||
<c:if test="${strCfg.isHexbin eq 1}">checked</c:if>
|
||||
<input type="radio" name="${cfgName}.isHex" value="1" class="required"
|
||||
<c:if test="${(strCfg.isHexbin eq 1) || (region.configRegionValue eq 'NTC_P2P_HASH_BIN')}">checked disabled</c:if>
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required"
|
||||
<c:if test="${strCfg.isHexbin ne 1}">checked</c:if>
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required"
|
||||
<c:if test="${(strCfg.isHexbin ne 1) && (region.configRegionValue ne 'NTC_P2P_HASH_BIN')}">checked</c:if>
|
||||
<c:if test="${region.configRegionValue eq 'NTC_P2P_HASH_BIN'}">disabled</c:if>
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
@@ -132,5 +149,6 @@ $(function(){
|
||||
<div for="${cfgName}.isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</html>
|
||||
Reference in New Issue
Block a user