Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
huluobin
dc-java
Commits
f87cbd0f
Commit
f87cbd0f
authored
Mar 08, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
c4200502
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
55 deletions
+54
-55
DcAutoSalesForecastStageConfigMapper.xml
...bailuntec/mapper/DcAutoSalesForecastStageConfigMapper.xml
+52
-53
job.properties
...show/show-auto-turnover/src/main/resources/job.properties
+2
-2
No files found.
data-common/src/main/java/com/bailuntec/mapper/DcAutoSalesForecastStageConfigMapper.xml
View file @
f87cbd0f
...
...
@@ -5,58 +5,58 @@
<select
id=
"selectMatchStage"
resultType=
"com.bailuntec.domain.entity.DcAutoSalesForecastStageConfig"
>
SELECT t7.*
from dc_auto_turnover t1
LEFT JOIN dc_base_sku t2 on t1.bailun_sku = t2.bailun_sku
LEFT JOIN dc_base_stock t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
LEFT JOIN dc_base_warehouse t6 on t1.warehouse_code = t6.warehouse_code
LEFT JOIN dc_auto_sales_forecast_sku_config t3 on t1.bailun_sku = t3.bailun_sku
LEFT JOIN dc_auto_sales_forecast_product_code_config t4 on t2.product_code = t4.product_code
LEFT JOIN dc_auto_sales_forecast_config t5 on (t3.config_id = t5.id or t5.id not in (select config_id
from dc_auto_sales_forecast_sku_config
where bailun_sku = t1.bailun_sku))
and (t4.config_id = t5.id or t5.id not in (select config_id
from dc_auto_sales_forecast_product_code_config
where product_code = t1.product_code))
and (t6.warehouse_code = t5.warehouse_code or length(trim(t5.warehouse_code)) = 0)
and (t6.hq_type = t5.warehouse_type or length(trim(t5.warehouse_type)) = 0)
and (find_in_set(t2.product_type,t5.category) or length(trim(t5.category)) = 0)
and (t6.area_id = t5.warehouse_area_id or length(trim(t5.warehouse_area_id)) = 0)
and t5.is_delete = 0
<if
test=
"firstOrderDays!=null "
>
and (t5.first_order_days_min = 0 or t5.first_order_days_min
<
= #{firstOrderDays})
and (t5.first_order_days_max = 0 or t5.first_order_days_max
>
= #{firstOrderDays})
</if>
and (false
<if
test=
"avgOrderCount30!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 30
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount30})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount30})))
</if>
<if
test=
"avgOrderCount14!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 14
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount14})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount14})))
</if>
<if
test=
"avgOrderCount7!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 7
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount7})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount7})))
</if>
)
LEFT JOIN dc_auto_sales_forecast_stage_config t7 on t7.config_id = t5.id
and (IF(t5.screen_type = 1,
((t8.first_inbound_date
<
= t7.duration_upper_limit or t7.duration_upper_limit = 0)
and (t8.first_inbound_date
>
= t7.duration_lower_limit or t7.duration_lower_limit = 0)
and (t7.duration_upper_limit != 0 or t7.duration_lower_limit != 0))
or t8.first_inbound_date is null
or length(trim(t8.first_inbound_date)) = 0,
((t1.daily_weighted_sales
<
= t7.sales_upper_limit or t7.sales_upper_limit = 0)
and (t1.daily_weighted_sales
>
= t7.sales_lower_limit or t7.sales_lower_limit = 0)
and (t7.sales_upper_limit != 0 or t7.sales_lower_limit != 0))
or t1.daily_weighted_sales is null
or length(trim(t1.daily_weighted_sales)) = 0))
LEFT JOIN dc_base_sku t2 on t1.bailun_sku = t2.bailun_sku
LEFT JOIN dc_base_stock t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
LEFT JOIN dc_base_warehouse t6 on t1.warehouse_code = t6.warehouse_code
LEFT JOIN dc_auto_sales_forecast_sku_config t3 on t1.bailun_sku = t3.bailun_sku
LEFT JOIN dc_auto_sales_forecast_product_code_config t4 on t2.product_code = t4.product_code
LEFT JOIN dc_auto_sales_forecast_config t5 on (t3.config_id = t5.id or t5.id not in (select config_id
from dc_auto_sales_forecast_sku_config
where bailun_sku = t1.bailun_sku))
and (t4.config_id = t5.id or t5.id not in (select config_id
from dc_auto_sales_forecast_product_code_config
where product_code = t1.product_code))
and (t6.warehouse_code = t5.warehouse_code or length(trim(t5.warehouse_code)) = 0)
and (t6.hq_type = t5.warehouse_type or length(trim(t5.warehouse_type)) = 0)
and (find_in_set(t2.product_type,t5.category) or length(trim(t5.category)) = 0)
and (t6.area_id = t5.warehouse_area_id or length(trim(t5.warehouse_area_id)) = 0)
and t5.is_delete = 0
<if
test=
"firstOrderDays!=null "
>
and (t5.first_order_days_min = 0 or t5.first_order_days_min
<
= #{firstOrderDays})
and (t5.first_order_days_max = 0 or t5.first_order_days_max
>
= #{firstOrderDays})
</if>
and (false
<if
test=
"avgOrderCount30!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 30
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount30})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount30})))
</if>
<if
test=
"avgOrderCount14!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 14
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount14})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount14})))
</if>
<if
test=
"avgOrderCount7!=null "
>
or (t5.orders_avg_sampling_days = 0 or (t5.orders_avg_sampling_days = 7
and (t5.orders_avg_min = 0 or t5.orders_avg_min
<
= #{avgOrderCount7})
and (t5.orders_avg_max = 0 or t5.orders_avg_max
>
= #{avgOrderCount7})))
</if>
)
LEFT JOIN dc_auto_sales_forecast_stage_config t7 on t7.config_id = t5.id
and (IF(t5.screen_type = 1,
((t8.first_inbound_date
<
= t7.duration_upper_limit or t7.duration_upper_limit = 0)
and (t8.first_inbound_date
>
= t7.duration_lower_limit or t7.duration_lower_limit = 0)
and (t7.duration_upper_limit != 0 or t7.duration_lower_limit != 0))
or t8.first_inbound_date is null
or length(trim(t8.first_inbound_date)) = 0,
((t1.daily_weighted_sales
<
= t7.sales_upper_limit or t7.sales_upper_limit = 0)
and (t1.daily_weighted_sales
>
= t7.sales_lower_limit or t7.sales_lower_limit = 0)
and (t7.sales_upper_limit != 0 or t7.sales_lower_limit != 0))
or t1.daily_weighted_sales is null
or length(trim(t1.daily_weighted_sales)) = 0))
where t1.bailun_sku = #{bailunSku}
and t1.warehouse_code = #{warehouseCode}
and t5.id is not null
and t1.warehouse_code = #{warehouseCode}
and t5.id is not null
ORDER BY t5.`level` desc
limit 1
</select>
...
...
@@ -112,8 +112,7 @@
from dc_base_oms_sku_30
where bailun_sku = #{bailunSku}
and warehouse_code = #{warehouseCode}
# and create_time >= date_sub(now(), interval #{days} + 1 day)
and date_sub(now(), interval #{days} + 1 day)
<
create_time
and date_sub(now(), interval #{days} + 1 day)
<
= create_time
</select>
</mapper>
data-show/show-auto-turnover/src/main/resources/job.properties
View file @
f87cbd0f
...
...
@@ -14,8 +14,8 @@ NAME_SPACE=data-center
#JOB_NAME_WEEK=0 0 10 ? * MON
JOB_NAME
=
show-auto-turnover62
JOB_CRON
=
0 0 3 * * ?
#JOB_CRON=0 30 14
* * ?
#
JOB_CRON=0 0 3 * * ?
JOB_CRON
=
0 20 10
* * ?
SHARDING_TOTAL_COUNT
=
8
JOB_NAME_NE_NORMAL
=
show-auto-turnover-ne-normal
...
...
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