update
This commit is contained in:
@@ -74,15 +74,15 @@ public class DesUtils {
|
|||||||
String encData = "";
|
String encData = "";
|
||||||
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
||||||
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
firstKeyBt = getKeyBytes(firstKey);
|
firstKeyBt = getKeyBytes(firstKey);
|
||||||
firstLength = firstKeyBt.size();
|
firstLength = firstKeyBt.size();
|
||||||
}
|
}
|
||||||
if (secondKey != null && !secondKey.equals("")) {
|
if (secondKey != null && !"".equals(secondKey)) {
|
||||||
secondKeyBt = getKeyBytes(secondKey);
|
secondKeyBt = getKeyBytes(secondKey);
|
||||||
secondLength = secondKeyBt.size();
|
secondLength = secondKeyBt.size();
|
||||||
}
|
}
|
||||||
if (thirdKey != null && !thirdKey.equals("")) {
|
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||||
thirdKeyBt = getKeyBytes(thirdKey);
|
thirdKeyBt = getKeyBytes(thirdKey);
|
||||||
thirdLength = thirdKeyBt.size();
|
thirdLength = thirdKeyBt.size();
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ public class DesUtils {
|
|||||||
if (leng < 4) {
|
if (leng < 4) {
|
||||||
int[] bt = strToBt(data);
|
int[] bt = strToBt(data);
|
||||||
int[] encByte = null;
|
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[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = bt;
|
tempBt = bt;
|
||||||
@@ -106,7 +106,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x, y;
|
int x, y;
|
||||||
tempBt = bt;
|
tempBt = bt;
|
||||||
@@ -118,7 +118,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
tempBt = bt;
|
tempBt = bt;
|
||||||
@@ -138,7 +138,7 @@ public class DesUtils {
|
|||||||
String tempData = data.substring(i * 4 + 0, i * 4 + 4);
|
String tempData = data.substring(i * 4 + 0, i * 4 + 4);
|
||||||
int[] tempByte = strToBt(tempData);
|
int[] tempByte = strToBt(tempData);
|
||||||
int[] encByte = null;
|
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[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -153,7 +153,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x, y;
|
int x, y;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -165,7 +165,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x;
|
int x;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -182,7 +182,7 @@ public class DesUtils {
|
|||||||
String remainderData = data.substring(iterator * 4 + 0, leng);
|
String remainderData = data.substring(iterator * 4 + 0, leng);
|
||||||
int[] tempByte = strToBt(remainderData);
|
int[] tempByte = strToBt(remainderData);
|
||||||
int[] encByte = null;
|
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[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -197,7 +197,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x, y;
|
int x, y;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -209,7 +209,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
encByte = tempBt;
|
encByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x;
|
int x;
|
||||||
tempBt = tempByte;
|
tempBt = tempByte;
|
||||||
@@ -237,15 +237,15 @@ public class DesUtils {
|
|||||||
String decStr = "";
|
String decStr = "";
|
||||||
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
|
||||||
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
int firstLength = 0, secondLength = 0, thirdLength = 0;
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
firstKeyBt = getKeyBytes(firstKey);
|
firstKeyBt = getKeyBytes(firstKey);
|
||||||
firstLength = firstKeyBt.size();
|
firstLength = firstKeyBt.size();
|
||||||
}
|
}
|
||||||
if (secondKey != null && !secondKey.equals("")) {
|
if (secondKey != null && !"".equals(secondKey)) {
|
||||||
secondKeyBt = getKeyBytes(secondKey);
|
secondKeyBt = getKeyBytes(secondKey);
|
||||||
secondLength = secondKeyBt.size();
|
secondLength = secondKeyBt.size();
|
||||||
}
|
}
|
||||||
if (thirdKey != null && !thirdKey.equals("")) {
|
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||||
thirdKeyBt = getKeyBytes(thirdKey);
|
thirdKeyBt = getKeyBytes(thirdKey);
|
||||||
thirdLength = thirdKeyBt.size();
|
thirdLength = thirdKeyBt.size();
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ public class DesUtils {
|
|||||||
intByte[j] = Integer.parseInt(strByte.substring(j, j + 1));
|
intByte[j] = Integer.parseInt(strByte.substring(j, j + 1));
|
||||||
}
|
}
|
||||||
int[] decByte = null;
|
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[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = intByte;
|
tempBt = intByte;
|
||||||
@@ -276,7 +276,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
decByte = tempBt;
|
decByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = intByte;
|
tempBt = intByte;
|
||||||
@@ -288,7 +288,7 @@ public class DesUtils {
|
|||||||
}
|
}
|
||||||
decByte = tempBt;
|
decByte = tempBt;
|
||||||
} else {
|
} else {
|
||||||
if (firstKey != null && !firstKey.equals("")) {
|
if (firstKey != null && !"".equals(firstKey)) {
|
||||||
int[] tempBt;
|
int[] tempBt;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
tempBt = intByte;
|
tempBt = intByte;
|
||||||
@@ -382,37 +382,37 @@ public class DesUtils {
|
|||||||
*/
|
*/
|
||||||
public String bt4ToHex(String binary) {
|
public String bt4ToHex(String binary) {
|
||||||
String hex = "";
|
String hex = "";
|
||||||
if (binary.equalsIgnoreCase("0000")) {
|
if ("0000".equalsIgnoreCase(binary)) {
|
||||||
hex = "0";
|
hex = "0";
|
||||||
} else if (binary.equalsIgnoreCase("0001")) {
|
} else if ("0001".equalsIgnoreCase(binary)) {
|
||||||
hex = "1";
|
hex = "1";
|
||||||
} else if (binary.equalsIgnoreCase("0010")) {
|
} else if ("0010".equalsIgnoreCase(binary)) {
|
||||||
hex = "2";
|
hex = "2";
|
||||||
} else if (binary.equalsIgnoreCase("0011")) {
|
} else if ("0011".equalsIgnoreCase(binary)) {
|
||||||
hex = "3";
|
hex = "3";
|
||||||
} else if (binary.equalsIgnoreCase("0100")) {
|
} else if ("0100".equalsIgnoreCase(binary)) {
|
||||||
hex = "4";
|
hex = "4";
|
||||||
} else if (binary.equalsIgnoreCase("0101")) {
|
} else if ("0101".equalsIgnoreCase(binary)) {
|
||||||
hex = "5";
|
hex = "5";
|
||||||
} else if (binary.equalsIgnoreCase("0110")) {
|
} else if ("0110".equalsIgnoreCase(binary)) {
|
||||||
hex = "6";
|
hex = "6";
|
||||||
} else if (binary.equalsIgnoreCase("0111")) {
|
} else if ("0111".equalsIgnoreCase(binary)) {
|
||||||
hex = "7";
|
hex = "7";
|
||||||
} else if (binary.equalsIgnoreCase("1000")) {
|
} else if ("1000".equalsIgnoreCase(binary)) {
|
||||||
hex = "8";
|
hex = "8";
|
||||||
} else if (binary.equalsIgnoreCase("1001")) {
|
} else if ("1001".equalsIgnoreCase(binary)) {
|
||||||
hex = "9";
|
hex = "9";
|
||||||
} else if (binary.equalsIgnoreCase("1010")) {
|
} else if ("1010".equalsIgnoreCase(binary)) {
|
||||||
hex = "A";
|
hex = "A";
|
||||||
} else if (binary.equalsIgnoreCase("1011")) {
|
} else if ("1011".equalsIgnoreCase(binary)) {
|
||||||
hex = "B";
|
hex = "B";
|
||||||
} else if (binary.equalsIgnoreCase("1100")) {
|
} else if ("1100".equalsIgnoreCase(binary)) {
|
||||||
hex = "C";
|
hex = "C";
|
||||||
} else if (binary.equalsIgnoreCase("1101")) {
|
} else if ("1101".equalsIgnoreCase(binary)) {
|
||||||
hex = "D";
|
hex = "D";
|
||||||
} else if (binary.equalsIgnoreCase("1110")) {
|
} else if ("1110".equalsIgnoreCase(binary)) {
|
||||||
hex = "E";
|
hex = "E";
|
||||||
} else if (binary.equalsIgnoreCase("1111")) {
|
} else if ("1111".equalsIgnoreCase(binary)) {
|
||||||
hex = "F";
|
hex = "F";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,51 +426,51 @@ public class DesUtils {
|
|||||||
*/
|
*/
|
||||||
public String hexToBt4(String hex) {
|
public String hexToBt4(String hex) {
|
||||||
String binary = "";
|
String binary = "";
|
||||||
if (hex.equalsIgnoreCase("0")) {
|
if ("0".equalsIgnoreCase(hex)) {
|
||||||
binary = "0000";
|
binary = "0000";
|
||||||
} else if (hex.equalsIgnoreCase("1")) {
|
} else if ("1".equalsIgnoreCase(hex)) {
|
||||||
binary = "0001";
|
binary = "0001";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("2")) {
|
if ("2".equalsIgnoreCase(hex)) {
|
||||||
binary = "0010";
|
binary = "0010";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("3")) {
|
if ("3".equalsIgnoreCase(hex)) {
|
||||||
binary = "0011";
|
binary = "0011";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("4")) {
|
if ("4".equalsIgnoreCase(hex)) {
|
||||||
binary = "0100";
|
binary = "0100";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("5")) {
|
if ("5".equalsIgnoreCase(hex)) {
|
||||||
binary = "0101";
|
binary = "0101";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("6")) {
|
if ("6".equalsIgnoreCase(hex)) {
|
||||||
binary = "0110";
|
binary = "0110";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("7")) {
|
if ("7".equalsIgnoreCase(hex)) {
|
||||||
binary = "0111";
|
binary = "0111";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("8")) {
|
if ("8".equalsIgnoreCase(hex)) {
|
||||||
binary = "1000";
|
binary = "1000";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("9")) {
|
if ("9".equalsIgnoreCase(hex)) {
|
||||||
binary = "1001";
|
binary = "1001";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("A")) {
|
if ("A".equalsIgnoreCase(hex)) {
|
||||||
binary = "1010";
|
binary = "1010";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("B")) {
|
if ("B".equalsIgnoreCase(hex)) {
|
||||||
binary = "1011";
|
binary = "1011";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("C")) {
|
if ("C".equalsIgnoreCase(hex)) {
|
||||||
binary = "1100";
|
binary = "1100";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("D")) {
|
if ("D".equalsIgnoreCase(hex)) {
|
||||||
binary = "1101";
|
binary = "1101";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("E")) {
|
if ("E".equalsIgnoreCase(hex)) {
|
||||||
binary = "1110";
|
binary = "1110";
|
||||||
}
|
}
|
||||||
if (hex.equalsIgnoreCase("F")) {
|
if ("F".equalsIgnoreCase(hex)) {
|
||||||
binary = "1111";
|
binary = "1111";
|
||||||
}
|
}
|
||||||
return binary;
|
return binary;
|
||||||
|
|||||||
@@ -247,7 +247,8 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
|||||||
|
|
||||||
private static ThreadLocal<FSTConfiguration> fstConfiguration =
|
private static ThreadLocal<FSTConfiguration> fstConfiguration =
|
||||||
new NamedThreadLocal<FSTConfiguration>("FSTConfiguration") {
|
new NamedThreadLocal<FSTConfiguration>("FSTConfiguration") {
|
||||||
public FSTConfiguration initialValue() {
|
@Override
|
||||||
|
public FSTConfiguration initialValue() {
|
||||||
return FSTConfiguration.createDefaultConfiguration();
|
return FSTConfiguration.createDefaultConfiguration();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class WorkDayUtils {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getChineseWeek(Calendar date) {
|
public String getChineseWeek(Calendar date) {
|
||||||
final String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
final String[] dayNames = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
||||||
int dayOfWeek = date.get(Calendar.DAY_OF_WEEK);
|
int dayOfWeek = date.get(Calendar.DAY_OF_WEEK);
|
||||||
// System.out.println(dayNames[dayOfWeek - 1]);
|
// System.out.println(dayNames[dayOfWeek - 1]);
|
||||||
return dayNames[dayOfWeek - 1];
|
return dayNames[dayOfWeek - 1];
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public class VideoUtils {
|
|||||||
command.add(getFfmpegFile());
|
command.add(getFfmpegFile());
|
||||||
command.add("-i");
|
command.add("-i");
|
||||||
command.add(inputFile);
|
command.add(inputFile);
|
||||||
if ((imgFileExtension.toLowerCase()).equals("gif")) {
|
if ("gif".equals(imgFileExtension.toLowerCase())) {
|
||||||
command.add("-vframes");
|
command.add("-vframes");
|
||||||
command.add("30");
|
command.add("30");
|
||||||
command.add("-f");
|
command.add("-f");
|
||||||
|
|||||||
@@ -2227,7 +2227,7 @@ public class DiffMatchPatch {
|
|||||||
if (m.group(2).length() == 0) {
|
if (m.group(2).length() == 0) {
|
||||||
patch.start1--;
|
patch.start1--;
|
||||||
patch.length1 = 1;
|
patch.length1 = 1;
|
||||||
} else if (m.group(2).equals("0")) {
|
} else if ("0".equals(m.group(2))) {
|
||||||
patch.length1 = 0;
|
patch.length1 = 0;
|
||||||
} else {
|
} else {
|
||||||
patch.start1--;
|
patch.start1--;
|
||||||
@@ -2238,7 +2238,7 @@ public class DiffMatchPatch {
|
|||||||
if (m.group(4).length() == 0) {
|
if (m.group(4).length() == 0) {
|
||||||
patch.start2--;
|
patch.start2--;
|
||||||
patch.length2 = 1;
|
patch.length2 = 1;
|
||||||
} else if (m.group(4).equals("0")) {
|
} else if ("0".equals(m.group(4))) {
|
||||||
patch.length2 = 0;
|
patch.length2 = 0;
|
||||||
} else {
|
} else {
|
||||||
patch.start2--;
|
patch.start2--;
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class PinyinUtils {
|
|||||||
if (input == null){
|
if (input == null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
char c[] = input.toCharArray();
|
char[] c = input.toCharArray();
|
||||||
for (int i = 0; i < c.length; i++) {
|
for (int i = 0; i < c.length; i++) {
|
||||||
if (c[i] == ' ') {
|
if (c[i] == ' ') {
|
||||||
c[i] = '\u3000';
|
c[i] = '\u3000';
|
||||||
@@ -143,7 +143,7 @@ public class PinyinUtils {
|
|||||||
if (input == null){
|
if (input == null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
char c[] = input.toCharArray();
|
char[] c = input.toCharArray();
|
||||||
for (int i = 0; i < c.length; i++) {
|
for (int i = 0; i < c.length; i++) {
|
||||||
if (c[i] == '\u3000') {
|
if (c[i] == '\u3000') {
|
||||||
c[i] = ' ';
|
c[i] = ' ';
|
||||||
|
|||||||
@@ -24,17 +24,17 @@ public class IdcardUtils extends StringUtils {
|
|||||||
public static final int CHINA_ID_MAX_LENGTH = 18;
|
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",
|
"21", "22", "23", "31", "32", "33", "34", "35", "36", "37", "41",
|
||||||
"42", "43", "44", "45", "46", "50", "51", "52", "53", "54", "61",
|
"42", "43", "44", "45", "46", "50", "51", "52", "53", "54", "61",
|
||||||
"62", "63", "64", "65", "71", "81", "82", "91" };
|
"62", "63", "64", "65", "71", "81", "82", "91" };
|
||||||
|
|
||||||
/** 每位加权因子 */
|
/** 每位加权因子 */
|
||||||
public static final int power[] = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9,
|
public static final int[] power = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9,
|
||||||
10, 5, 8, 4, 2 };
|
10, 5, 8, 4, 2 };
|
||||||
|
|
||||||
/** 第18位校检码 */
|
/** 第18位校检码 */
|
||||||
public static final String verifyCode[] = { "1", "0", "X", "9", "8", "7",
|
public static final String[] verifyCode = { "1", "0", "X", "9", "8", "7",
|
||||||
"6", "5", "4", "3", "2" };
|
"6", "5", "4", "3", "2" };
|
||||||
/** 最低年限 */
|
/** 最低年限 */
|
||||||
public static final int MIN = 1930;
|
public static final int MIN = 1930;
|
||||||
@@ -177,7 +177,7 @@ public class IdcardUtils extends StringUtils {
|
|||||||
}
|
}
|
||||||
String[] cardval = validateIdCard10(card);
|
String[] cardval = validateIdCard10(card);
|
||||||
if (cardval != null) {
|
if (cardval != null) {
|
||||||
if (cardval[2].equals("true")) {
|
if ("true".equals(cardval[2])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -276,10 +276,10 @@ public class IdcardUtils extends StringUtils {
|
|||||||
info[0] = "台湾";
|
info[0] = "台湾";
|
||||||
System.out.println("11111");
|
System.out.println("11111");
|
||||||
String char2 = idCard.substring(1, 2);
|
String char2 = idCard.substring(1, 2);
|
||||||
if (char2.equals("1")) {
|
if ("1".equals(char2)) {
|
||||||
info[1] = "M";
|
info[1] = "M";
|
||||||
System.out.println("MMMMMMM");
|
System.out.println("MMMMMMM");
|
||||||
} else if (char2.equals("2")) {
|
} else if ("2".equals(char2)) {
|
||||||
info[1] = "F";
|
info[1] = "F";
|
||||||
System.out.println("FFFFFFF");
|
System.out.println("FFFFFFF");
|
||||||
} else {
|
} else {
|
||||||
@@ -361,7 +361,7 @@ public class IdcardUtils extends StringUtils {
|
|||||||
sum = sum + Integer.valueOf(c + "") * iflag;
|
sum = sum + Integer.valueOf(c + "") * iflag;
|
||||||
iflag--;
|
iflag--;
|
||||||
}
|
}
|
||||||
if (end.toUpperCase().equals("A")) {
|
if ("A".equals(end.toUpperCase())) {
|
||||||
sum = sum + 10;
|
sum = sum + 10;
|
||||||
} else {
|
} else {
|
||||||
sum = sum + Integer.valueOf(end);
|
sum = sum + Integer.valueOf(end);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ public abstract class ExcelReader extends DefaultHandler {
|
|||||||
// 将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
// 将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
||||||
} else if ("v".equals(name)) {
|
} else if ("v".equals(name)) {
|
||||||
String value = lastContents.trim();
|
String value = lastContents.trim();
|
||||||
value = value.equals("") ? " " : value;
|
value = "".equals(value) ? " " : value;
|
||||||
try {
|
try {
|
||||||
// 日期格式处理
|
// 日期格式处理
|
||||||
if (dateFlag) {
|
if (dateFlag) {
|
||||||
@@ -188,7 +188,7 @@ public abstract class ExcelReader extends DefaultHandler {
|
|||||||
curCol++;
|
curCol++;
|
||||||
} else {
|
} else {
|
||||||
// 如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
|
// 如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
|
||||||
if (name.equals("row")) {
|
if ("row".equals(name)) {
|
||||||
getRows(sheetIndex + 1, curRow, rowList);
|
getRows(sheetIndex + 1, curRow, rowList);
|
||||||
rowList.clear();
|
rowList.clear();
|
||||||
curRow++;
|
curRow++;
|
||||||
|
|||||||
@@ -23,21 +23,24 @@ public class MoneyType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public Object getValue(String val) {
|
@Override
|
||||||
|
public Object getValue(String val) {
|
||||||
return val == null ? StringUtils.EMPTY : StringUtils.replace(val, ",", StringUtils.EMPTY);
|
return val == null ? StringUtils.EMPTY : StringUtils.replace(val, ",", StringUtils.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对象值(导出)
|
* 获取对象值(导出)
|
||||||
*/
|
*/
|
||||||
public String setValue(Object val) {
|
@Override
|
||||||
|
public String setValue(Object val) {
|
||||||
return val == null ? StringUtils.EMPTY : nf.format(val);
|
return val == null ? StringUtils.EMPTY : nf.format(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对象值格式(导出)
|
* 获取对象值格式(导出)
|
||||||
*/
|
*/
|
||||||
public String getDataFormat() {
|
@Override
|
||||||
|
public String getDataFormat() {
|
||||||
return "0.00";
|
return "0.00";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ public class BookMark {
|
|||||||
// Get the first node and catch it's reference for return if
|
// Get the first node and catch it's reference for return if
|
||||||
// the first child node is a style node (w:rPr).
|
// the first child node is a style node (w:rPr).
|
||||||
childNode = parentNode.getFirstChild();
|
childNode = parentNode.getFirstChild();
|
||||||
if (childNode != null && childNode.getNodeName().equals("w:rPr")) {
|
if (childNode != null && "w:rPr".equals(childNode.getNodeName())) {
|
||||||
styleNode = childNode;
|
styleNode = childNode;
|
||||||
} else {
|
} else {
|
||||||
// If the first node was not a style node and there are other
|
// If the first node was not a style node and there are other
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
|||||||
* @param plainPassword 明文密码
|
* @param plainPassword 明文密码
|
||||||
* @return 16位salt密钥 + 40位hash密码
|
* @return 16位salt密钥 + 40位hash密码
|
||||||
*/
|
*/
|
||||||
public String encryptPassword(String plainPassword) {
|
@Override
|
||||||
|
public String encryptPassword(String plainPassword) {
|
||||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||||
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
|
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
|
||||||
byte[] hashPassword = Sha1Utils.sha1(plain.getBytes(), salt, HASH_INTERATIONS);
|
byte[] hashPassword = Sha1Utils.sha1(plain.getBytes(), salt, HASH_INTERATIONS);
|
||||||
@@ -85,6 +86,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
|||||||
* @param password 密文密码
|
* @param password 密文密码
|
||||||
* @return 验证成功返回true
|
* @return 验证成功返回true
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean validatePassword(String plainPassword, String password) {
|
public boolean validatePassword(String plainPassword, String password) {
|
||||||
try{
|
try{
|
||||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.common.utils.excel.fieldtype;
|
package com.jeesite.common.utils.excel.fieldtype;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.jeesite.common.lang.StringUtils;
|
import com.jeesite.common.lang.StringUtils;
|
||||||
import com.jeesite.modules.sys.entity.Area;
|
import com.jeesite.modules.sys.entity.Area;
|
||||||
import com.jeesite.modules.sys.utils.AreaUtils;
|
import com.jeesite.modules.sys.utils.AreaUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字段类型转换
|
* 字段类型转换
|
||||||
* @author ThinkGem
|
* @author ThinkGem
|
||||||
@@ -27,7 +27,8 @@ public class AreaType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public Object getValue(String val) {
|
@Override
|
||||||
|
public Object getValue(String val) {
|
||||||
for (Area e : list){
|
for (Area e : list){
|
||||||
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
|
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
|
||||||
return e;
|
return e;
|
||||||
@@ -39,6 +40,7 @@ public class AreaType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导出)
|
* 获取对象值(导出)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String setValue(Object val) {
|
public String setValue(Object val) {
|
||||||
if (val != null && ((Area)val).getAreaName() != null){
|
if (val != null && ((Area)val).getAreaName() != null){
|
||||||
return ((Area)val).getAreaName();
|
return ((Area)val).getAreaName();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class CompanyType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object getValue(String val) {
|
public Object getValue(String val) {
|
||||||
for (Company e : list){
|
for (Company e : list){
|
||||||
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
|
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
|
||||||
@@ -39,6 +40,7 @@ public class CompanyType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 设置对象值(导出)
|
* 设置对象值(导出)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String setValue(Object val) {
|
public String setValue(Object val) {
|
||||||
if (val != null && ((Company)val).getCompanyName() != null){
|
if (val != null && ((Company)val).getCompanyName() != null){
|
||||||
return ((Company)val).getCompanyName();
|
return ((Company)val).getCompanyName();
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ public class OfficeType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public Object getValue(String val) {
|
@Override
|
||||||
|
public Object getValue(String val) {
|
||||||
for (Office e : list){
|
for (Office e : list){
|
||||||
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
|
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
|
||||||
return e;
|
return e;
|
||||||
@@ -39,7 +40,8 @@ public class OfficeType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 设置对象值(导出)
|
* 设置对象值(导出)
|
||||||
*/
|
*/
|
||||||
public String setValue(Object val) {
|
@Override
|
||||||
|
public String setValue(Object val) {
|
||||||
if (val != null && ((Office)val).getOfficeName() != null){
|
if (val != null && ((Office)val).getOfficeName() != null){
|
||||||
return ((Office)val).getOfficeName();
|
return ((Office)val).getOfficeName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ public class PostListType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public Object getValue(String val) {
|
@Override
|
||||||
|
public Object getValue(String val) {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
for (String s : StringUtils.split(val, ",")) {
|
for (String s : StringUtils.split(val, ",")) {
|
||||||
for (Post e : postList) {
|
for (Post e : postList) {
|
||||||
@@ -46,7 +47,8 @@ public class PostListType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 设置对象值(导出)
|
* 设置对象值(导出)
|
||||||
*/
|
*/
|
||||||
public String setValue(Object val) {
|
@Override
|
||||||
|
public String setValue(Object val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Post> postList = (List<Post>) val;
|
List<Post> postList = (List<Post>) val;
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ public class RoleListType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public Object getValue(String val) {
|
@Override
|
||||||
|
public Object getValue(String val) {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
for (String s : StringUtils.split(val, ",")) {
|
for (String s : StringUtils.split(val, ",")) {
|
||||||
for (Role e : roleList) {
|
for (Role e : roleList) {
|
||||||
@@ -46,7 +47,8 @@ public class RoleListType implements FieldType {
|
|||||||
/**
|
/**
|
||||||
* 设置对象值(导出)
|
* 设置对象值(导出)
|
||||||
*/
|
*/
|
||||||
public String setValue(Object val) {
|
@Override
|
||||||
|
public String setValue(Object val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Role> roleList = (List<Role>) val;
|
List<Role> roleList = (List<Role>) val;
|
||||||
|
|||||||
@@ -4,18 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.modules.msg.service;
|
package com.jeesite.modules.msg.service;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import com.jeesite.common.callback.MethodCallback;
|
|
||||||
import com.jeesite.common.collect.ListUtils;
|
import com.jeesite.common.collect.ListUtils;
|
||||||
import com.jeesite.common.config.Global;
|
import com.jeesite.common.config.Global;
|
||||||
import com.jeesite.common.entity.Page;
|
import com.jeesite.common.entity.Page;
|
||||||
@@ -28,17 +16,22 @@ import com.jeesite.modules.msg.dao.MsgInnerRecordDao;
|
|||||||
import com.jeesite.modules.msg.entity.MsgInner;
|
import com.jeesite.modules.msg.entity.MsgInner;
|
||||||
import com.jeesite.modules.msg.entity.MsgInnerRecord;
|
import com.jeesite.modules.msg.entity.MsgInnerRecord;
|
||||||
import com.jeesite.modules.msg.entity.MsgPush;
|
import com.jeesite.modules.msg.entity.MsgPush;
|
||||||
import com.jeesite.modules.msg.entity.content.AppMsgContent;
|
import com.jeesite.modules.msg.entity.content.*;
|
||||||
import com.jeesite.modules.msg.entity.content.BaseMsgContent;
|
|
||||||
import com.jeesite.modules.msg.entity.content.EmailMsgContent;
|
|
||||||
import com.jeesite.modules.msg.entity.content.PcMsgContent;
|
|
||||||
import com.jeesite.modules.msg.entity.content.SmsMsgContent;
|
|
||||||
import com.jeesite.modules.msg.utils.MsgPushUtils;
|
import com.jeesite.modules.msg.utils.MsgPushUtils;
|
||||||
import com.jeesite.modules.sys.entity.EmpUser;
|
import com.jeesite.modules.sys.entity.EmpUser;
|
||||||
import com.jeesite.modules.sys.entity.User;
|
import com.jeesite.modules.sys.entity.User;
|
||||||
import com.jeesite.modules.sys.service.EmpUserService;
|
import com.jeesite.modules.sys.service.EmpUserService;
|
||||||
|
|
||||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部消息Service
|
* 内部消息Service
|
||||||
@@ -192,16 +185,12 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ListUtils.pageList(recordList, 100, new MethodCallback() {
|
msgInnerRecordDao.insertBatch(recordList, null);
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public Object execute(Object... objs) {
|
|
||||||
return msgInnerRecordDao.insertBatch((List<MsgInnerRecord>)objs[0]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 手动触发消息推送任务
|
// 手动触发消息推送任务
|
||||||
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
|
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
|
||||||
msgPushThreadPool.submit(new Runnable() {
|
msgPushThreadPool.submit(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
try{
|
try{
|
||||||
MsgPushUtils.getMsgPushTask().execute();
|
MsgPushUtils.getMsgPushTask().execute();
|
||||||
}catch(Exception ex){
|
}catch(Exception ex){
|
||||||
|
|||||||
@@ -4,16 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.jeesite.modules.sys.service.support;
|
package com.jeesite.modules.sys.service.support;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import javax.validation.ConstraintViolation;
|
|
||||||
import javax.validation.ConstraintViolationException;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.jeesite.common.config.Global;
|
import com.jeesite.common.config.Global;
|
||||||
import com.jeesite.common.entity.Page;
|
import com.jeesite.common.entity.Page;
|
||||||
import com.jeesite.common.idgen.IdGen;
|
import com.jeesite.common.idgen.IdGen;
|
||||||
@@ -33,6 +23,14 @@ import com.jeesite.modules.sys.service.EmployeeService;
|
|||||||
import com.jeesite.modules.sys.service.UserService;
|
import com.jeesite.modules.sys.service.UserService;
|
||||||
import com.jeesite.modules.sys.utils.EmpUtils;
|
import com.jeesite.modules.sys.utils.EmpUtils;
|
||||||
import com.jeesite.modules.sys.utils.UserUtils;
|
import com.jeesite.modules.sys.utils.UserUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.validation.ConstraintViolation;
|
||||||
|
import javax.validation.ConstraintViolationException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工管理Service
|
* 员工管理Service
|
||||||
@@ -54,7 +52,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
private void corpModelValid() throws Exception{
|
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");
|
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,似乎你的当前版本不是JeeSite专业版。\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,6 +91,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
/**
|
/**
|
||||||
* 查询全部用户,仅返回基本信息
|
* 查询全部用户,仅返回基本信息
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<EmpUser> findUserList(EmpUser empUser){
|
public List<EmpUser> findUserList(EmpUser empUser){
|
||||||
return dao.findUserList(empUser);
|
return dao.findUserList(empUser);
|
||||||
}
|
}
|
||||||
@@ -100,6 +99,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
/**
|
/**
|
||||||
* 根据部门编码查询用户,仅返回基本信息
|
* 根据部门编码查询用户,仅返回基本信息
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
|
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
|
||||||
return dao.findUserListByOfficeCodes(empUser);
|
return dao.findUserListByOfficeCodes(empUser);
|
||||||
}
|
}
|
||||||
@@ -107,6 +107,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
/**
|
/**
|
||||||
* 根据角色编码查询用户,仅返回基本信息
|
* 根据角色编码查询用户,仅返回基本信息
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
|
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
|
||||||
return dao.findUserListByRoleCodes(empUser);
|
return dao.findUserListByRoleCodes(empUser);
|
||||||
}
|
}
|
||||||
@@ -114,6 +115,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
/**
|
/**
|
||||||
* 根据岗位编码查询用户,仅返回基本信息
|
* 根据岗位编码查询用户,仅返回基本信息
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
|
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
|
||||||
return dao.findUserListByPostCodes(empUser);
|
return dao.findUserListByPostCodes(empUser);
|
||||||
}
|
}
|
||||||
@@ -169,6 +171,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
|||||||
* @param file 导入的用户数据文件
|
* @param file 导入的用户数据文件
|
||||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||||
if (file == null){
|
if (file == null){
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
|||||||
/**
|
/**
|
||||||
* 查询当前员工关联的岗位信息
|
* 查询当前员工关联的岗位信息
|
||||||
*/
|
*/
|
||||||
public List<EmployeePost> findEmployeePostList(Employee employee){
|
@Override
|
||||||
|
public List<EmployeePost> findEmployeePostList(Employee employee){
|
||||||
EmployeePost employeePost = new EmployeePost();
|
EmployeePost employeePost = new EmployeePost();
|
||||||
employeePost.setEmpCode(employee.getEmpCode());
|
employeePost.setEmpCode(employee.getEmpCode());
|
||||||
return employeePostDao.findList(employeePost);
|
return employeePostDao.findList(employeePost);
|
||||||
@@ -104,6 +105,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
|||||||
/**
|
/**
|
||||||
* 查询当前员工关联的附属机构信息
|
* 查询当前员工关联的附属机构信息
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
|
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
|
||||||
EmployeeOffice employeeOffice = new EmployeeOffice();
|
EmployeeOffice employeeOffice = new EmployeeOffice();
|
||||||
employeeOffice.setEmpCode(employee.getEmpCode());
|
employeeOffice.setEmpCode(employee.getEmpCode());
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
|
|||||||
/**
|
/**
|
||||||
* 不使用数据库事务,执行插入日志
|
* 不使用数据库事务,执行插入日志
|
||||||
*/
|
*/
|
||||||
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
@Override
|
||||||
|
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
||||||
public void insertLog(Log entity) {
|
public void insertLog(Log entity) {
|
||||||
DataSourceHolder.setJdbcTransaction(false);
|
DataSourceHolder.setJdbcTransaction(false);
|
||||||
dao.insert(entity);
|
dao.insert(entity);
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
|||||||
* @param file 导入的机构数据文件
|
* @param file 导入的机构数据文件
|
||||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Override
|
||||||
|
@Transactional
|
||||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||||
if (file == null){
|
if (file == null){
|
||||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
|||||||
/**
|
/**
|
||||||
* 根据名称查询岗位
|
* 根据名称查询岗位
|
||||||
*/
|
*/
|
||||||
public Post getByPostName(Post post) {
|
@Override
|
||||||
|
public Post getByPostName(Post post) {
|
||||||
Post where = new Post();
|
Post where = new Post();
|
||||||
where.setPostName(post.getPostName());
|
where.setPostName(post.getPostName());
|
||||||
return dao.getByEntity(where);
|
return dao.getByEntity(where);
|
||||||
|
|||||||
Reference in New Issue
Block a user