|
@@ -1,11 +1,13 @@
|
|
|
package com.caimei.modules.order.web;
|
|
|
|
|
|
import com.caimei.dfs.image.beens.ImageUploadInfo;
|
|
|
+import com.caimei.modules.common.utils.ExcelUtil;
|
|
|
import com.caimei.modules.common.utils.UploadUtils;
|
|
|
import com.caimei.modules.order.dao.CmPayShopRecordDao;
|
|
|
import com.caimei.modules.order.dao.NewOrderProductDao;
|
|
|
import com.caimei.modules.order.entity.*;
|
|
|
import com.caimei.modules.order.service.*;
|
|
|
+import com.caimei.modules.order.utils.OrderUtil;
|
|
|
import com.caimei.modules.sys.utils.UploadImageUtils;
|
|
|
import com.caimei.modules.user.entity.CmUserOrganize;
|
|
|
import com.caimei.modules.user.service.CmUserOrganizeService;
|
|
@@ -89,6 +91,14 @@ public class CmPayShopController extends BaseController {
|
|
|
model.addAttribute("endTime", cmPayShop.getEndTime());
|
|
|
cmPayShop.setEndTime(cmPayShop.getEndTime().trim() + " 23:59:59");
|
|
|
}
|
|
|
+ if (null != cmPayShop.getStartTime2() && !"".equals(cmPayShop.getStartTime2()) && !cmPayShop.getStartTime2().endsWith("00:00:00")) {
|
|
|
+ model.addAttribute("startTime2", cmPayShop.getStartTime2());
|
|
|
+ cmPayShop.setStartTime2(cmPayShop.getStartTime2().trim() + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (null != cmPayShop.getEndTime2() && !"".equals(cmPayShop.getEndTime2()) && !cmPayShop.getEndTime2().endsWith("23:59:59")) {
|
|
|
+ model.addAttribute("endTime2", cmPayShop.getEndTime2());
|
|
|
+ cmPayShop.setEndTime2(cmPayShop.getEndTime2().trim() + " 23:59:59");
|
|
|
+ }
|
|
|
Page<CmPayShop> page = cmPayShopService.findPage(new Page<CmPayShop>(request, response), cmPayShop);
|
|
|
//获取组织列表
|
|
|
List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findOrganize();
|
|
@@ -123,6 +133,36 @@ public class CmPayShopController extends BaseController {
|
|
|
return "redirect:" + Global.getAdminPath() + "/order/cmPayShop/?repage";
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "export")
|
|
|
+ public void export(CmPayShop cmPayShop, RedirectAttributes redirectAttributes, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ if (null != cmPayShop.getStartTime() && !"".equals(cmPayShop.getStartTime()) && !cmPayShop.getStartTime().endsWith("00:00:00")) {
|
|
|
+ cmPayShop.setStartTime(cmPayShop.getStartTime().trim() + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (null != cmPayShop.getEndTime() && !"".equals(cmPayShop.getEndTime()) && !cmPayShop.getEndTime().endsWith("23:59:59")) {
|
|
|
+ cmPayShop.setEndTime(cmPayShop.getEndTime().trim() + " 23:59:59");
|
|
|
+ }
|
|
|
+ if (null != cmPayShop.getStartTime2() && !"".equals(cmPayShop.getStartTime2()) && !cmPayShop.getStartTime2().endsWith("00:00:00")) {
|
|
|
+ cmPayShop.setStartTime2(cmPayShop.getStartTime2().trim() + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (null != cmPayShop.getEndTime2() && !"".equals(cmPayShop.getEndTime2()) && !cmPayShop.getEndTime2().endsWith("23:59:59")) {
|
|
|
+ cmPayShop.setEndTime2(cmPayShop.getEndTime2().trim() + " 23:59:59");
|
|
|
+ }
|
|
|
+ //获取订单数据
|
|
|
+ String fileName = "付款列表.xls";
|
|
|
+ String template = Global.getConfig("export.template");
|
|
|
+ String templateFileName = template + "/payList.xls";
|
|
|
+ try {
|
|
|
+ Map data = new HashMap<String, Object>();
|
|
|
+ List<CmPayShop> list = cmPayShopService.exports(new Page<CmPayShop>(request, response), cmPayShop);
|
|
|
+ data.put("list", list);
|
|
|
+ new ExcelUtil().createExcel(templateFileName, data, fileName, response);
|
|
|
+ } catch (Exception e) {
|
|
|
+ addMessage(redirectAttributes, "收款列表导出失败!" + e.getMessage());
|
|
|
+ logger.info(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping("saveChangePayShopAmount")
|
|
|
public String saveChangePayShopAmount(NewShopOrder newShopOrder) {
|
|
|
String shopOrderID = newShopOrder.getId();
|