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
359a2250
Commit
359a2250
authored
Sep 14, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
现金流sku 新增汇总行
parent
b4599bbb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
6 deletions
+68
-6
Program.cs
AutoGeneratePurchaseAdvise/Program.cs
+3
-3
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+36
-2
dc_report_cash_flow_log.cs
AutoTurnOver.Models/dc_report_cash_flow_log.cs
+1
-0
CashFlowController.cs
AutoTurnOver/Controllers/CashFlowController.cs
+28
-1
No files found.
AutoGeneratePurchaseAdvise/Program.cs
View file @
359a2250
...
@@ -13,11 +13,11 @@ namespace AutoGeneratePurchaseAdvise
...
@@ -13,11 +13,11 @@ namespace AutoGeneratePurchaseAdvise
static
async
Task
Main
(
string
[]
args
)
static
async
Task
Main
(
string
[]
args
)
{
{
Console
.
WriteLine
(
"采购建议计算任务启动..."
);
Console
.
WriteLine
(
"采购建议计算任务启动..."
);
//PurchaseAdviseServices.AutoPushBuySys(2);
//PurchaseAdviseServices.AutoPushBuySys(6);
try
try
{
{
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 09:00:00")));
//PurchaseAdviseServices.AutoPushBuySys(2);
//PurchaseAdviseServices.AutoPushBuySys(6);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
359a2250
...
@@ -1799,6 +1799,31 @@ left join dc_auto_config_sku_label as t6 on t1.bailun_sku = t6.bailun_sku
...
@@ -1799,6 +1799,31 @@ left join dc_auto_config_sku_label as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join dc_auto_turnover as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
left join dc_auto_turnover as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
where t1.type=@type "
;
where t1.type=@type "
;
if
(
search
.
is_sum
==
true
)
{
sql
=
@" select
sum(t1.balance) as 'balance',
sum(t1.current_balance) as 'current_balance',
sum(t1.current_income) as 'current_income',
sum(t1.current_expend) as 'current_expend',
sum(t1.last_balance) as 'last_balance',
sum(t1.last_income) as 'last_income',
sum(t1.last_expend) as 'last_expend',
sum(ifnull(t4.usable_stock,0)) as 'usable_stock',
sum(ifnull(t5.quantity_transfer,0)+ifnull(t5.quantity_purchase,0)) as 'on_the_way',
sum(ifnull(t4.usable_stock,0) * t2.unit_price) as 'stock_amount',
sum(ifnull(t5.quantity_transfer,0)+ifnull(t5.quantity_purchase,0)) as 'on_the_way_amount'
from dc_report_cash_flow_sku_group as t1
left join dc_base_sku as t2 on t1.bailun_sku=t2.bailun_sku
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
left join dc_base_stock as t4 on t1.bailun_sku = t4.bailun_sku and t1.warehouse_code = t4.warehouse_code
left join dc_mid_transit as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_auto_config_sku_label as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join dc_auto_turnover as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
where t1.type=@type"
;
}
DynamicParameters
parameters
=
new
DynamicParameters
();
DynamicParameters
parameters
=
new
DynamicParameters
();
parameters
.
Add
(
"type"
,
search
.
data_type
);
parameters
.
Add
(
"type"
,
search
.
data_type
);
...
@@ -1852,9 +1877,18 @@ where t1.type=@type ";
...
@@ -1852,9 +1877,18 @@ where t1.type=@type ";
}
}
}
}
if
(
search
.
is_sum
)
{
return
new
Page
<
dc_report_cash_flow_sku_group_dto
>()
{
Items
=
new
List
<
dc_report_cash_flow_sku_group_dto
>
{
_connection
.
QuerySingleOrDefault
<
dc_report_cash_flow_sku_group_dto
>(
sql
,
parameters
)
}
};
}
else
{
return
_connection
.
Page
<
dc_report_cash_flow_sku_group_dto
>(
sql
,
search
,
parameters
);
}
return
_connection
.
Page
<
dc_report_cash_flow_sku_group_dto
>(
sql
,
search
,
parameters
);
}
}
/// <summary>
/// <summary>
...
...
AutoTurnOver.Models/dc_report_cash_flow_log.cs
View file @
359a2250
...
@@ -359,6 +359,7 @@ namespace AutoTurnOver.Models
...
@@ -359,6 +359,7 @@ namespace AutoTurnOver.Models
public
string
buyer_name
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
public
string
supplier_name
{
get
;
set
;
}
public
string
supplier_name
{
get
;
set
;
}
public
string
product_type
{
get
;
set
;
}
public
string
product_type
{
get
;
set
;
}
public
bool
is_sum
{
get
;
set
;
}
}
}
public
class
dc_report_cash_flow_platform_share_dto
public
class
dc_report_cash_flow_platform_share_dto
...
...
AutoTurnOver/Controllers/CashFlowController.cs
View file @
359a2250
...
@@ -192,7 +192,8 @@ namespace AutoTurnOver.Controllers
...
@@ -192,7 +192,8 @@ namespace AutoTurnOver.Controllers
warehouse_code
=
warehousecode
,
warehouse_code
=
warehousecode
,
monitor_status
=
monitor_status
,
monitor_status
=
monitor_status
,
warehousearea
=
warehousearea
,
warehousearea
=
warehousearea
,
warehousetype
=
warehousetype
warehousetype
=
warehousetype
,
is_sum
=
false
};
};
var
services
=
new
CashFlowServices
();
var
services
=
new
CashFlowServices
();
var
page_data
=
services
.
SkuView
(
m
);
var
page_data
=
services
.
SkuView
(
m
);
...
@@ -213,6 +214,32 @@ namespace AutoTurnOver.Controllers
...
@@ -213,6 +214,32 @@ namespace AutoTurnOver.Controllers
}
}
public
JsonResult
SkuViewSumFooter
(
int
?
data_type
,
string
sku_label
,
string
bailun_sku
,
int
offset
,
int
limit
,
string
order
,
string
sort
,
string
buyer_name
,
string
warehousecode
,
string
supplier_name
,
string
warehousetype
,
int
?
warehousearea
,
int
?
monitor_status
=
null
,
string
product_type
=
null
)
{
var
m
=
new
dc_report_cash_flow_sku_group_search_dto
{
bailun_sku
=
bailun_sku
,
page
=
1
,
rows
=
1
,
sidx
=
sort
,
sord
=
order
,
buyer_name
=
buyer_name
,
sku_label
=
string
.
IsNullOrWhiteSpace
(
sku_label
)
?
null
:
WebUtility
.
UrlDecode
(
sku_label
),
data_type
=
data_type
,
supplier_name
=
supplier_name
,
product_type
=
product_type
,
warehouse_code
=
warehousecode
,
monitor_status
=
monitor_status
,
warehousearea
=
warehousearea
,
warehousetype
=
warehousetype
,
is_sum
=
true
};
var
services
=
new
CashFlowServices
();
var
list
=
services
.
SkuView
(
m
);
return
new
JsonResult
(
list
==
null
||
list
.
Items
.
Count
<=
0
?
new
dc_report_cash_flow_sku_group_dto
()
:
list
.
Items
[
0
]);
}
public
FileResult
ExportSkuView
(
int
?
data_type
,
string
sku_label
,
string
bailun_sku
,
int
offset
,
int
limit
,
string
order
,
string
sort
,
string
buyer_name
,
string
warehousecode
,
string
supplier_name
,
string
warehousetype
,
int
?
warehousearea
,
int
?
monitor_status
=
null
,
string
product_type
=
null
)
public
FileResult
ExportSkuView
(
int
?
data_type
,
string
sku_label
,
string
bailun_sku
,
int
offset
,
int
limit
,
string
order
,
string
sort
,
string
buyer_name
,
string
warehousecode
,
string
supplier_name
,
string
warehousetype
,
int
?
warehousearea
,
int
?
monitor_status
=
null
,
string
product_type
=
null
)
{
{
var
m
=
new
dc_report_cash_flow_sku_group_search_dto
var
m
=
new
dc_report_cash_flow_sku_group_search_dto
...
...
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