Commit c2876728 by Kazuki Nakamura

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

parent bf59a0c0
......@@ -218,7 +218,7 @@ public class PointUseAction extends AbstractAction {
* @return
*/
@Execute(validator = false)
public String sendEmailForMemberCardReceipt() {
public String sendEmailForMemberCardReceipt() throws UnsupportedEncodingException, MessagingException {
// 会員情報の確認
String url = memberInfoValidate();
......@@ -241,7 +241,7 @@ public class PointUseAction extends AbstractAction {
if (!StringUtil.isBlank(member.mbEmail)) {
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());
addError(SinaburoViewUtil.getMessage("errors.E055"));
return "/user/pointUse/confirmOfAddress.html";
......
......@@ -101,7 +101,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
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)
.lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
......@@ -116,7 +116,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
public String getGiftExchangeForCsv(GiftExchangeSearchForm giftExchangeSearchForm) throws UnsupportedEncodingException, Exception{
StringBuffer str = new StringBuffer();
str.append("\"申請日\",\"会員ID\",\"氏名\",\"メールアドレス\",\"申請枚数\",\"郵便番号\",\"都道府県\",\"市区町村\",\"町名・番地\",\"建物名\",\"会員番号\""+"\r\n");
str.append("\"申請日\",\"会員ID\",\"氏名\",\"メールアドレス\",\"申請(枚数/ポイント数)\",\"郵便番号\",\"都道府県\",\"市区町村\",\"町名・番地\",\"建物名\",\"会員番号\""+"\r\n");
List<GiftExchange> giftExchangeList = getGiftExchangeByFromDayAndToDay(giftExchangeSearchForm);
......@@ -132,10 +132,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
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 + "\",");
......@@ -150,10 +156,10 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
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");
......@@ -163,6 +169,16 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
}
/**
* null値を空白に置き換え
*/
private String replaceNullWithBlank(String str) {
if(str != null) {
return str;
}
return "";
}
/**
* ポイント交換申請情報取得(CSV出力用)
* @param giftExchangeSearchForm
* @return List<GiftExchange>
......@@ -184,7 +200,7 @@ public class GiftExchangeService extends AbstractService<GiftExchange> {
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)
.lt("applyDate", toDay)
.eq("member.validFlg", SinaburoConstant.MemberValidFlg.VALID)
......
......@@ -122,9 +122,9 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
}
/**
* CSVファイル出力ポイント交換申請情報取得
* CSVファイル出力郵送受付申請情報取得
* @param memberCardReceiptSearchForm
* @return String ポイント交換申請情報文字列
* @return String 郵送受付申請情報文字列
*/
public String getMemberCardReceiptForCsv(MemberCardReceiptSearchForm memberCardReceiptSearchForm) throws UnsupportedEncodingException, Exception{
......@@ -157,7 +157,7 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
str.append("\"" + memberCardReceipt.member.areaName + "\",");
//建物名
str.append("\"" + memberCardReceipt.member.buildingName + "\",");
str.append("\"" + replaceNullWithBlank(memberCardReceipt.member.buildingName) + "\",");
//電話番号
str.append("\"" + memberCardReceipt.member.telno + "\"");
......@@ -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
* @return List<MemberCardReceipt>
*/
......@@ -179,7 +189,6 @@ public class MemberCardReceiptService extends AbstractService<MemberCardReceipt>
Date fromDay = null;
Date toDay = null;
//#30951 「ポイント交換申請結果CSV出力」でエラー画面 対応
if (!StringUtil.isBlank(memberCardReceiptSearchForm.fromDay)){
logger.info("memberCardReceiptSearchForm.fromDay:" + memberCardReceiptSearchForm.fromDay);
fromDay = SinaburoUtil.convertStringToTimestamp(memberCardReceiptSearchForm.fromDay,"yyyy-MM-dd");
......
......@@ -70,15 +70,15 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<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>
<col width="100px">
<col width="80px">
<col width="100px">
<col width="120px">
<col width="170px">
<col width="80px">
<col width="80px">
<col width="100px">
<col width="184px">
<col width="200px">
<col width="200px">
......@@ -90,7 +90,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<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>
......@@ -106,13 +106,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<td class="tdDiv">$!giftExchange.memberId</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.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.prefecture.prefecture</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.buildingName)</td>
<td class="tdDiv">$!giftExchange.member.memberNum</td>
<td class="tdDiv t_center">$!giftExchange.member.memberNum</td>
</tr>
#end
</tbody>
......
......@@ -70,13 +70,13 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<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>
<col width="100px">
<col width="80px">
<col width="100px">
<col width="80px">
<col width="100px">
<col width="80px">
<col width="184px">
<col width="200px">
<col width="200px">
......@@ -116,7 +116,7 @@ $!tools.getMsg("dateError") $!tools.getMsg("dateError_1") $!tools.getMsg("dateEr
<!--▼ページング▼-->
<ul class="pageNav01">
#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>
<!--▲ページング▲-->
......
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