当前位置: 首页 > news >正文

西安哪些做网站的公司/百度运营优化师

西安哪些做网站的公司,百度运营优化师,网站专业销售团队介绍,天翼云主机 网站服务器maven地址为:org.apache.poipoi-ooxml3.17好了,废话不多少,上代码jsp前端代码(根据自己的业务来)时间:-消费类型:所有报名费酒水零食类支付状态:所有未支付已支付data-options"iconCls:‘icon-search‘" sty…

maven地址为:

org.apache.poi

poi-ooxml

3.17

好了,废话不多少,上代码

jsp前端代码(根据自己的业务来)

时间:

 -

消费类型:

所有

报名费

酒水零食类

支付状态:

所有

未支付

已支付

data-options="iconCls:‘icon-search‘" style="margin-left:10px">查询

(查询出来的数据可统计)

导出表

$(function() {

//导出excel表

$(‘#consumesOutExcel‘).on(‘click‘,function(){

exportExcel();

});

});

function exportExcel() {

$.messager.confirm(‘确认‘, ‘确认把该搜索结果导出Excel表格 ?‘, function(r) {

if (r) {

var startTime = $(‘#startDateConsume‘).val();

var endTime = $(‘#endDateConsume‘).val();

var consumesType = $(‘#consumesType‘).val();

var conPaymentStatus = $(‘#conPaymentStatus‘).val();

$.messager.progress({

title : ‘处理中‘,

msg : ‘请稍后‘,

});

$.messager.progress(‘close‘);

location.href="web/vip/exportExcel.xlsx?startTime="+startTime+"&endTime="+endTime+"&consumesType="+consumesType+"&conPaymentStatus="+conPaymentStatus;

}

});

java后端代码:

@Controller

@RequestMapping("/vip")

public class VipController {

//文件下载:导出excel表

@RequestMapping(value = "/exportExcel.xlsx",method = RequestMethod.GET)

@ResponseBody

public void exportExcel(HttpServletRequest request,HttpServletResponse response) throws UnsupportedEncodingException{

//一、从后台拿数据

if (null == request || null == response)

{

return;

}

List list = null;

String startTime = request.getParameter("startTime");

String endTime = request.getParameter("endTime");

int consumesType = Integer.parseInt(request.getParameter("consumesType"));

int conPaymentStatus =Integer.parseInt(request.getParameter("conPaymentStatus"));

VipConsumesExample example = new VipConsumesExample();

if(consumesType!=0 && conPaymentStatus!=0){

example.createCriteria().andTimeBetween(startTime, endTime).andConsumeTypeEqualTo(consumesType).andStatusEqualTo(conPaymentStatus);

}else if(consumesType ==0 && conPaymentStatus!=0) {

example.createCriteria().andTimeBetween(startTime, endTime).andStatusEqualTo(conPaymentStatus);

}else if(consumesType!=0 && conPaymentStatus==0){

example.createCriteria().andTimeBetween(startTime, endTime).andConsumeTypeEqualTo(consumesType);

}else {

example.createCriteria().andTimeBetween(startTime, endTime);

}

list = this.vipConsumesDao.selectByExample(example);

//二、 数据转成excel

request.setCharacterEncoding("UTF-8");

response.setCharacterEncoding("UTF-8");

response.setContentType("application/x-download");

String fileName = "消费记录.xlsx";

fileName = URLEncoder.encode(fileName, "UTF-8");

response.addHeader("Content-Disposition", "attachment;filename=" + fileName);

// 第一步:定义一个新的工作簿

XSSFWorkbook wb = new XSSFWorkbook();

// 第二步:创建一个Sheet页

XSSFSheet sheet = wb.createSheet("startTimeendTime");

sheet.setDefaultRowHeight((short) (2 * 256));//设置行高

sheet.setColumnWidth(0, 4000);//设置列宽

sheet.setColumnWidth(1,5500);

sheet.setColumnWidth(2,5500);

sheet.setColumnWidth(3,5500);

sheet.setColumnWidth(11,3000);

sheet.setColumnWidth(12,3000);

sheet.setColumnWidth(13,3000);

XSSFFont font = wb.createFont();

font.setFontName("宋体");

font.setFontHeightInPoints((short) 16);

XSSFRow row = sheet.createRow(0);

XSSFCell cell = row.createCell(0);

cell.setCellValue("流水号 ");

cell = row.createCell(1);

cell.setCellValue("微信名 ");

cell = row.createCell(2);

cell.setCellValue("微信订单号");

cell = row.createCell(3);

cell.setCellValue("消费时间");

cell = row.createCell(4);

cell.setCellValue("消费类型");

cell = row.createCell(5);

cell.setCellValue("剩余积分 ");

cell = row.createCell(6);

cell.setCellValue("新增积分 ");

cell = row.createCell(7);

cell.setCellValue("扣除积分 ");

cell = row.createCell(8);

cell.setCellValue("消费金额");

cell = row.createCell(9);

cell.setCellValue("支付方式");

cell = row.createCell(10);

cell.setCellValue("支付状态 ");

cell = row.createCell(11);

cell.setCellValue("钱包原始金额");

cell = row.createCell(12);

cell.setCellValue("钱包扣除金额");

cell = row.createCell(13);

cell.setCellValue("钱包剩余金额");

XSSFRow rows;

XSSFCell cells;

for (int i = 0; i 

// 第三步:在这个sheet页里创建一行

rows = sheet.createRow(i+1);

// 第四步:在该行创建一个单元格

cells = rows.createCell(0);

// 第五步:在该单元格里设置值

cells.setCellValue(list.get(i).getConsumeId());

cells = rows.createCell(1);

cells.setCellValue(list.get(i).getName());

cells = rows.createCell(2);

cells.setCellValue(list.get(i).getOrderNumber());

cells = rows.createCell(3);

cells.setCellValue(list.get(i).getTime());

cells = rows.createCell(4);

if (list.get(i).getConsumeType() == 2) {

cells.setCellValue("酒水零食费");

} else {

cells.setCellValue("报名费");

}

cells = rows.createCell(5);

cells.setCellValue(list.get(i).getIntegral());

cells = rows.createCell(6);

cells.setCellValue(list.get(i).getIntegralIn());

cells = rows.createCell(7);

cells.setCellValue(list.get(i).getIntegralOut());

cells = rows.createCell(8);

cells.setCellValue(list.get(i).getMoney());

cells = rows.createCell(9);

if (list.get(i).getPayment() == 2) {

cells.setCellValue("积分抵现");

} else if (list.get(i).getPayment() == 3) {

cells.setCellValue("微信支付");

} else if (list.get(i).getPayment() == 4) {

cells.setCellValue("现金");

} else if (list.get(i).getPayment() == 1) {

cells.setCellValue("钱包");

}

cells = rows.createCell(10);

if (list.get(i).getStatus() == 2) {

cells.setCellValue("已支付");

} else if (list.get(i).getStatus() == 1) {

cells.setCellValue("未支付");

}

cells = rows.createCell(11);

cells.setCellValue(list.get(i).getWalletOriginal());

cells = rows.createCell(12);

cells.setCellValue(list.get(i).getWalletOut());

cells = rows.createCell(13);

cells.setCellValue(list.get(i).getWalletSurplus());

}

try {

OutputStream out = response.getOutputStream();

wb.write(out);

out.close();

wb.close();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

}

摘抄原文:https://blog.csdn.net/xiaoyangsavvy/article/details/80239210

http://www.jmfq.cn/news/5104711.html

相关文章:

  • 国外装修网站建设模板/各种手艺培训班
  • 企业网站内的问答模式怎么做/痘痘该如何去除效果好
  • 佛山手机网站建设/百度手机应用商店
  • 哪个网站可以做彩经专家/谷歌浏览器下载安装2022
  • 沈阳定制网站建设/宁波seo外包优化
  • 智慧团建入口登录网站/关键词异地排名查询
  • wordpress 多站点 无法访问/郑州网站关键词推广
  • 企业网站怎么做才能留住客户/百度账号管理中心
  • 东营市做网站的公司/seo流量是什么意思
  • 中山市城市建设档案馆网站/百度大搜数据多少钱一条
  • 如何在旅游网站上做攻略/苏州seo优化
  • 江苏网站优化/北京建站工作室
  • 济南小程序制作公司/长沙seo报价
  • 网站为什么做微云的采集/一键生成个人网站
  • 电子商务网站费用/百度推广客户端下载网址
  • qq官网登录/品牌关键词优化哪家便宜
  • 定制类网站建设/如何推广一个产品
  • 网站建设合同注意事项/可以打广告的平台
  • 做网站引流做什么类型的网站最好/太原百度快照优化排名
  • 化纤公司网站建设/网页设计用什么软件
  • 口碑好的东莞网站建设/温州seo
  • 效果图网站模板/宁波网站推广找哪家公司
  • 网站优化工作室/友情链接代码美化
  • 仿站仿淘宝客网站视频教程/如何做好营销
  • 用什么来网站开发好/bt磁力狗
  • 莱芜翰林名苑莱芜论坛/长沙网站seo外包
  • 无锡网站制作的公司有哪些/营销页面
  • 2023疫情第二波爆发时间/关键词优化怎么弄
  • 做优化送网站/网络营销方案策划案例
  • 网站建设和空间/营销案例网站