package com.vci.client.portal.form.defaultvalue;
|
|
import java.text.SimpleDateFormat;
|
|
import com.vci.client.ClientSession;
|
import com.vci.corba.common.VCIError;
|
|
|
/**
|
*
|
* @Title :DefaultValueInnerFunction.java
|
* @Description :
|
* @Copyright :宏博远达科技有限公司
|
* @Author :平台与规划部/ZhongGY/E-mail:zhonggy@vci-tech.com
|
* @Date :2015-6-24
|
* @Version :1
|
* @Other :产生注释:Alt+Shift+J
|
*/
|
public class DefaultValueInnerFunction {
|
|
private static DefaultValueInnerFunction instance = null;
|
|
private DefaultValueInnerFunction(){}
|
|
public synchronized static DefaultValueInnerFunction getInstance(){
|
if (instance == null) {
|
instance = new DefaultValueInnerFunction();
|
}
|
return instance;
|
}
|
|
/**
|
* @Title :获取系统当前时间(服务器端)
|
* @Description :
|
* @return
|
*/
|
public String getCurrentTime(){
|
//return "TODO:getCurrentTime()";
|
String format = "HH:mm:ss";
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
String dateString = "";
|
try {
|
dateString = sdf.format(ClientSession.getFrameworkService().getSystemTime());
|
} catch (VCIError e) {
|
// TODO Auto-generated catch block
|
e.printStackTrace();
|
}
|
return dateString;
|
}
|
/**
|
* @Title :获取系统当前日期(服务器端)
|
* @Description :
|
* @return
|
*/
|
public String getCurrentDate(){
|
//return "TODO:getCurrentDate()";
|
String format = "yyyy-MM-dd";
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
String dateString = "";
|
try {
|
dateString = sdf.format(ClientSession.getFrameworkService().getSystemTime());
|
} catch (VCIError e) {
|
// TODO Auto-generated catch block
|
e.printStackTrace();
|
}
|
return dateString;
|
}
|
/**
|
* @Title :获取系统当前日期(服务器端)
|
* @Description :
|
* @return
|
*/
|
public String getCurrentDateTime(){
|
//return "TODO:getCurrentDateTime()";
|
String format = "yyyy-MM-dd HH:mm:ss";
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
String dateString = "";
|
try {
|
dateString = sdf.format(ClientSession.getFrameworkService().getSystemTime());
|
} catch (VCIError e) {
|
// TODO Auto-generated catch block
|
e.printStackTrace();
|
}
|
return dateString;
|
}
|
}
|