|
|
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -210,8 +211,11 @@ public class StoreApplyController {
|
|
|
@RequestMapping(value = "/export", method = RequestMethod.GET)
|
|
|
public ModelAndView storeInfoAndProdCountExport(@DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
|
- modelAndView.addObject("startTime", startTime);
|
|
|
- modelAndView.addObject("endTime", endTime);
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ modelAndView.addObject("dateFormat", dateFormat);
|
|
|
+ modelAndView.addObject("startTime", format.format(startTime));
|
|
|
+ modelAndView.addObject("endTime", format.format(endTime));
|
|
|
List<StoreInfoAndProdExport> exports = storeApplyService.storeInfoAndProdCountExport(startTime, endTime);
|
|
|
modelAndView.addObject("data", exports);
|
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/product/storeInfo", "上传产品详情"));
|