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
bltdc
dc-java
Commits
e2ef7148
Commit
e2ef7148
authored
Jan 10, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动周转--重跑计算漏数据
parent
fed8fdef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
DcBaseStockMapper.java
...src/main/java/com/bailuntec/mapper/DcBaseStockMapper.java
+4
-0
DcBaseStockMapper.xml
.../src/main/java/com/bailuntec/mapper/DcBaseStockMapper.xml
+13
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+5
-0
No files found.
data-common/src/main/java/com/bailuntec/mapper/DcBaseStockMapper.java
View file @
e2ef7148
...
...
@@ -136,12 +136,16 @@ public interface DcBaseStockMapper {
List
<
DcBaseStock
>
listParameterStockById
(
@Param
(
"jobParameter"
)
String
jobParameter
,
@Param
(
"v1"
)
int
v1
,
@Param
(
"v2"
)
int
v2
);
List
<
DcBaseStock
>
listAllStock
(
@Param
(
"v1"
)
int
v1
,
@Param
(
"v2"
)
int
v2
);
List
<
DcBaseStock
>
listWarehouseStockById
(
@Param
(
"warehouseCode"
)
String
warehouseCode
,
@Param
(
"v1"
)
int
v1
,
@Param
(
"v2"
)
int
v2
);
List
<
DcBaseStock
>
listInStockNotInAutoTurnover
();
long
countByParam
(
@Param
(
"jobParameter"
)
String
jobParameter
);
long
countAll
();
long
countByWarehouseCode
(
@Param
(
"warehouseCode"
)
String
warehouseCode
);
void
updateSkuUnitPrice
();
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseStockMapper.xml
View file @
e2ef7148
...
...
@@ -1250,6 +1250,12 @@
where tb2.warehouse_code is not null and tb3.bailun_sku is null order by tb1.id asc limit #{v1}, #{v2}
</select>
<select
id=
"listAllStock"
resultType=
"com.bailuntec.domain.entity.DcBaseStock"
>
select * from dc_base_stock tb1
LEFT JOIN dc_auto_turnover tb3 ON tb1.bailun_sku = tb3.bailun_sku and tb1.warehouse_code = tb3.warehouse_code
where tb3.bailun_sku is null order by tb1.id asc limit #{v1}, #{v2}
</select>
<select
id=
"listWarehouseStockById"
resultType=
"com.bailuntec.domain.entity.DcBaseStock"
>
select * from dc_base_stock tb1
LEFT JOIN dc_auto_turnover tb3 ON tb1.bailun_sku = tb3.bailun_sku and tb1.warehouse_code = tb3.warehouse_code
...
...
@@ -1269,6 +1275,13 @@
where tb2.warehouse_code is not null and tb3.bailun_sku is null
</select>
<select
id=
"countAll"
resultType=
"long"
>
select count(*)
from dc_base_stock tb1
LEFT JOIN dc_auto_turnover tb3 ON tb1.bailun_sku = tb3.bailun_sku and tb1.warehouse_code = tb3.warehouse_code
where tb3.bailun_sku is null
</select>
<select
id=
"countByWarehouseCode"
resultType=
"long"
>
select count(*)
from dc_base_stock tb1
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
e2ef7148
...
...
@@ -74,6 +74,9 @@ public class AutoTurnoverJob extends PointJob {
case
"耗材仓"
:
dcBaseStockList
=
baseStockMapperFor
.
listParameterStockById
(
shardingContext
.
getJobParameter
(),
page
*
jobPointLog
.
getPageSize
(),
jobPointLog
.
getPageSize
());
break
;
case
"ALL"
:
dcBaseStockList
=
baseStockMapperFor
.
listAllStock
(
page
*
jobPointLog
.
getPageSize
(),
jobPointLog
.
getPageSize
());
break
;
default
:
dcBaseStockList
=
baseStockMapperFor
.
listWarehouseStockById
(
shardingContext
.
getJobParameter
(),
page
*
jobPointLog
.
getPageSize
(),
jobPointLog
.
getPageSize
());
}
...
...
@@ -122,6 +125,8 @@ public class AutoTurnoverJob extends PointJob {
case
"第三方仓库"
:
case
"耗材仓"
:
return
baseStockMapper
.
countByParam
(
jobParameter
);
case
"ALL"
:
return
baseStockMapper
.
countAll
();
default
:
return
baseStockMapper
.
countByWarehouseCode
(
jobParameter
);
}
...
...
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