diff --git a/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java new file mode 100644 index 000000000..57133d029 --- /dev/null +++ b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java @@ -0,0 +1,371 @@ +package com.nis.web.controller.configuration; + +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.nis.domain.Page; +import com.nis.domain.ServiceConfigInfo; +import com.nis.domain.configuration.BaseCfg; +import com.nis.domain.configuration.ComplexkeywordCfg; +import com.nis.domain.configuration.RequestInfo; +import com.nis.domain.configuration.ServiceDictInfo; +import com.nis.util.Constants; +import com.nis.web.controller.BaseController; + +/** + * 增强字符串相关配置控制类 + * @author dell + * + */ +@Controller +@RequestMapping("${adminPath}/cfg/complex") +public class ComplexStringCfgController extends BaseController{ + + @RequestMapping(value = {"list"}) + public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + if(cfg!=null){ + Integer serviceId=cfg.getServiceId(); + logger.info("servcice id is "+serviceId); + if(serviceId!=null){ + model.addAttribute("serviceId", serviceId); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + String tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + logger.info("table name is "+tableName); + cfg.setTableName(tableName); + Page searchPage=new Page(request, response, 1); + if(pageNo!=null) searchPage.setPageNo(pageNo); + if(pageSize!=null) searchPage.setPageSize(pageSize); + if(cfg.getPage()!=null){ + if(!StringUtils.isBlank(cfg.getPage().getOrderBy())); + searchPage.setOrderBy(cfg.getPage().getOrderBy()); + } + Page page = complexStringCfgService.findPage(searchPage, cfg); + model.addAttribute("page", page); + model.addAttribute("action", cfg.getAction()); + model.addAttribute("tableName", tableName); + List requestInfos=requestInfoService.getValidRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findLableDict(); + model.addAttribute("lables", lables); + } + }else{ + logger.error("未获取到正确的serviceId"); + } + } + } + + return "/cfg/complexCfgList"; + } + + + @RequestMapping(value = {"form"}) + public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + model.addAttribute("action", action); + model.addAttribute("serviceId", serviceId); + logger.info("sercice id is "+serviceId); + if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + String tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + logger.info("table name is "+tableName); + String className=complexStringCfgService.getClassName(tableName); + logger.info("class name is "+className); + String packageName=ComplexkeywordCfg.class.getPackage().getName(); + try { + //通过反射获得ComplexkeywordCfg的子类的实例,并调用子类的initDefaultValue初始化默认值 + Class clazz=Class.forName(packageName+"."+className); + ComplexkeywordCfg cfg=(ComplexkeywordCfg)clazz.newInstance(); + cfg.setTableName(tableName); + cfg.initDefaultValue(); + cfg.setAction(action); + cfg.setServiceId(serviceId); + model.addAttribute("_cfg", cfg); + model.addAttribute("tableName", tableName); + List requestInfos=requestInfoService.getValidRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findLableDict(); + model.addAttribute("lables", lables); + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { + // TODO Auto-generated catch block + logger.error("打开新增IP窗口失败",e); + e.printStackTrace(); + } + } + } + }else{ + logger.error("未获取到正确的serviceId"); + } + + return "/cfg/complexCfgForm"; + } + @RequestMapping(value = {"updateForm"}) + public String updateStringCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", action); + model.addAttribute("tableName", tableName); + if(!StringUtils.isBlank(tableName)){ + logger.info("table name is "+tableName); + ComplexkeywordCfg searchBean=new ComplexkeywordCfg(); + searchBean.setCfgId(cfgId); + searchBean.setTableName(tableName); + ComplexkeywordCfg cfg=complexStringCfgService.getStringCfgById(searchBean); + model.addAttribute("_cfg", cfg); + List requestInfos=requestInfoService.getAllRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findAllFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findAllXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findAllLableDict(); + model.addAttribute("lables", lables); + }else if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + logger.info("table name is "+tableName); + ComplexkeywordCfg searchBean=new ComplexkeywordCfg(); + searchBean.setCfgId(cfgId); + searchBean.setTableName(tableName); + ComplexkeywordCfg cfg=complexStringCfgService.getStringCfgById(searchBean); + model.addAttribute("_cfg", cfg); + List requestInfos=requestInfoService.getAllRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findAllFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findAllXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findAllLableDict(); + model.addAttribute("lables", lables); + + } + } + }else{ + logger.error("未获取到正确的表名"); + } + + return "/cfg/complexCfgForm"; + } + + /** + * + * addStringCfg(新增IP配置) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"saveOrUpdateCfg"}) + public String saveOrUpdateStringCfg(String cfgName,Model model, ComplexkeywordCfg cfg) { + model.addAttribute("cfgName",cfgName); + model.addAttribute("cfgType","complex"); + logger.info("saveOrUpdateStringCfg loaded"); + if(cfg==null){ + logger.error("无法保存空的配置!"); + addMessage(model,"保存失败!"); + }else if(!StringUtils.isBlank(cfg.getTableName())){ + int serviceId=cfg.getServiceId(); + long compileId=getCompileId(cfg); + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + cfg.setIsValid(Constants.VALID_NO); + cfg.setIsAudit(Constants.AUDIT_NOT_YET); + cfg.setCompileId(compileId); + if(cfg.getCfgId()==null){ + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + complexStringCfgService.addStringCfg(cfg); + }else{ + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + complexStringCfgService.updateStringCfg(cfg); + } + model.addAttribute("serviceId",serviceId); + model.addAttribute("action",cfg.getAction()); + addMessage(model,"保存成功,正在为您跳转页面..."); + }else if(cfg.getServiceId()!=null){ + int serviceId=cfg.getServiceId(); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + String tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + long compileId=getCompileId(cfg); + cfg.setTableName(tableName); + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + cfg.setIsValid(Constants.VALID_NO); + cfg.setIsAudit(Constants.AUDIT_NOT_YET); + cfg.setCompileId(compileId); + if(cfg.getCfgId()==null){ + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + complexStringCfgService.addStringCfg(cfg); + }else{ + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + complexStringCfgService.updateStringCfg(cfg); + } + model.addAttribute("serviceId",serviceId); + model.addAttribute("action",cfg.getAction()); + addMessage(model,"保存成功,正在为您跳转页面..."); + } + } + }else{ + addMessage(model,"保存失败!"); + logger.error("无法确定IP配置的表名!"); + } + return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName); + } + + /** + * + * auditStringCfg(审核IP配置) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"auditCfg"}) + public String auditStringCfg(String cfgName,ComplexkeywordCfg cfg,Model model) { + model.addAttribute("cfgName", cfgName); + if(cfg==null){ + logger.error("无法审核空的配置!"); + }else if(!StringUtils.isBlank(cfg.getTableName())){ + int audit=complexStringCfgService.getIsAudit(cfg); + if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){ + logger.error("审核通过的配置只能取消审核通过!"); + }else{ + cfg.setAuditorId(cfg.getCurrentUser().getId()); + cfg.setAuditTime(new Date()); + + if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0 + cfg.setIsValid(Constants.VALID_NO); + }else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1 + cfg.setIsValid(Constants.VALID_YES); + } + int result=complexStringCfgService.auditStringCfg(cfg); + } + + }else if(cfg.getServiceId()!=null){ + int serviceId=cfg.getServiceId(); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + String tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + cfg.setTableName(tableName); + int audit=complexStringCfgService.getIsAudit(cfg); + if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){ + logger.error("审核通过的配置只能取消审核通过!"); + }else{ + cfg.setAuditorId(cfg.getCurrentUser().getId()); + cfg.setAuditTime(new Date()); + + if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0 + cfg.setIsValid(Constants.VALID_NO); + }else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1 + cfg.setIsValid(Constants.VALID_YES); + } + int result=complexStringCfgService.auditStringCfg(cfg); + } + } + } + }else{ + logger.error("无法确定IP配置的表名!"); + } + return "redirect:" + adminPath + "/cfg/complex/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName; + } + /** + * + * auditStringCfg(删除IP配置,逻辑删除) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"deleteCfg"}) + public String deleteStringCfg(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) { + model.addAttribute("serviceId", serviceId); + model.addAttribute("cfgName", cfgName); + model.addAttribute("action", action); + model.addAttribute("cfgType","complex"); + if(!StringUtils.isBlank(tableName)){ + int audit=complexStringCfgService.getIsAudit(tableName,cfgId); + //未审核时可删除 + if(audit!=Constants.AUDIT_YES){ + ComplexkeywordCfg cfg=new ComplexkeywordCfg(); + cfg.setCfgId(cfgId); + cfg.setTableName(tableName); + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + cfg.setIsValid(Constants.VALID_DEL); + int result=complexStringCfgService.deleteStringCfg(cfg); + addMessage(model,"删除成功,正在为您跳转页面..."); + }else{ + logger.error("通过审核的配置不能删除!"); + } + + }else if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + tableName=serviceConfigInfo.getTableName(); + if(!StringUtils.isBlank(tableName)){ + ComplexkeywordCfg cfg=new ComplexkeywordCfg(); + cfg.setCfgId(cfgId); + cfg.setTableName(tableName); + int audit=complexStringCfgService.getIsAudit(cfg); + //未审核时可删除 + if(audit!=Constants.AUDIT_YES){ + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + cfg.setIsValid(Constants.VALID_DEL); + int result=complexStringCfgService.deleteStringCfg(cfg); + addMessage(model,"删除成功,正在为您跳转页面..."); + }else{ + logger.error("通过审核的配置不能删除!"); + } + } + } + }else{ + logger.error("无法确定IP配置的表名!"); + } + return "/cfg/resultPage"; + } + /** + * + * getCompileId(获取编译ID) + * (这里描述这个方法适用条件 – 可选) + * @return + *long + * @exception + * @since 1.0.0 + */ + protected long getCompileId(BaseCfg cfg){ + return 0; + } +} diff --git a/src/main/java/com/nis/web/controller/configuration/NumCfgController.java b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java new file mode 100644 index 000000000..a8bba132b --- /dev/null +++ b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java @@ -0,0 +1,263 @@ +package com.nis.web.controller.configuration; + +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.nis.domain.Page; +import com.nis.domain.ServiceConfigInfo; +import com.nis.domain.configuration.BaseCfg; +import com.nis.domain.configuration.NumBoundaryCfg; +import com.nis.domain.configuration.RequestInfo; +import com.nis.domain.configuration.ServiceDictInfo; +import com.nis.util.Constants; +import com.nis.web.controller.BaseController; + +/** + * 字符串相关配置控制类 + * @author dell + * + */ +@Controller +@RequestMapping("${adminPath}/cfg/num") +public class NumCfgController extends BaseController{ + + @RequestMapping(value = {"list"}) + public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")NumBoundaryCfg cfg,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + if(cfg!=null){ + Integer serviceId=cfg.getServiceId(); + logger.info("servcice id is "+serviceId); + if(serviceId!=null){ + model.addAttribute("serviceId", serviceId); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + Page searchPage=new Page(request, response, 1); + if(pageNo!=null) searchPage.setPageNo(pageNo); + if(pageSize!=null) searchPage.setPageSize(pageSize); + if(cfg.getPage()!=null){ + if(!StringUtils.isBlank(cfg.getPage().getOrderBy())); + searchPage.setOrderBy(cfg.getPage().getOrderBy()); + } + Page page = numCfgService.findPage(searchPage, cfg); + model.addAttribute("page", page); + model.addAttribute("action", cfg.getAction()); + List requestInfos=requestInfoService.getValidRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findLableDict(); + model.addAttribute("lables", lables); + }else{ + logger.error("未获取到正确的serviceId"); + } + } + } + + return "/cfg/numCfgList"; + } + + + @RequestMapping(value = {"form"}) + public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + model.addAttribute("action", action); + model.addAttribute("serviceId", serviceId); + logger.info("sercice id is "+serviceId); + if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + NumBoundaryCfg cfg=new NumBoundaryCfg(); + cfg.initDefaultValue(); + cfg.setAction(action); + cfg.setServiceId(serviceId); + model.addAttribute("_cfg", cfg); + List requestInfos=requestInfoService.getValidRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findLableDict(); + model.addAttribute("lables", lables); + } + }else{ + logger.error("未获取到正确的serviceId"); + } + + return "/cfg/numCfgForm"; + } + @RequestMapping(value = {"updateForm"}) + public String updateStringCfgForm(int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { + model.addAttribute("cfgName", cfgName); + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", action); + if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + NumBoundaryCfg searchBean=new NumBoundaryCfg(); + searchBean.setCfgId(cfgId); + NumBoundaryCfg cfg=numCfgService.getNumCfgById(searchBean); + model.addAttribute("_cfg", cfg); + List requestInfos=requestInfoService.getAllRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + List fls=serviceDictInfoService.findAllFlDict(); + model.addAttribute("fls", fls); + List xzs=serviceDictInfoService.findAllXzDict(); + model.addAttribute("xzs", xzs); + List lables=serviceDictInfoService.findAllLableDict(); + model.addAttribute("lables", lables); + + } + }else{ + logger.error("未获取到正确的表名"); + } + + return "/cfg/numCfgForm"; + } + + /** + * + * addStringCfg(新增IP配置) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"saveOrUpdateCfg"}) + public String saveOrUpdateStringCfg(String cfgName,Model model, NumBoundaryCfg cfg) { + model.addAttribute("cfgName",cfgName); + model.addAttribute("cfgType","num"); + logger.info("saveOrUpdateStringCfg loaded"); + if(cfg==null){ + logger.error("无法保存空的配置!"); + addMessage(model,"保存失败!"); + }else if(cfg.getServiceId()!=null){ + int serviceId=cfg.getServiceId(); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + long compileId=getCompileId(cfg); + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + cfg.setIsValid(Constants.VALID_NO); + cfg.setIsAudit(Constants.AUDIT_NOT_YET); + cfg.setCompileId(compileId); + if(cfg.getCfgId()==null){ + cfg.setCreatorId(cfg.getCurrentUser().getId()); + cfg.setCreateTime(new Date()); + numCfgService.addNumCfg(cfg); + }else{ + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + numCfgService.updateNumCfg(cfg); + } + model.addAttribute("serviceId",serviceId); + model.addAttribute("action",cfg.getAction()); + addMessage(model,"保存成功,正在为您跳转页面..."); + } + }else{ + addMessage(model,"保存失败!"); + logger.error("无法确定IP配置的表名!"); + } + return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName); + } + + /** + * + * auditStringCfg(审核IP配置) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"auditCfg"}) + public String auditStringCfg(String cfgName,NumBoundaryCfg cfg,Model model) { + model.addAttribute("cfgName", cfgName); + if(cfg==null){ + logger.error("无法审核空的配置!"); + }else if(cfg.getServiceId()!=null){ + int serviceId=cfg.getServiceId(); + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + int audit=numCfgService.getIsAudit(cfg); + if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){ + logger.error("审核通过的配置只能取消审核通过!"); + }else{ + cfg.setAuditorId(cfg.getCurrentUser().getId()); + cfg.setAuditTime(new Date()); + + if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0 + cfg.setIsValid(Constants.VALID_NO); + }else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1 + cfg.setIsValid(Constants.VALID_YES); + } + int result=numCfgService.auditNumCfg(cfg); + } + } + }else{ + logger.error("无法确定IP配置的表名!"); + } + return "redirect:" + adminPath + "/cfg/num/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName; + } + /** + * + * auditStringCfg(删除IP配置,逻辑删除) + * (这里描述这个方法适用条件 – 可选) + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequestMapping(value = {"deleteCfg"}) + public String deleteStringCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) { + model.addAttribute("serviceId", serviceId); + model.addAttribute("cfgName", cfgName); + model.addAttribute("action", action); + model.addAttribute("cfgType","num"); + if(serviceId!=null){ + ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); + if(serviceConfigInfo!=null){ + NumBoundaryCfg cfg=new NumBoundaryCfg(); + cfg.setCfgId(cfgId); + int audit=numCfgService.getIsAudit(cfg); + //未审核时可删除 + if(audit!=Constants.AUDIT_YES){ + cfg.setEditorId(cfg.getCurrentUser().getId()); + cfg.setEditTime(new Date()); + cfg.setIsValid(Constants.VALID_DEL); + int result=numCfgService.deleteNumCfg(cfg); + addMessage(model,"删除成功,正在为您跳转页面..."); + }else{ + logger.error("通过审核的配置不能删除!"); + } + } + }else{ + logger.error("无法确定IP配置的表名!"); + } + return "/cfg/resultPage"; + } + /** + * + * getCompileId(获取编译ID) + * (这里描述这个方法适用条件 – 可选) + * @return + *long + * @exception + * @since 1.0.0 + */ + protected long getCompileId(BaseCfg cfg){ + return 0; + } +} diff --git a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.java b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.java new file mode 100644 index 000000000..8d1b2b608 --- /dev/null +++ b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.java @@ -0,0 +1,29 @@ +package com.nis.web.dao.configuration; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import com.nis.domain.configuration.ComplexkeywordCfg; +import com.nis.web.dao.CrudDao; +import com.nis.web.dao.MyBatisDao; + +/** + * IP相关配置数据处理类 + * @author dell + * + */ +@MyBatisDao +public interface ComplexStringCfgDao extends CrudDao{ + public ComplexkeywordCfg getById(@Param("tableName")String tableName,@Param("cfgId")Long id) ; + public ComplexkeywordCfg get(ComplexkeywordCfg entity) ; + public List findList(ComplexkeywordCfg entity) ; + public int insert(ComplexkeywordCfg entity) ; + public int updateByPrimaryKeySelective(ComplexkeywordCfg entity) ; + public int updateValid(ComplexkeywordCfg entity) ; + public int audit(ComplexkeywordCfg entity) ; + public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id); + public int getIsValid(ComplexkeywordCfg entity); + public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id); + public int getIsAudit(ComplexkeywordCfg entity); +} diff --git a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml new file mode 100644 index 000000000..8a0811a3d --- /dev/null +++ b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CFG_ID, CFG_DESC,DISTRICT, KEYWORDS,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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN + + + r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.DISTRICT as district, r.KEYWORDS as keywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit, + r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime, + r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify, + r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin, + r.AREA_EFFECTIVE_IDS AS areaEffectiveIds + + + CFG_DESC,DISTRICT,KEYWORDS, 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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS + + + #{cfgDesc,jdbcType=VARCHAR},#{district,jdbcType=VARCHAR},#{keywords,jdbcType=VARCHAR},#{action,jdbcType=INTEGER}, + #{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{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}, + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}, + #{areaEffectiveIds,jdbcType=VARCHAR} + + + + + + + + SELECT LAST_INSERT_ID() + + insert into ${tableName} ( + + )values ( + + ) + + + update ${tableName} + + + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, + + + district = #{district,jdbcType=VARCHAR}, + + + keywords = #{keywords,jdbcType=VARCHAR}, + + + action = #{action,jdbcType=INTEGER}, + + + is_valid = #{isValid,jdbcType=INTEGER}, + + + is_audit = #{isAudit,jdbcType=INTEGER}, + + + creator_id = #{creatorId,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + editor_id = #{editorId,jdbcType=INTEGER}, + + + edit_time = #{editTime,jdbcType=TIMESTAMP}, + + + auditor_id = #{auditorId,jdbcType=INTEGER}, + + + audit_time = #{auditTime,jdbcType=TIMESTAMP}, + + + service_id = #{serviceId,jdbcType=INTEGER}, + + + request_id = #{requestId,jdbcType=INTEGER}, + + + compile_id = #{compileId,jdbcType=INTEGER}, + + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, + + + classify = #{classify,jdbcType=VARCHAR}, + + + attribute = #{attribute,jdbcType=VARCHAR}, + + + lable = #{lable,jdbcType=VARCHAR}, + + + expr_type=#{exprType,jdbcType=INTEGER}, + + + match_method=#{matchMethod,jdbcType=INTEGER}, + + + is_hexbin=#{isHexbin,jdbcType=INTEGER}, + + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, + + + + where cfg_id = #{cfgId,jdbcType=BIGINT} + + + + update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT} + + + update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP} + + ,is_valid = #{isValid,jdbcType=INTEGER} + + where cfg_id = #{cfgId,jdbcType=BIGINT} + + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/NumCfgDao.java b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.java new file mode 100644 index 000000000..2d79f65b3 --- /dev/null +++ b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.java @@ -0,0 +1,29 @@ +package com.nis.web.dao.configuration; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import com.nis.domain.configuration.NumBoundaryCfg; +import com.nis.web.dao.CrudDao; +import com.nis.web.dao.MyBatisDao; + +/** + * IP相关配置数据处理类 + * @author dell + * + */ +@MyBatisDao +public interface NumCfgDao extends CrudDao{ + public NumBoundaryCfg getById(@Param("cfgId")Long id) ; + public NumBoundaryCfg get(NumBoundaryCfg entity) ; + public List findList(NumBoundaryCfg entity) ; + public int insert(NumBoundaryCfg entity) ; + public int updateByPrimaryKeySelective(NumBoundaryCfg entity) ; + public int updateValid(NumBoundaryCfg entity) ; + public int audit(NumBoundaryCfg entity) ; + public int getIsValid(@Param("cfgId")Long id); + public int getIsValid(NumBoundaryCfg entity); + public int getIsAudit(@Param("cfgId")Long id); + public int getIsAudit(NumBoundaryCfg entity); +} diff --git a/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml new file mode 100644 index 000000000..efa6919be --- /dev/null +++ b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CFG_ID, CFG_DESC, LOW_BOUNADRY,UP_BOUNADRY,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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN + + + r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.LOW_BOUNADRY as lowBounadry,r.UP_BOUNADRY as upBounadry, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit, + r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime, + r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify, + r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin, + r.AREA_EFFECTIVE_IDS AS areaEffectiveIds + + + CFG_DESC, LOW_BOUNADRY,UP_BOUNADRY, 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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS + + + #{cfgDesc,jdbcType=VARCHAR},#{lowBounadry,jdbcType=BIGINT},#{upBounadry,jdbcType=BIGINT},#{action,jdbcType=INTEGER}, + #{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{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}, + #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}, + #{areaEffectiveIds,jdbcType=VARCHAR} + + + + + + + + SELECT LAST_INSERT_ID() + + insert into num_boundary_cfg ( + + )values ( + + ) + + + update num_boundary_cfg + + + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, + + + low_bounadry = #{lowBounadry,jdbcType=BIGINT}, + + + up_Bounadry = #{upBounadry,jdbcType=BIGINT}, + + + action = #{action,jdbcType=INTEGER}, + + + is_valid = #{isValid,jdbcType=INTEGER}, + + + is_audit = #{isAudit,jdbcType=INTEGER}, + + + creator_id = #{creatorId,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + editor_id = #{editorId,jdbcType=INTEGER}, + + + edit_time = #{editTime,jdbcType=TIMESTAMP}, + + + auditor_id = #{auditorId,jdbcType=INTEGER}, + + + audit_time = #{auditTime,jdbcType=TIMESTAMP}, + + + service_id = #{serviceId,jdbcType=INTEGER}, + + + request_id = #{requestId,jdbcType=INTEGER}, + + + compile_id = #{compileId,jdbcType=INTEGER}, + + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, + + + classify = #{classify,jdbcType=VARCHAR}, + + + attribute = #{attribute,jdbcType=VARCHAR}, + + + lable = #{lable,jdbcType=VARCHAR}, + + + expr_type=#{exprType,jdbcType=INTEGER}, + + + match_method=#{matchMethod,jdbcType=INTEGER}, + + + is_hexbin=#{isHexbin,jdbcType=INTEGER}, + + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, + + + + where cfg_id = #{cfgId,jdbcType=BIGINT} + + + + update NUM_BOUNDARY_CFG set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT} + + + update NUM_BOUNDARY_CFG set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP} + + ,is_valid = #{isValid,jdbcType=INTEGER} + + where cfg_id = #{cfgId,jdbcType=BIGINT} + + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/ComplexStringCfgService.java b/src/main/java/com/nis/web/service/configuration/ComplexStringCfgService.java new file mode 100644 index 000000000..b9af64270 --- /dev/null +++ b/src/main/java/com/nis/web/service/configuration/ComplexStringCfgService.java @@ -0,0 +1,190 @@ +package com.nis.web.service.configuration; + +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataAccessException; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.nis.domain.configuration.ComplexkeywordCfg; +import com.nis.web.dao.configuration.ComplexStringCfgDao; +import com.nis.web.service.CrudService; + +/** + * String相关配置事务类 + * @author dell + * + */ +@Service +public class ComplexStringCfgService extends CrudService { + @Autowired + protected ComplexStringCfgDao complexStringCfgDao; + /** + * + * addStringCfg(新增IP类配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int addStringCfg(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.insert(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return 0; + cfg.setTableName(tableName); + logger.info("save "+tableName); + return complexStringCfgDao.insert(cfg); + } + + } + /** + * + * updateStringCfg(更新IP类配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int updateStringCfg(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.updateByPrimaryKeySelective(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return 0; + cfg.setTableName(tableName); + logger.info("update "+tableName); + return complexStringCfgDao.updateByPrimaryKeySelective(cfg); + } + + } + /** + * + * auditStringCfg(审核IP类配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int auditStringCfg(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.audit(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return 0; + cfg.setTableName(tableName); + logger.info("aduit "+tableName); + return complexStringCfgDao.audit(cfg); + } + + } + /** + * + * deleteStringCfg(删除IP类配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int deleteStringCfg(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.updateValid(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return 0; + cfg.setTableName(tableName); + logger.info("delete "+tableName); + return complexStringCfgDao.updateValid(cfg); + } + + } + /** + * + * getStringCfg(根据IP与类名获取IP配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param clazz + * @param id + * @return + *ComplexkeywordCfg + * @exception + * @since 1.0.0 + */ + public ComplexkeywordCfg getStringCfgById(Class clazz,long id){ + String tableName=getTableName(clazz.getSimpleName()); + if(StringUtils.isBlank(tableName)) + return null; + logger.info("get "+tableName); + return complexStringCfgDao.getById(tableName, id); + } + /** + * + * getStringCfg(根据IP与类名获取IP配置) + * (继承ComplexkeywordCfg这个类方可使用) + * @param clazz + * @param id + * @return + *ComplexkeywordCfg + * @exception + * @since 1.0.0 + */ + public ComplexkeywordCfg getStringCfgById(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.get(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return null; + cfg.setTableName(tableName); + logger.info("get "+tableName); + return complexStringCfgDao.get(cfg); + } + + } + public Integer getIsValid(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.getIsValid(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return null; + cfg.setTableName(tableName); + return complexStringCfgDao.getIsValid(cfg); + } + + } + public Integer getIsValid(String tableName, long id){ + return complexStringCfgDao.getIsValid(tableName,id); + } + public Integer getIsAudit(ComplexkeywordCfg cfg){ + if(!StringUtils.isBlank(cfg.getTableName())){ + return complexStringCfgDao.getIsAudit(cfg); + }else{ + String tableName=getTableName(cfg.getClass().getSimpleName()); + if(StringUtils.isBlank(tableName)) + return null; + cfg.setTableName(tableName); + return complexStringCfgDao.getIsAudit(cfg); + } + + } + public Integer getIsAudit(String tableName, long id){ + return complexStringCfgDao.getIsAudit(tableName,id); + } +} diff --git a/src/main/java/com/nis/web/service/configuration/NumCfgService.java b/src/main/java/com/nis/web/service/configuration/NumCfgService.java new file mode 100644 index 000000000..5187b1209 --- /dev/null +++ b/src/main/java/com/nis/web/service/configuration/NumCfgService.java @@ -0,0 +1,117 @@ +package com.nis.web.service.configuration; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataAccessException; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.nis.domain.configuration.NumBoundaryCfg; +import com.nis.web.dao.configuration.NumCfgDao; +import com.nis.web.service.CrudService; + +/** + * Num相关配置事务类 + * @author dell + * + */ +@Service +public class NumCfgService extends CrudService { + @Autowired + protected NumCfgDao numCfgDao; + /** + * + * addNumCfg(新增IP类配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int addNumCfg(NumBoundaryCfg cfg){ + return numCfgDao.insert(cfg); + } + /** + * + * updateNumCfg(更新IP类配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int updateNumCfg(NumBoundaryCfg cfg){ + return numCfgDao.updateByPrimaryKeySelective(cfg); + } + /** + * + * auditNumCfg(审核IP类配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int auditNumCfg(NumBoundaryCfg cfg){ + return numCfgDao.audit(cfg); + } + /** + * + * deleteNumCfg(删除IP类配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param cfg + * @return + *int + * @exception + * @since 1.0.0 + */ + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public int deleteNumCfg(NumBoundaryCfg cfg){ + return numCfgDao.updateValid(cfg); + } + /** + * + * getNumCfg(根据IP与类名获取IP配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param clazz + * @param id + * @return + *NumBoundaryCfg + * @exception + * @since 1.0.0 + */ + public NumBoundaryCfg getNumCfgById(long id){ + return numCfgDao.getById(id); + } + /** + * + * getNumCfg(根据IP与类名获取IP配置) + * (继承NumBoundaryCfg这个类方可使用) + * @param clazz + * @param id + * @return + *NumBoundaryCfg + * @exception + * @since 1.0.0 + */ + public NumBoundaryCfg getNumCfgById(NumBoundaryCfg cfg){ + return numCfgDao.get(cfg); + } + public Integer getIsValid(NumBoundaryCfg cfg){ + return numCfgDao.getIsValid(cfg); + } + public Integer getIsValid(long id){ + return numCfgDao.getIsValid(id); + } + public Integer getIsAudit(NumBoundaryCfg cfg){ + return numCfgDao.getIsAudit(cfg); + } + public Integer getIsAudit(long id){ + return numCfgDao.getIsAudit(id); + } +} diff --git a/src/main/webapp/WEB-INF/include/form/complexInfo.jsp b/src/main/webapp/WEB-INF/include/form/complexInfo.jsp new file mode 100644 index 000000000..e2dc40770 --- /dev/null +++ b/src/main/webapp/WEB-INF/include/form/complexInfo.jsp @@ -0,0 +1,121 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> +

管控配置

+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ + <%--
+
+ +
+ + +
+
+
--%> +
+
+ +
+ + + <%-- --%> +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp new file mode 100644 index 000000000..bf7b8f752 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp @@ -0,0 +1,102 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + + + +
+ +

+ + 新增 + 修改 +

+ +
+
+
+
+
+ + 新增 + 修改 +
+ +
+
+ +
+
+ <%@include file="/WEB-INF/include/form/complexInfo.jsp" %> + + + + + + + + + <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> + + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp new file mode 100644 index 000000000..e4e118ea2 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp @@ -0,0 +1,212 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + + + +
+ + +

+ 详情 +

+ +
+
+
+
+
+ 详情 +
+
+ +
+
+
+
+ + + +
+ : + + + + + + + : + + + + + + + + : + + + 按创建时间顺序 + 按创建时间倒序 + 按修改时间顺序 + 按修改时间倒序 + 按审核时间顺序 + 按审核时间倒序 + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
配置ID配置描述匹配区域关键字管控类型业务id来函编译id是否区域管控分类性质标签区域生效id有效标识是否审核创建人员配置时间修改人员修改时间审核人员审核时间
${cfg.cfgId }${cfg.cfgDesc }${cfg.district }${cfg.keywords } + 阻断 + 监测 + 封堵白名单 + 监测白名单 + 封堵监测白名单 + 灰名单 + ${cfg.serviceId }${cfg.requestName }${cfg.compileId } + + + ${cfg.classifyName }${cfg.attributeName }${cfg.lableName }${cfg.areaEffectiveIds } + + + 已删除 + + + + + + + + ${cfg.creatorName }${cfg.editorName }${cfg.auditorName } +
+ + +
+
+
${page}
+
+ +
+
+
+ + + \ No newline at end of file