记得上下班打卡 | git大法好,push需谨慎

Commit 6aecb448 authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/new_member' into new_member

parents 52a92f25 8f80c77e
......@@ -5,8 +5,12 @@ import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
import com.liquidnet.client.admin.zhengzai.adam.dto.OrderExpressExportExcelListDao;
import com.liquidnet.client.admin.zhengzai.candy.dto.CandyCouponCodeExcelDto;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.PerformancesExpressServiceImpl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dao.OrderExpressExportListDao;
import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao;
import com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceOrderListAdminDao;
import com.liquidnet.service.kylin.dto.param.PerformanceExpressSearchAdminParam;
......@@ -17,6 +21,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -310,4 +315,21 @@ public class PerformancesExpressController extends BaseController {
}
}
/**
* 导出快递票订单
*/
@Log(title = "快递管理-演出列表", businessType = BusinessType.PRINT)
@RequiresPermissions("kylin:performancesExpress:exportExcel")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(@RequestParam("ids") String performanceId) {
List<OrderExpressExportListDao> list = performancesExpressServiceImpl.selectExpressList(performanceId);
ExcelUtil<OrderExpressExportExcelListDao> excelUtil = new ExcelUtil<>(OrderExpressExportExcelListDao.class);
List<OrderExpressExportExcelListDao> excelList = new ArrayList<>();
list.forEach(r -> {
excelList.add(OrderExpressExportExcelListDao.getNew().copy(r));
});
return excelUtil.exportExcel(excelList, "券码数据");
}
}
......@@ -358,14 +358,18 @@ var table = {
}
},
// 导出数据
exportExcel: function(formId) {
exportExcel: function(formId, data) {
table.set();
$.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#" + table.options.id).bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
if (data) {
dataParam = data;
} else {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#" + table.options.id).bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
}
$.modal.loading("正在导出数据,请稍后...");
$.post(table.options.exportUrl, dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
......
......@@ -44,6 +44,7 @@
var prefix = ctx + "kylin/performancesExpress";
var batchGenerateImageFlag = [[${@permission.hasPermi('kylin:performancesExpress:batchGenerateImage')}]];
var batchPrintExpressFlag = [[${@permission.hasPermi('kylin:performancesExpress:batchPrintExpress')}]];
var exportExcelFlag = [[${@permission.hasPermi('kylin:performancesExpress:exportExcel')}]];
function generateImage(performanceId) {
var configPrint = {
......@@ -285,6 +286,11 @@
});
}
function exportExcel(performancesId) {
var data = {"ids": performancesId};
$.table.exportExcel("", data)
}
$(function () {
var options = {
url: prefix + "/performancesList",
......@@ -293,6 +299,7 @@
batchCancelOrderUrl: prefix + "/batchCancelOrder",
batchGenerateImageUrl: prefix + "/batchGenerateImage",
batchPrintExpressUrl: prefix + "/batchPrintExpress",
exportUrl: prefix + "/export",
modalName: "演出快递",
columns: [
{
......@@ -333,6 +340,7 @@
actions.push('<a class="btn btn-warning btn-xs ' + batchCancelOrderFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.performancesId + '\', \'确定批量取消吗?\', table.options.batchCancelOrderUrl)"></i>取消</a> ');
// actions.push('<a class="btn btn-warning btn-xs ' + batchGenerateImageFlag + '" href="javascript:void(0)" onclick="generateImage(\'' + row.performancesId + '\',)"></i>下载快递单</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + batchPrintExpressFlag + '" href="javascript:void(0)" onclick="printExpress(\'' + row.performancesId + '\',)"></i>打印快递单</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + exportExcelFlag + '" href="javascript:void(0)" onclick="exportExcel(\'' + row.performancesId + '\')"></i>导出快递票订单</a> ');
return actions.join('');
}
}]
......
package com.liquidnet.client.admin.zhengzai.adam.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.OrderExpressExportListDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderExpressExportExcelListDao implements Serializable, Cloneable {
private static final long serialVersionUID = -2867045876880344637L;
@Excel(name = "票种")
private String title;
@Excel(name = "使用时间")
private String useStart;
@Excel(name = "订单编号")
private String orderCode;
@Excel(name = "购买数量")
private Integer number;
@Excel(name = "用户名称")
private String userName;
@Excel(name = "用户手机号")
private String userMobile;
@Excel(name = "收货人姓名")
private String expressContacts;
@Excel(name = "收货人手机号")
private String expressPhone;
@Excel(name = "收货地址")
private String expressAddress;
@Excel(name = "入场人姓名")
private String enterName;
@Excel(name = "入场人手机号")
private String enterMobile;
@Excel(name = "入场人身份证")
private String enterIdCod;
private static final OrderExpressExportExcelListDao obj = new OrderExpressExportExcelListDao();
public static OrderExpressExportExcelListDao getNew() {
try {
return (OrderExpressExportExcelListDao) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderExpressExportExcelListDao();
}
}
public OrderExpressExportExcelListDao copy(OrderExpressExportListDao source) {
if (null == source) return this;
this.setTitle(source.getTitle());
this.setUseStart(source.getUseStart());
this.setOrderCode(source.getOrderCode());
this.setNumber(source.getNumber());
this.setUserName(source.getUserName());
this.setUserMobile(source.getUserMobile());
this.setExpressContacts(source.getExpressContacts());
this.setExpressPhone(source.getExpressPhone());
this.setExpressAddress(source.getExpressAddress());
this.setEnterName(source.getEnterName());
this.setEnterMobile(source.getEnterMobile());
this.setEnterIdCod(source.getEnterIdCod());
return this;
}
}
......@@ -659,4 +659,9 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
return kylinOrderExpressPrintVo;
}
public List<OrderExpressExportListDao> selectExpressList(String performanceId) {
List<OrderExpressExportListDao> list = kylinOrderTicketsMapper.selectExpressList(performanceId);
return list;
}
}
......@@ -24,7 +24,7 @@ liquidnet:
reviewer:
app-login:
mobile: 13724286255
user-info: true
user-info: false
#以下为spring各环境个性配置
......@@ -24,6 +24,6 @@ liquidnet:
reviewer:
app-login:
mobile: 13724286255
user-info: true
user-info: false
#以下为spring各环境个性配置
package com.liquidnet.service.kylin.dao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderExpressExportListDao implements Serializable {
private static final long serialVersionUID = -2867045876880344637L;
private String title;
private String useStart;
private String orderCode;
private Integer number;
private String userName;
private String userMobile;
private String expressContacts;
private String expressPhone;
private String expressAddress;
private String enterName;
private String enterMobile;
private String enterIdCod;
}
......@@ -37,4 +37,5 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
List<OrderIdsDao> getOrderUserIdByTimesId(@Param("ticketId") String ticketId);
List<OrderExpressExportListDao> selectExpressList(@Param("performanceId") String performanceId);
}
......@@ -354,4 +354,29 @@
select order_tickets_id,user_id from kylin_order_tickets as kot left join kylin_order_ticket_relations as kotr on kotr.order_id = kot.order_tickets_id
where ticket_id =#{ticketId}
</select>
<select id="selectExpressList" resultType="com.liquidnet.service.kylin.dao.OrderExpressExportListDao">
SELECT
d.title,
d.use_start,
c.order_code,
c.number,
c.user_name,
c.user_mobile,
c.express_contacts,
c.express_phone,
c.express_address,
f.enter_name,
f.enter_mobile,
f.enter_id_code
FROM kylin_performances AS p
JOIN kylin_order_ticket_relations AS b ON b.performance_id = p.performances_id
JOIN kylin_order_tickets AS c ON c.order_tickets_id = b.order_id
JOIN kylin_order_ticket_status AS e ON e.order_id = b.order_id
JOIN kylin_order_ticket_entities AS f ON f.order_id = b.order_id
JOIN kylin_tickets AS d ON d.tickets_id = b.ticket_id
WHERE c.get_ticket_type = 'express'
AND e.status = 1
AND e.transfer_status in (0, 3)
AND p.performances_id = #{performanceId};
</select>
</mapper>
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 to comment