zhijiezhao 3 years ago
parent
commit
b3bf325d13

+ 10 - 0
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -51,6 +51,7 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
     private String associationType;//订单关联方式: 1手动 2自动
 
     //	--------------------
+    private String backName;//收款列表优惠券购买人名称回显
     private String orders;//关联订单号
     private String orderType;//关联订单类型  与 关联订单号一一对应
     private String startTime;     //时间开始 查询条件 收款时间
@@ -76,6 +77,15 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
         this.balanceAccountsRemark = balanceAccountsRemark;
     }
 
+
+    public String getBackName() {
+        return backName;
+    }
+
+    public void setBackName(String backName) {
+        this.backName = backName;
+    }
+
     public Integer getOrganizeID() {
         return organizeID;
     }

+ 2 - 0
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -67,9 +67,11 @@
         end) AS "userName",
         (case when crr.relationType = '1' then u_cr.name else u.name
         end) AS "name",
+        IF(crr.relationType = '6',(SELECT NAME FROM USER mu WHERE mu.userId=ccb.userId),'') AS "backname",
         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_coupon_buyrecord ccb ON crr.couponRecordId=ccb.id
         -- 主订单
         left join cm_order cr on cr.orderID = crr.orderID
         left join user u on u.userID = cr.userID

+ 13 - 5
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -181,6 +181,9 @@
                         </c:if>
                         <c:if test="${vo.receiptType == 7}">
                             二手商品上架费
+                        </c:if>
+                        <c:if test="${vo.receiptType == 8}">
+                            优惠券购买费
                         </c:if>
 					</span>
             <span><label>收款类型:</label>${fns:getPayTypeStr(vo.payType)}</span>
@@ -225,7 +228,7 @@
             </div>
         </c:if>
     </div>
-    <c:if test="${vo.receiptType != 2 and vo.receiptType != 6 and vo.receiptType != 7}">
+    <c:if test="${vo.receiptType != 2 and vo.receiptType != 6 and vo.receiptType != 7 and vo.receiptType != 8}">
         <h5>关联订单</h5>
         <div class="receipt-order-form">
             <c:forEach items="${vo.orderInfos}" var="orderInfo">
@@ -427,10 +430,15 @@
                 <span>机构名称:</span>
                 <br/>
                 <span>购买时间:${vo.receiptDate}</span>
-                <span>优惠券类型:</span>
-                <span>满减金额:</span>
-                <span>购买金额:</span>
-                <span>交易号:${receiptRecord.mbOrderId}</span>
+                <span>优惠券类型:
+                    <c:if test="${vo.couponType eq '0'}">活动券</c:if>
+                    <c:if test="${vo.couponType eq '1'}">品类券</c:if>
+                    <c:if test="${vo.couponType eq '2'}">活动券</c:if>
+                    <c:if test="${vo.couponType eq '3'}">店铺券</c:if>
+                </span>
+                <span>满减金额:${vo.couponAmount}</span>
+                <span>购买金额:${vo.receiptAmount}</span>
+                <span>交易号:${vo.mbOrderId}</span>
             </div>
         </div>
     </c:if>

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

@@ -226,16 +226,21 @@
                 <c:if test="${cmDiscernReceipt.receiptOrderType eq 2}">
                     <font color="red">(呵呵商城)</font>
                 </c:if>
+                <c:if test="${cmDiscernReceipt.receiptType eq 8}">
+                    ${cmDiscernReceipt.backName}
+                </c:if>
             </td>
             <td>
                 <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orderType}</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 6}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 7}">-----</c:if>
+                <c:if test="${cmDiscernReceipt.receiptType == 8}">-----</c:if>
             </td>
             <td>
                 <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orders}</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 6}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 7}">-----</c:if>
+                <c:if test="${cmDiscernReceipt.receiptType == 8}">-----</c:if>
             </td>
             <shiro:hasPermission name="order:cmDiscernReceipt:edit">
                 <td>