123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- /**
- * <p>文件名: Targetbug1Window.java</p>
- * <p>版权: </p>
- * <p>公司: company Co., Ltd.</p>
- * <p>项目名:fdeam</p>
- * <p>作者: 刘厦(liusha.information@gmail.com)</p>
- */
- 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;
- /**
- * <p>
- * Targetbug1Window
- * </p>
- * <p>
- * 说明:
- * </p>
- *
- * @author 刘厦(liusha.information@gmail.com)
- * @version 0.0.0
- * <table style="border:1px solid gray;">
- * <tr>
- * <th width="100px">版本号</th>
- * <th width="100px">动作</th>
- * <th width="100px">修改人</th>
- * <th width="100px">修改时间</th>
- * </tr>
- * <!-- 以 Table 方式书写修改历史 -->
- * <tr>
- * <td>0.0.0</td>
- * <td>创建类</td>
- * <td>刘厦</td>
- * <td>Nov 8, 20126:32:07 PM</td>
- * </tr>
- * <tr>
- * <td></td>
- * <td></td>
- * <td></td>
- * <td></td>
- * </tr>
- * </table>
- */
- public class ShiftoperationRptWindow extends SearchWindow {
- private static final long serialVersionUID = -6720100007092979186L;
-
-
- @SuppressWarnings("static-access")
- @Override
- public void onCreate() throws Exception {
- super.onCreate();
- SSDatebox begin = (SSDatebox) this.getFellow("s_begin");
- SEDatebox end = (SEDatebox) this.getFellow("e_end");
- end.setValue(new Date());
- Calendar c = Calendar.getInstance();
- c.setTime(new Date());
- c.add(Calendar.MONTH,-1);
- begin.setValue(c.getTime());
- /*SCombobox windfarm = (SCombobox)this.getFellow("windfarm");
- List<Windfarm> 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();
- }
- }
|