/**
*
文件名: Targetbug1Window.java
* 版权:
* 公司: company Co., Ltd.
* 项目名:fdeam
* 作者: 刘厦(liusha.information@gmail.com)
*/
package inbasis.ui.running;
import inbasis.domain.windfarm.Windfarm;
import inbasis.system.IBSServer;
import inbasis.system.ui.SearchWindow;
import inbasis.system.ui.common.SCombobox;
import inbasis.system.ui.common.SEDatebox;
import inbasis.system.ui.common.SSDatebox;
import inbasis.util.Util;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.aspectj.weaver.patterns.ScopeWithTypeVariables;
import com.inbasis.zul.Datebox;
/**
*
* Targetbug1Window
*
*
* 说明:
*
*
* @author 刘厦(liusha.information@gmail.com)
* @version 0.0.0
*
*
* 版本号 |
* 动作 |
* 修改人 |
* 修改时间 |
*
*
*
* 0.0.0 |
* 创建类 |
* 刘厦 |
* Nov 8, 20126:32:07 PM |
*
*
* |
* |
* |
* |
*
*
*/
public class ShiftoperationRptWindow extends SearchWindow {
private static final long serialVersionUID = -6720100007092979186L;
@SuppressWarnings("static-access")
@Override
public void onCreate() throws Exception {
super.onCreate();
/*SCombobox windfarm = (SCombobox)this.getFellow("windfarm");
List list = IBSServer.getIBSServer().getBaseDao().findWithQuery(Windfarm.class,"wfname!='集控中心'");
for(Windfarm l:list){
windfarm.appendItem(l.getWfname());
if(this.getLaborInfo().getDeptnum().equals(l.getWfname())){
windfarm.setValue(l.getWfname());
}
}*/
}
@Override
public void search() throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*SCombobox smon = (SCombobox) this.getFellow("windfarm");
String somon = smon.getValue();
if(Util.isNull(somon))
{
((Map) this.getSearchList().get("windfarm")).put("value", "");
}else{
((Map) this.getSearchList().get("windfarm")).put("value", somon);
}*/
SSDatebox beginBox = (SSDatebox) this.getFellow("s_begin");
Date begin = beginBox.getValue();
if(begin == null){
throw new Exception("报表条件'查询开始日期'不能为空,请确认!");
}else{
((Map) this.getSearchList().get("s_begin")).put("value", sdf.format(begin)+" 00:00:00");
}
SEDatebox endBox = (SEDatebox) this.getFellow("e_end");
Date end = endBox.getValue();
if(end == null){
throw new Exception("报表条件'查询结束日期'不能为空,请确认!");
}else{
((Map) this.getSearchList().get("e_end")).put("value", sdf.format(end)+" 23:59:59");
}
String str = this.searchString;
super.search();
}
}