音视频文本配置列表界面选中配置,增加编译配置id
导出excel增加性质、分类、标签属性值获取
This commit is contained in:
@@ -60,13 +60,13 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
|||||||
/**
|
/**
|
||||||
* 有效标识
|
* 有效标识
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="valid_identifier")
|
@ExcelField(title="valid_identifier",dictType="VALID_IDENTIFIER")
|
||||||
@Expose
|
@Expose
|
||||||
protected Integer isValid;
|
protected Integer isValid;
|
||||||
/**
|
/**
|
||||||
* 是否审核
|
* 是否审核
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="is_audit")
|
@ExcelField(title="is_audit",dictType="AUDIT_STATUS")
|
||||||
protected Integer isAudit;
|
protected Integer isAudit;
|
||||||
/**
|
/**
|
||||||
* 创建人员
|
* 创建人员
|
||||||
@@ -130,22 +130,22 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
|||||||
/**
|
/**
|
||||||
* 是否区域gk
|
* 是否区域gk
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="whether_area_block")
|
@ExcelField(title="whether_area_block",dictType="WHETHER_AREA_BLOCK")
|
||||||
protected Integer isAreaEffective;
|
protected Integer isAreaEffective;
|
||||||
/**
|
/**
|
||||||
* 分类
|
* 分类
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="type")
|
@ExcelField(title="type",dictType="type")
|
||||||
protected String classify;
|
protected String classify;
|
||||||
/**
|
/**
|
||||||
* 性质
|
* 性质
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="attribute")
|
@ExcelField(title="attribute",dictType="attribute")
|
||||||
protected String attribute;
|
protected String attribute;
|
||||||
/**
|
/**
|
||||||
* 标签
|
* 标签
|
||||||
*/
|
*/
|
||||||
@ExcelField(title="label")
|
@ExcelField(title="label",dictType="label")
|
||||||
protected String lable;
|
protected String lable;
|
||||||
/**
|
/**
|
||||||
* 分类
|
* 分类
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ package com.nis.domain.configuration;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.nis.domain.SysRole;
|
||||||
|
import com.nis.util.excel.ExcelField;
|
||||||
|
import com.nis.util.excel.fieldtype.RoleListType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: CfgIndexInfo.java
|
* @ClassName: CfgIndexInfo.java
|
||||||
@@ -48,6 +52,17 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
|||||||
private List<BaseStringCfg> stringList;
|
private List<BaseStringCfg> stringList;
|
||||||
private List<FileDigestCfg> digestList;
|
private List<FileDigestCfg> digestList;
|
||||||
|
|
||||||
|
@ExcelField(title="拥有角色", align=1, sort=800, fieldType=RoleListType.class)
|
||||||
|
private List<SysRole> userRoleList;
|
||||||
|
|
||||||
|
public List<SysRole> getUserRoleList() {
|
||||||
|
return userRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserRoleList(List<SysRole> userRoleList) {
|
||||||
|
this.userRoleList = userRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
public AvVoipAccountCfg getVoipAccount() {
|
public AvVoipAccountCfg getVoipAccount() {
|
||||||
return voipAccount;
|
return voipAccount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.derby.tools.sysinfo;
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
import org.apache.poi.ss.usermodel.CellStyle;
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
import org.apache.poi.ss.usermodel.Comment;
|
import org.apache.poi.ss.usermodel.Comment;
|
||||||
@@ -39,10 +40,12 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.nis.domain.basics.ServiceDictInfo;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.Encodes;
|
import com.nis.util.Encodes;
|
||||||
import com.nis.util.Reflections;
|
import com.nis.util.Reflections;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
|
import com.nis.util.excel.fieldtype.RoleListType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出Excel文件(导出“XLSX”格式,支持大数据量导出 @see org.apache.poi.ss.SpreadsheetVersion)
|
* 导出Excel文件(导出“XLSX”格式,支持大数据量导出 @see org.apache.poi.ss.SpreadsheetVersion)
|
||||||
@@ -493,7 +496,7 @@ public class ExportExcel {
|
|||||||
* 添加数据(通过annotation.ExportField添加数据)
|
* 添加数据(通过annotation.ExportField添加数据)
|
||||||
* @return list 数据列表
|
* @return list 数据列表
|
||||||
*/
|
*/
|
||||||
public <E> ExportExcel setDataList(Properties msgProp,List<E> list){
|
public <E> ExportExcel setDataList(Properties msgProp,List<E> list,Map map){
|
||||||
for (E e : list){
|
for (E e : list){
|
||||||
int colunm = 0;
|
int colunm = 0;
|
||||||
Row row = this.addRow();
|
Row row = this.addRow();
|
||||||
@@ -512,13 +515,22 @@ public class ExportExcel {
|
|||||||
val = Reflections.invokeMethod(e, ((Method)os[1]).getName(), new Class[] {}, new Object[] {});
|
val = Reflections.invokeMethod(e, ((Method)os[1]).getName(), new Class[] {}, new Object[] {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If is dict, get dict label
|
// If is dict, get dict label
|
||||||
if (StringUtils.isNotBlank(ef.dictType())){
|
if (StringUtils.isNotBlank(ef.dictType())){
|
||||||
val = DictUtils.getDictLabel(ef.dictType(),val==null?"":val.toString() , "");
|
String valStr=val==null?"":val.toString();
|
||||||
|
if("type".equals(ef.dictType()) || "attribute".equals(ef.dictType())
|
||||||
|
|| "label".equals(ef.dictType())){
|
||||||
|
// Get basic info
|
||||||
|
val = getBasicInfo(ef.dictType(),map,valStr);
|
||||||
|
}else{
|
||||||
|
//字典数据已做国际化处理
|
||||||
|
val = msgProp.get(DictUtils.getDictLabel(ef.dictType(), valStr, ""));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}catch(Exception ex) {
|
}catch(Exception ex) {
|
||||||
// Failure to ignore
|
// Failure to ignore
|
||||||
log.info(ex.toString());
|
log.error("Get entity value failed",ex);
|
||||||
val = "";
|
val = "";
|
||||||
}
|
}
|
||||||
this.addCell(row, colunm++, val, ef.align(), ef.fieldType());
|
this.addCell(row, colunm++, val, ef.align(), ef.fieldType());
|
||||||
@@ -528,7 +540,52 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 设置性质、分类、标签等信息
|
||||||
|
* @param dictType
|
||||||
|
* @param map
|
||||||
|
* @param val
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getBasicInfo(String dictType,Map map,String val) {
|
||||||
|
String basicInfo="";
|
||||||
|
List<ServiceDictInfo> list=new ArrayList<ServiceDictInfo>();
|
||||||
|
if("type".equals(dictType)){
|
||||||
|
list=(List<ServiceDictInfo>) map.get("fls");
|
||||||
|
for (String info : val.split(",")) {
|
||||||
|
for (ServiceDictInfo dictInfo : list) {
|
||||||
|
if(info.equals(dictInfo.getServiceDictId().toString())){
|
||||||
|
basicInfo+=","+dictInfo.getItemValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if("attribute".equals(dictType)){
|
||||||
|
list=(List<ServiceDictInfo>) map.get("xzs");
|
||||||
|
for (String info : val.split(",")) {
|
||||||
|
for (ServiceDictInfo dictInfo : list) {
|
||||||
|
if(info.equals(dictInfo.getServiceDictId().toString())){
|
||||||
|
basicInfo+=","+dictInfo.getItemValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if("label".equals(dictType)){
|
||||||
|
list=(List<ServiceDictInfo>) map.get("labels");
|
||||||
|
for (String info : val.split(",")) {
|
||||||
|
for (ServiceDictInfo dictInfo : list) {
|
||||||
|
if(info.equals(dictInfo.getServiceDictId().toString())){
|
||||||
|
basicInfo+=","+dictInfo.getItemValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!StringUtil.isEmpty(basicInfo)){
|
||||||
|
basicInfo=basicInfo.substring(1);
|
||||||
|
}
|
||||||
|
return basicInfo;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 输出数据流
|
* 输出数据流
|
||||||
* @param os 输出数据流
|
* @param os 输出数据流
|
||||||
@@ -594,7 +651,7 @@ public class ExportExcel {
|
|||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Throwable {
|
public static void main(String[] args) throws Throwable {
|
||||||
|
|
||||||
List<String> headerList = Lists.newArrayList();
|
/*List<String> headerList = Lists.newArrayList();
|
||||||
for (int i = 1; i <= 10; i++) {
|
for (int i = 1; i <= 10; i++) {
|
||||||
headerList.add("表头"+i);
|
headerList.add("表头"+i);
|
||||||
}
|
}
|
||||||
@@ -623,7 +680,7 @@ public class ExportExcel {
|
|||||||
ee.dispose();
|
ee.dispose();
|
||||||
|
|
||||||
log.debug("Export success.");
|
log.debug("Export success.");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -451,17 +451,17 @@ public class BaseController {
|
|||||||
if(dict.getRegionType()==1){
|
if(dict.getRegionType()==1){
|
||||||
List<IpCfgTemplate> list = Lists.newArrayList();
|
List<IpCfgTemplate> list = Lists.newArrayList();
|
||||||
list.add(new IpCfgTemplate());
|
list.add(new IpCfgTemplate());
|
||||||
new ExportExcel(msgProp,null, IpCfgTemplate.class, 2).setDataList(msgProp,list).
|
new ExportExcel(msgProp,null, IpCfgTemplate.class, 2).setDataList(msgProp,list,null).
|
||||||
write(request,response, fileName).dispose();
|
write(request,response, fileName).dispose();
|
||||||
}else if(dict.getRegionType()==2){
|
}else if(dict.getRegionType()==2){
|
||||||
List<StringCfgTemplate> list = Lists.newArrayList();
|
List<StringCfgTemplate> list = Lists.newArrayList();
|
||||||
list.add(new StringCfgTemplate());
|
list.add(new StringCfgTemplate());
|
||||||
new ExportExcel(msgProp,null, StringCfgTemplate.class, 2).setDataList(msgProp,list).
|
new ExportExcel(msgProp,null, StringCfgTemplate.class, 2).setDataList(msgProp,list,null).
|
||||||
write(request,response, fileName).dispose();
|
write(request,response, fileName).dispose();
|
||||||
}else if(dict.getRegionType()==3){
|
}else if(dict.getRegionType()==3){
|
||||||
List<ComplexStringCfgTemplate> list = Lists.newArrayList();
|
List<ComplexStringCfgTemplate> list = Lists.newArrayList();
|
||||||
list.add(new ComplexStringCfgTemplate());
|
list.add(new ComplexStringCfgTemplate());
|
||||||
new ExportExcel(msgProp,null, ComplexStringCfgTemplate.class, 2).setDataList(msgProp,list).
|
new ExportExcel(msgProp,null, ComplexStringCfgTemplate.class, 2).setDataList(msgProp,list,null).
|
||||||
write(request,response, fileName).dispose();
|
write(request,response, fileName).dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|||||||
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.SysUser;
|
import com.nis.domain.SysUser;
|
||||||
|
import com.nis.domain.basics.ServiceDictInfo;
|
||||||
import com.nis.domain.basics.SysDictInfo;
|
import com.nis.domain.basics.SysDictInfo;
|
||||||
import com.nis.domain.configuration.AreaBean;
|
import com.nis.domain.configuration.AreaBean;
|
||||||
import com.nis.domain.configuration.AreaIpCfg;
|
import com.nis.domain.configuration.AreaIpCfg;
|
||||||
@@ -53,9 +54,9 @@ public class AvContentController extends BaseController {
|
|||||||
//音视频VOIP配置新增界面
|
//音视频VOIP配置新增界面
|
||||||
@RequestMapping(value = {"/voipForm"})
|
@RequestMapping(value = {"/voipForm"})
|
||||||
@RequiresPermissions(value={"avVoip:config"})
|
@RequiresPermissions(value={"avVoip:config"})
|
||||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,String compileIds,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
cfg.setCompileId(Integer.parseInt(ids));
|
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||||
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||||
initUpdateFormCondition(model, cfg);
|
initUpdateFormCondition(model, cfg);
|
||||||
}else{
|
}else{
|
||||||
@@ -118,9 +119,9 @@ public class AvContentController extends BaseController {
|
|||||||
//修改VOIP配置审核状态
|
//修改VOIP配置审核状态
|
||||||
@RequestMapping(value = {"/auditAvVoip"})
|
@RequestMapping(value = {"/auditAvVoip"})
|
||||||
@RequiresPermissions(value={"avVoip:audit"})
|
@RequiresPermissions(value={"avVoip:audit"})
|
||||||
public String auditVoip(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) {
|
public String auditVoip(Integer isAudit,Integer isValid,String ids,String compileIds,Integer functionId,RedirectAttributes redirectAttributes) {
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = compileIds.split(",");
|
||||||
Date auditTime=new Date();
|
Date auditTime=new Date();
|
||||||
for(String id :idArray){
|
for(String id :idArray){
|
||||||
try {
|
try {
|
||||||
@@ -167,9 +168,9 @@ public class AvContentController extends BaseController {
|
|||||||
//音视频CONTIP新增界面
|
//音视频CONTIP新增界面
|
||||||
@RequestMapping(value = {"/contIpForm"})
|
@RequestMapping(value = {"/contIpForm"})
|
||||||
@RequiresPermissions(value={"avContIp:config"})
|
@RequiresPermissions(value={"avContIp:config"})
|
||||||
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
|
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,String compileIds,@ModelAttribute("cfg")BaseIpCfg cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
cfg.setCompileId(Integer.parseInt(ids));
|
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||||
cfg = avContentCfgService.getContIpCfgById(cfg);
|
cfg = avContentCfgService.getContIpCfgById(cfg);
|
||||||
initUpdateFormCondition(model, cfg);
|
initUpdateFormCondition(model, cfg);
|
||||||
}else{
|
}else{
|
||||||
@@ -206,9 +207,9 @@ public class AvContentController extends BaseController {
|
|||||||
//修改CONTIP配置审核
|
//修改CONTIP配置审核
|
||||||
@RequestMapping(value = {"/auditAvContIp"})
|
@RequestMapping(value = {"/auditAvContIp"})
|
||||||
@RequiresPermissions(value={"avContIp:audit"})
|
@RequiresPermissions(value={"avContIp:audit"})
|
||||||
public String auditContIp(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
public String auditContIp(Integer isAudit,Integer isValid,String ids,String compileIds,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = compileIds.split(",");
|
||||||
Date auditTime=new Date();
|
Date auditTime=new Date();
|
||||||
for(String id :idArray){
|
for(String id :idArray){
|
||||||
try {
|
try {
|
||||||
@@ -238,9 +239,9 @@ public class AvContentController extends BaseController {
|
|||||||
//音视频CONTIP新增界面
|
//音视频CONTIP新增界面
|
||||||
@RequestMapping(value = {"/picIpForm"})
|
@RequestMapping(value = {"/picIpForm"})
|
||||||
@RequiresPermissions(value={"avPicIp:config"})
|
@RequiresPermissions(value={"avPicIp:config"})
|
||||||
public String picIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
|
public String picIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,String compileIds,@ModelAttribute("cfg")BaseIpCfg cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
cfg.setCompileId(Integer.parseInt(ids));
|
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||||
cfg = avContentCfgService.getPicIpCfgById(cfg);
|
cfg = avContentCfgService.getPicIpCfgById(cfg);
|
||||||
initUpdateFormCondition(model, cfg);
|
initUpdateFormCondition(model, cfg);
|
||||||
}else{
|
}else{
|
||||||
@@ -277,9 +278,9 @@ public class AvContentController extends BaseController {
|
|||||||
//修改CONTIP配置审核
|
//修改CONTIP配置审核
|
||||||
@RequestMapping(value = {"/auditPicIp"})
|
@RequestMapping(value = {"/auditPicIp"})
|
||||||
@RequiresPermissions(value={"avPicIp:audit"})
|
@RequiresPermissions(value={"avPicIp:audit"})
|
||||||
public String auditPicIp(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
public String auditPicIp(Integer isAudit,Integer isValid,String ids,String compileIds,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = compileIds.split(",");
|
||||||
Date auditTime=new Date();
|
Date auditTime=new Date();
|
||||||
for(String id :idArray){
|
for(String id :idArray){
|
||||||
try {
|
try {
|
||||||
@@ -309,9 +310,9 @@ public class AvContentController extends BaseController {
|
|||||||
//音视频CONTUrl新增界面
|
//音视频CONTUrl新增界面
|
||||||
@RequestMapping(value = {"/contUrlForm"})
|
@RequestMapping(value = {"/contUrlForm"})
|
||||||
@RequiresPermissions(value={"avContUrl:config"})
|
@RequiresPermissions(value={"avContUrl:config"})
|
||||||
public String contUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){
|
public String contUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,String compileIds,@ModelAttribute("cfg")BaseStringCfg cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
cfg.setCompileId(Integer.parseInt(ids));
|
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||||
cfg = avContentCfgService.getContUrlCfgById(cfg);
|
cfg = avContentCfgService.getContUrlCfgById(cfg);
|
||||||
initUpdateFormCondition(model, cfg);
|
initUpdateFormCondition(model, cfg);
|
||||||
}else{
|
}else{
|
||||||
@@ -348,9 +349,9 @@ public class AvContentController extends BaseController {
|
|||||||
//修改CONTUrl配置审核
|
//修改CONTUrl配置审核
|
||||||
@RequestMapping(value = {"/auditAvContUrl"})
|
@RequestMapping(value = {"/auditAvContUrl"})
|
||||||
@RequiresPermissions(value={"avContUrl:audit"})
|
@RequiresPermissions(value={"avContUrl:audit"})
|
||||||
public String auditContUrl(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
public String auditContUrl(Integer isAudit,Integer isValid,String ids,String compileIds,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = compileIds.split(",");
|
||||||
Date auditTime=new Date();
|
Date auditTime=new Date();
|
||||||
for(String id :idArray){
|
for(String id :idArray){
|
||||||
try {
|
try {
|
||||||
@@ -380,9 +381,9 @@ public class AvContentController extends BaseController {
|
|||||||
//音视频CONTUrl新增界面
|
//音视频CONTUrl新增界面
|
||||||
@RequestMapping(value = {"/picUrlForm"})
|
@RequestMapping(value = {"/picUrlForm"})
|
||||||
@RequiresPermissions(value={"avPicUrl:config"})
|
@RequiresPermissions(value={"avPicUrl:config"})
|
||||||
public String picUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){
|
public String picUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,String compileIds,@ModelAttribute("cfg")BaseStringCfg cfg){
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
cfg.setCompileId(Integer.parseInt(ids));
|
cfg.setCompileId(Integer.parseInt(compileIds));
|
||||||
cfg = avContentCfgService.getPicUrlCfgById(cfg);
|
cfg = avContentCfgService.getPicUrlCfgById(cfg);
|
||||||
initUpdateFormCondition(model, cfg);
|
initUpdateFormCondition(model, cfg);
|
||||||
}else{
|
}else{
|
||||||
@@ -419,9 +420,9 @@ public class AvContentController extends BaseController {
|
|||||||
//修改CONTUrl配置审核
|
//修改CONTUrl配置审核
|
||||||
@RequestMapping(value = {"/auditAvPicUrl"})
|
@RequestMapping(value = {"/auditAvPicUrl"})
|
||||||
@RequiresPermissions(value={"avPicUrl:audit"})
|
@RequiresPermissions(value={"avPicUrl:audit"})
|
||||||
public String auditPicUrl(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
public String auditPicUrl(Integer isAudit,Integer isValid,String ids,String compileIds,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(compileIds)){
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = compileIds.split(",");
|
||||||
Date auditTime=new Date();
|
Date auditTime=new Date();
|
||||||
for(String id :idArray){
|
for(String id :idArray){
|
||||||
try {
|
try {
|
||||||
@@ -472,13 +473,21 @@ public class AvContentController extends BaseController {
|
|||||||
@ModelAttribute("cfg")CfgIndexInfo entity,
|
@ModelAttribute("cfg")CfgIndexInfo entity,
|
||||||
String ids,
|
String ids,
|
||||||
RedirectAttributes redirectAttributes){
|
RedirectAttributes redirectAttributes){
|
||||||
|
|
||||||
Properties msgProp = getMsgProp();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
//获取国际化配置
|
||||||
|
Properties msgProp = getMsgProp();
|
||||||
|
//获取分类、性质、标签
|
||||||
|
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||||
|
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||||
|
List<ServiceDictInfo> labels=serviceDictInfoService.findAllLableDict();
|
||||||
|
Map<Object, Object> map=new HashMap<Object, Object>();
|
||||||
|
map.put("fls", fls);
|
||||||
|
map.put("xzs", xzs);
|
||||||
|
map.put("labels", labels);
|
||||||
|
|
||||||
String fileName = "数据-"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
String fileName = "数据-"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
||||||
|
|
||||||
//导出选中记录
|
//导出选中记录
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(ids)){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -492,8 +501,6 @@ public class AvContentController extends BaseController {
|
|||||||
}
|
}
|
||||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||||
Page pageInfo=new Page<CfgIndexInfo>(request, response,"r");
|
Page pageInfo=new Page<CfgIndexInfo>(request, response,"r");
|
||||||
//int pageNo=pageInfo.getPageNo();
|
|
||||||
//int pageSize=pageInfo.getPageSize();
|
|
||||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||||
pageInfo.setPageNo(1);
|
pageInfo.setPageNo(1);
|
||||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||||
@@ -501,9 +508,8 @@ public class AvContentController extends BaseController {
|
|||||||
pageInfo.setPageNo(1);
|
pageInfo.setPageNo(1);
|
||||||
pageInfo.setPageSize(-1);
|
pageInfo.setPageSize(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity);
|
Page<CfgIndexInfo> page = avContentCfgService.findPage(pageInfo, entity);
|
||||||
new ExportExcel(msgProp,null, CfgIndexInfo.class,1).setDataList(msgProp,page.getList()).write(response, fileName).dispose();
|
new ExportExcel(msgProp,null, CfgIndexInfo.class,1).setDataList(msgProp,page.getList(),map).write(response, fileName).dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class SpecificServiceHostCfgController extends BaseController {
|
|||||||
String fileName = msgProp.getProperty("agreement_ip_configuration").replaceAll(" ", "_")+".xlsx";
|
String fileName = msgProp.getProperty("agreement_ip_configuration").replaceAll(" ", "_")+".xlsx";
|
||||||
List<SpecificServiceHostCfg> list = Lists.newArrayList();
|
List<SpecificServiceHostCfg> list = Lists.newArrayList();
|
||||||
list.add(new SpecificServiceHostCfg());
|
list.add(new SpecificServiceHostCfg());
|
||||||
new ExportExcel(msgProp,msgProp.getProperty("agreement_ip_configuration"), SpecificServiceHostCfg.class, 2).setDataList(msgProp,list).
|
new ExportExcel(msgProp,msgProp.getProperty("agreement_ip_configuration"), SpecificServiceHostCfg.class, 2).setDataList(msgProp,list,null).
|
||||||
write(request,response, fileName).dispose();
|
write(request,response, fileName).dispose();
|
||||||
return null;
|
return null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class UserController extends BaseController{
|
|||||||
try {
|
try {
|
||||||
String fileName = "用户数据-"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
String fileName = "用户数据-"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
||||||
Page<SysUser> page = userService.findUser(new Page<SysUser>(request, response, -1), user);
|
Page<SysUser> page = userService.findUser(new Page<SysUser>(request, response, -1), user);
|
||||||
new ExportExcel("用户数据", SysUser.class).setDataList(getMsgProp(),page.getList()).write(response, fileName).dispose();
|
new ExportExcel("用户数据", SysUser.class).setDataList(getMsgProp(),page.getList(),null).write(response, fileName).dispose();
|
||||||
return null;
|
return null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
addMessage(redirectAttributes, "导出用户失败!失败信息:"+e.getMessage());
|
addMessage(redirectAttributes, "导出用户失败!失败信息:"+e.getMessage());
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="i-checks" id="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" compileId="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||||
<td>${cfg.cfgDesc }</td>
|
<td>${cfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="i-checks" id="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" compileId="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||||
<td>${cfg.cfgDesc }</td>
|
<td>${cfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="i-checks" id="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" compileId="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||||
<td>${cfg.cfgDesc }</td>
|
<td>${cfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" class="i-checks" id="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" compileId="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||||
<td>${cfg.cfgDesc }</td>
|
<td>${cfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
||||||
|
|||||||
@@ -458,7 +458,7 @@
|
|||||||
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/voipForm" id="contentTable" label="update"></sys:delRow>
|
||||||
<sys:delRow url="${ctx}/ntc/av/updateAvVoipValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/updateAvVoipValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>
|
||||||
<sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow>
|
<!--<sys:delRow url="${ctx}/ntc/av/voipExport?functionId=${cfg.functionId }" id="contentTable" label="export" maxRow="${page.maxExportSize }"></sys:delRow>-->
|
||||||
<shiro:hasPermission name="avVoip:audit">
|
<shiro:hasPermission name="avVoip:audit">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
@@ -632,7 +632,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.compileId}" value="${indexCfg.isAudit}">
|
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" compileId="${indexCfg.compileId}" value="${indexCfg.isAudit}">
|
||||||
</td>
|
</td>
|
||||||
<td>${indexCfg.cfgDesc }</td>
|
<td>${indexCfg.cfgDesc }</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user