|
|
|
@ -13,10 +13,13 @@ import com.google.common.collect.Maps;
|
|
|
|
|
import com.google.common.collect.Sets;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import weaver.conn.RecordSetTrans;
|
|
|
|
|
import weaver.general.BaseBean;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.company.DepartmentComInfo;
|
|
|
|
|
import weaver.soa.workflow.request.*;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.time.ZoneOffset;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -1037,6 +1040,33 @@ public class CommonUtil {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 读取资源文件信息
|
|
|
|
|
* @param propFile 配置文件名
|
|
|
|
|
* @param itemName 资源信息名
|
|
|
|
|
* @param defaultInfo 默认返回信息
|
|
|
|
|
* @param value 可扩展多个的拼接内容
|
|
|
|
|
* @return 资源信息
|
|
|
|
|
*/
|
|
|
|
|
public static String readResource(String propFile,String itemName,int language,String defaultInfo,Object...value) {
|
|
|
|
|
String str_res = "";
|
|
|
|
|
String charsetName = new BaseBean().getPropValue(propFile, "charsetName");
|
|
|
|
|
try {
|
|
|
|
|
if ("".equals(charsetName))
|
|
|
|
|
charsetName = "UTF-8";
|
|
|
|
|
str_res = new String(Util.null2String(new BaseBean().getPropValue(propFile, itemName)).trim().getBytes(charsetName), "GBK");
|
|
|
|
|
if (value.length > 0) {
|
|
|
|
|
for (int i = 0; i < value.length; i++) {
|
|
|
|
|
str_res = str_res.replace("$" + i + "$", value[i].toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
return defaultInfo;
|
|
|
|
|
}
|
|
|
|
|
return str_res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取人员id和姓名的映射
|
|
|
|
|
* @return
|
|
|
|
|