统计接口新增1222
This commit is contained in:
@@ -44,7 +44,7 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增:详细列表(表头 + 货物明细 + 照片),不分页
|
* 详细列表(表头 + 货物明细 + 照片),不分页
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('document:order:list')")
|
// @PreAuthorize("@ss.hasPermi('document:order:list')")
|
||||||
@GetMapping("/listWithDetail")
|
@GetMapping("/listWithDetail")
|
||||||
@@ -156,7 +156,6 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
// ======================== 统计接口 ========================
|
// ======================== 统计接口 ========================
|
||||||
|
|
||||||
/** 总览统计 */
|
/** 总览统计 */
|
||||||
//@PreAuthorize("@ss.hasPermi('document:order:stat')")
|
|
||||||
@PostMapping("/stat/overview")
|
@PostMapping("/stat/overview")
|
||||||
public AjaxResult statOverview(@RequestBody DeliveryOrderStatQuery query) {
|
public AjaxResult statOverview(@RequestBody DeliveryOrderStatQuery query) {
|
||||||
DeliveryOverviewStatVO vo = deliveryOrderService.statOverview(query);
|
DeliveryOverviewStatVO vo = deliveryOrderService.statOverview(query);
|
||||||
@@ -164,7 +163,6 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 按配送状态统计 */
|
/** 按配送状态统计 */
|
||||||
//@PreAuthorize("@ss.hasPermi('document:order:stat')")
|
|
||||||
@PostMapping("/stat/status")
|
@PostMapping("/stat/status")
|
||||||
public AjaxResult statByStatus(@RequestBody DeliveryOrderStatQuery query) {
|
public AjaxResult statByStatus(@RequestBody DeliveryOrderStatQuery query) {
|
||||||
List<DeliveryStatusStatVO> list = deliveryOrderService.statByStatus(query);
|
List<DeliveryStatusStatVO> list = deliveryOrderService.statByStatus(query);
|
||||||
@@ -172,7 +170,6 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 按车辆类型统计 */
|
/** 按车辆类型统计 */
|
||||||
//@PreAuthorize("@ss.hasPermi('document:order:stat')")
|
|
||||||
@PostMapping("/stat/vehicleType")
|
@PostMapping("/stat/vehicleType")
|
||||||
public AjaxResult statByVehicleType(@RequestBody DeliveryOrderStatQuery query) {
|
public AjaxResult statByVehicleType(@RequestBody DeliveryOrderStatQuery query) {
|
||||||
List<DeliveryVehicleTypeStatVO> list = deliveryOrderService.statByVehicleType(query);
|
List<DeliveryVehicleTypeStatVO> list = deliveryOrderService.statByVehicleType(query);
|
||||||
@@ -180,7 +177,6 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 按日期(日维度)统计 */
|
/** 按日期(日维度)统计 */
|
||||||
//@PreAuthorize("@ss.hasPermi('document:order:stat')")
|
|
||||||
@PostMapping("/stat/daily")
|
@PostMapping("/stat/daily")
|
||||||
public AjaxResult statByDaily(@RequestBody DeliveryOrderStatQuery query) {
|
public AjaxResult statByDaily(@RequestBody DeliveryOrderStatQuery query) {
|
||||||
List<DeliveryDailyStatVO> list = deliveryOrderService.statByDaily(query);
|
List<DeliveryDailyStatVO> list = deliveryOrderService.statByDaily(query);
|
||||||
@@ -188,10 +184,10 @@ public class DeliveryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 按日期(月维度)统计 */
|
/** 按日期(月维度)统计 */
|
||||||
//@PreAuthorize("@ss.hasPermi('document:order:stat')")
|
|
||||||
@PostMapping("/stat/monthly")
|
@PostMapping("/stat/monthly")
|
||||||
public AjaxResult statByMonthly(@RequestBody DeliveryOrderStatQuery query) {
|
public AjaxResult statByMonthly(@RequestBody DeliveryOrderStatQuery query) {
|
||||||
List<DeliveryMonthlyStatVO> list = deliveryOrderService.statByMonthly(query);
|
List<DeliveryMonthlyStatVO> list = deliveryOrderService.statByMonthly(query);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,10 +289,11 @@
|
|||||||
FROM delivery_order dor
|
FROM delivery_order dor
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- ========== 新增:列表 + 明细 + 附件(listWithDetail 用) ========== -->
|
<!-- ========== 列表 + 明细 + 附件(listWithDetail 用) ========== -->
|
||||||
<select id="selectDeliveryOrderVoList"
|
<select id="selectDeliveryOrderVoList"
|
||||||
parameterType="com.delivery.project.document.domain.DeliveryOrder"
|
parameterType="com.delivery.project.document.domain.DeliveryOrder"
|
||||||
resultMap="DeliveryOrderVoResult">
|
resultMap="DeliveryOrderVoResult">
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
dor.order_no AS order_no,
|
dor.order_no AS order_no,
|
||||||
MAX(dor.bill_no_ck) AS bill_no_ck,
|
MAX(dor.bill_no_ck) AS bill_no_ck,
|
||||||
@@ -323,8 +324,7 @@
|
|||||||
MAX(dor.toll_fee) AS toll_fee,
|
MAX(dor.toll_fee) AS toll_fee,
|
||||||
MAX(dor.total_km) AS total_km,
|
MAX(dor.total_km) AS total_km,
|
||||||
MAX(dor.remark) AS remark
|
MAX(dor.remark) AS remark
|
||||||
FROM
|
FROM delivery_order dor
|
||||||
delivery_order dor
|
|
||||||
<where>
|
<where>
|
||||||
(dor.is_delete = '0' OR dor.is_delete = 0 OR dor.is_delete IS NULL)
|
(dor.is_delete = '0' OR dor.is_delete = 0 OR dor.is_delete IS NULL)
|
||||||
|
|
||||||
@@ -396,7 +396,12 @@
|
|||||||
AND dor.plate_no = #{plateNo}
|
AND dor.plate_no = #{plateNo}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- 配送状态:优先用多选列表 -->
|
<!-- ✅ 新增/确认:接收单位名称(模糊) -->
|
||||||
|
<if test="receiverOrgName != null and receiverOrgName != ''">
|
||||||
|
AND dor.receiver_org_name LIKE CONCAT('%', #{receiverOrgName}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- ✅ 新增/确认:配送状态(多选优先) -->
|
||||||
<if test="orderStatusList != null and orderStatusList.size > 0">
|
<if test="orderStatusList != null and orderStatusList.size > 0">
|
||||||
AND dor.order_status IN
|
AND dor.order_status IN
|
||||||
<foreach collection="orderStatusList" item="st" open="(" separator="," close=")">
|
<foreach collection="orderStatusList" item="st" open="(" separator="," close=")">
|
||||||
@@ -404,11 +409,12 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- 如果没有多选,再用单个状态 -->
|
<!-- ✅ 新增/确认:配送状态(单选兜底) -->
|
||||||
<if test="(orderStatusList == null or orderStatusList.size == 0)
|
<if test="(orderStatusList == null or orderStatusList.size == 0)
|
||||||
and orderStatus != null and orderStatus != ''">
|
and orderStatus != null and orderStatus != ''">
|
||||||
AND dor.order_status = #{orderStatus}
|
AND dor.order_status = #{orderStatus}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
GROUP BY dor.order_no
|
GROUP BY dor.order_no
|
||||||
ORDER BY MAX(dor.create_time) DESC
|
ORDER BY MAX(dor.create_time) DESC
|
||||||
|
|||||||
Reference in New Issue
Block a user