Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
DataCenter_Core2.1_20190520
Commits
8a6107fd
Commit
8a6107fd
authored
Aug 15, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成管理成本的发生额计算
parent
3267da18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
0 deletions
+197
-0
APP.config
Bailun.DC.HappenAmount/APP.config
+8
-0
Bailun.DC.HappenAmount.csproj
Bailun.DC.HappenAmount/Bailun.DC.HappenAmount.csproj
+1
-0
Services.cs
Bailun.DC.HappenAmount/Services.cs
+81
-0
dc_daily_happen_amount.cs
Bailun.DC.Models/dc_daily_happen_amount.cs
+107
-0
No files found.
Bailun.DC.HappenAmount/APP.config
0 → 100644
View file @
8a6107fd
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
appSettings
>
<
add
key
=
"FeeUrl"
value
=
"http://api.fee.bailuntec.com/purchase/other/cost/api/manageCostList"
/>
<
add
key
=
"cwUrl"
value
=
"http://cw.bailuntec.com/api/api/GetRepayPlanDetails"
/>
</
appSettings
>
</
configuration
>
\ No newline at end of file
Bailun.DC.HappenAmount/Bailun.DC.HappenAmount.csproj
View file @
8a6107fd
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bailun.DC.Common\Bailun.DC.Common.csproj" />
<ProjectReference Include="..\Bailun.DC.Common\Bailun.DC.Common.csproj" />
<ProjectReference Include="..\Bailun.DC.Models\Bailun.DC.Models.csproj" />
<ProjectReference Include="..\Bailun.DC.Models\Bailun.DC.Models.csproj" />
<ProjectReference Include="..\Bailun.DC.Services\Bailun.DC.Services.csproj" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
...
...
Bailun.DC.HappenAmount/Services.cs
View file @
8a6107fd
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
Bailun.DC.Models
;
using
System.Linq
;
namespace
Bailun.DC.HappenAmount
namespace
Bailun.DC.HappenAmount
{
{
...
@@ -9,7 +11,86 @@ namespace Bailun.DC.HappenAmount
...
@@ -9,7 +11,86 @@ namespace Bailun.DC.HappenAmount
public
void
Init
(
DateTime
start
,
DateTime
end
)
public
void
Init
(
DateTime
start
,
DateTime
end
)
{
{
var
m
=
new
dc_daily_happen_amount
()
{
day
=
DateTime
.
Parse
(
start
.
ToShortDateString
()),
ac_amount_happen
=
0
,
ac_amount_pay
=
0
,
ac_amount_sales
=
0
,
hl_amount_happen
=
0
,
hl_amount_pay
=
0
,
hl_amount_sales
=
0
,
ss_amount_happen
=
0
,
ss_amount_pay
=
0
,
ss_amount_sales
=
0
,
tl_amount_happen
=
0
,
tl_amount_pay
=
0
,
tl_amount_sales
=
0
,
tos_amount_happen
=
0
,
tos_amount_pay
=
0
,
tos_amount_sales
=
0
,
createtime
=
DateTime
.
Now
,
};
var
sqlpay
=
""
;
var
sqlhappen
=
""
;
var
sqlsales
=
""
;
#
region
管理成本
var
url
=
"http://api.fee.bailuntec.com/purchase/other/cost/api/manageCostList?o=0"
;
var
cwurl
=
"http://cw.bailuntec.com/api/api/GetRepayPlanDetails?"
;
url
+=
"&startDate="
+
start
.
ToString
(
"yyyy-MM-dd"
)
+
"&endDate="
+
end
.
ToString
(
"yyyy-MM-dd"
);
cwurl
+=
"BeginRepayTime="
+
start
.
ToString
(
"yyyy-MM-dd"
)
+
"&EndRepayTime="
+
end
.
ToString
(
"yyyy-MM-dd"
);
//利息支出
var
listInterest
=
new
Bailun
.
DC
.
Services
.
FinanceReportServices
().
ListInterestExpense
(
cwurl
);
//管理成本
var
list
=
new
Bailun
.
DC
.
Services
.
FinanceReportServices
().
ListOtherCost
(
url
);
var
listFeeType
=
new
List
<
string
>
{
"推广费"
,
"税费"
,
"平台费用"
,
"服务费"
,
"其他"
};
if
(
list
.
Count
>
0
)
{
m
.
hl_amount_pay
+=
list
.
Sum
(
a
=>
a
.
amountRmb
);
m
.
hl_amount_happen
+=
list
.
Sum
(
a
=>
a
.
amountRmb
);
var
objtemp
=
list
.
Where
(
a
=>
a
.
companyValue
==
5
||
a
.
companyValue
==
2
).
Where
(
b
=>
listFeeType
.
Contains
(
b
.
feeSuperType
));
if
(
objtemp
.
Count
()
>
0
)
{
m
.
hl_amount_sales
=
objtemp
.
Sum
(
a
=>
a
.
amountRmb
);
}
}
if
(
listInterest
.
Count
>
0
)
{
m
.
hl_amount_pay
+=
listInterest
.
Sum
(
a
=>
a
.
RepayInterestRMB
);
m
.
hl_amount_happen
+=
listInterest
.
Sum
(
a
=>
a
.
RepayInterestRMB
);
}
#
endregion
#
region
头程物流
#
endregion
//尾程物流
//一级供应商
//二级供应商
}
}
}
}
...
...
Bailun.DC.Models/dc_daily_happen_amount.cs
0 → 100644
View file @
8a6107fd
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
/// <summary>
/// 每日发生额
/// </summary>
public
class
dc_daily_happen_amount
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 统计日期
/// </summary>
public
DateTime
day
{
get
;
set
;
}
/// <summary>
/// 管理成本付款额
/// </summary>
public
decimal
ac_amount_pay
{
get
;
set
;
}
/// <summary>
/// 管理成本发生额
/// </summary>
public
decimal
ac_amount_happen
{
get
;
set
;
}
/// <summary>
/// 管理成本销售额
/// </summary>
public
decimal
ac_amount_sales
{
get
;
set
;
}
/// <summary>
/// 头程物流付款额
/// </summary>
public
decimal
hl_amount_pay
{
get
;
set
;
}
/// <summary>
/// 头程物流发生额
/// </summary>
public
decimal
hl_amount_happen
{
get
;
set
;
}
/// <summary>
/// 头程物流销售额
/// </summary>
public
decimal
hl_amount_sales
{
get
;
set
;
}
/// <summary>
/// 尾程物流付款额
/// </summary>
public
decimal
tl_amount_pay
{
get
;
set
;
}
/// <summary>
/// 尾程物流发生额
/// </summary>
public
decimal
tl_amount_happen
{
get
;
set
;
}
/// <summary>
/// 尾程物流销售额
/// </summary>
public
decimal
tl_amount_sales
{
get
;
set
;
}
/// <summary>
/// 一级供应商付款额
/// </summary>
public
decimal
tos_amount_pay
{
get
;
set
;
}
/// <summary>
/// 一级供应商发生额
/// </summary>
public
decimal
tos_amount_happen
{
get
;
set
;
}
/// <summary>
/// 一级供应商销售额
/// </summary>
public
decimal
tos_amount_sales
{
get
;
set
;
}
/// <summary>
/// 二级供应商付款额
/// </summary>
public
decimal
ss_amount_pay
{
get
;
set
;
}
/// <summary>
/// 二级供应商发生额
/// </summary>
public
decimal
ss_amount_happen
{
get
;
set
;
}
/// <summary>
/// 二级供应商销售额
/// </summary>
public
decimal
ss_amount_sales
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
createtime
{
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