✨ 应收账单导出时间按筛选类型切换
This commit is contained in:
@@ -35,6 +35,7 @@ import com.bms.ar.domain.vo.ArBillGeneratePreviewExportRow;
|
||||
import com.bms.ar.domain.vo.ArBillGenerateRequest;
|
||||
import com.bms.ar.domain.vo.ArBillListExportRow;
|
||||
import com.bms.ar.domain.vo.ArBillQuery;
|
||||
import com.bms.ar.enums.ArBillDateType;
|
||||
import com.bms.ar.service.IArBillService;
|
||||
import com.bms.ar.security.ArBillScopeResolver;
|
||||
import com.bms.common.annotation.Log;
|
||||
@@ -181,12 +182,18 @@ public class ArBillController extends BaseController {
|
||||
public void exportGeneratePreview(HttpServletResponse response, ArBillGenerateQuery query,
|
||||
HttpServletRequest request) {
|
||||
rejectMultiValueParameter(request, "customerId");
|
||||
List<PrcOrderBill> bills = billService.previewBill(query == null ? new ArBillGenerateQuery() : query);
|
||||
ArBillGenerateQuery exportQuery = query == null ? new ArBillGenerateQuery() : query;
|
||||
List<PrcOrderBill> bills = billService.previewBill(exportQuery);
|
||||
List<ArBillGeneratePreviewExportRow> rows = new ArrayList<>(bills.size());
|
||||
for (PrcOrderBill bill : bills) {
|
||||
rows.add(ArBillGeneratePreviewExportRow.from(bill));
|
||||
}
|
||||
ExcelUtil<ArBillGeneratePreviewExportRow> util = new ExcelUtil<>(ArBillGeneratePreviewExportRow.class);
|
||||
if (ArBillDateType.PICKUP_DATE == ArBillDateType.of(exportQuery.getDateType())) {
|
||||
util.hideColumn("bizDate");
|
||||
} else {
|
||||
util.hideColumn("pickupDate");
|
||||
}
|
||||
util.exportExcel(response, rows, "应收账单待生成订单");
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -25,9 +25,12 @@ public class ArBillGeneratePreviewExportRow implements Serializable {
|
||||
@Excel(name = "客户", sort = 3, width = 24)
|
||||
private String customerName;
|
||||
|
||||
@Excel(name = "业务日期", sort = 4, dateFormat = "yyyy-MM-dd HH:mm:ss", width = 22)
|
||||
@Excel(name = "计费时间", sort = 4, dateFormat = "yyyy-MM-dd HH:mm:ss", width = 22)
|
||||
private Date bizDate;
|
||||
|
||||
@Excel(name = "收货时间", sort = 4, dateFormat = "yyyy-MM-dd HH:mm:ss", width = 22)
|
||||
private Date pickupDate;
|
||||
|
||||
@Excel(name = "产品", sort = 5, width = 22)
|
||||
private String productName;
|
||||
|
||||
@@ -53,6 +56,7 @@ public class ArBillGeneratePreviewExportRow implements Serializable {
|
||||
row.setTransferNo(bill.getTransferNo());
|
||||
row.setCustomerName(bill.getCustomerName());
|
||||
row.setBizDate(bill.getBizDate());
|
||||
row.setPickupDate(bill.getPickupDate());
|
||||
row.setProductName(bill.getProductName());
|
||||
row.setCountryName(bill.getCountryName());
|
||||
row.setActualWeight(bill.getActualWeight());
|
||||
|
||||
Reference in New Issue
Block a user