You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-develop/src/com/engine/kq/biz/KQLeaveRulesComInfo.java

320 lines
8.3 KiB
Java

package com.engine.kq.biz;
import com.engine.kq.wfset.util.KQAttFlowCheckUtil;
import weaver.cache.CacheBase;
import weaver.cache.CacheColumn;
import weaver.cache.CacheColumnType;
import weaver.cache.PKColumn;
import weaver.general.Util;
import weaver.systeminfo.SystemEnv;
/**
*
*/
public class KQLeaveRulesComInfo extends CacheBase {
/**
*
*/
protected static String TABLE_NAME = "kq_leaveRules";
/**
* sqlwherewhere
*/
protected static String TABLE_WHERE = " (isDelete is null or isDelete !=1) ";
/**
* sqlorder byorder by
*/
protected static String TABLE_ORDER = " showOrder,id ";
/**
*
*/
@PKColumn(type = CacheColumnType.NUMBER)
protected static String PK_NAME = "id";
/**
*
*/
@CacheColumn(name = "leaveName")
protected static int leaveName;
@CacheColumn(name = "SchevacationON")
protected static int SchevacationON;
@CacheColumn(name = "Schevacation")
protected static int Schevacation;
/**
* 0-1-
*/
@CacheColumn(name = "isEnable")
protected static int isEnable;
/**
* 0-1-
*/
@CacheColumn(name = "scopeType")
protected static int scopeType;
/**
* ID(ID)
*/
@CacheColumn(name = "scopeValue")
protected static int scopeValue;
/**
*
* 1-
* 2-
* 3-
* 4-
*
*/
@CacheColumn(name = "minimumUnit")
protected static int minimumUnit;
/**
*
* XX=1
*/
@CacheColumn(name = "proportion")
protected static int proportion;
/**
* 1=XX
*/
@CacheColumn(name = "hoursToDay")
protected static int hoursToDay;
/**
* 0-1-2-3-
*/
@CacheColumn(name = "filterHolidays")
protected static int filterHolidays;
/**
*
* 1-
* 2-
*/
@CacheColumn(name = "computingMode")
protected static int computingMode;
/**
*
* 0-
* 1-
*/
@CacheColumn(name = "balanceEnable")
protected static int balanceEnable;
/**
*
*/
@CacheColumn(name = "leaveCode")
protected static int leaveCode;
/**
* 1- 2-
*/
@CacheColumn(name = "timeselection")
protected static int timeselection;
/**
* 1 2 3
*/
@CacheColumn(name = "conversion")
protected static int conversion;
/**
* 1 0
*/
@CacheColumn(name = "repeat_time")
protected static int repeatTime;
public String getId(){
return (String)getRowValue(PK_INDEX);
}
public String getLeaveName() {
return (String)getRowValue(leaveName);
}
public String getLeaveName(String key){
return (String) getValue(leaveName,key);
}
public String getSchevacationON() {
return (String)getRowValue(SchevacationON);
}
public String getSchevacationON(String key){
return (String) getValue(SchevacationON,key);
}
public String getSchevacation() {
return (String)getRowValue(Schevacation);
}
public String getSchevacation(String key){
return (String) getValue(Schevacation,key);
}
public String getIsEnable() {
return (String)getRowValue(isEnable);
}
public String getIsEnable(String key){
return (String) getValue(isEnable,key);
}
public String getScopeType() {
return (String)getRowValue(scopeType);
}
public String getScopeType(String key){
return (String) getValue(scopeType,key);
}
public String getScopeValue() {
return (String)getRowValue(scopeValue);
}
public String getScopeValue(String key){
return (String) getValue(scopeValue,key);
}
public String getMinimumUnit() {
return (String)getRowValue(minimumUnit);
}
public String getMinimumUnit(String key){
return (String)getValue(minimumUnit,key);
}
public String getProportion() {
return (String)getRowValue(proportion);
}
public String getProportion(String key){
return (String)getValue(proportion,key);
}
public String getHoursToDay() {
return (String)getRowValue(hoursToDay);
}
public String getHoursToDay(String key){
return (String)getValue(hoursToDay,key);
}
public String getFilterHolidays() {
return (String)getRowValue(filterHolidays);
}
public String getFilterHolidays(String key){
return (String)getValue(filterHolidays,key);
}
public String getComputingMode() {
return (String)getRowValue(computingMode);
}
public String getComputingMode(String key){
return (String)getValue(computingMode,key);
}
public String getBalanceEnable() {
return (String)getRowValue(balanceEnable);
}
public String getBalanceEnable(String key){
return (String)getValue(balanceEnable,key);
}
public String getLeaveCode() {
return (String)getRowValue(leaveCode);
}
public String getLeaveCode(String key){
return (String)getValue(leaveCode,key);
}
public String getTimeSelection() {
String value = (String) getRowValue(timeselection);
if (value == null || value.equals("")) {
value = "1";
}
return value;
}
public String getTimeSelection(String key) {
String value = (String) getValue(timeselection, key);
if (value == null || value.equals("")) {
value = "1";
}
return value;
}
public String getConversion() {
return (String)getRowValue(conversion);
}
public String getConversion(String key){
return (String)getValue(conversion,key);
}
public String getRepeatTime() {
return (String)getRowValue(repeatTime);
}
public String getRepeatTime(String key){
return (String)getValue(repeatTime,key);
}
public String getUnitName(int language){
String unitName = "";//单位名称,天/小时
int minimumUnit = Util.getIntValue(getMinimumUnit(),1);
if (minimumUnit == 1 || minimumUnit == 2 || minimumUnit == 4) {
unitName = SystemEnv.getHtmlLabelName(389325, language);//(天)
} else {
unitName = SystemEnv.getHtmlLabelName(389326, language);//(小时)
}
return unitName;
}
public String getUnitName(String key,int language){
String unitName = "";//单位名称,天/小时
int minimumUnit = Util.getIntValue(getMinimumUnit(key),1);
if (minimumUnit == 1 || minimumUnit == 2 || minimumUnit == 4) {
unitName = SystemEnv.getHtmlLabelName(389325, language);//(天)
} else {
unitName = SystemEnv.getHtmlLabelName(389326, language);//(小时)
}
// KQTransMethod method = new KQTransMethod();
// unitName = "("+method.getMinimumUnitName4Browser(""+minimumUnit, ""+language)+")";
return unitName;
}
public String getUnitNameNew(String key,int language){
String unitName = "";//单位名称,天/小时
int minimumUnit = Util.getIntValue(getMinimumUnit(key),1);
if (minimumUnit == 1 || minimumUnit == 2 || minimumUnit == 4) {
unitName = SystemEnv.getHtmlLabelName(389325, language);//(天)
} else {
unitName = SystemEnv.getHtmlLabelName(389326, language);//(小时)
}
return unitName;
}
@Override
public void removeCache() {
super.removeCache();
KQAttFlowCheckUtil kqAttFlowCheckUtil = new KQAttFlowCheckUtil();
kqAttFlowCheckUtil.initLeaveUnit();
}
}