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
fad8906e
authored
May 07, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台占位的时候可以录入多个客人的手机号、姓名、性别。并在赛事活动分组导出的时候导出这些信息
parent
e0f775f9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
41 deletions
src/main/java/com/ctrip/fun/admin/controller/golf/EventCustomerInfoConttroller.java
src/main/java/com/ctrip/fun/admin/controller/golf/TeeTimeController.java
src/main/java/com/ctrip/fun/admin/controller/order/OpEventActivityOrderController.java
src/main/java/com/ctrip/fun/admin/service/golf/TeeTimeService.java
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListAll.ftl
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListPaying.ftl
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListPaysuccess.ftl
src/main/webapp/WEB-INF/templates/golf/findOrderPlayers.ftl
src/main/webapp/WEB-INF/templates/golf/teeTimeSearch.ftl
src/main/java/com/ctrip/fun/admin/controller/golf/EventCustomerInfoConttroller.java
View file @
fad8906e
...
...
@@ -121,7 +121,7 @@ public class EventCustomerInfoConttroller {
private
XSSFWorkbook
build
(
Map
<
String
,
List
<
OrderPlayerBean
>>
beansMap
)
{
XSSFWorkbook
workBook
=
new
XSSFWorkbook
();
XSSFSheet
sheet
=
workBook
.
createSheet
(
"playerGroup"
);
String
[]
titles
=
{
"编号"
,
"打球日期"
,
"TeeTime"
,
"产品名称"
,
"总金额"
,
"下单人UID"
,
"订单号"
,
"手机号"
,
"姓名"
,
String
[]
titles
=
{
"编号"
,
"打球日期"
,
"TeeTime"
,
"产品名称"
,
"总金额"
,
"下单人UID"
,
"订单号"
,
"手机号"
,
"姓名"
,
"性别"
,
"实时/非实时"
,
"来源"
,
"优惠名称"
,
"优惠金额"
,
"社员/非社员"
};
int
[]
sheetWitdh
=
{
32
*
256
,
16
*
256
,
8
*
256
,
40
*
256
,
8
*
256
,
16
*
256
,
16
*
256
,
16
*
256
,
16
*
256
,
16
*
256
,
16
*
256
,
32
*
256
,
16
*
256
,
16
*
256
};
...
...
@@ -152,11 +152,12 @@ public class EventCustomerInfoConttroller {
int
orderId_cell_column
=
6
;
int
mobile_phone_cell_column
=
7
;
int
player_name_cell_column
=
8
;
int
type_cell_column
=
9
;
int
source_cell_column
=
10
;
int
voucherName_cell_column
=
11
;
int
voucherAmount_cell_column
=
12
;
int
userGrade_cell_column
=
13
;
int
player_gender_cell_column
=
9
;
int
type_cell_column
=
10
;
int
source_cell_column
=
11
;
int
voucherName_cell_column
=
12
;
int
voucherAmount_cell_column
=
13
;
int
userGrade_cell_column
=
14
;
if
(
i
==
0
)
{
// 填充编号
...
...
@@ -210,6 +211,20 @@ public class EventCustomerInfoConttroller {
XSSFCell
dataCell_8
=
dataRow
.
createCell
(
player_name_cell_column
);
dataCell_8
.
setCellValue
(
bean
.
getPlayerName
());
// 填充性别
XSSFCell
dataCell_20
=
dataRow
.
createCell
(
player_gender_cell_column
);
if
(
bean
.
getGender
()!=
null
&&!
""
.
equals
(
bean
.
getGender
())){
if
(
"M"
.
equals
(
bean
.
getGender
())){
dataCell_20
.
setCellValue
(
"男"
);
}
else
if
(
"F"
.
equals
(
bean
.
getGender
())){
dataCell_20
.
setCellValue
(
"女"
);
}
else
{
dataCell_20
.
setCellValue
(
"未知"
);
}
}
else
{
dataCell_20
.
setCellValue
(
"未知"
);
}
dataCell_8
.
setCellValue
(
bean
.
getPlayerName
());
// 填充来源
XSSFCell
dataCell_10
=
dataRow
.
createCell
(
source_cell_column
);
dataCell_10
.
setCellValue
(
bean
.
getSource
());
...
...
src/main/java/com/ctrip/fun/admin/controller/golf/TeeTimeController.java
View file @
fad8906e
...
...
@@ -29,6 +29,8 @@ import com.ctrip.fun.admin.template.FlashMessageDirective;
import
com.ctrip.fun.common.core.util.DateUtil
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.order.CustomerBean
;
import
com.ctrip.fun.common.vo.order.OfflineEventCustomerInfoBean
;
import
com.ctrip.fun.common.vo.order.RealTimeTeeTimeResourceInfoBean
;
/**
...
...
@@ -92,43 +94,41 @@ public class TeeTimeController {
* 临时占座
*/
@RequestMapping
(
value
=
"/tempConfirm"
,
method
=
RequestMethod
.
POST
)
public
String
tempConfirm
(
String
resourceId
,
Date
date
,
@RequestParam
(
value
=
"phones[]"
)
String
[]
phones
,
ModelMap
model
,
RedirectAttributes
redirectAttributes
)
{
model
.
put
(
"resourceId"
,
resourceId
);
model
.
put
(
"date"
,
date
);
public
String
tempConfirm
(
ModelMap
model
,
RedirectAttributes
redirectAttributes
,
OfflineEventCustomerInfoBean
customerInfoBean
)
{
model
.
put
(
"resourceId"
,
customerInfoBean
.
getResourceId
());
model
.
put
(
"date"
,
customerInfoBean
.
getPriceDate
());
int
rid
=
0
;
try
{
rid
=
Integer
.
valueOf
(
resourceId
);
rid
=
Integer
.
valueOf
(
customerInfoBean
.
getResourceId
()
);
}
catch
(
Exception
e
)
{
}
if
(
rid
<
1
||
date
==
null
)
{
if
(
rid
<
1
||
customerInfoBean
.
getPriceDate
()
==
null
)
{
addFlashMessage
(
redirectAttributes
,
"占座失败,参数错误"
);
return
"redirect:search"
;
}
String
redirectUrl
=
"redirect:search?resourceId="
+
resourceId
+
"&date="
+
DateUtil
.
getDateStr
(
date
);
if
(
phones
==
null
||
phones
.
length
==
0
)
{
String
redirectUrl
=
"redirect:search?resourceId="
+
customerInfoBean
.
getResourceId
()
+
"&date="
+
DateUtil
.
getDateStr
(
customerInfoBean
.
getPriceDate
()
);
if
(
customerInfoBean
.
getCustomerInfos
()
==
null
||
customerInfoBean
.
getCustomerInfos
().
size
()
==
0
)
{
addFlashMessage
(
redirectAttributes
,
"占座失败,请输入客户电话号码"
);
return
redirectUrl
;
}
Set
<
String
>
distinctPhones
=
new
HashSet
<
String
>();
for
(
String
phone
:
phones
)
{
if
(
StringUtils
.
isEmpty
(
phone
))
{
for
(
CustomerBean
customerBean
:
customerInfoBean
.
getCustomerInfos
()
)
{
if
(
StringUtils
.
isEmpty
(
customerBean
.
getMobileNo
()
))
{
addFlashMessage
(
redirectAttributes
,
"电话号码填写不完整"
);
return
redirectUrl
;
}
if
(!
phone
.
matches
(
"^(13|15|18|17|14)[0-9]{9}+$"
))
{
addFlashMessage
(
redirectAttributes
,
"电话号码不符合规范("
+
phone
+
")"
);
if
(!
customerBean
.
getMobileNo
()
.
matches
(
"^(13|15|18|17|14)[0-9]{9}+$"
))
{
addFlashMessage
(
redirectAttributes
,
"电话号码不符合规范("
+
customerBean
.
getMobileNo
()
+
")"
);
return
redirectUrl
;
}
if
(!
distinctPhones
.
add
(
phone
))
{
if
(!
distinctPhones
.
add
(
customerBean
.
getMobileNo
()
))
{
addFlashMessage
(
redirectAttributes
,
"手机号码不能重复"
);
return
redirectUrl
;
}
}
List
<
String
>
mobilePhones
=
Arrays
.
asList
(
phones
);
Response
<
Serializable
>
response
=
teeTimeService
.
tempConfirm
(
rid
,
date
,
mobilePhones
);
Response
<
Serializable
>
response
=
teeTimeService
.
tempConfirm
(
rid
,
customerInfoBean
.
getPriceDate
(),
customerInfoBean
.
getCustomerInfos
());
if
(
redirectAttributes
==
null
)
{
addFlashMessage
(
redirectAttributes
,
"占座失败,请重试"
);
}
else
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
...
...
src/main/java/com/ctrip/fun/admin/controller/order/OpEventActivityOrderController.java
View file @
fad8906e
...
...
@@ -145,6 +145,11 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
if
(
response
.
getResult
()
!=
null
)
{
for
(
EventActivityOrderListBean
bean
:
response
.
getResult
())
{
bean
.
setOrderStatusString
(
OrderStatusEnum
.
getOrderStatusEnum
(
bean
.
getOrderStatus
()).
getShowStatusName
());
if
(
bean
.
getInvoiceId
()
==
null
||
bean
.
getInvoiceId
()
==
0
)
{
bean
.
setIsInvoiceDesc
(
"否"
);
}
else
{
bean
.
setIsInvoiceDesc
(
"是"
);
}
}
}
...
...
src/main/java/com/ctrip/fun/admin/service/golf/TeeTimeService.java
View file @
fad8906e
...
...
@@ -21,6 +21,7 @@ import com.ctrip.fun.admin.utility.SpringSecurityUtil;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.order.CustomerBean
;
import
com.ctrip.fun.common.vo.order.EventCustomerInfoOfflineLogBean
;
import
com.ctrip.fun.common.vo.order.OfflineEventCustomerInfoBean
;
import
com.ctrip.fun.common.vo.order.OpEventCustomerInfoQuery
;
...
...
@@ -82,12 +83,12 @@ public class TeeTimeService extends BaseService {
* @return
*/
public
Response
<
Serializable
>
tempConfirm
(
int
resourceId
,
Date
priceDate
,
List
<
String
>
mobilePhone
s
)
{
List
<
CustomerBean
>
customerBean
s
)
{
String
uri
=
super
.
getServiceUri
(
"uri.teetime.tempConfirm"
);
Request
<
OfflineEventCustomerInfoBean
>
request
=
new
Request
<
OfflineEventCustomerInfoBean
>();
request
.
setUserId
(
""
);
OfflineEventCustomerInfoBean
bean
=
new
OfflineEventCustomerInfoBean
();
bean
.
set
MobilePhones
(
mobilePhone
s
);
bean
.
set
CustomerInfos
(
customerBean
s
);
bean
.
setPriceDate
(
priceDate
);
bean
.
setResourceId
(
resourceId
);
bean
.
setOperator
(
SpringSecurityUtil
.
getCurrentUserName
());
...
...
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListAll.ftl
View file @
fad8906e
...
...
@@ -14,6 +14,7 @@
<th>下单时间</th>
<th>状态</th>
<th>接管人</th>
<th>已存发票信息</th>
<th>订单来源</th>
</tr>
...
...
@@ -31,6 +32,7 @@
<td><#if item.orderDate??>${item.orderDate?string("yyyy-MM-dd HH:mm:ss")}<#else></#if></td>
<td>${item.orderStatusString!}</td>
<td>${item.receiver!}</td>
<td>${item.isInvoiceDesc!}</td>
<td>${item.orderSourceCategory!}</td>
</tr>
</#list>
...
...
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListPaying.ftl
View file @
fad8906e
...
...
@@ -14,6 +14,7 @@
<th>下单时间</th>
<th>状态</th>
<th>接管人</th>
<th>已存发票信息</th>
<th>订单来源</th>
</tr>
...
...
@@ -30,6 +31,7 @@
<td><#if item.orderDate??>${item.orderDate?string("yyyy-MM-dd HH:mm:ss")}<#else></#if></td>
<td>${item.orderStatusString!}</td>
<td>${item.receiver!}</td>
<td>${item.isInvoiceDesc!}</td>
<td>${item.orderSourceCategory!}</td>
</tr>
</#list>
...
...
src/main/webapp/WEB-INF/templates/eventActivityOrder/list/eventActivityOrderListPaysuccess.ftl
View file @
fad8906e
...
...
@@ -14,6 +14,7 @@
<th>下单时间</th>
<th>状态</th>
<th>接管人</th>
<th>已存发票信息</th>
<th>订单来源</th>
</tr>
...
...
@@ -30,6 +31,7 @@
<td><#if item.orderDate??>${item.orderDate?string("yyyy-MM-dd HH:mm:ss")}<#else></#if></td>
<td>${item.orderStatusString!}</td>
<td>${item.receiver!}</td>
<td>${item.isInvoiceDesc!}</td>
<td>${item.orderSourceCategory!}</td>
</tr>
</#list>
...
...
src/main/webapp/WEB-INF/templates/golf/findOrderPlayers.ftl
View file @
fad8906e
...
...
@@ -53,6 +53,7 @@ $(function(){
<th>订单号</th>
<th>手机号</th>
<th>姓名</th>
<th>性别</th>
<th>实时/非实时</th>
<th>来源</th>
<th>优惠名称</th>
...
...
@@ -85,6 +86,19 @@ $(function(){
<td>${item.orderNo!""}</td>
<td>${item.mobilePhone!""}</td>
<td>${item.playerName}</td>
<#if item.gender??>
<#if (item.gender=="M")>
<td>男</td>
<#elseif (item.gender=="F")>
<td>女</td>
<#else>
<td>未知</td>
</#if>
<#else>
<td>未知</td>
</#if>
<#if item_index==0>
<td rowspan='${size}'>${item.type!""}</td>
</#if>
...
...
src/main/webapp/WEB-INF/templates/golf/teeTimeSearch.ftl
View file @
fad8906e
...
...
@@ -21,6 +21,7 @@ $(function(){
return;
}
$('#placehold_form').show();
createCustomInfo($('#number').val());
})
</#if>
<#if (teeTime.inventorySize>1) >
...
...
@@ -30,17 +31,25 @@ $(function(){
}
$('#number').change(function(){
var value = $(this).val();
$('.phone_div:gt('+(value-1)+')').remove();
var size = $('.phone_div').length;
if(value>size){
for(i=0;i<value-size;i++){
var phone_div = '<div class="long_content_div control-group phone_div"><label class="control-label" ></label><div class="controls"><input type="text" name="phones[]" value="" placeholder="电话号码" class="input-medium"><span class="help-inline"><font color=red>*</font></span></div></div>';
// $('.phone_div:eq(0)').after(phone_div);
$('.phone_div:last').after(phone_div);
}
}
createCustomInfo(value)
})
</#if>
//建立占座客户信息
function createCustomInfo(num){
$('#customInfo').html('');
var len = num || 0,phone_div = ''
if(len>=1){
for(var i=0;i<len;i++){
phone_div += '<div class="long_content_div control-group phone_div">电话号码<input type="text" name="customerInfos['+ i +'].mobileNo" value="" placeholder="电话号码" class="width:150px">'+
'姓名<input type="text" name="customerInfos['+ i +'].name"" value="" placeholder="姓名" class="width:150px">'+
'性别<input type="radio" name="customerInfos['+ i +'].gender" value="M" checked>男<input type="radio" name="customerInfos['+ i +'].gender" value="F">女</div>'
}
$('#customInfo').html(phone_div);
}
}
</#if>
})
...
...
@@ -93,7 +102,7 @@ $(function(){
<#if teeTime?? && (teeTime.inventorySize>0)>
<form class="form-inline form-horizontal" action="tempConfirm" method="post" id="placehold_form" style="display:none">
<input type="hidden" name="resourceId" id="resourceId" value="${resourceId!""}"/>
<input type="hidden" name="
d
ate" id="date" value="<#if date??>${date?string("yyyy-MM-dd")}</#if>"/>
<input type="hidden" name="
priceD
ate" id="date" value="<#if date??>${date?string("yyyy-MM-dd")}</#if>"/>
<div id="course_container">
<div class="row-fluid show-grid">
<h3 class="span12" data-collapse-summary="" aria-expanded="true">TeeTime选择</h3>
...
...
@@ -105,12 +114,8 @@ $(function(){
</select>
</div>
<div class="long_content_div control-group phone_div">
<label class="control-label" for="phones">电话号码</label>
<div class="controls">
<input type="text" name="phones[]" value="" placeholder="电话号码" class="input-medium">
<span class="help-inline"><font color=red>*</font></span>
</div>
<div class="long_content_div control-group phone_div" id="customInfo">
</div>
<div class="long_content_div control-group">
...
...
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