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
a92e253d
Commit
a92e253d
authored
Mar 23, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购建议新增可用库容
parent
e798bf9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+2
-0
dc_auto_purchase_advise.cs
AutoTurnOver.Models/dc_auto_purchase_advise.cs
+5
-0
No files found.
AutoTurnOver.DB/purchase_advise.cs
View file @
a92e253d
...
@@ -695,6 +695,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
...
@@ -695,6 +695,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
}
}
var
new_data
=
item
.
ToJson
().
ToObj
<
dc_auto_purchase_advise_detailed
>();
var
new_data
=
item
.
ToJson
().
ToObj
<
dc_auto_purchase_advise_detailed
>();
new_data
.
storage_capacity_quantity
=
itemStorageCapacity
.
stock
;
new_data
.
quantity_init_advise
=
item
.
quantity_final_advise
;
new_data
.
quantity_init_advise
=
item
.
quantity_final_advise
;
new_data
.
quantity_final_advise
=
use_quantity
;
new_data
.
quantity_final_advise
=
use_quantity
;
new_data
.
mother_sku
=
item
.
bailun_sku
;
new_data
.
mother_sku
=
item
.
bailun_sku
;
...
@@ -749,6 +750,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
...
@@ -749,6 +750,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
var
storageCapacity
=
(
int
)
Math
.
Ceiling
((
skuStorageCapacityList
.
FirstOrDefault
(
s
=>
s
.
bailun_sku_warehouse_code
==
item
.
bailun_sku_warehouse_code
)
??
new
dc_base_storage_capacity
()).
stock
);
var
storageCapacity
=
(
int
)
Math
.
Ceiling
((
skuStorageCapacityList
.
FirstOrDefault
(
s
=>
s
.
bailun_sku_warehouse_code
==
item
.
bailun_sku_warehouse_code
)
??
new
dc_base_storage_capacity
()).
stock
);
var
quantity_final_advise
=
item
.
quantity_final_advise
;
var
quantity_final_advise
=
item
.
quantity_final_advise
;
item
.
storage_capacity_quantity
=
storageCapacity
;
item
.
quantity_final_advise
=
Math
.
Min
(
quantity_final_advise
,
storageCapacity
);
item
.
quantity_final_advise
=
Math
.
Min
(
quantity_final_advise
,
storageCapacity
);
item
.
storage_capacity_lack_quantity
=
Math
.
Max
(
0
,
quantity_final_advise
-
item
.
quantity_final_advise
);
item
.
storage_capacity_lack_quantity
=
Math
.
Max
(
0
,
quantity_final_advise
-
item
.
quantity_final_advise
);
datas
.
Add
(
item
);
datas
.
Add
(
item
);
...
...
AutoTurnOver.Models/dc_auto_purchase_advise.cs
View file @
a92e253d
...
@@ -50,6 +50,11 @@ namespace AutoTurnOver.Models
...
@@ -50,6 +50,11 @@ namespace AutoTurnOver.Models
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 可用库容
/// </summary>
public
decimal
?
storage_capacity_quantity
{
get
;
set
;
}
/// <summary>
/// sku
/// sku
/// </summary>
/// </summary>
public
string
bailun_sku
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
...
...
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