(1)数值类配置dao,service,controller提交
(2)增强字符串类配置dao,service,controller,页面提交
This commit is contained in:
@@ -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<ComplexkeywordCfg> searchPage=new Page<ComplexkeywordCfg>(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<ComplexkeywordCfg> page = complexStringCfgService.findPage(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
model.addAttribute("tableName", tableName);
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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;
|
||||
}
|
||||
}
|
||||
@@ -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<NumBoundaryCfg> searchPage=new Page<NumBoundaryCfg>(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<NumBoundaryCfg> page = numCfgService.findPage(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", cfg.getAction());
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> 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;
|
||||
}
|
||||
}
|
||||
@@ -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<ComplexkeywordCfg>{
|
||||
public ComplexkeywordCfg getById(@Param("tableName")String tableName,@Param("cfgId")Long id) ;
|
||||
public ComplexkeywordCfg get(ComplexkeywordCfg entity) ;
|
||||
public List<ComplexkeywordCfg> 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);
|
||||
}
|
||||
@@ -0,0 +1,394 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.ComplexStringCfgDao" >
|
||||
<resultMap id="ComplexStringMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="keywords" property="keywords" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ComplexStringMapWithUser" type="com.nis.domain.configuration.ComplexkeywordCfg" extends="ComplexStringMap">
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="ComplexkeywordCfg_Column_List_with_id" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Column_List_with_id_alias" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Column_List" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="ComplexkeywordCfg_Value_List" >
|
||||
#{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}
|
||||
</sql>
|
||||
<select id="getById" resultMap="ComplexStringMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="get" resultMap="ComplexStringMap" >
|
||||
SELECT
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id" />
|
||||
FROM ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="district != null">
|
||||
AND DISTRICT=#{district,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
AND KEYWORDS=#{keywords,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="ComplexStringMapWithUser">
|
||||
select
|
||||
<!--<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>-->
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id_alias"/>
|
||||
<!-- </otherwise>
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
|
||||
,sdil.item_value as lableName
|
||||
</trim>
|
||||
from ${tableName} r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
|
||||
<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 r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="district != null">
|
||||
AND r.DISTRICT like concat(concat('%',#{district,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
AND r.KEYWORDS like concat(concat('%',#{keywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND r.EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND r.MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND r.IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findAllList" resultMap="ComplexStringMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ${tableName} (
|
||||
<include refid="ComplexkeywordCfg_Column_List" />
|
||||
)values (
|
||||
<include refid="ComplexkeywordCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="district != null">
|
||||
district = #{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
keywords = #{keywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
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>
|
||||
<update id="audit" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_AUDIT FROM ${tableName}
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
</mapper>
|
||||
29
src/main/java/com/nis/web/dao/configuration/NumCfgDao.java
Normal file
29
src/main/java/com/nis/web/dao/configuration/NumCfgDao.java
Normal file
@@ -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<NumBoundaryCfg>{
|
||||
public NumBoundaryCfg getById(@Param("cfgId")Long id) ;
|
||||
public NumBoundaryCfg get(NumBoundaryCfg entity) ;
|
||||
public List<NumBoundaryCfg> 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);
|
||||
}
|
||||
397
src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml
Normal file
397
src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml
Normal file
@@ -0,0 +1,397 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.NumCfgDao" >
|
||||
<resultMap id="NumMap" type="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="low_bounadry" property="lowBounadry" jdbcType="BIGINT" />
|
||||
<result column="up_boundary" property="upBounadry" jdbcType="BIGINT" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="NumMapWithUser" type="com.nis.domain.configuration.NumBoundaryCfg" extends="NumMap">
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="NumCfg_Column_List_with_id" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="NumCfg_Column_List_with_id_alias" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="NumCfg_Column_List" >
|
||||
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
|
||||
</sql>
|
||||
<sql id="NumCfg_Value_List" >
|
||||
#{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}
|
||||
</sql>
|
||||
<select id="getById" resultMap="NumMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="NumCfg_Column_List_with_id" />
|
||||
FROM num_boundary_cfg
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="get" resultMap="NumMap" >
|
||||
SELECT
|
||||
<include refid="NumCfg_Column_List_with_id" />
|
||||
FROM num_boundary_cfg
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
AND LOW_BOUNADRY=#{lowBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
AND UP_BOUNADRY=#{upBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgKeywords != null">
|
||||
AND CFG_KEYWORDS=#{cfgKeywords,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND classify=#{classify,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND attribute=#{attribute,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND lable=#{lable,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="findList" resultMap="NumMapWithUser">
|
||||
select
|
||||
<!--<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>-->
|
||||
<include refid="NumCfg_Column_List_with_id_alias"/>
|
||||
<!-- </otherwise>
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
|
||||
,sdil.item_value as lableName
|
||||
</trim>
|
||||
from num_boundary_cfg r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0
|
||||
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0
|
||||
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0
|
||||
<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 r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
AND r.LOW_BOUNADRY=#{lowBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
AND r.UP_BOUNADRY=#{upBounadry,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
AND r.EXPR_TYPE=#{exprType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
AND r.MATCH_METHOD=#{matchMethod,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
AND r.IS_HEXBIN=#{isHexbin,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="findAllList" resultMap="NumMap">
|
||||
select
|
||||
<choose>
|
||||
<when test="page !=null and page.fields != null and page.fields != ''">
|
||||
${page.fields}
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="NumCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from num_boundary_cfg
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into num_boundary_cfg (
|
||||
<include refid="NumCfg_Column_List" />
|
||||
)values (
|
||||
<include refid="NumCfg_Value_List" />
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
update num_boundary_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lowBounadry != null">
|
||||
low_bounadry = #{lowBounadry,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="upBounadry != null">
|
||||
up_Bounadry = #{upBounadry,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
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>
|
||||
<update id="audit" parameterType="com.nis.domain.configuration.NumBoundaryCfg" >
|
||||
update NUM_BOUNDARY_CFG set is_audit = #{isAudit,jdbcType=INTEGER}, auditor_id = #{auditorId,jdbcType=INTEGER}, audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_VALID FROM NUM_BOUNDARY_CFG
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
|
||||
SELECT IS_AUDIT FROM NUM_BOUNDARY_CFG
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -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<ComplexStringCfgDao,ComplexkeywordCfg> {
|
||||
@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);
|
||||
}
|
||||
}
|
||||
@@ -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<NumCfgDao,NumBoundaryCfg> {
|
||||
@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);
|
||||
}
|
||||
}
|
||||
121
src/main/webapp/WEB-INF/include/form/complexInfo.jsp
Normal file
121
src/main/webapp/WEB-INF/include/form/complexInfo.jsp
Normal file
@@ -0,0 +1,121 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section">管控配置</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">配置描述</label>
|
||||
<div class="col-md-8">
|
||||
<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">匹配区域</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="district" value="${_cfg.district}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">关键词</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="keywords" value="${_cfg.keywords}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">管控类型</label>
|
||||
<div class="col-md-8">
|
||||
<select name="action" class="selectpicker select2 form-control" readonly="readonly">
|
||||
<option value="1" <c:if test="${_cfg.action==1}">selected</c:if><c:if test="${_cfg.action!=1}">disabled="disabled"</c:if> >阻断</option>
|
||||
<option value="2" <c:if test="${_cfg.action==2}">selected</c:if><c:if test="${_cfg.action!=2}">disabled="disabled"</c:if> >监测</option>
|
||||
<option value="5" <c:if test="${_cfg.action==5}">selected</c:if><c:if test="${_cfg.action!=5}">disabled="disabled"</c:if> >封堵白名单</option>
|
||||
<option value="6" <c:if test="${_cfg.action==6}">selected</c:if><c:if test="${_cfg.action!=6}">disabled="disabled"</c:if> >监测白名单</option>
|
||||
<option value="7" <c:if test="${_cfg.action==7}">selected</c:if><c:if test="${_cfg.action!=7}">disabled="disabled"</c:if> >封堵监测都白名单</option>
|
||||
<option value="8" <c:if test="${_cfg.action==8}">selected</c:if><c:if test="${_cfg.action!=8}">disabled="disabled"</c:if> >灰名单</option>
|
||||
</select>
|
||||
<input class="form-control" type="hidden" name="action" value="${_cfg.action}">
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否区域管控</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
>是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
>否
|
||||
</label>
|
||||
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">表达式类型</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType " value="1"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>
|
||||
>与表达式
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType" value="0"
|
||||
<c:if test="${_cfg.exprType==0}">checked</c:if>
|
||||
>无表达式
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">匹配方式</label>
|
||||
<div class="col-md-8">
|
||||
<select name="matchMethod" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.matchMethod==0 }">selected</c:if>><spring:message code="子串匹配"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.matchMethod==1 }">selected</c:if>><spring:message code="右匹配"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.matchMethod==2 }">selected</c:if>><spring:message code="左匹配"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.matchMethod==3 }">selected</c:if>><spring:message code="完全匹配"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">是否hex二进制</label>
|
||||
<div class="col-md-8">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control" title="--请选择--" >
|
||||
<option value="0" <c:if test="${_cfg.isHexbin==0 }">selected</c:if>><spring:message code="大小写不敏感,且非HEX"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.isHexbin==1 }">selected</c:if>><spring:message code="HEX格式二进制"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.isHexbin==2 }">selected</c:if>><spring:message code="大小写敏感,且非HEX"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">区域生效id</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
102
src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp
Normal file
102
src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp
Normal file
@@ -0,0 +1,102 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#save").on("click",function(){
|
||||
$("#cfgFrom").attr("action","${ctx}/cfg/complex/saveOrUpdateCfg");
|
||||
$("#save").submit();
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</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><spring:message code="${cfgName}"></spring:message>
|
||||
<c:if test="${empty _cfg.cfgId}">新增</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">修改</c:if>
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<input type="hidden" name="action" value="${_cfg.action}">
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">IP地址</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">配置名称</label>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
|
||||
|
||||
</div>
|
||||
<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">保存</button>
|
||||
<button id="cancel" type="button" class="btn default">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
212
src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp
Normal file
212
src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp
Normal file
@@ -0,0 +1,212 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/complex/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'">新增<spring:message code="${cfgName}"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></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-cogs"></i><spring:message code="${cfgName}"></spring:message>详情
|
||||
</div>
|
||||
<div class="tools">
|
||||
<!-- <a href="javascript:;" class="collapse" data-original-title=""
|
||||
title=""> </a> <a href="#portlet-config" data-toggle="modal"
|
||||
class="config" data-original-title="" title=""> </a> <a
|
||||
href="javascript:;" class="reload" data-original-title=""
|
||||
title=""> </a> <a href="javascript:;" class="remove"
|
||||
data-original-title="" title=""> </a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/complex/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<spring:message code="state"/> : <form:select path="isAudit" class="selectpicker select2" title="--请选择--" >
|
||||
<form:option value=""></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="取消审核通过"></spring:message></form:option>
|
||||
</form:select>
|
||||
<spring:message code="函号"/> :
|
||||
<form:select path="requestId" class="selectpicker select2" title="--请选择--" data-live-search="true" data-live-search-placeholder="搜索">
|
||||
<form:option value=""></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>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
|
||||
</button>
|
||||
<spring:message code="排序"/> :
|
||||
<form:select path="page.orderBy" class="selectpicker select2" title="--请选择--">
|
||||
<form:option value=""></form:option>
|
||||
<form:option value="createTime asc">按创建时间顺序</form:option>
|
||||
<form:option value="createTime desc">按创建时间倒序</form:option>
|
||||
<form:option value="editTime asc">按修改时间顺序</form:option>
|
||||
<form:option value="editTime desc">按修改时间倒序</form:option>
|
||||
<form:option value="auditTime asc">按审核时间顺序</form:option>
|
||||
<form:option value="auditTime desc">按审核时间倒序</form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>配置ID</th>
|
||||
<th>配置描述</th>
|
||||
<th>匹配区域</th>
|
||||
<th>关键字</th>
|
||||
<th>管控类型</th>
|
||||
<th>业务id</th>
|
||||
<th>来函</th>
|
||||
<th>编译id</th>
|
||||
<th>是否区域管控</th>
|
||||
<th>分类</th>
|
||||
<th>性质</th>
|
||||
<th>标签</th>
|
||||
<th>区域生效id</th>
|
||||
<th>有效标识</th>
|
||||
<th>是否审核</th>
|
||||
<th>创建人员</th>
|
||||
<th>配置时间</th>
|
||||
<th>修改人员</th>
|
||||
<th>修改时间</th>
|
||||
<th>审核人员</th>
|
||||
<th>审核时间</th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg">
|
||||
<tr>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.district }</td>
|
||||
<td>${cfg.keywords }</td>
|
||||
<td>
|
||||
<c:if test="${1 eq cfg.action }">阻断</c:if>
|
||||
<c:if test="${2 eq cfg.action }">监测</c:if>
|
||||
<c:if test="${5 eq cfg.action }">封堵白名单</c:if>
|
||||
<c:if test="${6 eq cfg.action }">监测白名单</c:if>
|
||||
<c:if test="${7 eq cfg.action }">封堵监测白名单</c:if>
|
||||
<c:if test="${8 eq cfg.action }">灰名单</c:if>
|
||||
</td>
|
||||
<td>${cfg.serviceId }</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>${cfg.compileId }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}">否</c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">是</c:if>
|
||||
</td>
|
||||
<td>${cfg.classifyName }</td>
|
||||
<td>${cfg.attributeName }</td>
|
||||
<td>${cfg.lableName }</td>
|
||||
<td>${cfg.areaEffectiveIds }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}">否</c:if>
|
||||
<c:if test="${cfg.isValid==1}">是</c:if>
|
||||
<c:if test="${cfg.isValid==-1}">已删除</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="取消审核通过"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<!-- 审核未通过可修改 -->
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '1'}">
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="cancel"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '0'}">
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="unapproved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}">
|
||||
<li><a href="${ctx}/cfg/complex/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure?', this.href)"><spring:message code="修改配置"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="${ctx}/cfg/complex/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="approved"></spring:message></a></li>
|
||||
<li><a href="${ctx}/cfg/complex/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&tableName=${cfg.tableName}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user