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
5a5e6124
Commit
5a5e6124
authored
Dec 17, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理成本的利息改为读取数据中心的
parent
ab32ef0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
7 deletions
+106
-7
dc_base_finance_interest.cs
Bailun.DC.Models/dc_base_finance_interest.cs
+70
-0
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+29
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+7
-7
No files found.
Bailun.DC.Models/dc_base_finance_interest.cs
0 → 100644
View file @
5a5e6124
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
/// <summary>
/// 利息支出
/// </summary>
public
class
dc_base_finance_interest
{
public
int
id
{
get
;
set
;
}
/// <summary>
/// 付款主体id
/// </summary>
public
int
company_val
{
get
;
set
;
}
/// <summary>
/// 付款主体名称
/// </summary>
public
string
company
{
get
;
set
;
}
/// <summary>
/// 银行卡号
/// </summary>
public
string
bank_card
{
get
;
set
;
}
/// <summary>
/// 持卡人
/// </summary>
public
string
bank_card_user
{
get
;
set
;
}
/// <summary>
/// 银行名称
/// </summary>
public
string
bank_name
{
get
;
set
;
}
/// <summary>
/// 债权人
/// </summary>
public
string
creditor
{
get
;
set
;
}
/// <summary>
/// 偿还利息
/// </summary>
public
decimal
repay_interest
{
get
;
set
;
}
/// <summary>
/// 偿还利息人民币
/// </summary>
public
decimal
repay_interest_rmb
{
get
;
set
;
}
/// <summary>
/// 实际时间
/// </summary>
public
DateTime
actual_repay_time
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
gmt_create
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
gmt_modify
{
get
;
set
;
}
}
}
Bailun.DC.Services/FinanceReportServices.cs
View file @
5a5e6124
...
@@ -283,6 +283,35 @@ namespace Bailun.DC.Services
...
@@ -283,6 +283,35 @@ namespace Bailun.DC.Services
}
}
}
}
/// <summary>
/// 获取管理成本的利息支出
/// </summary>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="paycompanyid"></param>
/// <returns></returns>
public
List
<
dc_base_finance_interest
>
ListFinanceInterest
(
DateTime
start
,
DateTime
end
,
int
?
paycompanyid
)
{
var
sql
=
$"select * from dc_base_finance_interest where actual_repay_time>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and actual_repay_time<'
{
end
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
'"
;
if
(
paycompanyid
.
HasValue
&&
paycompanyid
.
Value
>
0
)
{
sql
+=
" and company_val="
+
paycompanyid
.
Value
;
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
list
=
cn
.
Query
<
dc_base_finance_interest
>(
sql
).
ToList
();
return
list
;
}
}
#
endregion
#
endregion
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
5a5e6124
...
@@ -389,7 +389,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -389,7 +389,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
//利息支出
//利息支出
var
listInterest
=
new
Services
.
FinanceReportServices
().
ListInterestExpense
(
cwurl
);
var
listInterest
=
new
Services
.
FinanceReportServices
().
List
FinanceInterest
(
start
,
end
,
paycompanyid
);
//new Services.FinanceReportServices().List
InterestExpense(cwurl);
//Edit by Allan at 20191217 for 更改数据源
//Edit by Allan at 20191217 for 更改数据源
var
list
=
new
Services
.
FinanceReportServices
().
ListFinanceManageCost
(
start
,
end
,
""
,
paycompanyid
);
//new Services.FinanceReportServices().ListOtherCost(url);
var
list
=
new
Services
.
FinanceReportServices
().
ListFinanceManageCost
(
start
,
end
,
""
,
paycompanyid
);
//new Services.FinanceReportServices().ListOtherCost(url);
...
@@ -499,18 +499,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -499,18 +499,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
//广州电子服装仓
//广州电子服装仓
var
clothVal
=
0.00
M
;
var
clothVal
=
0.00
M
;
var
objCloth
=
listInterest
.
Where
(
a
=>
a
.
CompanyV
al
!=
1
);
var
objCloth
=
listInterest
.
Where
(
a
=>
a
.
company_v
al
!=
1
);
if
(
objCloth
.
Count
()
>
0
)
if
(
objCloth
.
Count
()
>
0
)
{
{
clothVal
=
objCloth
.
Sum
(
a
=>
a
.
RepayInterestRMB
);
clothVal
=
objCloth
.
Sum
(
a
=>
a
.
repay_interest_rmb
);
}
}
//广州百伦
//广州百伦
var
gzblVal
=
0.00
M
;
var
gzblVal
=
0.00
M
;
var
objGZBL
=
listInterest
.
Where
(
a
=>
a
.
CompanyV
al
==
1
);
var
objGZBL
=
listInterest
.
Where
(
a
=>
a
.
company_v
al
==
1
);
if
(
objGZBL
.
Count
()
>
0
)
if
(
objGZBL
.
Count
()
>
0
)
{
{
gzblVal
=
objGZBL
.
Sum
(
a
=>
a
.
RepayInterestRMB
);
gzblVal
=
objGZBL
.
Sum
(
a
=>
a
.
repay_interest_rmb
);
}
}
if
(
clothVal
>
0
&&
clothindex
==
-
1
)
if
(
clothVal
>
0
&&
clothindex
==
-
1
)
...
@@ -641,7 +641,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -641,7 +641,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
}
}
}
var
val
=
listInterest
.
Sum
(
a
=>
a
.
RepayInterestRMB
);
var
val
=
listInterest
.
Sum
(
a
=>
a
.
repay_interest_rmb
);
if
(
index_Interest
==
-
1
&&
val
>
0
)
if
(
index_Interest
==
-
1
&&
val
>
0
)
{
{
...
@@ -707,7 +707,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -707,7 +707,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
msg
=
list
.
Count
>
0
?
""
:
"成本接口返回了空记录。"
,
msg
=
list
.
Count
>
0
?
""
:
"成本接口返回了空记录。"
,
col
=
listCol
,
col
=
listCol
,
list
=
listValue
,
list
=
listValue
,
amount
=
Math
.
Round
(
list
.
Sum
(
a
=>
a
.
amount_rmb
)+
listInterest
.
Sum
(
a
=>
a
.
RepayInterestRMB
),
2
)
amount
=
Math
.
Round
(
list
.
Sum
(
a
=>
a
.
amount_rmb
)+
listInterest
.
Sum
(
a
=>
a
.
repay_interest_rmb
),
2
)
});
});
}
}
...
...
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