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
e8cbc8f5
Commit
e8cbc8f5
authored
Jan 16, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
20b57a99
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
4 deletions
+52
-4
DcBaseOmsSkuMapper.xml
...src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
+49
-1
mybatis-config.xml
data-common/src/main/resources/mybatis-config.xml
+2
-2
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+1
-1
No files found.
data-common/src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
View file @
e8cbc8f5
...
...
@@ -3743,7 +3743,7 @@
<select
id=
"omsSkuSellerCount"
resultType=
"java.math.BigDecimal"
>
SELECT (SELECT coalesce(sum(ifnull(tt2.sales, tt1.bailun_sku_quantity_ordered)), 0)
from (
dc_
base_forecast_history
tt2
dc_
aims_transfer_warehouse_sales
tt2
LEFT JOIN (
select coalesce(sum(t1.bailun_sku_quantity_ordered), 0) as bailun_sku_quantity_ordered,
DATE_FORMAT(paid_time, '%Y-%m-%d') as paid_date
...
...
@@ -3766,6 +3766,54 @@
and tt2.date
>
= #{lowerTime}
and tt2.date
<
= #{upperTime})
/ #{days}
+
(SELECT coalesce(sum(ifnull(tt2.sales, tt1.bailun_sku_quantity_ordered)), 0)
from (
dc_aims_transfer_warehouse_sales tt2
right JOIN (
select coalesce(sum(t1.bailun_sku_quantity_ordered), 0) as bailun_sku_quantity_ordered,
DATE_FORMAT(paid_time, '%Y-%m-%d') as paid_date
from dc_base_oms_sku t1
where t1.paid_time
>
= #{lowerTime}
and t1.paid_time
<
= #{upperTime}
and t1.bailun_sku = #{bailunSku}
and t1.warehouse_code = #{warehouseCode}
and t1.has_fba_s = 0
and t1.has_delete = 0
and t1.has_scalp = 0
and t1.has_buyer_remark = 0
and t1.has_platsku_remark = 0
and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单'
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str))
/ #{days}
-
(SELECT coalesce(sum(ifnull(tt2.sales, tt1.bailun_sku_quantity_ordered)), 0)
from (
dc_aims_transfer_warehouse_sales tt2
inner JOIN (
select coalesce(sum(t1.bailun_sku_quantity_ordered), 0) as bailun_sku_quantity_ordered,
DATE_FORMAT(paid_time, '%Y-%m-%d') as paid_date
from dc_base_oms_sku t1
where t1.paid_time
>
= #{lowerTime}
and t1.paid_time
<
= #{upperTime}
and t1.bailun_sku = #{bailunSku}
and t1.warehouse_code = #{warehouseCode}
and t1.has_fba_s = 0
and t1.has_delete = 0
and t1.has_scalp = 0
and t1.has_buyer_remark = 0
and t1.has_platsku_remark = 0
and t1.has_innersale = 0
and t1.bailun_order_status != 'Canceled'
and t1.platform_order_type != '手工单'
GROUP BY DATE_FORMAT(paid_time, '%y%m%d')) tt1 on tt1.paid_date = tt2.date_str)
where tt2.bailun_sku =#{bailunSku}
and tt2.warehouse_code = #{warehouseCode}
and tt2.date
>
= #{lowerTime}
and tt2.date
<
= #{upperTime})
/ #{days}
</select>
...
...
data-common/src/main/resources/mybatis-config.xml
View file @
e8cbc8f5
...
...
@@ -5,8 +5,8 @@
<configuration>
<!--<properties resource="db-tj.properties"/>-->
<!-- <properties resource="db-dev.properties"/>--
>
<properties
resource=
"db-prod.properties"
/
>
<properties
resource=
"db-dev.properties"
/
>
<!-- <properties resource="db-prod.properties"/>--
>
<settings>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
</settings>
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
e8cbc8f5
...
...
@@ -257,7 +257,7 @@ public class AutoTurnoverTest {
public
void
testXX2
()
{
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
andBailunSkuEqualTo
(
"95
1294303
"
)
.
andBailunSkuEqualTo
(
"95
0697201
"
)
.
andWarehouseCodeEqualTo
(
"GZBLWH"
)
.
example
());
...
...
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