Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
199e0dd3
authored
May 14, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单导出时候增加余额退款和优惠券退款列;赛事订单在确认打球时间时给出teetime和库存提示
parent
fad8906e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
142 additions
and
17 deletions
src/main/java/com/ctrip/fun/admin/controller/order/OpEventActivityOrderController.java
src/main/java/com/ctrip/fun/admin/service/order/CourseExcelExportService.java
src/main/java/com/ctrip/fun/admin/service/order/OpEventActivityOrderService.java
src/main/resources/properties/service.properties
src/main/webapp/WEB-INF/templates/eventActivityOrder/common/orderDetailTeeTime.ftl
src/main/webapp/resource/css/common.css
src/main/webapp/resource/js/app/op.js
src/main/java/com/ctrip/fun/admin/controller/order/OpEventActivityOrderController.java
View file @
199e0dd3
...
...
@@ -36,6 +36,7 @@ import com.ctrip.fun.admin.service.order.EventActivityExcelExportService;
import
com.ctrip.fun.admin.service.order.OpEventActivityOrderService
;
import
com.ctrip.fun.admin.utility.OrderUtil
;
import
com.ctrip.fun.common.core.util.BeanConverter
;
import
com.ctrip.fun.common.core.util.BeanConverter.DateConverter
;
import
com.ctrip.fun.common.core.util.DateUtil
;
import
com.ctrip.fun.common.core.util.StringUtils
;
import
com.ctrip.fun.common.vo.PagedResponseBean
;
...
...
@@ -50,6 +51,7 @@ import com.ctrip.fun.common.vo.order.OpOrderQuery;
import
com.ctrip.fun.common.vo.order.OrderProcessEnum
;
import
com.ctrip.fun.common.vo.order.OrderSourceEnum
;
import
com.ctrip.fun.common.vo.order.OrderStatusEnum
;
import
com.ctrip.fun.common.vo.product.CourseResourceBean
;
import
com.ctrip.fun.common.vo.product.ProductPaymentTypeEnum
;
import
freemarker.ext.beans.BeansWrapper
;
...
...
@@ -333,6 +335,23 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
return
result
;
}
/**
* 获取打球当天所有的可用资源以及这些资源所对应的库存信息
* 入参:产品id;打球日期
* */
@RequestMapping
(
value
=
"/loadPlayDateEventActivityResource"
,
method
=
RequestMethod
.
POST
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
Response
<
List
<
CourseResourceBean
>>
loadPlayDateEventActivityResource
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"productId"
,
required
=
true
)
int
productId
,
@RequestParam
(
value
=
"playDate"
,
required
=
true
)
String
playDate
)
{
Response
<
List
<
CourseResourceBean
>>
response
=
new
Response
<
List
<
CourseResourceBean
>>();
OpEventActivityOrderBean
processBean
=
new
OpEventActivityOrderBean
();
processBean
.
setProductId
(
productId
);
processBean
.
setPlayDate
(
DateUtil
.
parseDate
(
playDate
));
List
<
CourseResourceBean
>
courseResourceBeans
=
opEventActivityOrderService
.
loadPlayDateEventActivityResource
(
""
,
processBean
);
response
.
setBody
(
courseResourceBeans
);
return
response
;
}
/**
* add by caosy: modify the teetime
* */
@RequestMapping
(
value
=
"/confirmEventActivityOrderResourceTeeTime"
,
method
=
RequestMethod
.
POST
)
...
...
src/main/java/com/ctrip/fun/admin/service/order/CourseExcelExportService.java
View file @
199e0dd3
...
...
@@ -40,7 +40,7 @@ public class CourseExcelExportService extends AbstractExcelExportService<CourseO
switch
(
listType
)
{
case
"list_all"
:
String
title_all
[]
=
{
"订单号"
,
"联系人"
,
"订单名称"
,
"球场名称"
,
"城市"
,
"打球时间"
,
"支付方式"
,
"底价"
,
"实付金额"
,
"返佣"
,
"返现"
,
"保险"
,
"下单时间"
,
"支付时间"
,
"途径"
,
"状态"
,
"接管人"
,
"收款人"
,
"推荐码"
,
"下单人uid"
,
"下单人注册时间"
,
"打球人数"
,
"打球人1"
,
"打球人2"
,
"打球人3"
,
"打球人4"
,
"实际结算金额"
,
"结算对象"
,
"结算日期"
,
"财务备注"
,
"余额"
,
"兑换卷"
,
"实收现金"
,
"
退款金额"
,
"预存款支付金额"
,
"支付订单编号"
,
"手动扣款类型"
,
"订单来源"
,
"用户类型"
,
"补单"
};
"打球人数"
,
"打球人1"
,
"打球人2"
,
"打球人3"
,
"打球人4"
,
"实际结算金额"
,
"结算对象"
,
"结算日期"
,
"财务备注"
,
"余额"
,
"兑换卷"
,
"实收现金"
,
"
在线支付退款金额"
,
"余额退款金额"
,
"优惠券退款金额"
,
"预存款支付金额"
,
"支付订单编号"
,
"手动扣款类型"
,
"订单来源"
,
"用户类型"
,
"补单"
};
return
title_all
;
case
"list_pay"
:
// 等待支付
String
title_pay
[]
=
{
"订单号"
,
"联系人"
,
"订单名称"
,
"城市"
,
"打球时间"
,
"支付方式"
,
"实付金额"
,
"下单时间"
,
"途径"
,
"状态"
,
"接管人"
,
"支付订单编号"
,
"手动扣款类型"
,
"订单来源"
,
"用户类型"
};
...
...
@@ -165,16 +165,18 @@ public class CourseExcelExportService extends AbstractExcelExportService<CourseO
BigDecimal
voucherAmt
=
bean
.
getVoucherAmount
()
==
null
?
BigDecimal
.
ZERO
:
bean
.
getVoucherAmount
();
cellList_all
.
get
(
32
).
setCellValue
(
actualAmt
.
subtract
(
voucherAmt
).
toString
());
cellList_all
.
get
(
33
).
setCellValue
(
bean
.
getRefundAmount
()
==
null
?
BigDecimal
.
ZERO
.
toString
()
:
bean
.
getRefundAmount
().
toString
());
cellList_all
.
get
(
34
).
setCellValue
(
bean
.
getPrePayCardRefundAmount
()
==
null
?
BigDecimal
.
ZERO
.
toString
()
:
bean
.
getPrePayCardRefundAmount
().
toString
());
cellList_all
.
get
(
35
).
setCellValue
(
bean
.
getVoucherRefundAmount
()
==
null
?
BigDecimal
.
ZERO
.
toString
()
:
bean
.
getVoucherRefundAmount
().
toString
());
if
(
bean
.
getDepositAmount
()
!=
null
)
{
cellList_all
.
get
(
3
4
).
setCellValue
(
bean
.
getDepositAmount
().
toString
());
cellList_all
.
get
(
3
6
).
setCellValue
(
bean
.
getDepositAmount
().
toString
());
}
else
{
cellList_all
.
get
(
3
4
).
setCellValue
(
0
);
cellList_all
.
get
(
3
6
).
setCellValue
(
0
);
}
cellList_all
.
get
(
3
5
).
setCellValue
(
bean
.
getOutTradeId
());
cellList_all
.
get
(
3
6
).
setCellValue
(
bean
.
getOfflinePayTypeMsg
());
cellList_all
.
get
(
3
7
).
setCellValue
(
bean
.
getOrderSourceCategory
());
cellList_all
.
get
(
38
).
setCellValue
(
bean
.
getUserType
());
cellList_all
.
get
(
39
).
setCellValue
(
bean
.
isDelayOrder
()?
"是"
:
"否"
);
cellList_all
.
get
(
3
7
).
setCellValue
(
bean
.
getOutTradeId
());
cellList_all
.
get
(
3
8
).
setCellValue
(
bean
.
getOfflinePayTypeMsg
());
cellList_all
.
get
(
3
9
).
setCellValue
(
bean
.
getOrderSourceCategory
());
cellList_all
.
get
(
40
).
setCellValue
(
bean
.
getUserType
());
cellList_all
.
get
(
41
).
setCellValue
(
bean
.
isDelayOrder
()?
"是"
:
"否"
);
break
;
case
"list_pay"
:
// 等待支付
ArrayList
<
XSSFCell
>
cellList_pay
=
new
ArrayList
<
XSSFCell
>();
...
...
src/main/java/com/ctrip/fun/admin/service/order/OpEventActivityOrderService.java
View file @
199e0dd3
...
...
@@ -2,6 +2,7 @@ package com.ctrip.fun.admin.service.order;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -17,6 +18,7 @@ import com.ctrip.fun.common.vo.order.EventActivityOrderListExcelBean;
import
com.ctrip.fun.common.vo.order.EventActivityOrderProcessBean
;
import
com.ctrip.fun.common.vo.order.OpEventActivityOrderBean
;
import
com.ctrip.fun.common.vo.order.OpOrderQuery
;
import
com.ctrip.fun.common.vo.product.CourseResourceBean
;
/**
* @author thshi
...
...
@@ -114,5 +116,22 @@ public class OpEventActivityOrderService extends AbstractOpOrderService<EventAct
}).
getBody
();
return
response
;
}
public
List
<
CourseResourceBean
>
loadPlayDateEventActivityResource
(
String
userId
,
OpEventActivityOrderBean
processBean
)
{
String
uri
=
super
.
getServiceUri
(
"uri.eventActivityOrder.loadPlayDateEventActivityResource"
);
List
<
CourseResourceBean
>
responseBean
=
new
ArrayList
<
CourseResourceBean
>();
Request
<
OpEventActivityOrderBean
>
request
=
new
Request
<
OpEventActivityOrderBean
>(
userId
,
processBean
);
HttpEntity
<
Request
<
OpEventActivityOrderBean
>>
entity
=
new
HttpEntity
<
Request
<
OpEventActivityOrderBean
>>(
request
);
Response
<
List
<
CourseResourceBean
>>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
List
<
CourseResourceBean
>>>()
{
}).
getBody
();
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
String
.
format
(
"[获取订单列表] status: %d, msg: %s"
,
response
.
getStatus
(),
response
.
getMessage
()));
}
return
responseBean
;
}
}
src/main/resources/properties/service.properties
View file @
199e0dd3
...
...
@@ -71,7 +71,7 @@ uri.tourOrder.getTourOrderExralResource=/fun-golf-service/tourOrder/tourOrderExr
uri.eventActivityOrder.changeCustomerInfo
=
/fun-golf-service/eventActivityOrder/changeCustomerInfo
uri.eventActivityOrder.confirmEventActivityOrderResource
=
/fun-golf-service/eventActivityOrder/confirmEventActivityOrderResource
uri.eventActivityOrder.confirmEventActivityOrderResourceTeeTime
=
/fun-golf-service/eventActivityOrder/confirmEventActivityOrderResourceTeeTime
uri.eventActivityOrder.loadPlayDateEventActivityResource
=
/fun-golf-service/eventActivityOrder/loadPlayDateEventActivityResource
#CoursePayee and CourseBalance
uri.CoursePayee.list
=
/fun-golf-service/coursePayee/list
uri.CoursePayee.add
=
/fun-golf-service/coursePayee/add
...
...
src/main/webapp/WEB-INF/templates/eventActivityOrder/common/orderDetailTeeTime.ftl
View file @
199e0dd3
<input id="orderId" type="hidden" value="${orderBean.orderId}"/>
<input type="hidden" id="userId" value="${orderBean.userName!}"></input>
<input type="hidden" id="productId" value="${orderBean.productId!}"></input>
<input type="hidden" id="playDate" value="${orderBean.playDate?string('yyyy-MM-dd')}"></input>
<input name = "operator" id="operator" type="hidden" value="${Session['SPRING_SECURITY_CONTEXT'].authentication.name}"/>
<div class = "div-orderDetail">
<table class="table-font table table-bordered table-striped">
...
...
@@ -42,14 +43,20 @@
</tr>
<tr>
<td>底价</td><td>${orderBean.floorPrice!}</td>
<td>确认时间</td>
<td>确认时间
s1
</td>
<td>
<input type="time" id="realpaytime" name="formatTeeTime" value="${orderBean.teeTime}" placeholder="TeeTime" class="input-medium"
style="display:inline; width:50%;">
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
选择时间
</button>
<input type="time" id="realpaytime" name="formatTeeTime" value="${orderBean.teeTime}" placeholder="TeeTime" class="input-medium"
style="display:inline; width:50%;margin-bottom:0">
<form id="form_eventactivity" action = "" method="post" style="display:none;" >
<#include "../common/orderPayInfoEdit.ftl">
</form>
<a href="javascript:;" onclick="changeEventActivityResourceTeeTime($(this))" class="btn btn-primary btn-
small" style="display:inline; margin-left:10px;vertical-align:5px;
">修改</a>
<a href="javascript:;" onclick="changeEventActivityResourceTeeTime($(this))" class="btn btn-primary btn-
lg" style="display:inline-block;width:82px;box-sizing:border-box;margin-top:6px
">修改</a>
</td>
</tr>
...
...
@@ -81,6 +88,71 @@
</tr>
</table>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group lc-btn-group" id="teeTimeInvButton">
</div>
</div>
</div>
</div>
</div>
</div>
<script src="${staticServer}/js/lib/jquery-1.9.1.min.js">
</script>
<script type="text/javascript" src="${staticServer}/js/app/eventActivityOrder.js"></script>
<script type="text/javascript">
$(function() {
jQuery.ajax({
type:"POST",
contentType:"application/x-www-form-urlencoded",
url:"/eventActivityOrder/loadPlayDateEventActivityResource",
data:{
productId:$("input[id='productId']").val(),
playDate:$("input[id='playDate']").val()
},
success:function(data){
if(data.status == 0){
data = eval(data);
var arr = data.body;
for(var item in arr) {
var hour = parseInt(arr[item].teeTime/60)+"";
var send = arr[item].teeTime%60+"";
if(hour.length==1){
hour="0"+hour;
}
if(send.length==1){
send="0"+send;
}
var teeTime_inv = (hour+":"+send)+"____"+(arr[item].inventorySize-arr[item].usedInventory);
var html = '<button type="button" class="btn btn-primary lc-btn" id="teeTimeInvButton';
html+=item;
html+='\">';
html=html+teeTime_inv+"</button>";
$("#teeTimeInvButton").append(html);
$("button[id^='teeTimeInvButton']").click(function(){
var msg01=$(this).text();
$("#realpaytime").val(msg01.split("____")[0]);
$("#myModal").modal("hide");
});
}
}else{
alert("修改失败!" + data.message);
}
},
error:function(){
alert("修改失败!----");
}
});
});
</script>
src/main/webapp/resource/css/common.css
View file @
199e0dd3
...
...
@@ -281,4 +281,16 @@ ul.mid-img li {
}
.board_logo
a
{
position
:
relative
;
}
.board_logo
a
span
.num
{
float
:
right
;
font-size
:
12px
;
border-radius
:
10px
;
background
:
#00ce64
;
padding
:
0
5px
;
color
:
#fff
;
margin-top
:
-6px
;
margin-left
:
-8px
;}
.board_logo
a
span
.left
{
float
:
left
;}
\ No newline at end of file
.board_logo
a
span
.left
{
float
:
left
;}
/*add begin by lichong */
.lc-btn-group
{
width
:
100%
;
white-space
:
normal
;
}
.lc-btn
{
width
:
calc
(
100%
/
3
-
10px
);
margin
:
5px
!important
;
}
\ No newline at end of file
src/main/webapp/resource/js/app/op.js
View file @
199e0dd3
...
...
@@ -298,8 +298,9 @@
$
(
"#form"
).
append
(
$
(
"#realpaytime"
)).
submit
();
}
}
function
changeEventActivityResourceTeeTime
(
_SelfJQ
){
if
(
!
isBtnValid
(
_SelfJQ
)){
if
(
!
isBtnValid
(
_SelfJQ
)){
return
false
;
}
//invalidBtn(_SelfJQ);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment