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