自定义报表代码提交

This commit is contained in:
2022-10-21 09:06:38 +08:00
parent b55d988c7e
commit 53389fb6f3
11 changed files with 387 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package com.njcn.harmonic.utils;
/**
* 数据公共工具类
*
* @author qijian
* @version 1.0.0
* @createTime 2022/10/14 - 10:07
*/
public class PublicDataUtils {
/**
* 功能:下划线命名转驼峰命名
* 将下划线替换为空格,将字符串根据空格分割成数组,再将每个单词首字母大写
* @param s
* @return
*/
public static String underCamel(String s)
{
String separator = "_";
String under="";
s = s.toLowerCase().replace(separator, " ");
String sarr[]=s.split(" ");
for(int i=0;i<sarr.length;i++)
{
String w=sarr[i].substring(0,1).toUpperCase()+sarr[i].substring(1);
under +=w;
}
return under;
}
}