diff --git a/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceController.java b/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceController.java index aaa7804..ff9327a 100644 --- a/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceController.java +++ b/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceController.java @@ -66,6 +66,8 @@ public class InvoiceController { log.debug("{}发票明细列表查询参数:{}", LOGGER_MSG, JsonUtils.getInstance().toJsonString(orderBatchQuery)); //数据转换 Map paramMap = PageBeanConvertUtil.convertToMap(orderBatchQuery); + paramMap.put("pzhStart", orderBatchQuery.getPzhStart()); + paramMap.put("pzhEnd", orderBatchQuery.getPzhEnd()); if (StringUtils.isBlank(orderBatchQuery.getXhfNsrsbh())) { log.error("{},请求税号为空!", LOGGER_MSG); return R.error(OrderValidateEnum.TAXCODE_ISNULL.getKey(), OrderValidateEnum.TAXCODE_ISNULL.getMessage()); diff --git a/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/model/OrderListQuery.java b/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/model/OrderListQuery.java index 2a215d8..8ce0f7c 100644 --- a/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/model/OrderListQuery.java +++ b/order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/model/OrderListQuery.java @@ -260,5 +260,13 @@ public class OrderListQuery { * 短信交付状态 0未交付 1已交付 */ private String shortMsgPushStatus; + /** + * 凭证号排序 + */ + private String pzhStart; + /** + * 订单号排序 + */ + private String pzhEnd; } diff --git a/order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml b/order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml index b2756f5..30c7c30 100644 --- a/order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml +++ b/order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml @@ -1636,6 +1636,12 @@ and CAST(oii.kphjje AS DECIMAL(40,2)) <= CAST(#{map.maxhjje,jdbcType=VARCHAR} as DECIMAL(40,2)) + + and CAST(oi.byzd2 AS UNSIGNED) >= CAST(#{map.pzhStart,jdbcType=VARCHAR} as UNSIGNED) + + + and CAST(oi.byzd2 AS UNSIGNED) <= CAST(#{map.pzhEnd,jdbcType=VARCHAR} as UNSIGNED) + @@ -1649,11 +1655,25 @@ order by check_time desc - - order by CONVERT(oi.byzd2, UNSIGNED) asc,kprq DESC + + order by CASE + WHEN oi.byzd2 IS NULL OR oi.byzd2 = '' THEN 1 + ELSE 0 + END, + CONVERT(oi.byzd2, UNSIGNED) asc,ddh DESC + + + order by CASE + WHEN oi.byzd2 IS NULL OR oi.byzd2 = '' THEN 1 + ELSE 0 + END, + CONVERT(oi.byzd2, UNSIGNED) asc,ddh asc + + + order by CONVERT(oi.byzd2, UNSIGNED) DESC,ddh DESC - - order by CONVERT(oi.byzd2, UNSIGNED) desc,kprq DESC + + order by CONVERT(oi.byzd2, UNSIGNED) DESC,ddh asc ORDER BY kprq DESC