Commit 5dbeb678 by Huang Linyu

Merge branch 'f-6.6.5' of 192.168.10.6:caosy/fun-admin into f-6.6.5

parents d7020dca a99753b9
......@@ -410,51 +410,56 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
}
}
}
if(StringUtils.isEmpty(playerNum)){
/*map.addAttribute("message", "退款打球人序号不能为空");
return "error";*/
quantity = 0;
processBean.setPlayerNum("");
}else{
List<Integer> players = new ArrayList<Integer>();
String[] playerNumArray = playerNum.trim().split(",");
boolean invalidNum=false;
if(playerNumArray.length == 0){
if(playerNum.trim() != null && !"".equals(playerNum.trim())){
players.add(Integer.valueOf(playerNum.trim()));
}
if(1 != type){
//部分退款
if(StringUtils.isEmpty(playerNum)){
quantity = 0;
processBean.setPlayerNum("");
}else{
for (String playerNumStr : playerNumArray) {
if(playerNumStr.trim() != null && !"".equals(playerNumStr.trim())){
players.add(Integer.valueOf(playerNumStr.trim()));
}
}
}
for (Integer player : players) {
if(player.intValue() <= 0){
invalidNum = true;
break;
List<Integer> players = new ArrayList<Integer>();
String[] playerNumArray = playerNum.trim().split(",");
boolean invalidNum=false;
if(playerNumArray.length == 0){
if(playerNum.trim() != null && !"".equals(playerNum.trim())){
players.add(Integer.valueOf(playerNum.trim()));
}
}else{
for (String playerNumStr : playerNumArray) {
if(playerNumStr.trim() != null && !"".equals(playerNumStr.trim())){
players.add(Integer.valueOf(playerNumStr.trim()));
}
}
}
for (Integer player : players) {
if(player.intValue() <= 0){
invalidNum = true;
break;
}
}
quantity = players.size();
boolean exceed = (quantityLimit<quantity);
if(invalidNum || exceed){
map.addAttribute("message", "退款打球人序号不正确,请检查!");
return "error";
}
}
quantity = players.size();
boolean exceed = (quantityLimit<quantity);
if(invalidNum || exceed){
map.addAttribute("message", "退款打球人序号不正确,请检查!");
return "error";
processBean.setPlayerNum(playerNum.trim());
}
processBean.setPlayerNum(playerNum.trim());
}
BigDecimal refundTotalAmount = orderBean.getPrePayCardRefundAmount().add(orderBean.getRefundAmount());
BigDecimal requestTotalAmount = new BigDecimal(0);
if(StringUtils.isEmpty(refundAmount) && StringUtils.isEmpty(prePayCardRefundAmount)){
requestTotalAmount = BigDecimal.valueOf(Double.parseDouble(refundAmount)).add(BigDecimal.valueOf(Double.parseDouble(prePayCardRefundAmount)));
BigDecimal refundTotalAmount = orderBean.getPrePayCardRefundAmount().add(orderBean.getRefundAmount());
BigDecimal requestTotalAmount = new BigDecimal(0);
if(!StringUtils.isEmpty(refundAmount) && !StringUtils.isEmpty(prePayCardRefundAmount)){
requestTotalAmount = BigDecimal.valueOf(Double.parseDouble(refundAmount)).add(BigDecimal.valueOf(Double.parseDouble(prePayCardRefundAmount)));
}
BigDecimal enableRefundAmount = orderBean.getPrePayAmount().subtract(orderBean.getVoucherAmount());
if(requestTotalAmount.add(refundTotalAmount).compareTo(enableRefundAmount)==1){
map.addAttribute("message", "退款金额超出限制!");
return "error";
}
}
BigDecimal enableRefundAmount = orderBean.getPrePayAmount().subtract(orderBean.getVoucherAmount());
if(requestTotalAmount.add(refundTotalAmount).compareTo(enableRefundAmount)==1){
map.addAttribute("message", "退款金额超出限制!");
return "error";
}
if (type == 1) {
processBean.setOperateType(OrderProcessEnum.REFUND_ALL.getOperationCode()); // 全部退款
processDesc = processDesc + "退款金额: " + refundAmount + "元,预付卡退款金额: " + prePayCardRefundAmount + "元,优惠券退款金额: " + thisRefundVoucherAmount + "元";
......@@ -476,8 +481,8 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
processBean.setSendMsg(true);
processBean.setProcessDesc(processDesc + "<br/>");
processBean.setUcid("123456");
processBean.setRefundAmount(Double.parseDouble(refundAmount));
processBean.setPrePayCardRefundAmount(Double.parseDouble(prePayCardRefundAmount));
processBean.setRefundAmount(Double.parseDouble(StringUtils.isEmpty(refundAmount) ? "0.00" : refundAmount));
processBean.setPrePayCardRefundAmount(Double.parseDouble(StringUtils.isEmpty(prePayCardRefundAmount)? "0.00" : prePayCardRefundAmount));
processBean.setPrePayRefundAmount(Double.parseDouble(StringUtils.isEmpty(prePayRefundAmount) ? "0.00" : prePayRefundAmount));
if (manual == 0) {
......
......@@ -10,7 +10,8 @@
<#-- 银行卡退款金额上限 -->
<#assign refundUpperLimit=orderBean.preAuthAmount-orderBean.refundAmount!>
<#-- 预付卡退款金额上限 -->
<#assign refundUpperLimit_prePayCard=orderBean.prePayAmount + orderBean.prePayCardAmount - ((orderBean.refundAmount)!0)- ((orderBean.prePayCardRefundAmount)!0)>
<#assign refundUpperLimit_prePayCard=orderBean.prePayCardAmount-orderBean.prePayCardRefundAmount!>
<#assign refundUpperLimit_prePayCard_part=orderBean.prePayAmount + orderBean.prePayCardAmount - ((orderBean.refundAmount)!0)- ((orderBean.prePayCardRefundAmount)!0)>
<#-- 抵用券退款金额上限 -->
<#assign refundUpperLimit_voucher=(orderBean.voucherAmount)!0-(orderBean.voucherRefundAmount)!0>
<#else>
......@@ -18,7 +19,8 @@
<#if (refundUpperLimit<0)>
<#assign refundUpperLimit=0>
</#if>
<#assign refundUpperLimit_prePayCard= orderBean.prePayAmount + orderBean.prePayCardAmount - ((orderBean.refundAmount)!0)- ((orderBean.prePayCardRefundAmount)!0)>
<#assign refundUpperLimit_prePayCard=orderBean.prePayCardAmount-orderBean.prePayCardRefundAmount!>
<#assign refundUpperLimit_prePayCard_part= orderBean.prePayAmount + orderBean.prePayCardAmount - ((orderBean.refundAmount)!0)- ((orderBean.prePayCardRefundAmount)!0)>
<#assign refundUpperLimit_voucher=((orderBean.voucherAmount)!0)-((orderBean.voucherRefundAmount)!0)>
<#assign refundUpperLimit_prepayAmount=(orderBean.orderPayinfoBean.prePayAmount)!0>
</#if>
......@@ -53,7 +55,7 @@
</tr>
<tr>
<td>退单金额(含礼品卡)</td>
<td>¥<input class="input-width" style="height:30px" id = "refund" type = "text" name="refundAmount" value="" readonly="randonly" />
<td>¥<input class="input-width" style="height:30px" id = "refund" type = "text" name="refundAmount" value="${refundUpperLimit}" readonly="randonly" />
已退:${orderBean.refundAmount!}&nbsp;|&nbsp;可退:${refundUpperLimit}</td>
</tr>
<tr id="quantity" style="display:none">
......@@ -69,8 +71,8 @@
</tr>
<tr>
<td>预付卡(建议)</td>
<td>¥<input class="input-width" style="height:30px" id = "prePayCard" type = "text" name="prePayCardRefundAmount" value="" readonly="randonly" />
已退:${orderBean.prePayCardRefundAmount!}&nbsp;|&nbsp;可退:${refundUpperLimit_prePayCard}</td>
<td>¥<input class="input-width" style="height:30px" id = "prePayCard" type = "text" name="prePayCardRefundAmount" value="${refundUpperLimit_prePayCard}" readonly="randonly" />
已退:${orderBean.prePayCardRefundAmount!}&nbsp;|&nbsp;可退:${refundUpperLimit_prePayCard_part}</td>
</tr>
<#if (orderBean.quantity > 0)>
<tr id="partCashRebate" style="display:none">
......
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 sign in to comment