81 lines
3.9 KiB
Java
81 lines
3.9 KiB
Java
package wenrgise.hrms.businessdelegate;
|
|
|
|
import java.rmi.RemoteException;
|
|
import java.sql.Timestamp;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import javax.ejb.CreateException;
|
|
import wenrgise.common.bean.BaseHeaderBean;
|
|
import wenrgise.common.exception.EnrgiseApplicationException;
|
|
import wenrgise.common.exception.EnrgiseSystemException;
|
|
import wenrgise.common.utility.EnrgiseUtil;
|
|
import wenrgise.common.utility.RecordMetaInfo;
|
|
import wenrgise.common.vo.BaseQueryVO;
|
|
import wenrgise.common.vo.ThisPageVO;
|
|
import wenrgise.ejb.common.utility.ServiceLocator;
|
|
import wenrgise.hrms.bean.HrmAttShiftRosterGenHdrBean;
|
|
import wenrgise.hrms.ejb.facade.HrmSecondFacade;
|
|
import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome;
|
|
|
|
public class HrmAttShiftRosterGenBD extends HrmBaseBD {
|
|
public RecordMetaInfo getHeaderMetaImpl(BaseQueryVO oQueryVO) throws EnrgiseApplicationException, EnrgiseSystemException {
|
|
return null;
|
|
}
|
|
|
|
public ArrayList getHeaderRecordImpl(BaseQueryVO oQueryVO, long lStartPosition, long lLastPosition) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return null;
|
|
}
|
|
|
|
public RecordMetaInfo getTotalDetailRecordCountImpl(String lPrimaryKey, String sScreenName) throws EnrgiseApplicationException, EnrgiseSystemException {
|
|
return null;
|
|
}
|
|
|
|
public ArrayList getDetailRecordImpl(String lPrimaryKey, String sScreenName, long lAbsoluteStart, long lAbsoluteEnd) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return null;
|
|
}
|
|
|
|
public boolean updateHeaderRecordImpl(BaseHeaderBean oBaseHeaderBean) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return true;
|
|
}
|
|
|
|
public String getInsertDataImpl(BaseQueryVO oQueryVO) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return "Only Implementation";
|
|
}
|
|
|
|
public String saveImpl(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList oDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return null;
|
|
}
|
|
|
|
public Map getDisabledFieldsImpl(ThisPageVO oThisPageVO) throws EnrgiseApplicationException, EnrgiseSystemException {
|
|
HashMap oHashMap = new HashMap();
|
|
ArrayList arylstEnableList = new ArrayList();
|
|
ArrayList arylstDisableList = new ArrayList();
|
|
arylstDisableList.add("butExecute");
|
|
HrmAttShiftRosterGenHdrBean oHrmAttShiftRosterGenHdrBean = (HrmAttShiftRosterGenHdrBean)oThisPageVO.getOHeaderBean();
|
|
if (EnrgiseUtil.checkString(oHrmAttShiftRosterGenHdrBean.getSite())) {
|
|
arylstEnableList.add("butWrkGrpCode");
|
|
arylstDisableList.add("butSiteCode");
|
|
} else {
|
|
arylstEnableList.add("butSiteCode");
|
|
arylstDisableList.add("butWrkGrpCode");
|
|
}
|
|
oHashMap.put("D", arylstDisableList);
|
|
oHashMap.put("E", arylstEnableList);
|
|
return oHashMap;
|
|
}
|
|
|
|
public String submitImpl(String sButtonName, BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList oDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
try {
|
|
String sHeaderPrimaryKey = null;
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oShiftRosterGenFacade = oHome.create();
|
|
if (sButtonName.equalsIgnoreCase("butGenerate"))
|
|
sHeaderPrimaryKey = oShiftRosterGenFacade.saveShiftRosterGenData((HrmAttShiftRosterGenHdrBean)oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, oDetailBeanArray, bDetailDataChanged, oDetailPicked, this.oUserInfo);
|
|
return sHeaderPrimaryKey;
|
|
} catch (CreateException oCrt) {
|
|
throw new EnrgiseSystemException(oCrt);
|
|
}
|
|
}
|
|
}
|