Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
49e541b3
Commit
49e541b3
authored
Jun 21, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建采购建议时,广州03 可找广州01借用库存
parent
9d43af10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+3
-2
No files found.
AutoTurnOver.DB/purchase_advise.cs
View file @
49e541b3
...
@@ -44,6 +44,8 @@ namespace AutoTurnOver.DB
...
@@ -44,6 +44,8 @@ namespace AutoTurnOver.DB
RedundancyDeduction
(
"GZBLWH"
,
"QYBLZZ"
);
RedundancyDeduction
(
"GZBLWH"
,
"QYBLZZ"
);
RedundancyDeduction
(
"GZBLWH"
,
"BLGZ03"
);
// 生成采购建议 (只补缺货的不管)
// 生成采购建议 (只补缺货的不管)
_connection
.
Execute
(
@"
_connection
.
Execute
(
@"
INSERT into dc_auto_purchase_advise_detailed(`bailun_sku`,`warehouse_code`,`quantity_init_advise`,`quantity_final_advise`,
INSERT into dc_auto_purchase_advise_detailed(`bailun_sku`,`warehouse_code`,`quantity_init_advise`,`quantity_final_advise`,
...
@@ -303,13 +305,12 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=
...
@@ -303,13 +305,12 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=
/// </summary>
/// </summary>
public
static
void
RedundancyDeduction
(
string
warehouse_code_form
,
string
warehouse_code_to
)
public
static
void
RedundancyDeduction
(
string
warehouse_code_form
,
string
warehouse_code_to
)
{
{
// 把广州01出了建议数的找出来
var
gzblwh_turnover_list
=
_connection
.
Query
<
Models
.
dc_auto_turnover
>(
@"
var
gzblwh_turnover_list
=
_connection
.
Query
<
Models
.
dc_auto_turnover
>(
@"
select t1.* from dc_auto_turnover as t1
select t1.* from dc_auto_turnover as t1
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
where ( t5.`status`=0 or t5.`status` is null ) and t1.quantity_begin_advise>0 and t1.warehouse_code=@warehouse_code_to
where ( t5.`status`=0 or t5.`status` is null ) and t1.quantity_begin_advise>0 and t1.warehouse_code=@warehouse_code_to
"
,
new
{
warehouse_code_to
},
commandTimeout
:
0
);
"
,
new
{
warehouse_code_to
},
commandTimeout
:
0
);
// 看看清远03是不是有冗余的库存
if
(
gzblwh_turnover_list
!=
null
&&
gzblwh_turnover_list
.
Count
()
>=
1
)
if
(
gzblwh_turnover_list
!=
null
&&
gzblwh_turnover_list
.
Count
()
>=
1
)
{
{
foreach
(
var
item
in
gzblwh_turnover_list
)
foreach
(
var
item
in
gzblwh_turnover_list
)
...
...
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