Commit c2876728 by Kazuki Nakamura

#51860【ポイント交換申請】管理者画面のポイント交換申請検索画面、郵送受付申請検索画面のレイアウト、文言修正対応

parent bf59a0c0
...@@ -218,7 +218,7 @@ public class PointUseAction extends AbstractAction { ...@@ -218,7 +218,7 @@ public class PointUseAction extends AbstractAction {
* @return * @return
*/ */
@Execute(validator = false) @Execute(validator = false)
public String sendEmailForMemberCardReceipt() { public String sendEmailForMemberCardReceipt() throws UnsupportedEncodingException, MessagingException {
// 会員情報の確認 // 会員情報の確認
String url = memberInfoValidate(); String url = memberInfoValidate();
...@@ -241,7 +241,7 @@ public class PointUseAction extends AbstractAction { ...@@ -241,7 +241,7 @@ public class PointUseAction extends AbstractAction {
if (!StringUtil.isBlank(member.mbEmail)) { if (!StringUtil.isBlank(member.mbEmail)) {
MailUtil.send(member.mbEmail, PropertyUtil.getProperty("MEMBER_CARD_RECEIPT_MAIL_TITLE"), message.message); MailUtil.send(member.mbEmail, PropertyUtil.getProperty("MEMBER_CARD_RECEIPT_MAIL_TITLE"), message.message);
} }
} catch (Exception e) { } catch (MessagingException e) {
logger.warn("Mail send failed." + e.toString()); logger.warn("Mail send failed." + e.toString());
addError(SinaburoViewUtil.getMessage("errors.E055")); addError(SinaburoViewUtil.getMessage("errors.E055"));
return "/user/pointUse/confirmOfAddress.html"; return "/user/pointUse/confirmOfAddress.html";
......
...@@ -101,7 +101,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -101,7 +101,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
toDay=SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd"); toDay=SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd");
} }
return select().innerJoin("member").innerJoin("member.prefecture").where(new SimpleWhere() return select().innerJoin("member").innerJoin("member.prefecture").innerJoin("gift").where(new SimpleWhere()
.ge("applyDate", fromDay) .ge("applyDate", fromDay)
.lt("applyDate", toDay) .lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID) .eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
...@@ -116,7 +116,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -116,7 +116,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
public String getGiftExchangeForCsv(GiftExchangeSearchForm giftExchangeSearchForm) throws UnsupportedEncodingException, Exception{ public String getGiftExchangeForCsv(GiftExchangeSearchForm giftExchangeSearchForm) throws UnsupportedEncodingException, Exception{
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
str.append("\"申請日\",\"会員ID\",\"氏名\",\"メールアドレス\",\"申請枚数\",\"郵便番号\",\"都道府県\",\"市区町村\",\"町名・番地\",\"建物名\",\"会員番号\""+"\r\n"); str.append("\"申請日\",\"会員ID\",\"氏名\",\"メールアドレス\",\"申請(枚数/ポイント数)\",\"郵便番号\",\"都道府県\",\"市区町村\",\"町名・番地\",\"建物名\",\"会員番号\""+"\r\n");
List<GiftExchange> giftExchangeList = getGiftExchangeByFromDayAndToDay(giftExchangeSearchForm); List<GiftExchange> giftExchangeList = getGiftExchangeByFromDayAndToDay(giftExchangeSearchForm);
...@@ -132,10 +132,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -132,10 +132,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
str.append("\"" + giftExchange.member.firstName + " " + giftExchange.member.lastName + "\","); str.append("\"" + giftExchange.member.firstName + " " + giftExchange.member.lastName + "\",");
//メールアドレス //メールアドレス
str.append("\"" + giftExchange.member.pcEmail +"\","); str.append("\"" + replaceNullWithBlank(giftExchange.member.pcEmail) +"\",");
//申請枚数 //申請枚数
str.append("\"" + giftExchange.cnt + "\","); String unit = null;
if(SinaburoConstant.giftType.ECOBO.equals(giftExchange.gift.giftType)) {
unit = "枚";
} else {
unit = "ポイント";
}
str.append("\"" + giftExchange.cnt + unit + "\",");
//郵便番号 //郵便番号
str.append("\"" + giftExchange.member.zipCode + "\","); str.append("\"" + giftExchange.member.zipCode + "\",");
...@@ -150,10 +156,10 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -150,10 +156,10 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
str.append("\"" + giftExchange.member.areaName + "\","); str.append("\"" + giftExchange.member.areaName + "\",");
//建物名 //建物名
str.append("\"" + giftExchange.member.buildingName + "\","); str.append("\"" + replaceNullWithBlank(giftExchange.member.buildingName) + "\",");
//会員番号 //会員番号
str.append("\"" + giftExchange.member.memberNum + "\""); str.append("\"" + replaceNullWithBlank(giftExchange.member.memberNum) + "\"");
str.append("\r\n"); str.append("\r\n");
...@@ -161,6 +167,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -161,6 +167,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
return str.toString(); return str.toString();
} }
/**
* null値を空白に置き換え
*/
private String replaceNullWithBlank(String str) {
if(str != null) {
return str;
}
return "";
}
/** /**
* ポイント交換申請情報取得(CSV出力用) * ポイント交換申請情報取得(CSV出力用)
...@@ -184,7 +200,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> { ...@@ -184,7 +200,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
toDay = SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd"); toDay = SinaburoUtil.convertStringToTimestamp(SinaburoUtil.getNextDay(giftExchangeSearchForm.toDay),"yyyy-MM-dd");
} }
return select().innerJoin("member").innerJoin("member.prefecture").where(new SimpleWhere() return select().innerJoin("member").innerJoin("member.prefecture").innerJoin("gift").where(new SimpleWhere()
.ge("applyDate", fromDay) .ge("applyDate", fromDay)
.lt("applyDate", toDay) .lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID) .eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
......
...@@ -122,9 +122,9 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt> ...@@ -122,9 +122,9 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
} }
/** /**
* CSVファイル出力ポイント交換申請情報取得 * CSVファイル出力郵送受付申請情報取得
* @param memberCardReceiptSearchForm * @param memberCardReceiptSearchForm
* @return String ポイント交換申請情報文字列 * @return String 郵送受付申請情報文字列
*/ */
public String getMemberCardReceiptForCsv(MemberCardReceiptSearchForm memberCardReceiptSearchForm) throws UnsupportedEncodingException, Exception{ public String getMemberCardReceiptForCsv(MemberCardReceiptSearchForm memberCardReceiptSearchForm) throws UnsupportedEncodingException, Exception{
...@@ -157,7 +157,7 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt> ...@@ -157,7 +157,7 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
str.append("\"" + memberCardReceipt.member.areaName + "\","); str.append("\"" + memberCardReceipt.member.areaName + "\",");
//建物名 //建物名
str.append("\"" + memberCardReceipt.member.buildingName + "\","); str.append("\"" + replaceNullWithBlank(memberCardReceipt.member.buildingName) + "\",");
//電話番号 //電話番号
str.append("\"" + memberCardReceipt.member.telno + "\""); str.append("\"" + memberCardReceipt.member.telno + "\"");
...@@ -170,7 +170,17 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt> ...@@ -170,7 +170,17 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
} }
/** /**
* ポイント交換申請情報取得(CSV出力用) * null値を空白に置き換え
*/
private String replaceNullWithBlank(String str) {
if(str != null) {
return str;
}
return "";
}
/**
* 郵送受付申請情報取得(CSV出力用)
* @param memberCardReceiptSearchForm * @param memberCardReceiptSearchForm
* @return List<MemberCardReceipt> * @return List<MemberCardReceipt>
*/ */
...@@ -179,7 +189,6 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt> ...@@ -179,7 +189,6 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
Date fromDay = null; Date fromDay = null;
Date toDay = null; Date toDay = null;
//#30951 「ポイント交換申請結果CSV出力」でエラー画面 対応
if (!StringUtil.isBlank(memberCardReceiptSearchForm.fromDay)){ if (!StringUtil.isBlank(memberCardReceiptSearchForm.fromDay)){
logger.info("memberCardReceiptSearchForm.fromDay:" + memberCardReceiptSearchForm.fromDay); logger.info("memberCardReceiptSearchForm.fromDay:" + memberCardReceiptSearchForm.fromDay);
fromDay = SinaburoUtil.convertStringToTimestamp(memberCardReceiptSearchForm.fromDay,"yyyy-MM-dd"); fromDay = SinaburoUtil.convertStringToTimestamp(memberCardReceiptSearchForm.fromDay,"yyyy-MM-dd");
......
...@@ -70,15 +70,15 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr ...@@ -70,15 +70,15 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<div style="width:844px; overflow-x: auto;"> <div style="width:844px; overflow-x: auto;">
<table border="0" cellpadding="0" cellspacing="0" class="stripe" style="width:1324px;"> <table border="0" cellpadding="0" cellspacing="0" class="stripe" style="width:1414px;">
<colgroup> <colgroup>
<col width="100px"> <col width="100px">
<col width="80px"> <col width="80px">
<col width="100px"> <col width="100px">
<col width="120px"> <col width="120px">
<col width="170px">
<col width="80px"> <col width="80px">
<col width="80px"> <col width="80px">
<col width="100px">
<col width="184px"> <col width="184px">
<col width="200px"> <col width="200px">
<col width="200px"> <col width="200px">
...@@ -90,7 +90,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr ...@@ -90,7 +90,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<th class="t_center">会員ID</th> <th class="t_center">会員ID</th>
<th class="t_center">氏名</th> <th class="t_center">氏名</th>
<th class="t_center">メールアドレス</th> <th class="t_center">メールアドレス</th>
<th class="t_center">申請枚数</th> <th class="t_center">申請(枚数/ポイント数)</th>
<th class="t_center">郵便番号</th> <th class="t_center">郵便番号</th>
<th class="t_center">都道府県</th> <th class="t_center">都道府県</th>
<th class="t_center">市区町村</th> <th class="t_center">市区町村</th>
...@@ -106,13 +106,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr ...@@ -106,13 +106,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<td class="tdDiv">$!giftExchange.memberId</td> <td class="tdDiv">$!giftExchange.memberId</td>
<td class="tdDiv">$!escape.html($!giftExchange.member.firstName) $!escape.html($!giftExchange.member.lastName)&nbsp;</td> <td class="tdDiv">$!escape.html($!giftExchange.member.firstName) $!escape.html($!giftExchange.member.lastName)&nbsp;</td>
<td class="tdDiv">$!giftExchange.member.pcEmail&nbsp;</td> <td class="tdDiv">$!giftExchange.member.pcEmail&nbsp;</td>
<td class="tdDiv">$!giftExchange.cnt</td> <td class="tdDiv">$!giftExchange.cnt #if($!giftExchange.gift.giftType == 1)枚#elseポイント#end</td>
<td class="tdDiv">$!giftExchange.member.zipCode</td> <td class="tdDiv">$!giftExchange.member.zipCode</td>
<td class="tdDiv">$!giftExchange.member.prefecture.prefecture</td> <td class="tdDiv">$!giftExchange.member.prefecture.prefecture</td>
<td class="tdDiv">$!escape.html($!giftExchange.member.cityName)</td> <td class="tdDiv">$!escape.html($!giftExchange.member.cityName)</td>
<td class="tdDiv">$!escape.html($!giftExchange.member.areaName)</td> <td class="tdDiv">$!escape.html($!giftExchange.member.areaName)</td>
<td class="tdDiv">$!escape.html($!giftExchange.member.buildingName)</td> <td class="tdDiv">$!escape.html($!giftExchange.member.buildingName)</td>
<td class="tdDiv">$!giftExchange.member.memberNum</td> <td class="tdDiv t_center">$!giftExchange.member.memberNum</td>
</tr> </tr>
#end #end
</tbody> </tbody>
......
...@@ -70,13 +70,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr ...@@ -70,13 +70,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<div style="width:844px; overflow-x: auto;"> <div style="width:844px; overflow-x: auto;">
<table border="0" cellpadding="0" cellspacing="0" class="stripe" style="width:1124px;"> <table border="0" cellpadding="0" cellspacing="0" class="stripe" style="width:1104px;">
<colgroup> <colgroup>
<col width="100px"> <col width="100px">
<col width="80px"> <col width="80px">
<col width="100px"> <col width="100px">
<col width="80px"> <col width="80px">
<col width="100px"> <col width="80px">
<col width="184px"> <col width="184px">
<col width="200px"> <col width="200px">
<col width="200px"> <col width="200px">
...@@ -116,7 +116,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr ...@@ -116,7 +116,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<!--▼ページング▼--> <!--▼ページング▼-->
<ul class="pageNav01"> <ul class="pageNav01">
#makeLink("#q('/admin/enquete/memberCardReceiptSearch/memberCardReceiptSearch/')",$memberCardReceiptSearchForm.pagingMap.paging) #makeLink("#q('/admin/enquete/memberCardReceiptSearch/memberCardReceiptSearch/')",$memberCardReceiptSearchForm.pagingMap.paging)
<a href="#" onclick="report_download(); return false;"><button class="button1">郵送申請結果CSV出力</button></a> <a href="#" onclick="report_download(); return false;"><button class="button1">郵送受付申請結果CSV出力</button></a>
</ul> </ul>
<!--▲ページング▲--> <!--▲ページング▲-->
......
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