Commit eea8f130 by Kim Gyeongeun

市川市追加対応

parent 6c66f54c
...@@ -2,14 +2,14 @@ package jp.agentec.sinaburocast.form.admin.enquete; ...@@ -2,14 +2,14 @@ package jp.agentec.sinaburocast.form.admin.enquete;
import java.util.ArrayList; 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.StandardToStringStyle;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
import org.seasar.framework.container.annotation.tiger.Component; import org.seasar.framework.container.annotation.tiger.Component;
import org.seasar.framework.container.annotation.tiger.InstanceType; import org.seasar.framework.container.annotation.tiger.InstanceType;
import jp.agentec.sinaburocast.entity.GiftExchange;
import jp.agentec.sinaburocast.form.admin.setting.PagingForm;
/** /**
* ポイント交換申請検索Form * ポイント交換申請検索Form
* *
...@@ -19,6 +19,9 @@ import org.seasar.framework.container.annotation.tiger.InstanceType; ...@@ -19,6 +19,9 @@ import org.seasar.framework.container.annotation.tiger.InstanceType;
@Component(instance=InstanceType.SESSION) @Component(instance=InstanceType.SESSION)
public class GiftExchangeSearchForm extends PagingForm{ public class GiftExchangeSearchForm extends PagingForm{
/** 区分(エコボ:1、ICHICO:2) */
public Integer giftType;
/** 申請日(From) */ /** 申請日(From) */
public String fromDay; public String fromDay;
...@@ -32,6 +35,7 @@ public class GiftExchangeSearchForm extends PagingForm{ ...@@ -32,6 +35,7 @@ public class GiftExchangeSearchForm extends PagingForm{
fromDay = null; fromDay = null;
toDay = null; toDay = null;
searchResultList = null; searchResultList = null;
giftType = null;
} }
@Override @Override
......
...@@ -100,12 +100,15 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -100,12 +100,15 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
//toDay =SinaburoUtil.getAddDate(SinaburoUtil.stringToDateSlash(giftExchangeSearchForm.toDay),1); //toDay =SinaburoUtil.getAddDate(SinaburoUtil.stringToDateSlash(giftExchangeSearchForm.toDay),1);
toDay=SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd"); toDay=SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd");
} }
SimpleWhere where = new SimpleWhere().ge("applyDate", fromDay)
return select().innerJoin("member").innerJoin("member.prefecture").innerJoin("gift").where(new SimpleWhere()
.ge("applyDate", fromDay)
.lt("applyDate", toDay) .lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID) .eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
.eq("member.delFlg", SinaburoConstant.MemberDelFlg.NOT_DEL)); .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 ...@@ -43,12 +43,20 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<table border="0" cellspacing="5" cellpadding="0" class="stripe3 w790"> <table border="0" cellspacing="5" cellpadding="0" class="stripe3 w790">
<tr class="gray"> <tr class="gray">
<td class="w100">申請日(From)</td> <td class="w40">区分</td>
<td><input name="fromDay" id="fromDay" type="text" class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.fromDay)"> <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> <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>
<td class="w100">申請日(To)</td> <td class="w85">申請日(To)</td>
<td><input name="toDay" id="toDay" type="text" class="w180 mgl10" value="$!escape.html($!giftExchangeSearchForm.toDay)"> <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> <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> </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