新增设置systemFilePath方法,创建保时捷sftp工具类
parent
7900654b0d
commit
244a7b6162
|
@ -0,0 +1,503 @@
|
|||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package weaver.general;
|
||||
|
||||
import com.engine.fna.cmd.documentCompareNew.CompareUtil;
|
||||
import com.engine.portal.biz.nonstandardfunction.SysModuleInfoBiz;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
import java.util.Properties;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.conn.WeaverThreadPool;
|
||||
|
||||
public class GCONST {
|
||||
private static String CONFIG_FILE = "weaver";
|
||||
private static String ROOT_PATH;
|
||||
private static String CONTEXT_PATH = "/";
|
||||
private static String SERVER_NAME;
|
||||
private static WeaverThreadPool wThreadPool;
|
||||
public static ArrayList WFProcessing = new ArrayList();
|
||||
private static Properties othersprop = null;
|
||||
private static Properties mutillanguageprop = null;
|
||||
private static Properties Wfmonitorprop = null;
|
||||
private static String WORKFLOWWAYOUT = "WORKFLOWWAYOUT";
|
||||
private static String WFERRORDATACLEARTIME = "WFERRORDATACLEARTIME";
|
||||
private static String MOREACCOUNTLANDING = "MOREACCOUNTLANDING";
|
||||
private static String WORKFLOWINTERVENORBYMONITOR = "WORKFLOWINTERVENORBYMONITOR";
|
||||
private static String FREEFLOW = "FREEFLOW";
|
||||
private static String CHATSERVER = "CHATSERVER";
|
||||
private static String CHATREESOURCE = "CHATRESOURCE";
|
||||
private static String CHATHOST = "CHATHOST";
|
||||
private static String WorkFlowOverTimeTmp = "WORKFLOWOVERTIMETEMP";
|
||||
private static String MailReminderSet = "MailReminderSet";
|
||||
private static String RTXReminderSet = "RTXReminderSet";
|
||||
private static Properties freeflowProp = null;
|
||||
private static Properties dactylogramProp = null;
|
||||
private static Properties wfFieldTriggerProp = null;
|
||||
private static Properties hrmchatProp = null;
|
||||
private static Properties wfovertime = null;
|
||||
private static Properties reminderProp = null;
|
||||
private static Properties workflowsayoutProp = null;
|
||||
private static Properties issigninorsignoutProp = null;
|
||||
private static Properties moreaccountlandingProp = null;
|
||||
private static Properties workflowimpProp = null;
|
||||
private static Properties dmlactionProp = null;
|
||||
private static String ZH_TW_LANGUAGE = "ZH_TW_LANGUAGE";
|
||||
private static String EN_LANGUAGE = "EN_LANGUAGE";
|
||||
private static Properties workflowstoporcancelProp = null;
|
||||
private static Properties workflowimportdetailProp = null;
|
||||
private static Properties workflowspecialApprovalProp = null;
|
||||
private static Properties workflowreturnnodeProp = null;
|
||||
private static Properties systemSettingMenuProp = null;
|
||||
private static Properties systemThemeTemplateProp = null;
|
||||
private static Properties wsactionProp = null;
|
||||
private static Properties esbactionProp = null;
|
||||
private static Properties sapactionProp = null;
|
||||
private static String systemFilePath = "";
|
||||
private static Properties coremailProp = null;
|
||||
public static String PROP_UTF8 = "UTF-8";
|
||||
public static String XML_UTF8 = "UTF-8";
|
||||
public static String NOMRAL_UTF8 = "UTF-8";
|
||||
public static final String inputRegP = "(<input( [^>]+ | )name {0,3}= {0,3}['\"]?)([^>]{0,500}?)(['\"]?( [^>]+ | )value {0,3}= {0,3}['|\"]?)(~`~`([\\d ]{1,2}[^`]{0,2000}?`~`)+[\\d ]{1,2}[^`]{0,2000}?`~`~)(['\"]?[^>]*/?>)|(<input( [^>]+ | )value {0,3}= {0,3}['\"]?)(~`~`([\\d ]{1,2}[^`]{0,2000}?`~`)+[\\d ]{1,2}[^`]{0,2000}?`~`~)(['\"]?( [^>]+ | )name {0,3}= {0,3}['\"]?)([^>]{0,500}?)(((['\" ][^>]*/?)|[/?])(>))";
|
||||
public static final String langRegP = "(?<!value {0,3}= {0,3}('|\"))(~`~`(([\\d ]{1,2}[^`]{0,2000}?`~`)+[\\d ]{1,2}[^`]{0,2000}?)`~`~).{0,2000}?";
|
||||
public static final String jsonRegP = "((\"\\w{0,50}\"):( {0,3}\"(~`~`(([\\d ]{1,2}[^`]{0,2000}?`~`)+[\\d ]{1,2}[^`]{0,2000}?)`~`~)\")([,]?))";
|
||||
public static final String LANG_CONTENT_PREFIX = "~`~`";
|
||||
public static final String LANG_CONTENT_SPLITTER1 = "`~`";
|
||||
public static final String LANG_CONTENT_SUFFIX = "`~`~";
|
||||
public static final String LANG_INPUT_PREFIX = "__multilangpre_";
|
||||
public static final String valueRegP = "~`~`(([\\d ]{1,2}[^`]{0,2000}?`~`)+[\\d ]{1,2}[^`]{0,2000}?)`~`~";
|
||||
public static final String IS_MULTILANG_SET = "is_multilang_set";
|
||||
private static String host = "";
|
||||
public static String propertyPath = "";
|
||||
public static String propFileBakName = "weaver_bak";
|
||||
|
||||
public GCONST() {
|
||||
}
|
||||
|
||||
public static void setHost(String var0) {
|
||||
host = var0;
|
||||
}
|
||||
|
||||
public static String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public static void setRootPath(String var0) {
|
||||
ROOT_PATH = var0;
|
||||
(new BaseBean()).writeLog("setRootPath:" + getMyGrandpaStackTrace() + " value=" + var0);
|
||||
}
|
||||
|
||||
public static void setSystemFilePath(String var0) {
|
||||
systemFilePath = var0;
|
||||
(new BaseBean()).writeLog("systemFilePath:" + getMyGrandpaStackTrace() + " value=" + var0);
|
||||
}
|
||||
|
||||
|
||||
public static String getMyGrandpaStackTrace() {
|
||||
StackTraceElement[] var0 = Thread.currentThread().getStackTrace();
|
||||
StackTraceElement var1 = var0[1];
|
||||
StackTraceElement var2 = var0[2];
|
||||
String var3 = null;
|
||||
|
||||
for(int var4 = 1; var4 < var0.length; ++var4) {
|
||||
StackTraceElement var5 = var0[var4];
|
||||
if (!var5.getClassName().equals(var2.getClassName())) {
|
||||
var3 = var5.getClassName() + "." + var5.getMethodName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (var3 == null) {
|
||||
var3 = var2.getClassName() + "." + var2.getMethodName();
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
public static void setContextPath(String var0) {
|
||||
if (!Objects.isNull(var0)) {
|
||||
if ("/".equals(var0)) {
|
||||
CONTEXT_PATH = var0;
|
||||
} else {
|
||||
if (!var0.startsWith("/")) {
|
||||
var0 = "/" + var0;
|
||||
}
|
||||
|
||||
if (var0.endsWith("/")) {
|
||||
var0 = var0.substring(0, var0.length() - 1);
|
||||
}
|
||||
|
||||
CONTEXT_PATH = var0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getContextPath() {
|
||||
if (Objects.isNull(getContextRealPath())) {
|
||||
return "";
|
||||
} else {
|
||||
return "/".equals(getContextRealPath()) ? "" : getContextRealPath();
|
||||
}
|
||||
}
|
||||
|
||||
public static String getContextRealPath() {
|
||||
return CONTEXT_PATH;
|
||||
}
|
||||
|
||||
public static void setServerName(String var0) {
|
||||
SERVER_NAME = var0;
|
||||
}
|
||||
|
||||
public static String getRootPath() {
|
||||
return ROOT_PATH;
|
||||
}
|
||||
|
||||
public static String getServerName() {
|
||||
return SERVER_NAME;
|
||||
}
|
||||
|
||||
public static String getConfigFile() {
|
||||
return CONFIG_FILE;
|
||||
}
|
||||
|
||||
public static String getPropertyPath() {
|
||||
if (propertyPath == null || "".equals(propertyPath) || propertyPath.contains("null")) {
|
||||
File var0 = new File(ROOT_PATH + "WEB-INF" + File.separatorChar + "prop");
|
||||
if (var0.exists()) {
|
||||
propertyPath = ROOT_PATH + "WEB-INF" + File.separatorChar + "prop" + File.separatorChar;
|
||||
} else {
|
||||
propertyPath = ROOT_PATH + "prop" + File.separatorChar;
|
||||
}
|
||||
}
|
||||
|
||||
return propertyPath;
|
||||
}
|
||||
|
||||
public static String getLogPath() {
|
||||
return ROOT_PATH + "log" + File.separatorChar;
|
||||
}
|
||||
|
||||
public static String getPrintMoudlePath() {
|
||||
return ROOT_PATH + "printmoudlefile" + File.separatorChar;
|
||||
}
|
||||
|
||||
public static String getSqlPath() {
|
||||
return ROOT_PATH + "sql" + File.separatorChar;
|
||||
}
|
||||
|
||||
public static String getSysFilePath() {
|
||||
// return ROOT_PATH + "filesystem" + File.separatorChar;
|
||||
if("".equals(systemFilePath)){
|
||||
return ROOT_PATH + "filesystem" + File.separatorChar;
|
||||
}else {
|
||||
if(systemFilePath.endsWith(String.valueOf(File.separatorChar))){
|
||||
return systemFilePath;
|
||||
}else {
|
||||
return systemFilePath + File.separatorChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getSysFileBackupPath() {
|
||||
// return ROOT_PATH + "filesystembackup" + File.separatorChar;
|
||||
if("".equals(systemFilePath)){
|
||||
return ROOT_PATH + "filesystembackup" + File.separatorChar;
|
||||
}else {
|
||||
if(systemFilePath.endsWith(String.valueOf(File.separatorChar))){
|
||||
return systemFilePath.replace(File.separatorChar + "filesystem" + File.separatorChar,
|
||||
File.separatorChar + "filesystembackup" + File.pathSeparatorChar);
|
||||
}else {
|
||||
return systemFilePath.replace(File.separatorChar + "filesystem",
|
||||
File.separatorChar + "filesystembackup") + File.separatorChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getSysFileBackupTime() {
|
||||
return "60";
|
||||
}
|
||||
|
||||
public static void setWeaverThreadPool(WeaverThreadPool var0) {
|
||||
wThreadPool = var0;
|
||||
}
|
||||
|
||||
public static WeaverThreadPool getWeaverThreadPool() {
|
||||
return wThreadPool;
|
||||
}
|
||||
|
||||
public static void setWsActionProp(Properties var0) {
|
||||
wsactionProp = var0;
|
||||
}
|
||||
|
||||
public static void setESBActionProp(Properties var0) {
|
||||
esbactionProp = var0;
|
||||
}
|
||||
|
||||
public static void setSapActionProp(Properties var0) {
|
||||
sapactionProp = var0;
|
||||
}
|
||||
|
||||
public static void setCoremailProp(Properties var0) {
|
||||
coremailProp = var0;
|
||||
}
|
||||
|
||||
public static void setOthersProperties(Properties var0) {
|
||||
othersprop = var0;
|
||||
}
|
||||
|
||||
public static void setMutilLanguageProperties(Properties var0) {
|
||||
mutillanguageprop = var0;
|
||||
}
|
||||
|
||||
public static void setDactylogramProperties(Properties var0) {
|
||||
dactylogramProp = var0;
|
||||
}
|
||||
|
||||
public static void setWfFieldTriggerProperties(Properties var0) {
|
||||
wfFieldTriggerProp = var0;
|
||||
}
|
||||
|
||||
public static void setWFMonitorProperties(Properties var0) {
|
||||
Wfmonitorprop = var0;
|
||||
}
|
||||
|
||||
public static void setFreeFlowProperties(Properties var0) {
|
||||
freeflowProp = var0;
|
||||
}
|
||||
|
||||
public static void setHrmChatProperties(Properties var0) {
|
||||
hrmchatProp = var0;
|
||||
}
|
||||
|
||||
public static void setWfOverTimeProperties(Properties var0) {
|
||||
wfovertime = var0;
|
||||
}
|
||||
|
||||
public static void setWfwayoutProperties(Properties var0) {
|
||||
workflowsayoutProp = var0;
|
||||
}
|
||||
|
||||
public static void setSigninProperties(Properties var0) {
|
||||
RecordSet var1 = new RecordSet();
|
||||
var1.executeSql("select needsign, needsignhasinit from hrmkqsystemSet ");
|
||||
int var2 = 0;
|
||||
int var3 = 0;
|
||||
if (var1.next()) {
|
||||
var2 = var1.getInt("needsign");
|
||||
var3 = var1.getInt("needsignhasinit");
|
||||
}
|
||||
|
||||
if (var3 == 1) {
|
||||
var0.setProperty("ISSIGNINORSIGNOUT", "" + var2);
|
||||
issigninorsignoutProp = var0;
|
||||
} else {
|
||||
issigninorsignoutProp = var0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void setMoreAccountProperties(Properties var0) {
|
||||
moreaccountlandingProp = var0;
|
||||
}
|
||||
|
||||
public static void setWorkflowImpProp(Properties var0) {
|
||||
workflowimpProp = var0;
|
||||
}
|
||||
|
||||
public static void setDMLActionProp(Properties var0) {
|
||||
dmlactionProp = var0;
|
||||
}
|
||||
|
||||
private static String getProp(String var0, Properties var1) {
|
||||
return var1 != null ? Util.null2String(var1.getProperty(var0)) : "";
|
||||
}
|
||||
|
||||
public static boolean getWorkflowWayOut() {
|
||||
String var0 = Util.null2String(getProp(WORKFLOWWAYOUT, othersprop));
|
||||
String var1 = Util.null2String(getProp("WORKFLOWWAYOUT", workflowsayoutProp));
|
||||
if (!"".equals(var1)) {
|
||||
if (var1.equals("1")) {
|
||||
return true;
|
||||
}
|
||||
} else if (var0.toLowerCase().equals("t")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getIsSignInOrSignOut() {
|
||||
String var0 = getProp("ISSIGNINORSIGNOUT", issigninorsignoutProp);
|
||||
if ("".equals(var0)) {
|
||||
var0 = getProp("ISSIGNINORSIGNOUT", issigninorsignoutProp);
|
||||
} else if ("true".equals(var0)) {
|
||||
var0 = "1";
|
||||
}
|
||||
|
||||
return var0;
|
||||
}
|
||||
|
||||
public static int getWorkflowErrorDataClearTime() {
|
||||
return Util.getIntValue(getProp(WFERRORDATACLEARTIME, othersprop), 7);
|
||||
}
|
||||
|
||||
public static boolean getMOREACCOUNTLANDING() {
|
||||
String var0 = getProp(MOREACCOUNTLANDING, moreaccountlandingProp);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static boolean getFIELDLINKAGE() {
|
||||
return SysModuleInfoBiz.checkNonstandardStatus("020");
|
||||
}
|
||||
|
||||
public static boolean getWorkflowIntervenorByMonitor() {
|
||||
String var0 = getProp(WORKFLOWINTERVENORBYMONITOR, Wfmonitorprop);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static boolean getONDACTYLOGRAM() {
|
||||
String var0 = getProp("ONDACTYLOGRAM", dactylogramProp);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static boolean getFreeFlow() {
|
||||
String var0 = getProp("FREEFLOW", freeflowProp);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static String getCHATSERVER() {
|
||||
return getProp(CHATSERVER, hrmchatProp);
|
||||
}
|
||||
|
||||
public static String getCHATREESOURCE() {
|
||||
return getProp(CHATREESOURCE, hrmchatProp);
|
||||
}
|
||||
|
||||
public static String getWorkFlowOverTimeTmp() {
|
||||
return getProp(WorkFlowOverTimeTmp, wfovertime);
|
||||
}
|
||||
|
||||
public static String getCHATHOST() {
|
||||
return getProp(CHATHOST, hrmchatProp);
|
||||
}
|
||||
|
||||
public static int getZHTWLANGUAGE() {
|
||||
return Util.getIntValue(getProp(ZH_TW_LANGUAGE, mutillanguageprop), 0);
|
||||
}
|
||||
|
||||
public static int getENLANGUAGE() {
|
||||
return Util.getIntValue(getProp(EN_LANGUAGE, mutillanguageprop), 0);
|
||||
}
|
||||
|
||||
public static void setReminderProp(Properties var0) {
|
||||
reminderProp = var0;
|
||||
}
|
||||
|
||||
public static boolean getMailReminderSet() {
|
||||
String var0 = getProp(MailReminderSet, reminderProp);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static boolean getRTXReminderSet() {
|
||||
String var0 = getProp(RTXReminderSet, reminderProp);
|
||||
return var0.toLowerCase().equals("y") || var0.equals("1");
|
||||
}
|
||||
|
||||
public static String getMailLoginPage() {
|
||||
return getProp("MailLoginPage", reminderProp);
|
||||
}
|
||||
|
||||
public static String getMailGotoPage() {
|
||||
return getProp("MailGotoPage", reminderProp);
|
||||
}
|
||||
|
||||
public static String getVerifyRTXLoginPage() {
|
||||
return getProp("VerifyRTXLoginPage", reminderProp);
|
||||
}
|
||||
|
||||
public static String getVerifyRTXGotoPage() {
|
||||
return getProp("VerifyRTXGotoPage", reminderProp);
|
||||
}
|
||||
|
||||
public static boolean isWorkflowIsOpenIOrE() {
|
||||
return Util.null2String(getProp("wf_e_i_isopen", workflowimpProp)).equals("1");
|
||||
}
|
||||
|
||||
public static boolean isDMLAction() {
|
||||
return Util.null2String(getProp("isdmlaction", dmlactionProp)).equals("1");
|
||||
}
|
||||
|
||||
public static void setWorkflowStopOrCancel(Properties var0) {
|
||||
workflowstoporcancelProp = var0;
|
||||
}
|
||||
|
||||
public static String getWorkflowStopOrCancel() {
|
||||
return SysModuleInfoBiz.checkNonstandardStatus("045") ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getDocCompare() {
|
||||
CompareUtil var0 = new CompareUtil();
|
||||
boolean var1 = CompareUtil.isOpen();
|
||||
return var1 ? "1" : "0";
|
||||
}
|
||||
|
||||
public static void setWorkflowImportDetail(Properties var0) {
|
||||
workflowimportdetailProp = var0;
|
||||
}
|
||||
|
||||
public static String getWorkflowImportDetail() {
|
||||
return getProp("WORKFLOWIMPORTDETAIL", workflowimportdetailProp);
|
||||
}
|
||||
|
||||
public static void setWorkflowSpecialApproval(Properties var0) {
|
||||
workflowspecialApprovalProp = var0;
|
||||
}
|
||||
|
||||
public static String getWorkflowSpecialApproval() {
|
||||
return getProp("WORKFLOWSPECIALAPPROVAL", workflowspecialApprovalProp);
|
||||
}
|
||||
|
||||
public static void setWorkflowReturnNode(Properties var0) {
|
||||
workflowreturnnodeProp = var0;
|
||||
}
|
||||
|
||||
public static String getWorkflowReturnNode() {
|
||||
return getProp("WORKFLOWRETURNNODE", workflowreturnnodeProp);
|
||||
}
|
||||
|
||||
public static void setSystemSettingMenu(Properties var0) {
|
||||
systemSettingMenuProp = var0;
|
||||
}
|
||||
|
||||
public static String getSystemSettingMenu() {
|
||||
return getProp("SYSTEMSETTINGMENU", systemSettingMenuProp);
|
||||
}
|
||||
|
||||
public static void setSystemThemeTemplate(Properties var0) {
|
||||
systemThemeTemplateProp = var0;
|
||||
}
|
||||
|
||||
public static String getsystemThemeTemplate() {
|
||||
return getProp("isOpenSoftAndSiteTempate", systemThemeTemplateProp);
|
||||
}
|
||||
|
||||
public static boolean isWsAction() {
|
||||
return Util.null2String(getProp("iswsaction", wsactionProp)).equals("1");
|
||||
}
|
||||
|
||||
public static boolean isESBAction() {
|
||||
return Util.null2String(getProp("isesbaction", esbactionProp)).equals("1");
|
||||
}
|
||||
|
||||
public static boolean isSapAction() {
|
||||
return Util.null2String(getProp("issapaction", sapactionProp)).equals("1");
|
||||
}
|
||||
|
||||
public static String getDefaultPassword() {
|
||||
return getProp("DEFAULTPASSWORD", coremailProp);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package weaver.youhong.ai.pcn.hrorganization.sftp;
|
||||
|
||||
/**
|
||||
* <h1>sftp连接工具类</h1>
|
||||
*
|
||||
* <p>create: 2022-11-22 11:00</p>
|
||||
*
|
||||
* @author youHong.ai
|
||||
*/
|
||||
|
||||
public class SftpConnectUtil {
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue