Commit eea8f130 by Kim Gyeongeun

市川市追加対応

parent 6c66f54c
......@@ -2,14 +2,14 @@ package jp.agentec.sinaburocast.form.admin.enquete;
import java.util.ArrayList;
import jp.agentec.sinaburocast.entity.GiftExchange;
import jp.agentec.sinaburocast.form.admin.setting.PagingForm;
import org.apache.commons.lang.builder.StandardToStringStyle;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.seasar.framework.container.annotation.tiger.Component;
import org.seasar.framework.container.annotation.tiger.InstanceType;
import jp.agentec.sinaburocast.entity.GiftExchange;
import jp.agentec.sinaburocast.form.admin.setting.PagingForm;
/**
* ポイント交換申請検索Form
*
......@@ -18,6 +18,9 @@ import org.seasar.framework.container.annotation.tiger.InstanceType;
*/
@Component(instance=InstanceType.SESSION)
public class GiftExchangeSearchForm extends PagingForm{
/** 区分(エコボ:1、ICHICO:2) */
public Integer giftType;
/** 申請日(From) */
public String fromDay;
......@@ -32,6 +35,7 @@ public class GiftExchangeSearchForm extends PagingForm{
fromDay = null;
toDay = null;
searchResultList = null;
giftType = null;
}
@Override
......
......@@ -100,12 +100,15 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
//toDay =SinaburoUtil.getAddDate(SinaburoUtil.stringToDateSlash(giftExchangeSearchForm.toDay),1);
toDay=SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd");
}
return select().innerJoin("member").innerJoin("member.prefecture").innerJoin("gift").where(new SimpleWhere()
.ge("applyDate", fromDay)
.lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
.eq("member.delFlg", SinaburoConstant.MemberDelFlg.NOT_DEL));
SimpleWhere where = new SimpleWhere().ge("applyDate", fromDay)
.lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
.eq("member.delFlg", SinaburoConstant.MemberDelFlg.NOT_DEL);
// 区分(エコボ:1、ICHICO:2)
if (giftExchangeSearchForm.giftType != null) {
where.eq("gift.giftType", giftExchangeSearchForm.giftType);
}
return select().innerJoin("member").innerJoin("member.prefecture").innerJoin("gift").where(where);
}
/**
......
......@@ -43,12 +43,20 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<table border="0" cellspacing="5" cellpadding="0" class="stripe3 w790">
<tr class="gray">
<td class="w100">申請日(From)</td>
<td><input name="fromDay" id="fromDay" type="text" class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.fromDay)">
<td class="w40">区分</td>
<td>
<select name="giftType" id="giftType" class="w130 mgl10">
<option value="" #if($!giftExchangeSearchForm.giftType == "") selected #end></option>
<option value="1" #if($!giftExchangeSearchForm.giftType == "1") selected #end>満点エコボカード</option>
<option value="2" #if($!giftExchangeSearchForm.giftType == "2") selected #end>ICHICOカード</option>
</select>
</td>
<td class="w85">申請日(From)</td>
<td><input name="fromDay" id="fromDay" type="text" class="w100 mgl10" value="$!escape.html($!giftExchangeSearchForm.fromDay)">
<div style="display: none;"><img id="calFromDate" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div>
</td>
<td class="w100">申請日(To)</td>
<td><input name="toDay" id="toDay" type="text" class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.toDay)">
<td class="w85">申請日(To)</td>
<td><input name="toDay" id="toDay" type="text" class="w100 mgl10" value="$!escape.html($!giftExchangeSearchForm.toDay)">
<div style="display: none;"><img id="calToDate" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div></td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment