update
This commit is contained in:
@@ -74,15 +74,15 @@ public class DesUtils {
|
||||
String encData = "";
|
||||
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
||||
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
firstKeyBt = getKeyBytes(firstKey);
|
||||
firstLength = firstKeyBt.size();
|
||||
}
|
||||
if (secondKey != null && !secondKey.equals("")) {
|
||||
if (secondKey != null && !"".equals(secondKey)) {
|
||||
secondKeyBt = getKeyBytes(secondKey);
|
||||
secondLength = secondKeyBt.size();
|
||||
}
|
||||
if (thirdKey != null && !thirdKey.equals("")) {
|
||||
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||
thirdKeyBt = getKeyBytes(thirdKey);
|
||||
thirdLength = thirdKeyBt.size();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class DesUtils {
|
||||
if (leng < 4) {
|
||||
int[] bt = strToBt(data);
|
||||
int[] encByte = null;
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = bt;
|
||||
@@ -106,7 +106,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = bt;
|
||||
@@ -118,7 +118,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x = 0;
|
||||
tempBt = bt;
|
||||
@@ -138,7 +138,7 @@ public class DesUtils {
|
||||
String tempData = data.substring(i * 4 + 0, i * 4 + 4);
|
||||
int[] tempByte = strToBt(tempData);
|
||||
int[] encByte = null;
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = tempByte;
|
||||
@@ -153,7 +153,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = tempByte;
|
||||
@@ -165,7 +165,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x;
|
||||
tempBt = tempByte;
|
||||
@@ -182,7 +182,7 @@ public class DesUtils {
|
||||
String remainderData = data.substring(iterator * 4 + 0, leng);
|
||||
int[] tempByte = strToBt(remainderData);
|
||||
int[] encByte = null;
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = tempByte;
|
||||
@@ -197,7 +197,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = tempByte;
|
||||
@@ -209,7 +209,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x;
|
||||
tempBt = tempByte;
|
||||
@@ -237,15 +237,15 @@ public class DesUtils {
|
||||
String decStr = "";
|
||||
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
||||
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
firstKeyBt = getKeyBytes(firstKey);
|
||||
firstLength = firstKeyBt.size();
|
||||
}
|
||||
if (secondKey != null && !secondKey.equals("")) {
|
||||
if (secondKey != null && !"".equals(secondKey)) {
|
||||
secondKeyBt = getKeyBytes(secondKey);
|
||||
secondLength = secondKeyBt.size();
|
||||
}
|
||||
if (thirdKey != null && !thirdKey.equals("")) {
|
||||
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||
thirdKeyBt = getKeyBytes(thirdKey);
|
||||
thirdLength = thirdKeyBt.size();
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class DesUtils {
|
||||
intByte[j] = Integer.parseInt(strByte.substring(j, j + 1));
|
||||
}
|
||||
int[] decByte = null;
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -276,7 +276,7 @@ public class DesUtils {
|
||||
}
|
||||
decByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -288,7 +288,7 @@ public class DesUtils {
|
||||
}
|
||||
decByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -382,37 +382,37 @@ public class DesUtils {
|
||||
*/
|
||||
public String bt4ToHex(String binary) {
|
||||
String hex = "";
|
||||
if (binary.equalsIgnoreCase("0000")) {
|
||||
if ("0000".equalsIgnoreCase(binary)) {
|
||||
hex = "0";
|
||||
} else if (binary.equalsIgnoreCase("0001")) {
|
||||
} else if ("0001".equalsIgnoreCase(binary)) {
|
||||
hex = "1";
|
||||
} else if (binary.equalsIgnoreCase("0010")) {
|
||||
} else if ("0010".equalsIgnoreCase(binary)) {
|
||||
hex = "2";
|
||||
} else if (binary.equalsIgnoreCase("0011")) {
|
||||
} else if ("0011".equalsIgnoreCase(binary)) {
|
||||
hex = "3";
|
||||
} else if (binary.equalsIgnoreCase("0100")) {
|
||||
} else if ("0100".equalsIgnoreCase(binary)) {
|
||||
hex = "4";
|
||||
} else if (binary.equalsIgnoreCase("0101")) {
|
||||
} else if ("0101".equalsIgnoreCase(binary)) {
|
||||
hex = "5";
|
||||
} else if (binary.equalsIgnoreCase("0110")) {
|
||||
} else if ("0110".equalsIgnoreCase(binary)) {
|
||||
hex = "6";
|
||||
} else if (binary.equalsIgnoreCase("0111")) {
|
||||
} else if ("0111".equalsIgnoreCase(binary)) {
|
||||
hex = "7";
|
||||
} else if (binary.equalsIgnoreCase("1000")) {
|
||||
} else if ("1000".equalsIgnoreCase(binary)) {
|
||||
hex = "8";
|
||||
} else if (binary.equalsIgnoreCase("1001")) {
|
||||
} else if ("1001".equalsIgnoreCase(binary)) {
|
||||
hex = "9";
|
||||
} else if (binary.equalsIgnoreCase("1010")) {
|
||||
} else if ("1010".equalsIgnoreCase(binary)) {
|
||||
hex = "A";
|
||||
} else if (binary.equalsIgnoreCase("1011")) {
|
||||
} else if ("1011".equalsIgnoreCase(binary)) {
|
||||
hex = "B";
|
||||
} else if (binary.equalsIgnoreCase("1100")) {
|
||||
} else if ("1100".equalsIgnoreCase(binary)) {
|
||||
hex = "C";
|
||||
} else if (binary.equalsIgnoreCase("1101")) {
|
||||
} else if ("1101".equalsIgnoreCase(binary)) {
|
||||
hex = "D";
|
||||
} else if (binary.equalsIgnoreCase("1110")) {
|
||||
} else if ("1110".equalsIgnoreCase(binary)) {
|
||||
hex = "E";
|
||||
} else if (binary.equalsIgnoreCase("1111")) {
|
||||
} else if ("1111".equalsIgnoreCase(binary)) {
|
||||
hex = "F";
|
||||
}
|
||||
|
||||
@@ -426,51 +426,51 @@ public class DesUtils {
|
||||
*/
|
||||
public String hexToBt4(String hex) {
|
||||
String binary = "";
|
||||
if (hex.equalsIgnoreCase("0")) {
|
||||
if ("0".equalsIgnoreCase(hex)) {
|
||||
binary = "0000";
|
||||
} else if (hex.equalsIgnoreCase("1")) {
|
||||
} else if ("1".equalsIgnoreCase(hex)) {
|
||||
binary = "0001";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("2")) {
|
||||
if ("2".equalsIgnoreCase(hex)) {
|
||||
binary = "0010";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("3")) {
|
||||
if ("3".equalsIgnoreCase(hex)) {
|
||||
binary = "0011";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("4")) {
|
||||
if ("4".equalsIgnoreCase(hex)) {
|
||||
binary = "0100";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("5")) {
|
||||
if ("5".equalsIgnoreCase(hex)) {
|
||||
binary = "0101";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("6")) {
|
||||
if ("6".equalsIgnoreCase(hex)) {
|
||||
binary = "0110";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("7")) {
|
||||
if ("7".equalsIgnoreCase(hex)) {
|
||||
binary = "0111";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("8")) {
|
||||
if ("8".equalsIgnoreCase(hex)) {
|
||||
binary = "1000";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("9")) {
|
||||
if ("9".equalsIgnoreCase(hex)) {
|
||||
binary = "1001";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("A")) {
|
||||
if ("A".equalsIgnoreCase(hex)) {
|
||||
binary = "1010";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("B")) {
|
||||
if ("B".equalsIgnoreCase(hex)) {
|
||||
binary = "1011";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("C")) {
|
||||
if ("C".equalsIgnoreCase(hex)) {
|
||||
binary = "1100";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("D")) {
|
||||
if ("D".equalsIgnoreCase(hex)) {
|
||||
binary = "1101";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("E")) {
|
||||
if ("E".equalsIgnoreCase(hex)) {
|
||||
binary = "1110";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("F")) {
|
||||
if ("F".equalsIgnoreCase(hex)) {
|
||||
binary = "1111";
|
||||
}
|
||||
return binary;
|
||||
|
||||
@@ -247,6 +247,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
|
||||
private static ThreadLocal<FSTConfiguration> fstConfiguration =
|
||||
new NamedThreadLocal<FSTConfiguration>("FSTConfiguration") {
|
||||
@Override
|
||||
public FSTConfiguration initialValue() {
|
||||
return FSTConfiguration.createDefaultConfiguration();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class WorkDayUtils {
|
||||
* @return
|
||||
*/
|
||||
public String getChineseWeek(Calendar date) {
|
||||
final String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
||||
final String[] dayNames = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
||||
int dayOfWeek = date.get(Calendar.DAY_OF_WEEK);
|
||||
// System.out.println(dayNames[dayOfWeek - 1]);
|
||||
return dayNames[dayOfWeek - 1];
|
||||
|
||||
@@ -170,7 +170,7 @@ public class VideoUtils {
|
||||
command.add(getFfmpegFile());
|
||||
command.add("-i");
|
||||
command.add(inputFile);
|
||||
if ((imgFileExtension.toLowerCase()).equals("gif")) {
|
||||
if ("gif".equals(imgFileExtension.toLowerCase())) {
|
||||
command.add("-vframes");
|
||||
command.add("30");
|
||||
command.add("-f");
|
||||
|
||||
@@ -2227,7 +2227,7 @@ public class DiffMatchPatch {
|
||||
if (m.group(2).length() == 0) {
|
||||
patch.start1--;
|
||||
patch.length1 = 1;
|
||||
} else if (m.group(2).equals("0")) {
|
||||
} else if ("0".equals(m.group(2))) {
|
||||
patch.length1 = 0;
|
||||
} else {
|
||||
patch.start1--;
|
||||
@@ -2238,7 +2238,7 @@ public class DiffMatchPatch {
|
||||
if (m.group(4).length() == 0) {
|
||||
patch.start2--;
|
||||
patch.length2 = 1;
|
||||
} else if (m.group(4).equals("0")) {
|
||||
} else if ("0".equals(m.group(4))) {
|
||||
patch.length2 = 0;
|
||||
} else {
|
||||
patch.start2--;
|
||||
|
||||
@@ -123,7 +123,7 @@ public class PinyinUtils {
|
||||
if (input == null){
|
||||
return null;
|
||||
}
|
||||
char c[] = input.toCharArray();
|
||||
char[] c = input.toCharArray();
|
||||
for (int i = 0; i < c.length; i++) {
|
||||
if (c[i] == ' ') {
|
||||
c[i] = '\u3000';
|
||||
|
||||
@@ -24,7 +24,7 @@ public class IdcardUtils extends StringUtils {
|
||||
public static final int CHINA_ID_MAX_LENGTH = 18;
|
||||
|
||||
/** 省、直辖市代码表 */
|
||||
public static final String cityCode[] = { "11", "12", "13", "14", "15",
|
||||
public static final String[] cityCode = { "11", "12", "13", "14", "15",
|
||||
"21", "22", "23", "31", "32", "33", "34", "35", "36", "37", "41",
|
||||
"42", "43", "44", "45", "46", "50", "51", "52", "53", "54", "61",
|
||||
"62", "63", "64", "65", "71", "81", "82", "91" };
|
||||
@@ -177,7 +177,7 @@ public class IdcardUtils extends StringUtils {
|
||||
}
|
||||
String[] cardval = validateIdCard10(card);
|
||||
if (cardval != null) {
|
||||
if (cardval[2].equals("true")) {
|
||||
if ("true".equals(cardval[2])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -272,14 +272,14 @@ public class IdcardUtils extends StringUtils {
|
||||
if (card.length() != 8 && card.length() != 9 && idCard.length() != 10) {
|
||||
return null;
|
||||
}
|
||||
if (idCard.matches("^[a-zA-Z][0-9]{9}$")) { // 台湾
|
||||
if (idCard.matches("^[a-zA-Z][0-9]{9}$")) {
|
||||
info[0] = "台湾";
|
||||
System.out.println("11111");
|
||||
String char2 = idCard.substring(1, 2);
|
||||
if (char2.equals("1")) {
|
||||
if ("1".equals(char2)) {
|
||||
info[1] = "M";
|
||||
System.out.println("MMMMMMM");
|
||||
} else if (char2.equals("2")) {
|
||||
} else if ("2".equals(char2)) {
|
||||
info[1] = "F";
|
||||
System.out.println("FFFFFFF");
|
||||
} else {
|
||||
@@ -289,10 +289,10 @@ public class IdcardUtils extends StringUtils {
|
||||
return info;
|
||||
}
|
||||
info[2] = validateTWCard(idCard) ? "true" : "false";
|
||||
} else if (idCard.matches("^[1|5|7][0-9]{6}\\(?[0-9A-Z]\\)?$")) { // 澳门
|
||||
} else if (idCard.matches("^[1|5|7][0-9]{6}\\(?[0-9A-Z]\\)?$")) {
|
||||
info[0] = "澳门";
|
||||
info[1] = "N";
|
||||
} else if (idCard.matches("^[A-Z]{1,2}[0-9]{6}\\(?[0-9A]\\)?$")) { // 香港
|
||||
} else if (idCard.matches("^[A-Z]{1,2}[0-9]{6}\\(?[0-9A]\\)?$")) {
|
||||
info[0] = "香港";
|
||||
info[1] = "N";
|
||||
info[2] = validateHKCard(idCard) ? "true" : "false";
|
||||
@@ -361,7 +361,7 @@ public class IdcardUtils extends StringUtils {
|
||||
sum = sum + Integer.valueOf(c + "") * iflag;
|
||||
iflag--;
|
||||
}
|
||||
if (end.toUpperCase().equals("A")) {
|
||||
if ("A".equals(end.toUpperCase())) {
|
||||
sum = sum + 10;
|
||||
} else {
|
||||
sum = sum + Integer.valueOf(end);
|
||||
|
||||
@@ -168,7 +168,7 @@ public abstract class ExcelReader extends DefaultHandler {
|
||||
// 将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
||||
} else if ("v".equals(name)) {
|
||||
String value = lastContents.trim();
|
||||
value = value.equals("") ? " " : value;
|
||||
value = "".equals(value) ? " " : value;
|
||||
try {
|
||||
// 日期格式处理
|
||||
if (dateFlag) {
|
||||
@@ -188,7 +188,7 @@ public abstract class ExcelReader extends DefaultHandler {
|
||||
curCol++;
|
||||
} else {
|
||||
// 如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
|
||||
if (name.equals("row")) {
|
||||
if ("row".equals(name)) {
|
||||
getRows(sheetIndex + 1, curRow, rowList);
|
||||
rowList.clear();
|
||||
curRow++;
|
||||
|
||||
@@ -23,6 +23,7 @@ public class MoneyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
return val == null ? StringUtils.EMPTY : StringUtils.replace(val, ",", StringUtils.EMPTY);
|
||||
}
|
||||
@@ -30,6 +31,7 @@ public class MoneyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
return val == null ? StringUtils.EMPTY : nf.format(val);
|
||||
}
|
||||
@@ -37,6 +39,7 @@ public class MoneyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值格式(导出)
|
||||
*/
|
||||
@Override
|
||||
public String getDataFormat() {
|
||||
return "0.00";
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ public class BookMark {
|
||||
// Get the first node and catch it's reference for return if
|
||||
// the first child node is a style node (w:rPr).
|
||||
childNode = parentNode.getFirstChild();
|
||||
if (childNode != null && childNode.getNodeName().equals("w:rPr")) {
|
||||
if (childNode != null && "w:rPr".equals(childNode.getNodeName())) {
|
||||
styleNode = childNode;
|
||||
} else {
|
||||
// If the first node was not a style node and there are other
|
||||
|
||||
@@ -72,6 +72,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
* @param plainPassword 明文密码
|
||||
* @return 16位salt密钥 + 40位hash密码
|
||||
*/
|
||||
@Override
|
||||
public String encryptPassword(String plainPassword) {
|
||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
|
||||
@@ -85,6 +86,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
* @param password 密文密码
|
||||
* @return 验证成功返回true
|
||||
*/
|
||||
@Override
|
||||
public boolean validatePassword(String plainPassword, String password) {
|
||||
try{
|
||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||
|
||||
@@ -27,6 +27,7 @@ public class AreaType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Area e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
|
||||
@@ -39,6 +40,7 @@ public class AreaType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Area)val).getAreaName() != null){
|
||||
return ((Area)val).getAreaName();
|
||||
|
||||
@@ -27,6 +27,7 @@ public class CompanyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Company e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
|
||||
@@ -39,6 +40,7 @@ public class CompanyType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Company)val).getCompanyName() != null){
|
||||
return ((Company)val).getCompanyName();
|
||||
|
||||
@@ -27,6 +27,7 @@ public class OfficeType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Office e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
|
||||
@@ -39,6 +40,7 @@ public class OfficeType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Office)val).getOfficeName() != null){
|
||||
return ((Office)val).getOfficeName();
|
||||
|
||||
@@ -31,6 +31,7 @@ public class PostListType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
List<String> list = new ArrayList<String>();
|
||||
for (String s : StringUtils.split(val, ",")) {
|
||||
@@ -46,6 +47,7 @@ public class PostListType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -31,6 +31,7 @@ public class RoleListType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
List<String> list = new ArrayList<String>();
|
||||
for (String s : StringUtils.split(val, ",")) {
|
||||
@@ -46,6 +47,7 @@ public class RoleListType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -186,6 +186,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
// 手动触发消息推送任务
|
||||
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
|
||||
msgPushThreadPool.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try{
|
||||
MsgPushUtils.getMsgPushTask().execute();
|
||||
|
||||
@@ -52,7 +52,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
*/
|
||||
@PostConstruct
|
||||
private void corpModelValid() throws Exception{
|
||||
if (Global.isUseCorpModel() != Global.getPropertyToBoolean("user.useCorpModel", "false")){
|
||||
if (!Global.isUseCorpModel().equals(Global.getPropertyToBoolean("user.useCorpModel", "false"))){
|
||||
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,似乎你的当前版本不是JeeSite专业版。\n");
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 查询全部用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserList(EmpUser empUser){
|
||||
return dao.findUserList(empUser);
|
||||
}
|
||||
@@ -98,6 +99,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据部门编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
|
||||
return dao.findUserListByOfficeCodes(empUser);
|
||||
}
|
||||
@@ -105,6 +107,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据角色编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
|
||||
return dao.findUserListByRoleCodes(empUser);
|
||||
}
|
||||
@@ -112,6 +115,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据岗位编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
|
||||
return dao.findUserListByPostCodes(empUser);
|
||||
}
|
||||
@@ -170,6 +174,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* @param file 导入的用户数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||
if (file == null){
|
||||
|
||||
@@ -94,6 +94,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
/**
|
||||
* 查询当前员工关联的岗位信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmployeePost> findEmployeePostList(Employee employee){
|
||||
EmployeePost employeePost = new EmployeePost();
|
||||
employeePost.setEmpCode(employee.getEmpCode());
|
||||
@@ -103,6 +104,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
/**
|
||||
* 查询当前员工关联的附属机构信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
|
||||
EmployeeOffice employeeOffice = new EmployeeOffice();
|
||||
employeeOffice.setEmpCode(employee.getEmpCode());
|
||||
|
||||
@@ -43,6 +43,7 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
|
||||
/**
|
||||
* 不使用数据库事务,执行插入日志
|
||||
*/
|
||||
@Override
|
||||
@Transactional//(propagation = Propagation.NOT_SUPPORTED)
|
||||
public void insertLog(Log entity) {
|
||||
DataSourceHolder.setJdbcTransaction(false);
|
||||
|
||||
@@ -82,6 +82,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* @param file 导入的机构数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||
if (file == null){
|
||||
|
||||
@@ -35,6 +35,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
/**
|
||||
* 根据名称查询岗位
|
||||
*/
|
||||
@Override
|
||||
public Post getByPostName(Post post) {
|
||||
Post where = new Post();
|
||||
where.setPostName(post.getPostName());
|
||||
|
||||
Reference in New Issue
Block a user