chaoo 3 лет назад
Родитель
Сommit
a98ad07f63

+ 2 - 2
src/main/java/com/caimei365/manager/controller/caimei/finance/FinanceApi.java

@@ -43,8 +43,8 @@ public class FinanceApi {
     /**
      * 收款详情
      */
-    @GetMapping("/receipt/detail")
-    public ResponseJson<ReceiptDetail> getReceiptDetail(Integer id) {
+    @GetMapping("/receipt/{id}")
+    public ResponseJson<ReceiptDetail> getReceiptDetail(@PathVariable("id") Integer id) {
         if (null == id) {
             return ResponseJson.error("收款Id不能为空!", null);
         }

+ 24 - 1
src/main/java/com/caimei365/manager/entity/caimei/ReceiptList.java

@@ -45,6 +45,10 @@ public class ReceiptList implements Serializable {
      * 关联订单类型  与 关联订单号一一对应 "0协销"/"1自主"
      */
     private String orderType;
+    /**
+     * 主订单Id
+     */
+    private Integer orderId;
     /**
      * 关联订单号
      */
@@ -57,5 +61,24 @@ public class ReceiptList implements Serializable {
      * 客户名称后缀,如:星范,呵呵商城
      */
     private String suffix;
-
+    /**
+     * 运费
+     */
+    private String freight;
+    /**
+     * 税费
+     */
+    private String orderTax;
+    /**
+     * 订单金额
+     */
+    private String orderFee;
+    /**
+     * 关联金额
+     */
+    private String associateAmount;
+    /**
+     * 非订单款项的确认原因
+     */
+    private String noOrderReason;
 }

+ 1 - 1
src/main/java/com/caimei365/manager/entity/caimei/ReceiptParam.java

@@ -44,7 +44,7 @@ public class ReceiptParam implements Serializable {
     /**
      * 组织id
      */
-    private Integer organizeId;
+    private String organizeId;
     /**
      * 查询用 订单编号
      */

+ 11 - 2
src/main/resources/mapper/FinanceDao.xml

@@ -71,11 +71,20 @@
         a.payType,
         a.receiptType,
         a.receiptStatus,
+        a.noOrderReason,
         (IF(crr.relationType = '1', cso_cr.orderType, cr.orderType)) AS orderType,
+        (IF(crr.relationType = '1', cso.orderID, cr.orderID)) AS orderId,
         (IF(crr.relationType = '1',
-        CONCAT('子订单',cso.shopOrderNo,'(',cso.shopOrderID,')'),
-        CONCAT(cso.orderNo,'(',cr.orderID,')')
+            CONCAT('子订单',cso.shopOrderNo,'(',cso.shopOrderID,')'),
+            CONCAT(cso.orderNo,'(',cr.orderID,')')
         )) AS orders,
+        (IF(crr.relationType = '1', cso.needPayAmount, cr.payTotalFee)) AS orderFee,
+        (IF(crr.relationType = '1', cso.needPayAmount, crr.associateAmount)) AS associateAmount,
+        IFNULL(cr.freight, 0) AS freight,
+        (IF(crr.relationType = '1',
+            (SELECT sum(cop.totalAddedValueTax) FROM cm_order_product cop WHERE cop.shopOrderID = crr.orderID),
+            (SELECT sum(cop.totalAddedValueTax) FROM cm_order_product cop WHERE cop.orderID = crr.orderID)
+        )) AS orderTax,
         (IF(crr.relationType = '1', IFNULL(u_cr.userName, u_cr.name), IFNULL(u.userName, u.name ))) AS userName,
         (IF(cr.organizeID = '1', '星范', (IF(cr.orderType = '2', '呵呵商城', '')) )) AS suffix
         FROM cm_discern_receipt a