mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
订单管理子单查询异常修复
This commit is contained in:
+3
-2
@@ -332,12 +332,13 @@ public class OrderServiceImpl implements OrderService {
|
||||
// 1. 查询主单ID分页
|
||||
IPage<Long> pageResult = orderMapper.selectMainOrderIds(page, pageReqVO);
|
||||
Long pageResultTotal = pageResult.getTotal();
|
||||
List<Long> records = pageResult.getRecords();
|
||||
|
||||
if (pageResultTotal == 0) {
|
||||
if (pageResultTotal == 0 || CollUtil.isEmpty(records)) {
|
||||
return PageResult.empty();
|
||||
}
|
||||
|
||||
List<Long> orderIds = pageResult.getRecords();
|
||||
List<Long> orderIds = records;
|
||||
// 2. 查询主单
|
||||
List<OrderDO> orderDOS = orderMapper.selectByIds(orderIds);
|
||||
if (CollUtil.isEmpty(orderDOS)) {
|
||||
|
||||
-80
@@ -202,86 +202,6 @@
|
||||
#{parentId}
|
||||
</foreach>
|
||||
|
||||
<if test="reqVO.id != null and reqVO.id != ''">
|
||||
AND CAST(t.id AS CHAR) LIKE CONCAT('%', #{reqVO.id}, '%')
|
||||
</if>
|
||||
|
||||
<if test="reqVO.parentNo != null">
|
||||
AND t.parent_id = #{reqVO.parentNo}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.apiOrderId != null and reqVO.apiOrderId != ''">
|
||||
AND t.api_order_id = #{reqVO.apiOrderId}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.orderDate != null and reqVO.orderDate.length == 2">
|
||||
AND t.order_date BETWEEN #{reqVO.orderDate[0]} AND #{reqVO.orderDate[1]}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.deliveryDate != null and reqVO.deliveryDate.length == 2">
|
||||
AND t.delivery_date BETWEEN #{reqVO.deliveryDate[0]} AND #{reqVO.deliveryDate[1]}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.orderType != null">
|
||||
AND t.order_type = #{reqVO.orderType}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.orderSort != null">
|
||||
AND t.order_sort = #{reqVO.orderSort}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.dataType != null">
|
||||
AND t.data_type = #{reqVO.dataType}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.status != null">
|
||||
AND t.status = #{reqVO.status}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.customOrderNo != null and reqVO.customOrderNo != ''">
|
||||
AND t.custom_order_no LIKE CONCAT('%', #{reqVO.customOrderNo}, '%')
|
||||
</if>
|
||||
|
||||
<if test="reqVO.customer != null and reqVO.customer != ''">
|
||||
AND t.customer = #{reqVO.customer}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.address != null and reqVO.address != ''">
|
||||
AND t.address LIKE CONCAT('%', #{reqVO.address}, '%')
|
||||
</if>
|
||||
|
||||
<if test="reqVO.phoneNumber != null and reqVO.phoneNumber != ''">
|
||||
AND t.phone_number = #{reqVO.phoneNumber}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.dealer != null and reqVO.dealer != ''">
|
||||
AND t.dealer LIKE CONCAT('%', #{reqVO.dealer}, '%')
|
||||
</if>
|
||||
|
||||
<if test="reqVO.dealerPhoneNumber != null and reqVO.dealerPhoneNumber != ''">
|
||||
AND t.dealer_phone_number = #{reqVO.dealerPhoneNumber}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.salesman != null and reqVO.salesman != ''">
|
||||
AND t.salesman = #{reqVO.salesman}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.splitter != null and reqVO.splitter != ''">
|
||||
AND t.splitter = #{reqVO.splitter}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.remark != null and reqVO.remark != ''">
|
||||
AND t.remark = #{reqVO.remark}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.organId != null">
|
||||
AND t.organ_id = #{reqVO.organId}
|
||||
</if>
|
||||
|
||||
<if test="reqVO.createTime != null and reqVO.createTime.length == 2">
|
||||
AND t.create_time BETWEEN #{reqVO.createTime[0]} AND #{reqVO.createTime[1]}
|
||||
</if>
|
||||
|
||||
AND t.deleted = #{reqVO.deleted}
|
||||
|
||||
ORDER BY t.id DESC
|
||||
|
||||
Reference in New Issue
Block a user