Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
68248677
Commit
68248677
authored
Nov 28, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单列表相关统计业务修正
parent
066fe581
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
147 additions
and
2022 deletions
+147
-2022
OrderMapper.java
...coder/yudao/module/order/dal/mysql/order/OrderMapper.java
+1
-1934
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+79
-79
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+67
-9
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/order/OrderMapper.java
View file @
68248677
This source diff could not be displayed because it is too large. You can
view the blob
instead.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
68248677
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
68248677
...
@@ -7296,10 +7296,33 @@
...
@@ -7296,10 +7296,33 @@
<select
id=
"statisticsMyOrder"
resultType=
"cn.iocoder.yudao.module.order.vo.order.StatisticsOrderVO"
>
<select
id=
"statisticsMyOrder"
resultType=
"cn.iocoder.yudao.module.order.vo.order.StatisticsOrderVO"
>
select
select
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.cartonsNum'), 0)) as total_num,
<choose>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.volume'), 0)) as total_volume,
<when
test=
"query.beginWarehouseInTime != null and query.endWarehouseInTime != null"
>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.weight'), 0)) as total_weight,
SUM(IFNULL(wi.cartons_num, 0)) as total_num,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.quantityAll'), 0)) as order_quantity,
SUM(IFNULL(wi.volume, 0)) as total_volume,
SUM(IFNULL(wi.weight, 0)) as total_weight,
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
</when>
<when
test=
"query.beginRucangTime != null and query.endRucangTime != null"
>
SUM(IFNULL(wi.cartons_num, 0)) as total_num,
SUM(IFNULL(wi.volume, 0)) as total_volume,
SUM(IFNULL(wi.weight, 0)) as total_weight,
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
</when>
<otherwise>
<choose>
<when
test=
"query.beginPickUpTime != null and query.endPickUpTime != null"
>
SUM(IFNULL(select SUM(IFNULL(op.pick_num, 0)) from ecw_order_pickup op where op.order_id = o.order_no and op.deleted = 0, 0)) as total_num,
</when>
<otherwise>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.cartonsNum'), 0)) as total_num,
</otherwise>
</choose>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.volume'), 0)) as total_volume,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.weight'), 0)) as total_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.quantityAll'), 0)) as order_quantity,
</otherwise>
</choose>
SUM(IFNULL(it.w_volume,0)) as total_w_volume,
SUM(IFNULL(it.w_volume,0)) as total_w_volume,
SUM(IFNULL(it.v_weight,0)) as total_v_weight,
SUM(IFNULL(it.v_weight,0)) as total_v_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, IF(it.charge_weight > it.min_metering_weight ,it.charge_weight,it.min_metering_weight)), 0)) as total_charge_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, IF(it.charge_weight > it.min_metering_weight ,it.charge_weight,it.min_metering_weight)), 0)) as total_charge_weight,
...
@@ -7313,6 +7336,12 @@
...
@@ -7313,6 +7336,12 @@
left join ecw_order_consignor nor on nor.order_id = o.order_id and nor.deleted = 0
left join ecw_order_consignor nor on nor.order_id = o.order_id and nor.deleted = 0
left join ecw_order_consignee nee on nee.order_id = o.order_id and nee.deleted = 0
left join ecw_order_consignee nee on nee.order_id = o.order_id and nee.deleted = 0
left join ecw_channel channel on channel.channel_id = o.channel_id
left join ecw_channel channel on channel.channel_id = o.channel_id
<if
test=
"query.beginWarehouseInTime != null and query.endWarehouseInTime != null "
>
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
</if>
<if
test=
"query.beginRucangTime != null and query.endRucangTime != null "
>
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
</if>
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
<if
test =
"query.deptId != null "
>
<if
test =
"query.deptId != null "
>
AND o.dept_id = #{query.deptId}
AND o.dept_id = #{query.deptId}
...
@@ -7328,10 +7357,33 @@
...
@@ -7328,10 +7357,33 @@
</select>
</select>
<select
id=
"statisticsOrder"
resultType=
"cn.iocoder.yudao.module.order.vo.order.StatisticsOrderVO"
>
<select
id=
"statisticsOrder"
resultType=
"cn.iocoder.yudao.module.order.vo.order.StatisticsOrderVO"
>
select
select
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.cartonsNum'), 0)) as total_num,
<choose>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.volume'), 0)) as total_volume,
<when
test=
"query.beginWarehouseInTime != null and query.endWarehouseInTime != null"
>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.weight'), 0)) as total_weight,
SUM(IFNULL(wi.cartons_num, 0)) as total_num,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.quantityAll'), 0)) as order_quantity,
SUM(IFNULL(wi.volume, 0)) as total_volume,
SUM(IFNULL(wi.weight, 0)) as total_weight,
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
</when>
<when
test=
"query.beginRucangTime != null and query.endRucangTime != null"
>
SUM(IFNULL(wi.cartons_num, 0)) as total_num,
SUM(IFNULL(wi.volume, 0)) as total_volume,
SUM(IFNULL(wi.weight, 0)) as total_weight,
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
</when>
<otherwise>
<choose>
<when
test=
"query.beginPickUpTime != null and query.endPickUpTime != null"
>
SUM(IFNULL(select SUM(IFNULL(op.pick_num, 0)) from ecw_order_pickup op where op.order_id = o.order_no and op.deleted = 0, 0)) as total_num,
</when>
<otherwise>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.cartonsNum'), 0)) as total_num,
</otherwise>
</choose>
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.volume'), 0)) as total_volume,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.weight'), 0)) as total_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, it.warehouse_in_info->>'$.quantityAll'), 0)) as order_quantity,
</otherwise>
</choose>
SUM(IFNULL(it.w_volume,0)) as total_w_volume,
SUM(IFNULL(it.w_volume,0)) as total_w_volume,
SUM(IFNULL(it.v_weight,0)) as total_v_weight,
SUM(IFNULL(it.v_weight,0)) as total_v_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, IF(it.charge_weight > it.min_metering_weight ,it.charge_weight,it.min_metering_weight)), 0)) as total_charge_weight,
SUM(IFNULL(IF(it.warehouse_in_info is null, 0, IF(it.charge_weight > it.min_metering_weight ,it.charge_weight,it.min_metering_weight)), 0)) as total_charge_weight,
...
@@ -7345,6 +7397,12 @@
...
@@ -7345,6 +7397,12 @@
left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_channel channel on channel.channel_id = o.channel_id
left join ecw_channel channel on channel.channel_id = o.channel_id
<if
test=
"query.beginWarehouseInTime != null and query.endWarehouseInTime != null "
>
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
</if>
<if
test=
"query.beginRucangTime != null and query.endRucangTime != null "
>
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
</if>
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
<if
test =
"query.deptId != null "
>
<if
test =
"query.deptId != null "
>
AND o.dept_id = #{query.deptId}
AND o.dept_id = #{query.deptId}
...
@@ -7366,7 +7424,7 @@
...
@@ -7366,7 +7424,7 @@
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
SUM(IFNULL(wi.quantity_all, 0)) as order_quantity
from ecw_order_warehouse_in wi
from ecw_order_warehouse_in wi
left join ecw_order o
left join ecw_order o
ON wi.order_id = o.order_id
ON wi.order_id = o.order_id
and wi.deleted = 0
left join ecw_order_departure de on de.order_id = o.order_id
left join ecw_order_departure de on de.order_id = o.order_id
left join ecw_order_objective ob on ob.order_id = o.order_id
left join ecw_order_objective ob on ob.order_id = o.order_id
left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignor nor on nor.order_id = o.order_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment