@ -98,11 +98,11 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
LambdaUpdateWrapper < OrderInfo > wrapper = new LambdaUpdateWrapper < > ( ) ;
wrapper . eq ( OrderInfo : : getId , orderId )
. set ( OrderInfo : : getCommentTime , new Date ( ) )
. set ( OrderInfo : : getCommentTime , new Date ( ) )
. set ( OrderInfo : : getCommentStar , starLevel ) . set ( OrderInfo : : getCommentDesc , reviewStr )
. set ( OrderInfo : : getOrderStatus , " 3 " ) ;
this . update ( wrapper ) ;
orderInfoDetailService . save ( new OrderInfoDetail ( orderInfo . getId ( ) , " 评论订单 " , new Date ( ) , 0L , " 1 " ) ) ;
orderInfoDetailService . save ( new OrderInfoDetail ( orderInfo . getId ( ) , " 评论订单 " , new Date ( ) , 0L , " 1 " ) ) ;
/ / 计算当前店铺评分
if ( ObjectUtil . isNotEmpty ( orderInfo . getPartnerId ( ) ) ) {
Double score = baseMapper . avgPartnerScore ( orderInfo . getPartnerId ( ) ) ;
@ -111,71 +111,72 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
partnerService . updateById ( partner ) ;
}
}
@Override
public IPage < OrderInfo > orderListApp ( Page < OrderInfo > page , String status , String title , String type ) {
public IPage < OrderInfo > orderListApp ( Page < OrderInfo > page , String status , String title , String type ) {
LoginUser user = SecurityFrameworkUtils . getLoginUser ( ) ;
return baseMapper . orderListApp ( page , user . getId ( ) , status , title , type ) ;
return baseMapper . orderListApp ( page , user . getId ( ) , status , title , type ) ;
}
@Override
public List < InspectionInfo > workOrder ( Long partnerId , String carNum , String goodsTitle , String customerSource , String payType , String startTime , Long roleId , String endTime ) {
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
}
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
}
return iInspectionInfoService . workOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
return iInspectionInfoService . workOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
}
@Override
public IPage < InspectionInfo > pageWorkOrder ( Long partnerId , String carNum , String goodsTitle , String customerSource , String payType , String startTime , Long roleId , String endTime , Page < InspectionInfo > page ) {
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
}
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
}
return iInspectionInfoService . pageWorkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime , page ) ;
return iInspectionInfoService . pageWorkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime , page ) ;
}
@Override
public Map < String , Object > workOrderData ( Long partnerId , String carNum , String goodsTitle , String customerSource , String payType , String startTime , Long roleId , String endTime ) {
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
}
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
}
return iInspectionInfoService . workOrderData ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
return iInspectionInfoService . workOrderData ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
}
@Override
public List < InspectionInfo > delworkOrder ( Long partnerId , String carNum , String goodsTitle , String customerSource , String payType , String startTime , Long roleId , String endTime ) {
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
}
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
}
return iInspectionInfoService . delworkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
return iInspectionInfoService . delworkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime ) ;
}
@Override
public IPage < InspectionInfo > pageDelworkOrder ( Long partnerId , String carNum , String goodsTitle , String customerSource , String payType , String startTime , Long roleId , String endTime , Page < InspectionInfo > page ) {
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
if ( StringUtils . isNotEmpty ( startTime ) ) {
startTime = startTime + " 00:00:00 " ;
}
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
if ( StringUtils . isNotEmpty ( endTime ) ) {
endTime = endTime + " 23:59:59 " ;
}
return iInspectionInfoService . pageDelWorkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime , page ) ;
return iInspectionInfoService . pageDelWorkOrder ( partnerId , carNum , goodsTitle , customerSource , payType , startTime , roleId , endTime , page ) ;
}
@Override
public IPage < OrderInfo > orderListSystem ( Page < OrderInfo > page , OrderInfo orderInfo ) {
return baseMapper . orderListSystem ( page , orderInfo ) ;
public IPage < OrderInfo > orderListSystem ( Page < OrderInfo > page , OrderInfo orderInfo ) {
return baseMapper . orderListSystem ( page , orderInfo ) ;
}
/ * *
@ -189,7 +190,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
* * /
@Override
public IPage < OrderInfo > queryListPage ( OrderInfo orderInfo , Page < OrderInfo > page ) {
return baseMapper . pageOrderListSystem ( orderInfo , page ) ;
if ( ObjectUtil . isNotNull ( orderInfo . getCarAge ( ) ) ) {
orderInfo . setNextCarAge ( orderInfo . getCarAge ( ) + 1 ) ;
}
return baseMapper . pageOrderListSystem ( orderInfo , page ) ;
}
@ -212,7 +216,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
throw new Exception ( " 请输入买单金额! " ) ;
}
if ( StringUtils . isNotEmpty ( orderInfo . getPayType ( ) ) & & orderInfo . getPayType ( ) . equals ( " sz " ) ) {
if ( StringUtils . isNotEmpty ( orderInfo . getPayType ( ) ) & & orderInfo . getPayType ( ) . equals ( " sz " ) ) {
Set < Long > userRoleIdListByUserId = permissionService . getUserRoleIdListByUserId ( user . getId ( ) ) ;
List < RoleDO > roleList = roleService . getRoleList ( userRoleIdListByUserId ) ;
boolean flag = false ;
@ -222,7 +226,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
break ;
}
}
if ( ! flag ) {
if ( ! flag ) {
throw new Exception ( " 您不是代办 请不要选择赊账! " ) ;
}
}
@ -312,15 +316,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
this . save ( createOrder ) ;
/ / 追加订单明细记录
OrderInfoDetail detail = new OrderInfoDetail ( createOrder . getId ( ) , " 创建订单 " , new Date ( ) , 0L , " 0 " ) ;
OrderInfoDetail detail = new OrderInfoDetail ( createOrder . getId ( ) , " 创建订单 " , new Date ( ) , 0L , " 0 " ) ;
orderInfoDetailService . save ( detail ) ;
if ( ObjectUtil . isNotEmpty ( orderInfo . getAppointmentId ( ) ) ) {
if ( ObjectUtil . isNotEmpty ( orderInfo . getAppointmentId ( ) ) ) {
/ / 处理预约记录
orderInfo . setId ( createOrder . getId ( ) ) ;
this . dealAppointment ( orderInfo ) ;
}
if ( ObjectUtil . isNotEmpty ( orderInfo . getPickCarId ( ) ) ) {
if ( ObjectUtil . isNotEmpty ( orderInfo . getPickCarId ( ) ) ) {
/ / 处理上门取车服务
orderInfo . setId ( createOrder . getId ( ) ) ;
this . dealPickCar ( orderInfo ) ;
@ -362,14 +366,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
createOrder . setPayType ( " balance " ) ;
this . updateById ( createOrder ) ;
/ / 追加订单明细记录
orderInfoDetailService . save ( new OrderInfoDetail ( createOrder . getId ( ) , " 支付成功 " , new Date ( ) , createOrder . getPayMoney ( ) , " 0 " ) ) ;
orderInfoDetailService . save ( new OrderInfoDetail ( createOrder . getId ( ) , " 支付成功 " , new Date ( ) , createOrder . getPayMoney ( ) , " 0 " ) ) ;
/ / 店铺销量 + 1
if ( goods . getLong ( " partnerId " ) ! = null ) {
partnerService . addSalesNum ( goods . getLong ( " partnerId " ) ) ;
}
return 11111111L ;
} else if ( StringUtils . isNotEmpty ( createOrder . getPayType ( ) ) & & createOrder . getPayType ( ) . equals ( " sz " ) ) {
} else if ( StringUtils . isNotEmpty ( createOrder . getPayType ( ) ) & & createOrder . getPayType ( ) . equals ( " sz " ) ) {
/ / 赊账的情况
/ / 支付方式为余额支付
createOrder . setPayType ( " sz " ) ;
@ -437,24 +441,24 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
res . put ( " skuName " , skuInfo . getSkuName ( ) ) ;
priceFen = skuInfo . getPrice ( ) ;
try {
if ( roleKeys . contains ( " jcdb " ) ) {
if ( roleKeys . contains ( " jcdb " ) ) {
/ / 先判断是否为代办
priceFen = skuInfo . getDbPrice ( ) ;
} else if ( roleKeys . contains ( " jcdwgly " ) ) {
priceFen = skuInfo . getDbPrice ( ) ;
} else if ( roleKeys . contains ( " jcdwgly " ) ) {
/ / 单位管理员
priceFen = skuInfo . getDwPrice ( ) ;
} else if ( roleKeys . contains ( " jcworker " ) | | roleKeys . contains ( " jcshop " ) ) {
priceFen = skuInfo . getDwPrice ( ) ;
} else if ( roleKeys . contains ( " jcworker " ) | | roleKeys . contains ( " jcshop " ) ) {
/ / 检测工人
/ / 判断是否为当前店铺的工人
LambdaQueryWrapper < PartnerWorker > queryWrapper1 = new LambdaQueryWrapper < > ( ) ;
queryWrapper1 . eq ( PartnerWorker : : getUserId , userId ) . eq ( PartnerWorker : : getPartnerId , shopInspectionGoods . getPartnerId ( ) ) . last ( " limit 1 " ) ;
LambdaQueryWrapper < PartnerWorker > queryWrapper1 = new LambdaQueryWrapper < > ( ) ;
queryWrapper1 . eq ( PartnerWorker : : getUserId , userId ) . eq ( PartnerWorker : : getPartnerId , shopInspectionGoods . getPartnerId ( ) ) . last ( " limit 1 " ) ;
PartnerWorker one = workerService . getOne ( queryWrapper1 ) ;
if ( ObjectUtils . isNotEmpty ( one ) ) {
priceFen = skuInfo . getYgPrice ( ) ;
if ( ObjectUtils . isNotEmpty ( one ) ) {
priceFen = skuInfo . getYgPrice ( ) ;
}
}
} catch ( Exception e ) {
} catch ( Exception e ) {
log . error ( e . getMessage ( ) ) ;
}
} else {
@ -484,8 +488,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
if ( StringUtils . isEmpty ( shopInspectionGoods . getIsAttend ( ) ) | | shopInspectionGoods . getIsAttend ( ) . equals ( " 0 " ) | | shopInspectionGoods . getIsSpecial ( ) = = 1 | | ObjectUtils . isEmpty ( userLevel ) | | 0 = = userLevel ) {
/ / 直接计算原价
realPrice = priceFen ;
}
else if ( userLevel = = 1 ) {
} else if ( userLevel = = 1 ) {
/ / 白银会员
/ / 获取会员的优惠折扣
BigDecimal inspectionPlatinum = shopConfig . getInspectionSilver ( ) ;
@ -508,9 +511,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
reduceMoney = priceFen - realPrice ;
/ / 追加汽车上门取车服务费用
if ( ObjectUtil . isNotEmpty ( orderInfo . getPickCarId ( ) ) ) {
if ( ObjectUtil . isNotEmpty ( orderInfo . getPickCarId ( ) ) ) {
JSONObject jsonObject = pickCarDetail ( orderInfo . getPickCarId ( ) ) ;
realPrice = realPrice + jsonObject . getLong ( " pickCarPrice " ) ;
realPrice = realPrice + jsonObject . getLong ( " pickCarPrice " ) ;
}
res . put ( " payMoney " , realPrice ) ;
} else if ( orderInfo . getGoodsType ( ) . equals ( " qx " ) ) {
@ -610,8 +613,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
return buff . toString ( ) ;
}
private void dealAppointment ( OrderInfo orderInfo ) {
if ( orderInfo . getGoodsType ( ) . equals ( " jc " ) ) {
private void dealAppointment ( OrderInfo orderInfo ) {
if ( orderInfo . getGoodsType ( ) . equals ( " jc " ) ) {
InspectionAppointment appointment = appointmentService . getById ( orderInfo . getAppointmentId ( ) ) ;
appointment . setOrderId ( orderInfo . getId ( ) ) ;
appointmentService . updateById ( appointment ) ;
@ -637,21 +640,23 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
}
private void dealPickCar ( OrderInfo orderInfo ) {
if ( orderInfo . getGoodsType ( ) . equals ( " jc " ) ) {
private void dealPickCar ( OrderInfo orderInfo ) {
if ( orderInfo . getGoodsType ( ) . equals ( " jc " ) ) {
InspectionPickCar pickCarInfo = pickCarService . getById ( orderInfo . getPickCarId ( ) ) ;
pickCarInfo . setOrderId ( orderInfo . getId ( ) ) ;
pickCarService . updateById ( pickCarInfo ) ;
/ / 追加订单明细记录
orderInfoDetailService . save ( new OrderInfoDetail ( orderInfo . getId ( ) , " 上门取车费用 " , new Date ( ) , pickCarInfo . getNeedPrice ( ) , " 1 " ) ) ;
orderInfoDetailService . save ( new OrderInfoDetail ( orderInfo . getId ( ) , " 上门取车费用 " , new Date ( ) , pickCarInfo . getNeedPrice ( ) , " 1 " ) ) ;
}
}
@Override
public JSONObject pickCarDetail ( Long pickCarId ) {
JSONObject res = new JSONObject ( ) ;
JSONObject res = new JSONObject ( ) ;
InspectionPickCar pickCar = pickCarService . getById ( pickCarId ) ;
res . put ( " pickCarPrice " , Optional . ofNullable ( pickCar . getNeedPrice ( ) ) . orElse ( 0L ) ) ;
res . put ( " pickCarPrice " , Optional . ofNullable ( pickCar . getNeedPrice ( ) ) . orElse ( 0L ) ) ;
return res ;
}
@ -716,17 +721,17 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
shopCoupon . setCouponStatus ( " 0 " ) ;
shopCouponService . updateShopCoupon ( shopCoupon ) ;
}
LambdaUpdateWrapper < InspectionAppointment > queryWrapper = new LambdaUpdateWrapper < > ( ) ;
queryWrapper . set ( InspectionAppointment : : getOrderId , null ) . eq ( InspectionAppointment : : getOrderId , orderId ) ;
LambdaUpdateWrapper < InspectionAppointment > queryWrapper = new LambdaUpdateWrapper < > ( ) ;
queryWrapper . set ( InspectionAppointment : : getOrderId , null ) . eq ( InspectionAppointment : : getOrderId , orderId ) ;
appointmentService . update ( queryWrapper ) ;
}
@Override
public IPage < OrderInfo > orderList ( Page < OrderInfo > page , String status , String title ) {
public IPage < OrderInfo > orderList ( Page < OrderInfo > page , String status , String title ) {
LoginUser user = SecurityFrameworkUtils . getLoginUser ( ) ;
return baseMapper . orderList ( page , user . getId ( ) , status , title ) ;
return baseMapper . orderList ( page , user . getId ( ) , status , title ) ;
}
/ * *
@ -796,7 +801,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
if ( orderInfo ! = null & & " 1 " . equals ( orderInfo . getOrderStatus ( ) ) ) {
ShopMallPartners shopMallPartners = shopMallPartnersService . selectShopMallPartnersByUserId ( sysUser . getId ( ) , " sc " ) ;
ShopMallPartners shopMallPartners = shopMallPartnersService . selectShopMallPartnersByUserId ( sysUser . getId ( ) , " sc " ) ;
if ( ! Objects . equals ( orderInfo . getPartnerId ( ) , shopMallPartners . getPartnerId ( ) ) ) {
return " 非本店铺核销码 " ;
}
@ -814,15 +819,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
@Override
public IPage < OrderInfo > validationListWx ( Page < OrderInfo > page ) {
return baseMapper . validationListWx ( page , SecurityFrameworkUtils . getLoginUserId ( ) ) ;
return baseMapper . validationListWx ( page , SecurityFrameworkUtils . getLoginUserId ( ) ) ;
}
/ / pc端核销记录 商城
@Override
public IPage < OrderInfo > validationListPc ( Page < OrderInfo > page ) {
ShopMallPartners shopMallPartners = shopMallPartnersService . selectShopMallPartnersByUserId ( SecurityFrameworkUtils . getLoginUserId ( ) , " sc " ) ;
ShopMallPartners shopMallPartners = shopMallPartnersService . selectShopMallPartnersByUserId ( SecurityFrameworkUtils . getLoginUserId ( ) , " sc " ) ;
Long partnerId = shopMallPartners . getPartnerId ( ) ;
return baseMapper . validationListPc ( page , partnerId ) ;
return baseMapper . validationListPc ( page , partnerId ) ;
}
@Override
@ -840,13 +845,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
@Override
public IPage < commentVo > getCommentOrderList ( Page < commentVo > page , Long partnerId ) {
return baseMapper . getCommentOrderList ( page , partnerId ) ;
public IPage < commentVo > getCommentOrderList ( Page < commentVo > page , Long partnerId ) {
return baseMapper . getCommentOrderList ( page , partnerId ) ;
}
@Override
public IPage < OrderInfo > orderListPc ( Page < OrderInfo > page , OrderInfo orderInfo ) {
return baseMapper . orderListPc ( page , orderInfo ) ;
return baseMapper . orderListPc ( page , orderInfo ) ;
}
@Override
@ -880,9 +885,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
} ) ;
/ / 查询所有检测项目
/ / 查询所有检测项目 动态添加到excel表头
List < DlInspectionProject > projectList = dlInspectionProjectService . list ( Wrappers . < DlInspectionProject > lambdaQuery ( )
. orderBy ( true , true , DlInspectionProject : : getSort ) ) ;
. orderBy ( true , true , DlInspectionProject : : getSort ) ) ;
/ / 动态构建表头
List < List < String > > head = new ArrayList < > ( ) ;
@ -900,15 +905,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
head . add ( Collections . singletonList ( " 代办人电话 " ) ) ;
head . add ( Collections . singletonList ( " 商品名称 " ) ) ;
head . add ( Collections . singletonList ( " 新旧车 " ) ) ;
/ / 动态列 ( 检测项目 )
for ( DlInspectionProject project : projectList ) {
head . add ( Collections . singletonList ( project . getProjectName ( ) ) ) ;
}
head . add ( Collections . singletonList ( " 开始时间 " ) ) ;
head . add ( Collections . singletonList ( " 结束时间 " ) ) ;
head . add ( Collections . singletonList ( " 检测时长 " ) ) ;
head . add ( Collections . singletonList ( " 支付方式 " ) ) ;
head . add ( Collections . singletonList ( " 金额 " ) ) ;
/ / 动态列 ( 检测项目 )
for ( DlInspectionProject project : projectList ) {
head . add ( Collections . singletonList ( project . getProjectName ( ) ) ) ;
}
List < Long > orderIds = orderInfoIPage . stream ( ) . map ( OrderInfo : : getId ) . collect ( Collectors . toList ( ) ) ;
@ -932,21 +937,31 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
row . add ( item . getWorkerPhone ( ) ) ;
row . add ( item . getGoodsTitle ( ) ) ;
row . add ( item . getCarStatus ( ) ) ;
/ / 动态列数据
/ / 获取所有orderId = item . orderId的数据
List < InspectionOrderExportVo > projecttList = projectWorkerNames . stream ( ) . filter ( i - > i . getOrderId ( ) . equals ( item . getOrderId ( ) ) ) . collect ( Collectors . toList ( ) ) ;
for ( DlInspectionProject dlInspectionProject : projectList ) {
boolean flag = false ;
for ( InspectionOrderExportVo project : projecttList ) {
if ( dlInspectionProject . getId ( ) . equals ( project . getProjectId ( ) ) ) {
flag = true ;
row . add ( project . getWorkName ( ) ) ;
}
}
if ( ! flag ) {
row . add ( " " ) ;
}
}
row . add ( item . getStartTime ( ) ) ;
row . add ( item . getEndTime ( ) ) ;
row . add ( item . getInspectionTime ( ) ) ;
row . add ( item . getPayType ( ) ) ;
row . add ( item . getPayMoneyStr ( ) ) ;
/ / 动态列数据
for ( InspectionOrderExportVo project : projectWorkerNames ) {
row . add ( item . getDynamicColumns ( ) . get ( project . getWorkName ( ) ) ) ;
}
data . add ( row ) ;
}
/ / 导出 Excel
EasyExcel . write ( response . getOutputStream ( ) )
. head ( head ) / / 设置动态表头