|
|
@@ -2,10 +2,12 @@ package com.uas.platform.b2b.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.ApcheckKeyWord;
|
|
|
+import com.uas.platform.b2b.model.ErpProdIODetail;
|
|
|
import com.uas.platform.b2b.model.ErpProdIo;
|
|
|
import com.uas.platform.b2b.model.SearchFilter;
|
|
|
import com.uas.platform.b2b.model.Vendor;
|
|
|
import com.uas.platform.b2b.service.PurchaseApBillService;
|
|
|
+import com.uas.platform.b2b.support.JxlsExcelView;
|
|
|
import com.uas.platform.b2b.support.UsageBufferedLogger;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
@@ -14,6 +16,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 应付对账单
|
|
|
@@ -60,4 +66,27 @@ public class SaleArCheckController {
|
|
|
logger.log("应付对账单", "筛选对账数据", "筛选所有未对账数据");
|
|
|
return purchaseApBillService.findXlsApChecks(searchKeyWord, fromDate, endDate, checkDate);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出未对账单据列表
|
|
|
+ *
|
|
|
+ * @param keyword 关键字
|
|
|
+ * @see ApcheckKeyWord
|
|
|
+ * @param fromDate 开始日期
|
|
|
+ * @param endDate 截止日期
|
|
|
+ * @param checkDate 对账月份
|
|
|
+ * @return ModelAndView
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/xls", method = RequestMethod.GET)
|
|
|
+ public ModelAndView export(ApcheckKeyWord keyword, Long fromDate, Long endDate, String checkDate) {
|
|
|
+ List<ErpProdIODetail> details = getAllApChecksByDate(fromDate, endDate, keyword, checkDate).getDetails();
|
|
|
+ ModelAndView modelAndView = new ModelAndView();
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
+ modelAndView.addObject("dateFormat", dateFormat);
|
|
|
+ modelAndView.addObject("data", details);
|
|
|
+ modelAndView.addObject("title", "应付对账单");
|
|
|
+ modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/fa/faApCheck", "应付对账单"));
|
|
|
+ logger.log("客户应收对账单", "导出Excel列表", "导出全部Excel列表");
|
|
|
+ return modelAndView;
|
|
|
+ }
|
|
|
}
|