Parcourir la source

首付款状态查询

zhang song il y a 6 ans
Parent
commit
58d6622332

+ 16 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/controller/CarOrderController.java

@@ -83,6 +83,22 @@ public class CarOrderController extends BaseController {
         return Result.success(true, result);
     }
 
+    /**
+     * <p>退订订单分页查询。</p>
+     */
+    @ApiOperation(value = "分页获取选配车订单表数据", notes = "根据条件获取")
+    @RequestMapping(value = "/backPage", method = RequestMethod.GET)
+    public Result backPage(Page page, CarOrder record) {
+
+        Map<String, Object> result = new HashMap<>();
+
+        List<CarOrder> pp = carOrderService.getBackByPage(page, record);
+
+        result.put("page", page);
+        result.put("pp", pp);
+        return Result.success(true, result);
+    }
+
     /**
      * <p>保存。</p>
      */

+ 7 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/dao/CarOrderDao.java

@@ -20,4 +20,11 @@ public interface CarOrderDao extends BaseDao<CarOrder> {
      * @return
      */
    List<CarOrder> queryOfflineByPage(Map<String, Object> parameter);
+
+    /**
+     * 查询退订订单
+     * @param parameter
+     * @return
+     */
+   List<CarOrder> queryBackByPage(Map<String, Object> parameter);
 }

+ 7 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/service/CarOrderService.java

@@ -2,8 +2,10 @@ package com.pine.admin.modules.business.service;
 
 import com.pine.admin.modules.base.binder.BaseService;
 import com.pine.admin.modules.business.entity.CarOrder;
+import com.pine.common.dto.Page;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 选配车订单表
@@ -35,5 +37,10 @@ public interface CarOrderService extends BaseService<CarOrder> {
      * 查询退款
      */
     String refund(String orderId,String customerId);
+
+    /**
+     * 查询退订订单
+     */
+    List<CarOrder>  getBackByPage(Page page,CarOrder  record);
 }
 

+ 22 - 2
pine-admin/src/main/java/com/pine/admin/modules/business/service/impl/CarOrderServiceImpl.java

@@ -55,6 +55,26 @@ public class CarOrderServiceImpl implements CarOrderService {
 
         return null;
     }
+    @Override
+    public List<CarOrder> getBackByPage(Page page, CarOrder record) {
+        log.info("getBackByPage");
+        try {
+            if (!ShiroUtils.getShiroUserInfo().getUserName().contains("超级管理员")) {
+                record.setCarSupplier(ShiroUtils.getShiroUserInfo().getUserName());
+            }
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put("page", page);
+
+            return carOrderDao.queryBackByPage(parameter);
+
+        }catch (Exception e){
+            log.error("getBackByPage", e);
+
+        }
+        return null;
+    }
+
 
     @Override
     @Transactional
@@ -63,8 +83,7 @@ public class CarOrderServiceImpl implements CarOrderService {
         log.info("getCarOrderByPage");
         try {
 
-            //TODO 目前提供的测试账号查询不到数据 暂时查询所有的 注释去掉即可根据登录用户查询
-            //TODO 首付/尾款支付状态查询
+            // 首付/尾款支付状态查询
 
             if (!ShiroUtils.getShiroUserInfo().getUserName().contains("超级管理员")) {
                 record.setCarSupplier(ShiroUtils.getShiroUserInfo().getUserName());
@@ -391,6 +410,7 @@ public class CarOrderServiceImpl implements CarOrderService {
 
     }
 
+
     private CarOrder getCarOrder(Long id) {
         CarOrder carOrder = new CarOrder();
         carOrder.setId(id);

+ 61 - 0
pine-admin/src/main/resources/mapper/business/CarOrderDao.xml

@@ -396,6 +396,67 @@
         </where>
         order by id desc
     </select>
+    <!-- 查询退订订单  -->
+    <select id="queryBackByPage" parameterType="java.util.Map"  resultMap="offlinePayments">
+        select lco.* from ls_car_order lco JOIN ls_car_back_order lcbo on lco.`code` =
+        lcbo.order_code
+        <where>
+            <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and lco.code = #{record.code}
+            </if>
+            <if test="record.payType != null and !&quot;&quot;.equals(record.payType)">
+                and lco.pay_type = #{record.payType}
+            </if>
+            <if test="record.status != null and !&quot;&quot;.equals(record.status)">
+                and lco.status = #{record.status}
+            </if>
+            <if test="record.loanStatus != null and !&quot;&quot;.equals(record.loanStatus)">
+                and lco.loan_status = #{record.loanStatus}
+            </if>
+            <if test="record.carId != null and !&quot;&quot;.equals(record.carId)">
+                and lco.car_id = #{record.carId}
+            </if>
+            <if test="record.pickedCarInformation != null and !&quot;&quot;.equals(record.pickedCarInformation)">
+                and lco.picked_car_information = #{record.pickedCarInformation}
+            </if>
+            <if test="record.loanInstalmentCount != null and !&quot;&quot;.equals(record.loanInstalmentCount)">
+                and lco.loan_instalment_count = #{record.loanInstalmentCount}
+            </if>
+            <if test="record.loanRate != null and !&quot;&quot;.equals(record.loanRate)">
+                and lco.loan_rate = #{record.loanRate}
+            </if>
+            <if test="record.downPaymentRate != null and !&quot;&quot;.equals(record.downPaymentRate)">
+                and lco.down_payment_rate = #{record.downPaymentRate}
+            </if>
+            <if test="record.realDownPaymentRate != null and !&quot;&quot;.equals(record.realDownPaymentRate)">
+                and lco.real_down_payment_rate = #{record.realDownPaymentRate}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and lco.name = #{record.name}
+            </if>
+            <if test="record.mobile != null and !&quot;&quot;.equals(record.mobile)">
+                and lco.mobile = #{record.mobile}
+            </if>
+            <if test="record.idCard != null and !&quot;&quot;.equals(record.idCard)">
+                and lco.id_card = #{record.idCard}
+            </if>
+            <if test="record.pickCity != null and !&quot;&quot;.equals(record.pickCity)">
+                and lco.pick_city = #{record.pickCity}
+            </if>
+            <if test="record.carSupplier != null and !&quot;&quot;.equals(record.carSupplier)">
+                and lco.car_supplier = #{record.carSupplier}
+            </if>
+            <if test="record.carSupplierNo != null and !&quot;&quot;.equals(record.carSupplierNo)">
+                and lco.car_supplier_no = #{record.carSupplierNo}
+            </if>
+            <if test="record.cancelReason != null and !&quot;&quot;.equals(record.cancelReason)">
+                and lco.cancel_reason = #{record.cancelReason}
+            </if>
+            and lco.loan_status != 2
+            and lco.status != 1
+        </where>
+        order by lco.id desc
+    </select>
 
     <!-- 查询未支付和线下支付的  -->
     <select id="queryOfflineByPage" parameterType="java.util.Map"