ソースを参照

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

Aslee 3 年 前
コミット
c1bdd4fe16

+ 17 - 8
src/main/java/com/caimei/modules/order/entity/CmRefundShop.java

@@ -13,13 +13,13 @@ import java.util.List;
  * @version 2019-07-01
  */
 public class CmRefundShop extends DataEntity<CmRefundShop> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String shopID;		// 供应商Id
 	private String shopName;		// 供应商名称
 	private String operator;		// 操作人ID
 	private String operatTime;		// 操作时间
-	private String refundWay;       //退款方式:1线下转账,2余额账号,3线下和余额同时退
+	private String refundWay;       //退款方式:1线下转账,2余额账号,3线下和余额同时退,4收款CRM(供应商退款)
 	private Double refundBalanceAmount;   //退款余额金额(余额账号)
 	private Double refundAmount;		// 退款金额(线下转账)
 	private String refundType;		// 线下转账具体银行
@@ -30,6 +30,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	private String endTime;
 	private String shopOrderIDs; //关联子订单ids
 	private String operatorName; //操作人名称
+	private String crmOperatorName;
 	private String shopOrderID;  //子订单ID
 	private String orderID;      //主订单ID
 	private String orderNo;      //订单编号
@@ -61,7 +62,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setShopID(String shopID) {
 		this.shopID = shopID;
 	}
-	
+
 	@Length(min=0, max=11, message="操作人ID长度必须介于 0 和 11 之间")
 	public String getOperator() {
 		return operator;
@@ -70,7 +71,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setOperator(String operator) {
 		this.operator = operator;
 	}
-	
+
 	@Length(min=0, max=19, message="操作时间长度必须介于 0 和 19 之间")
 	public String getOperatTime() {
 		return operatTime;
@@ -79,7 +80,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setOperatTime(String operatTime) {
 		this.operatTime = operatTime;
 	}
-	
+
 	public Double getRefundAmount() {
 		return refundAmount;
 	}
@@ -87,7 +88,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setRefundAmount(Double refundAmount) {
 		this.refundAmount = refundAmount;
 	}
-	
+
 	@Length(min=0, max=1, message="接收退款方式长度必须介于 0 和 1 之间")
 	public String getRefundType() {
 		return refundType;
@@ -96,7 +97,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setRefundType(String refundWay) {
 		this.refundType = refundWay;
 	}
-	
+
 	@Length(min=0, max=100, message="付款时间长度必须介于 0 和 100 之间")
 	public String getRemark() {
 		return remark;
@@ -155,6 +156,14 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 		this.operatorName = operatorName;
 	}
 
+	public String getCrmOperatorName() {
+		return crmOperatorName;
+	}
+
+	public void setCrmOperatorName(String crmOperatorName) {
+		this.crmOperatorName = crmOperatorName;
+	}
+
 	public String getShopOrderID() {
 		return shopOrderID;
 	}
@@ -210,4 +219,4 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setShopDifference(ChangePayShopDifference shopDifference) {
 		this.shopDifference = shopDifference;
 	}
-}
+}

+ 43 - 36
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -11,6 +11,7 @@ import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.DateUtils;
+import com.thinkgem.jeesite.common.utils.ObjectUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
@@ -71,29 +72,31 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             if ("1".equals(bean.getReceiptType()) || "3".equals(bean.getReceiptType()) || "5".equals(bean.getReceiptType())) {
                 List<Map<String, Object>> orderIDs = cmDiscernReceiptDao.getOrderIDStr(bean.getId());
                 for (Map<String, Object> map : orderIDs) {
-                    if ("".equals(type)) {
-//					协销订单 0 普通订单 1',
-                        Integer orderType = (Integer) map.get("orderType");
-                        if (null != map.get("orderType")) {
-                            type += map.get("orderType").toString().equals("0") ? "协销" : "自主";
+                    if (!ObjectUtils.isEmpty(map)) {
+                        if ("".equals(type)) {
+                            // 协销订单 0 普通订单 1',
+                            Integer orderType = (Integer) map.get("orderType");
+                            if (null != map.get("orderType")) {
+                                type += map.get("orderType").toString().equals("0") ? "协销" : "自主";
+                            } else {
+                                type += "自主";
+                            }
+                            if (2 == orderType) {
+                                //呵呵商城订单
+                                Integer orderId = ((Long) map.get("orderID")).intValue();
+                                NewOrder order = newOrderDao.findByOrderID(orderId);
+                                String name = heHeNewOrderDao.findHeUser(order.getUserID());
+                                bean.setName(name);
+                                bean.setReceiptOrderType("2");
+                            }
                         } else {
-                            type += "自主";
+                            type += ("<br>" + (map.get("orderType").toString().equals("0") ? "协销" : "自主"));
                         }
-                        if (2 == orderType) {
-                            //呵呵商城订单
-                            Integer orderId = ((Long) map.get("orderID")).intValue();
-                            NewOrder order = newOrderDao.findByOrderID(orderId);
-                            String name = heHeNewOrderDao.findHeUser(order.getUserID());
-                            bean.setName(name);
-                            bean.setReceiptOrderType("2");
+                        if ("".equals(no)) {
+                            no += "<a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo") + "</a>";
+                        } else {
+                            no += ("<br><a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo")) + "</a>";
                         }
-                    } else {
-                        type += ("<br>" + (map.get("orderType").toString().equals("0") ? "协销" : "自主"));
-                    }
-                    if ("".equals(no)) {
-                        no += "<a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo") + "</a>";
-                    } else {
-                        no += ("<br><a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo")) + "</a>";
                     }
                 }
             }
@@ -137,29 +140,33 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             ReceiptOrderInfoVo roi = null; //这是通过订单列表上的一条收款记录对应的多个订单中的一个订单
             if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getOrderID());
-                roi.setRelationType("1");
-                if ("5".equals(vo.getReceiptType())) {
-                    //供应商退款,已退金额
-                    List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
-                    if (records != null && records.size() > 0) {
-                        Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
-                        roi.setRefundsAmount(collect);
-                    } else {
-                        roi.setRefundsAmount(0d);
+                if (null != roi) {
+                    roi.setRelationType("1");
+                    if ("5".equals(vo.getReceiptType())) {
+                        //供应商退款,已退金额
+                        List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
+                        if (records != null && records.size() > 0) {
+                            Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                            roi.setRefundsAmount(collect);
+                        } else {
+                            roi.setRefundsAmount(0d);
+                        }
+                        //查询收款供应商退款金额
+                        BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
+                        BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
+                        roi.setRefundsAmount(refundsAmount.doubleValue());
                     }
-                    //查询收款供应商退款金额
-                    BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
-                    BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
-                    roi.setRefundsAmount(refundsAmount.doubleValue());
                 }
             }
             if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());
-                roi.setRelationType("2");
+                if (null != roi) {
+                    roi.setRelationType("2");
+                }
             }
-            if (roi != null) {
+            if (null != roi) {
                 List<ReceiptRecordVo> receiptRecordByOrderID = cmDiscernReceiptDao.findReceiptRecordByOrderID(roi);
-//                暂时不启用抹平明细
+                //                暂时不启用抹平明细
                 if (CollectionUtils.isNotEmpty(receiptRecordByOrderID)) {
                     for (ReceiptRecordVo v : receiptRecordByOrderID) {
                         if (StringUtils.equals("3", v.getConfirmType())) {

+ 9 - 7
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -158,13 +158,15 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 }
             }
             newShopOrders.forEach(shopOrder -> {
-                NewOrder order = newOrderDao.findByOrderID(shopOrder.getOrderID());
-                if ("2".equals(order.getOrderType())) {
-                    //呵呵商城订单
-                    shopOrder.setOrderType(2);
-                    if (StringUtils.isBlank(shopOrder.getClubName())) {
-                        String name = heHeNewOrderDao.findHeUser(order.getUserID());
-                        shopOrder.setClubName(name);
+                if (null != shopOrder) {
+                    NewOrder order = newOrderDao.findByOrderID(shopOrder.getOrderID());
+                    if (null != order && "2".equals(order.getOrderType())) {
+                        //呵呵商城订单
+                        shopOrder.setOrderType(2);
+                        if (StringUtils.isBlank(shopOrder.getClubName())) {
+                            String name = heHeNewOrderDao.findHeUser(order.getUserID());
+                            shopOrder.setClubName(name);
+                        }
                     }
                 }
             });

+ 47 - 12
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -67,18 +67,20 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
             String str = "";
             String ono = "";
             for (String i : idInfo) {
-                String no = i.split("_")[0];
-                String od = i.split("_")[1];
-                String id = i.split("_")[2];
-                if ("".equals(str)) {
-                    str += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
-                } else {
-                    str += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
-                }
-                if ("".equals(ono)) {
-                    ono += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
-                } else {
-                    ono += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                if (StringUtils.isNotEmpty(i)) {
+                    String no = i.split("_")[0];
+                    String od = i.split("_")[1];
+                    String id = i.split("_")[2];
+                    if ("".equals(str)) {
+                        str += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
+                    } else {
+                        str += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
+                    }
+                    if ("".equals(ono)) {
+                        ono += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                    } else {
+                        ono += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                    }
                 }
             }
             crs.setShopOrderIDs(str);
@@ -88,6 +90,39 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
         return page;
     }
 
+    public List<CmRefundShop> exports(Page<CmRefundShop> page, CmRefundShop cmRefundShop){
+        cmRefundShop.setPage(page);
+        List<CmRefundShop> result = cmRefundShopDao.findList(cmRefundShop);
+        for (CmRefundShop crs : result) {
+            List<String> idInfo = cmRefundShopRecordDao.findByRefundShopID(crs.getId());
+            String str = "";
+            String ono = "";
+            for (String i : idInfo) {
+                if (StringUtils.isNotEmpty(i)) {
+                    String no = i.split("_")[0];
+                    String od = i.split("_")[1];
+                    String id = i.split("_")[2];
+                    if ("".equals(str)) {
+                        str += no;
+                    } else {
+                        str += "," + no;
+                    }
+                    if ("".equals(ono)) {
+                        ono += od;
+                    } else {
+                        ono += "," + od;
+                    }
+                }
+            }
+            crs.setShopOrderIDs(str);
+            crs.setOrderNo(ono);
+            if ("4".equals(crs.getRefundWay())){
+                crs.setOperatorName(crs.getCrmOperatorName()+"(CRM)");
+            }
+        }
+        return result;
+    }
+
     @Transactional(readOnly = false)
     public void save(CmRefundShop cmRefundShop) {
         super.save(cmRefundShop);

+ 40 - 14
src/main/java/com/caimei/modules/order/web/CmRefundShopController.java

@@ -1,10 +1,15 @@
 package com.caimei.modules.order.web;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.caimei.modules.common.utils.ExcelUtil;
+import com.caimei.modules.order.entity.CmPayShop;
+import com.caimei.modules.order.entity.CmRefundShop;
+import com.caimei.modules.order.service.CmRefundShopService;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -14,14 +19,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.order.entity.CmRefundShop;
-import com.caimei.modules.order.service.CmRefundShopService;
-
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 退款表--供应商退款给采美Controller
@@ -37,7 +39,7 @@ public class CmRefundShopController extends BaseController {
 
 	@Autowired
 	private CmUserOrganizeService cmUserOrganizeService;
-	
+
 	@ModelAttribute
 	public CmRefundShop get(@RequestParam(required=false) String id) {
 		CmRefundShop entity = null;
@@ -49,7 +51,7 @@ public class CmRefundShopController extends BaseController {
 		}
 		return entity;
 	}
-	
+
 	@RequiresPermissions("order:cmRefundShop:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(CmRefundShop cmRefundShop, HttpServletRequest request, HttpServletResponse response, Model model) {
@@ -69,6 +71,30 @@ public class CmRefundShopController extends BaseController {
 		return "modules/order/cmRefundShopList";
 	}
 
+	@RequestMapping(value = "export")
+	public void exports(CmRefundShop cmRefundShop, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		if (null != cmRefundShop.getStartTime() && !"".equals(cmRefundShop.getStartTime()) && !cmRefundShop.getStartTime().endsWith("00:00:00")) {
+			cmRefundShop.setStartTime(cmRefundShop.getStartTime().trim() + " 00:00:00");
+		}
+		if (null != cmRefundShop.getEndTime() && !"".equals(cmRefundShop.getEndTime()) && !cmRefundShop.getEndTime().endsWith("23:59:59")) {
+			cmRefundShop.setEndTime(cmRefundShop.getEndTime().trim() + " 23:59:59");
+		}
+		//获取订单数据
+		String fileName = "退款记录列表.xls";
+		String template = Global.getConfig("export.template");
+		String templateFileName = template + "/refundShopList.xls";
+		try {
+			Map data = new HashMap<String, Object>();
+			List<CmRefundShop> list = cmRefundShopService.exports(new Page<CmRefundShop>(request, response), cmRefundShop);
+			data.put("list", list);
+			new ExcelUtil().createExcel(templateFileName, data, fileName, response);
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "退款记录列表导出失败!" + e.getMessage());
+			logger.info(e.getMessage());
+			e.printStackTrace();
+		}
+	}
+
 	@RequiresPermissions("order:cmRefundShop:view")
 	@RequestMapping(value = "form")
 	public String form(CmRefundShop cmRefundShop, Model model) {
@@ -86,7 +112,7 @@ public class CmRefundShopController extends BaseController {
 		addMessage(redirectAttributes, "保存退款表--供应商退款给采美成功");
 		return "redirect:"+Global.getAdminPath()+"/order/cmRefundShop/?repage";
 	}
-	
+
 	@RequiresPermissions("order:cmRefundShop:delete")
 	@RequestMapping(value = "delete")
 	public String delete(CmRefundShop cmRefundShop, RedirectAttributes redirectAttributes) {
@@ -145,4 +171,4 @@ public class CmRefundShopController extends BaseController {
 		}
 		return "redirect:"+Global.getAdminPath()+"/order/cmRefundShop/?repage";
 	}
-}
+}

+ 1 - 0
src/main/java/com/thinkgem/jeesite/common/service/CrudService.java

@@ -11,6 +11,7 @@ import com.caimei.modules.bulkpurchase.entity.PurchaseProduct;
 import com.caimei.modules.hehe.entity.HeheOrder;
 import com.caimei.modules.hehe.entity.HeheProduct;
 import com.caimei.modules.hehe.entity.HeheTransaction;
+import com.caimei.modules.order.entity.CmRefundShop;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

+ 0 - 150
src/main/resources/config/alpha/caimei.properties

@@ -1,150 +0,0 @@
-#============================#
-#===== Database sttings =====#
-#============================#
-
-#oracle database settings
-#jdbc.type=oracle
-#jdbc.driver=oracle.jdbc.driver.OracleDriver
-#jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
-#jdbc.username=root
-#jdbc.password=123456
-
-#mysql database setting
-jdbc.type=mysql
-jdbc.driver=com.mysql.jdbc.Driver
-jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-jdbc.username=developer
-jdbc.password=05bZ/OxTB:X+yd%1
-
-#mssql database settings
-#jdbc.type=mssql
-#jdbc.driver=net.sourceforge.jtds.jdbc.Driver
-#jdbc.url=jdbc:jtds:sqlserver://localhost:1433/jeesite
-#jdbc.username=sa
-#jdbc.password=sa
-
-#pool settings
-jdbc.pool.init=1
-jdbc.pool.minIdle=3
-jdbc.pool.maxActive=20
-
-#jdbc.testSql=SELECT 'x'
-jdbc.testSql=SELECT 'x' FROM DUAL
-
-#redis settings
-redis.keyPrefix=caimei
-redis.host=192.168.2.100
-redis.port=6379
-redis.pass=123456
-redis.timeout=100000
-#\u6700\u5927\u8FDE\u63A5\u6570
-redis.pool.maxActive=300
-#\u6700\u5927\u7A7A\u95F2\u6570
-redis.pool.maxIdle=100
-redis.pool.minIdle=10
-#\u6700\u5927\u5EFA\u7ACB\u8FDE\u63A5\u7B49\u5F85\u65F6\u95F4
-redis.pool.maxWait=1000
-redis.pool.maxTotal=6000
-
-#============================#
-#===== System settings ======#
-#============================#
-
-#\u4EA7\u54C1\u4FE1\u606F\u8BBE\u7F6E
-productName=\u91C7\u7F8E\u5FAE\u4FE1\u540E\u53F0
-copyrightYear=2014-2021
-version=V6.3.2
-
-#\u6F14\u793A\u6A21\u5F0F: \u4E0D\u80FD\u64CD\u4F5C\u548C\u4FDD\u5B58\u7684\u6A21\u5757\uFF1A sys: area/office/user/role/menu/dict, cms: site/category
-demoMode=false
-
-#\u7BA1\u7406\u57FA\u7840\u8DEF\u5F84, \u9700\u540C\u6B65\u4FEE\u6539\uFF1Aweb.xml
-adminPath=/a
-
-#\u524D\u7AEF\u57FA\u7840\u8DEF\u5F84
-frontPath=/f
-
-#\u7F51\u7AD9URL\u540E\u7F00
-urlSuffix=.html
-
-#\u662F\u5426\u4E0D\u5141\u8BB8\u5237\u65B0\u4E3B\u9875\uFF0C\u4E0D\u5141\u8BB8\u60C5\u51B5\u4E0B\uFF0C\u5237\u65B0\u4E3B\u9875\u4F1A\u5BFC\u81F4\u91CD\u65B0\u767B\u5F55
-notAllowRefreshIndex=false
-
-#\u662F\u5426\u5141\u8BB8\u591A\u8D26\u53F7\u540C\u65F6\u767B\u5F55
-user.multiAccountLogin=true
-
-#\u5206\u9875\u914D\u7F6E
-page.pageSize=30
-
-#\u7855\u6B63\u7EC4\u4EF6\u662F\u5426\u4F7F\u7528\u7F13\u5B58
-supcan.useCache=false
-
-#\u901A\u77E5\u95F4\u9694\u65F6\u95F4\u8BBE\u7F6E, \u5355\u4F4D\uFF1A\u6BEB\u79D2, 30s=30000ms, 60s=60000ms
-oa.notify.remind.interval=60000
-
-#============================#
-#==== Framework settings ====#
-#============================#
-
-#\u4F1A\u8BDD\u8D85\u65F6\uFF0C \u5355\u4F4D\uFF1A\u6BEB\u79D2\uFF0C 20m=1200000ms, 30m=1800000ms, 60m=3600000ms
-session.sessionTimeout=21600000
-#\u4F1A\u8BDD\u6E05\u7406\u95F4\u9694\u65F6\u95F4\uFF0C \u5355\u4F4D\uFF1A\u6BEB\u79D2\uFF0C2m=120000ms\u3002
-session.sessionTimeoutClean=120000
-
-#\u7F13\u5B58\u8BBE\u7F6E
-ehcache.configFile=cache/ehcache-local.xml
-#ehcache.configFile=cache/ehcache-rmi.xml
-
-#\u7D22\u5F15\u9875\u8DEF\u5F84
-web.view.index=/a
-
-#\u89C6\u56FE\u6587\u4EF6\u5B58\u653E\u8DEF\u5F84
-web.view.prefix=/WEB-INF/views/
-web.view.suffix=.jsp
-
-#\u6700\u5927\u6587\u4EF6\u4E0A\u4F20\u9650\u5236\uFF0C\u5355\u4F4D\u5B57\u8282. 30M=10*1024*1024*3(B)=10485760 bytes\uFF0C\u9700\u540C\u6B65\u4FEE\u6539\uFF1Ackfinder.xml
-web.maxUploadSize=104857600
-
-#\u65E5\u5FD7\u62E6\u622A\u8BBE\u7F6E\uFF0C\u6392\u9664\u7684URI\uFF1B\u5305\u542B @RequestMapping\u6CE8\u89E3\u7684value\u3002\uFF08\u5DF2\u4F5C\u5E9F\uFF09
-#web.logInterceptExcludeUri=/, /login, /sys/menu/tree, /sys/menu/treeData, /oa/oaNotify/self/count
-#web.logInterceptIncludeRequestMapping=save, delete, import, updateSort
-
-#\u9759\u6001\u6587\u4EF6\u540E\u7F00
-web.staticFile=.css,.js,.png,.jpg,.gif,.jpeg,.bmp,.ico,.swf,.psd,.htc,.htm,.html,.crx,.xpi,.exe,.ipa,.apk
-
-#\u5355\u70B9\u767B\u5F55CAS\u8BBE\u7F6E
-cas.server.url=http://127.0.0.1:8180/cas
-cas.project.url=http://127.0.0.1:8080/jeesite
-
-#\u5DE5\u4F5C\u6D41\u8BBE\u7F6E
-activiti.isSynActivitiIndetity=false
-activiti.export.diagram.path=c:/activiti_diagram
-#activiti font (windows font: \u5B8B\u4F53  linux font: simsun)
-activiti.diagram.activityFontName=\u5B8B\u4F53
-activiti.diagram.labelFontName=\u5B8B\u4F53
-#activiti\u5916\u90E8\u8868\u5355\u6839\u5730\u5740\u914D\u7F6E
-activiti.form.server.url=
-
-#\u4E0A\u4F20\u6587\u4EF6\u7EDD\u5BF9\u8DEF\u5F84, \u8DEF\u5F84\u4E2D\u4E0D\u5141\u8BB8\u5305\u542B\u201Cuserfiles\u201D
-#userfiles.basedir=D:/jeesite
-
-#\u5DE5\u7A0B\u8DEF\u5F84\uFF0C\u5728\u4EE3\u7801\u751F\u6210\u65F6\u83B7\u53D6\u4E0D\u5230\u5DE5\u7A0B\u8DEF\u5F84\u65F6\uFF0C\u53EF\u518D\u6B64\u6307\u5B9A\u7EDD\u5BF9\u8DEF\u5F84\u3002
-#projectPath=D\:\\workspace\\jeesite
-
-#\u7528\u6237\u5546\u54C1\u4EF7\u683C\u8FC7\u5C0F\u90AE\u4EF6\u63D0\u793A
-user.mails=jun.li@caimei365.com
-
-#\u6613\u5B9D\u652F\u4ED8
-yeepay.appkey=BM12345678902069
-yeepay.secretKey=OH6huQqihk0ZfGzWgR1WcQ==
-yeepay.secretRoot=https://openapi.yeepay.com/yop-center
-yeepay.divideCallback=http://localhost:8181/a/order/newShouldPay/divideCallback
-yeepay.mails=jun.li@caimei365.com
-
-#�˷���ƷĬ��ID
-freightProductID=999
-
-#商品资料库文件临时路径
-archive.tempPath=/mnt/newdatadrive/data/runtime/tomcat-instance/manager/tempFile/
-#ffmpeg路径
-ffmpeg.path=D:\\workSoftWare\\ffmpeg\\bin\\ffmpeg.exe

+ 0 - 62
src/main/resources/config/alpha/dfs_client.conf

@@ -1,62 +0,0 @@
-# connect timeout in seconds
-# default value is 30s
-connect_timeout=30
-
-# network timeout in seconds
-# default value is 30s
-network_timeout=60
-
-# the base path to store log files
-base_path=/home/yuqing/fastdfs
-
-# tracker_server can ocur more than once, and tracker_server format is
-#  "host:port", host can be hostname or ip address
-tracker_server=10.205.56.79:22122
-
-#standard log level as syslog, case insensitive, value list:
-### emerg for emergency
-### alert
-### crit for critical
-### error
-### warn for warning
-### notice
-### info
-### debug
-log_level=info
-
-# if use connection pool
-# default value is false
-# since V4.05
-use_connection_pool = false
-
-# connections whose the idle time exceeds this time will be closed
-# unit: second
-# default value is 3600
-# since V4.05
-connection_pool_max_idle_time = 3600
-
-# if load FastDFS parameters from tracker server
-# since V4.05
-# default value is false
-load_fdfs_parameters_from_tracker=false
-
-# if use storage ID instead of IP address
-# same as tracker.conf
-# valid only when load_fdfs_parameters_from_tracker is false
-# default value is false
-# since V4.05
-use_storage_id = false
-
-# specify storage ids filename, can use relative or absolute path
-# same as tracker.conf
-# valid only when load_fdfs_parameters_from_tracker is false
-# since V4.05
-storage_ids_filename = storage_ids.conf
-
-
-#HTTP settings
-http.tracker_server_port=80
-
-#use "#include" directive to include HTTP other settiongs
-##include http.conf
-

+ 0 - 7
src/main/resources/config/alpha/dfs_pool.properties

@@ -1,7 +0,0 @@
-### 连接池配置 ##############################################
-# 最大链接数
-pool.maxTotal=8
-# 最大空闲连接数
-pool.maxIdle=4
-# 最大等待时间(毫秒)
-pool.maxWaitMillis=5000

+ 0 - 33
src/main/resources/config/alpha/log4j.properties

@@ -1,33 +0,0 @@
-# Output pattern : date [thread] priority category - message   FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7
-log4j.rootLogger=WARN, Console, DailyRolling
-
-#Console
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.Target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{3} >> %m%n
-
-#DailyRolling
-log4j.appender.DailyRolling=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DailyRolling.File=${catalina.base}/logs/manager.log
-log4j.appender.DailyRolling.DatePattern='.'yyyy-MM-dd
-log4j.appender.DailyRolling.layout=org.apache.log4j.PatternLayout
-log4j.appender.DailyRolling.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p] %c{3} >> %m%n
-
-#log4j.logger.java.sql=DEBUG
-
-#Springframework level
-#log4j.logger.org.springframework=ERROR
-
-#Hibernate level
-#log4j.logger.net.sf.ehcache.config.CacheConfiguration=ERROR
-
-#Project defalult level
-#log4j.logger.org.activiti.engine.impl.persistence=DEBUG
-#log4j.logger.org.apache.shiro=DEBUG
-log4j.logger.com.thinkgem.jeesite=DEBUG
-log4j.logger.com.caimei=DEBUG
-log4j.logger.com.thinkgem.jeesite.common.security.shiro=WARN
-log4j.logger.com.thinkgem.jeesite.common.utils.JedisUtils=WARN
-log4j.logger.com.thinkgem.jeesite.modules.sys.web.LoginController=WARN
-log4j.logger.com.thinkgem.jeesite.modules.oa.dao.OaNotifyDao.findCount=WARN

BIN
src/main/resources/export/refundShopList.xls


+ 9 - 3
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -60,16 +60,22 @@
     </select>
 
     <select id="findList" resultType="CmDiscernReceipt">
+        -- 	relationType值为1是为子订单ID,为2时为主订单ID)
         SELECT
-        <include refid="cmDiscernReceiptColumns"/>
-        ,IF(a.receiptType='3',u_cr.userName,u.userName) AS "userName",IF(a.receiptType='3',u_cr.name,u.name) AS "name",
+        <include refid="cmDiscernReceiptColumns"/>,
+        (case when crr.relationType = '1' then u_cr.userName else u.userName
+        end) AS "userName",
+        (case when crr.relationType = '1' then u_cr.name else u.name
+        end) AS "name",
         cr.organizeID AS organizeID
         FROM cm_discern_receipt a
         left join cm_receipt_order_relation crr on crr.receiptID = a.id and crr.delFlag = '0'
+        -- 主订单
         left join cm_order cr on cr.orderID = crr.orderID
+        left join user u on u.userID = cr.userID
+        -- 子订单
         left join cm_shop_order cso on cso.shopOrderID = crr.orderID
         left join cm_order cso_cr on cso.orderID = cso_cr.orderID
-        left join user u on u.userID = cr.userID
         LEFT JOIN USER u_cr ON u_cr.userID = cso_cr.userID
         <where>
             <if test="id != null and id != '' and id != 0 ">

+ 18 - 14
src/main/resources/mappings/modules/order/CmRefundShopMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.order.dao.CmRefundShopDao">
-    
+
 	<sql id="cmRefundShopColumns">
 		a.id AS "id",
 		a.shopID AS "shopID",
@@ -14,31 +14,35 @@
 		a.refundBalanceAmount AS "refundBalanceAmount",
 		a.delFlag AS "delFlag"
 	</sql>
-	
+
 	<sql id="cmRefundShopJoins">
 	</sql>
-    
+
 	<select id="get" resultType="CmRefundShop">
-		SELECT 
+		SELECT
 			<include refid="cmRefundShopColumns"/>,
-			s.name AS shopName
+			s.name AS shopName,
+		    up.name AS crmOperatorName
 		FROM cm_refund_shop a
 		<include refid="cmRefundShopJoins"/>
 		left join shop s on s.shopID = a.shopID
+		left join receipt_user_permission up on up.id = a.operator
 		WHERE a.id = #{id}
 		AND a.delFlag='0'
 	</select>
-	
+
 	<select id="findList" resultType="CmRefundShop">
 		SELECT DISTINCT
 			<include refid="cmRefundShopColumns"/>,
 			crsr.refundType AS recordRefundType,
 			u.name AS operatorName,
+			up.name AS crmOperatorName,
 			s.name AS shopName
 		FROM cm_refund_shop a
 		LEFT JOIN cm_refund_shop_record crsr ON crsr.refundShopID = a.id
 		left join shop s on s.shopID = a.shopID
 		left join sys_user u on u.id = a.operator
+		left join receipt_user_permission up on up.id = a.operator
 		<where>
 			<if test="organizeID != null and organizeID != 9999 and organizeID != 0 ">
 				AND a.id IN (
@@ -102,15 +106,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmRefundShop">
-		SELECT 
+		SELECT
 			<include refid="cmRefundShopColumns"/>
 		FROM cm_refund_shop a
 		<include refid="cmRefundShopJoins"/>
 		<where>
 			AND a.delFlag='0'
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -119,7 +123,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert" parameterType="CmRefundShop"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO cm_refund_shop(
 			id,
@@ -145,9 +149,9 @@
 			#{delFlag}
 		)
 	</insert>
-	
+
 	<update id="update">
-		UPDATE cm_refund_shop SET 	
+		UPDATE cm_refund_shop SET
 			shopID = #{shopID},
 			operator = #{operator},
 			operatTime = #{operatTime},
@@ -159,7 +163,7 @@
 			delFlag = #{delFlag}
 		WHERE id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		DELETE FROM cm_refund_shop
 		WHERE id = #{id}
@@ -192,4 +196,4 @@
 		group by cfs.id
 		ORDER BY cfs.operatTime desc;
 	</select>
-</mapper>
+</mapper>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -220,12 +220,12 @@
                     <span class="org-note">星范</span>
                 </c:if>
                     ${cmDiscernReceipt.name}
+                <c:if test="${cmDiscernReceipt.name eq null or cmDiscernReceipt.name  == ''}">
+                    ${cmDiscernReceipt.userName}
+                </c:if>
                 <c:if test="${cmDiscernReceipt.receiptOrderType eq 2}">
                     <font color="red">(呵呵商城)</font>
                 </c:if>
-                <c:if test="${cmDiscernReceipt.organizeID == 3}">
-
-                </c:if>
             </td>
             <td>
                 <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orderType}</c:if>

+ 8 - 2
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp

@@ -247,7 +247,7 @@
 					<label>接收退款方式:</label>
 					<div>
 						<div class="refund-wrapper">
-							<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
+							<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
 								线下转账:
 								<c:if test="${cmRefundShop.refundType == '1'}">
 									建设银行7297
@@ -268,6 +268,9 @@
 									虚拟银行0000
 								</c:if>
 								,¥${cmRefundShop.refundAmount}
+								<c:if test="${cmRefundShop.refundWay eq 4}">
+									,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
+								</c:if>
 							</c:if>
 						</div>
 						<div class="refund-wrapper">
@@ -296,7 +299,7 @@
 				<ul><b>接收退款方式:</b></ul>
 				<div style="margin-left: 100px">
 					<div class="refund-wrapper">
-						<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
+						<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
 							线下转账:
 							<c:if test="${cmRefundShop.refundType == '1'}">
 								建设银行7297
@@ -317,6 +320,9 @@
 								虚拟银行0000
 							</c:if>
 							,¥${cmRefundShop.refundAmount}
+							<c:if test="${cmRefundShop.refundWay eq 4}">
+								,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
+							</c:if>
 						</c:if>
 					</div>
 					<div class="refund-wrapper">

+ 16 - 3
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopList.jsp

@@ -40,6 +40,12 @@
 			$("#searchForm").submit();
         	return false;
         }
+		$(function () {
+			$('#export').click(function () {
+				var formData = $('#searchForm').serialize();
+				window.location.href = "${ctx}/order/cmRefundShop/export?" + formData;
+			});
+		})
 	</script>
 </head>
 <body>
@@ -82,7 +88,8 @@
 					<form:options items="${cmUserOrganizeList}" itemLabel="organizeName" itemValue="id"
 								  htmlEscape="false"/>
 				</form:select>
-				<input id="btnSubmit"  class="btn btn-primary"  type="submit" value="查询"  style="width:120px;margin-left:730px;"/>
+				<input id="btnSubmit"  class="btn btn-primary"  type="submit" value=" 查询 " style="padding-left:50px;padding-right:50px;margin:0 20px;"/>
+				<input id="export" class="btn btn-primary" value="导出筛选结果"/>
 				<div class="clearfix"></div>
 			</div>
 		</div>
@@ -114,11 +121,17 @@
 				</td>
 				<td>${cmRefundShop.shopOrderIDs}</td>
 				<td>${cmRefundShop.orderNo}</td>
-				<td>${cmRefundShop.operatorName}</td>
+				<td><c:if test="${cmRefundShop.refundWay ne 4}">
+						${cmRefundShop.operatorName}
+					</c:if>
+					<c:if test="${cmRefundShop.refundWay eq 4}">
+						${cmRefundShop.crmOperatorName}(CRM)
+					</c:if>
+				</td>
 				<td>${cmRefundShop.operatTime}</td>
 				<shiro:hasPermission name="order:cmRefundShop:view"><td>
     				<a href="${ctx}/order/cmRefundShop/toRefund?id=${cmRefundShop.id}">查看详情</a>&nbsp&nbsp
-					<c:if test="${cmRefundShop.recordRefundType ne 5}">
+					<c:if test="${cmRefundShop.recordRefundType ne 5 and cmRefundShop.refundWay ne 4}">
 						<a href="${ctx}/order/cmRefundShop/revocation?id=${cmRefundShop.id}" onclick="return confirmx('确定撤销此次退款吗?', this.href)">撤销退款</a>
 					</c:if>
 				</td></shiro:hasPermission>