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
c9504005
Commit
c9504005
authored
Jul 16, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://193.112.143.129/bltdc/DataCenter_Core2.1_20190520
parents
17b3d342
a4bbae70
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
142 additions
and
38 deletions
+142
-38
FinanceDetailsDto.cs
Bailun.DC.Models/Dtos/Finance/FinanceDetailsDto.cs
+55
-0
FinanceDto.cs
Bailun.DC.Models/Dtos/Finance/FinanceDto.cs
+0
-2
GetCashFlowStatementInput.cs
Bailun.DC.Models/Dtos/Finance/GetCashFlowStatementInput.cs
+4
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+73
-34
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+1
-2
FinanceController.cs
Bailun.DC.WebApi/Controllers/FinanceController.cs
+9
-0
No files found.
Bailun.DC.Models/Dtos/Finance/FinanceDetailsDto.cs
0 → 100644
View file @
c9504005
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.Dtos.Finance
{
public
class
FinanceDetailsDto
{
/// <summary>
/// 金额
/// </summary>
public
decimal
Amount
{
get
;
set
;
}
/// <summary>
/// 人民币
/// </summary>
public
decimal
AmountRmb
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
public
string
CompanyName
{
get
;
set
;
}
/// <summary>
/// 币种
/// </summary>
public
string
Currency
{
get
;
set
;
}
/// <summary>
/// 部门
/// </summary>
public
string
DepartmentName
{
get
;
set
;
}
/// <summary>
/// 费用单号
/// </summary>
public
string
FeeId
{
get
;
set
;
}
/// <summary>
/// 收款单位
/// </summary>
public
string
ReceiveUnit
{
get
;
set
;
}
/// <summary>
/// 付款理由
/// </summary>
public
string
Reason
{
get
;
set
;
}
/// <summary>
/// 付款时间
/// </summary>
public
string
PayTime
{
get
;
set
;
}
/// <summary>
/// 费用类型
/// </summary>
public
string
FeeSuperType
{
get
;
set
;
}
/// <summary>
/// 会计科目
/// </summary>
public
string
Accounting
{
get
;
set
;
}
}
}
Bailun.DC.Models/Dtos/Finance/FinanceDto.cs
View file @
c9504005
...
...
@@ -15,7 +15,5 @@ namespace Bailun.DC.Models.Dtos.Finance
{
public
string
title
{
get
;
set
;
}
public
string
key
{
get
;
set
;
}
public
bool
show
{
get
;
set
;
}
=
true
;
public
string
width
{
get
;
set
;
}
=
"120"
;
}
}
Bailun.DC.Models/Dtos/Finance/GetCashFlowStatementInput.cs
View file @
c9504005
...
...
@@ -19,5 +19,9 @@ namespace Bailun.DC.Models.Dtos.Finance
/// 公司主体
/// </summary>
public
string
CorporateEntity
{
get
;
set
;
}
#
region
明细
public
string
CompanyName
{
get
;
set
;
}
public
string
FeeType
{
get
;
set
;
}
#
endregion
}
}
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
c9504005
...
...
@@ -23,37 +23,7 @@ namespace Bailun.DC.Services.WebApiService
try
{
var
dtos
=
new
FinanceDto
();
var
sql
=
$@"select * from dc_base_finance_fee s1
left JOIN dc_base_finance_company s2
ON s1.company_name = s2.company_name
where s1.cost_status = 4
and (s1.is_lend is null or s1.is_lend = 1
or (s1.is_lend = 2 and s1.lend_balance > 0) or (s1.is_lend = 2 and s1.cost_form = 1))
and s1.pay_time >= @PaymentTimeStart and s1.pay_time < @PaymentTimeEnd
and s2.company_type = @CorporateEntity"
;
var
para
=
new
DynamicParameters
();
para
.
Add
(
"PaymentTimeStart"
,
input
.
PaymentTimeStart
.
Date
);
para
.
Add
(
"PaymentTimeEnd"
,
input
.
PaymentTimeEnd
.
Date
);
para
.
Add
(
"CorporateEntity"
,
input
.
CorporateEntity
);
var
data
=
SimpleCRUD
.
Query
<
dc_base_finance_fee
>(
sql
,
para
,
GlobalConfig
.
ConnectionString
).
ToList
();
foreach
(
var
item
in
data
)
{
if
(
item
.
cost_form
==
2
)
{
item
.
amount
=
-(
item
.
amount
);
item
.
amount_rmb
=
-(
item
.
amount_rmb
);
}
//借支单待还余额
if
(
item
.
cost_form
==
3
)
{
if
(
item
.
is_lend
.
HasValue
&&
item
.
is_lend
.
Value
==
2
&&
((
item
.
lend_balance
??
0
)
>
0
))
//归还金额
{
item
.
amount
=
-(
item
.
amount
);
item
.
amount_rmb
=
-(
item
.
amount_rmb
);
}
}
}
var
data
=
GetFinanceFeeList
(
input
);
if
(
data
.
Count
>
0
)
{
var
url
=
ConfigHelper
.
AppSetting
(
"cwUrl"
);
...
...
@@ -105,10 +75,10 @@ and s2.company_type = @CorporateEntity";
for
(
int
i
=
0
;
i
<
listValue
.
Count
;
i
++)
{
jsonStr
+=
"{"
;
jsonStr
+=
"\"key\":\""
+
listValue
[
i
].
Item1
+
"\","
;
for
(
int
j
=
1
;
j
<
listValue
[
i
].
Item2
.
Count
;
j
++)
jsonStr
+=
"\"key\":\""
+
listValue
[
i
].
Item1
+
"\","
;
//第一条费用类型
for
(
int
j
=
0
;
j
<
listValue
[
i
].
Item2
.
Count
;
j
++)
//第一条类型里所有数据
{
jsonStr
+=
"\""
+
dtos
.
Col
[
j
].
key
+
"\":\""
+
listValue
[
i
].
Item2
[
j
]
+
"\","
;
jsonStr
+=
"\""
+
dtos
.
Col
[
j
+
1
].
key
+
"\":\""
+
listValue
[
i
].
Item2
[
j
]
+
"\","
;
}
jsonStr
=
jsonStr
.
Trim
(
','
);
jsonStr
+=
"},"
;
...
...
@@ -182,5 +152,74 @@ and s2.company_type = @CorporateEntity";
return
sqlText
.
ToString
();
}
#
endregion
private
List
<
dc_base_finance_fee
>
GetFinanceFeeList
(
GetCashFlowStatementInput
input
)
{
var
sql
=
$@"select * from dc_base_finance_fee s1
left JOIN dc_base_finance_company s2
ON s1.company_name = s2.company_name
where s1.cost_status = 4
and (s1.is_lend is null or s1.is_lend = 1
or (s1.is_lend = 2 and s1.lend_balance > 0) or (s1.is_lend = 2 and s1.cost_form = 1))
and s1.pay_time >= @PaymentTimeStart and s1.pay_time < @PaymentTimeEnd
and s2.company_type = @CorporateEntity "
;
var
para
=
new
DynamicParameters
();
para
.
Add
(
"PaymentTimeStart"
,
input
.
PaymentTimeStart
.
Date
);
para
.
Add
(
"PaymentTimeEnd"
,
input
.
PaymentTimeEnd
.
Date
);
para
.
Add
(
"CorporateEntity"
,
input
.
CorporateEntity
);
if
(!
string
.
IsNullOrWhiteSpace
(
input
.
CompanyName
)
&&
!
string
.
IsNullOrWhiteSpace
(
input
.
FeeType
))
{
sql
+=
" and s1.type_name=@type and s1.company_name = @companyname"
;
para
.
Add
(
"type"
,
input
.
FeeType
);
para
.
Add
(
"companyname"
,
input
.
CompanyName
);
}
var
data
=
SimpleCRUD
.
Query
<
dc_base_finance_fee
>(
sql
,
para
,
GlobalConfig
.
ConnectionString
).
ToList
();
foreach
(
var
item
in
data
)
{
if
(
item
.
cost_form
==
2
)
{
item
.
amount
=
-(
item
.
amount
);
item
.
amount_rmb
=
-(
item
.
amount_rmb
);
}
//借支单待还余额
if
(
item
.
cost_form
==
3
)
{
if
(
item
.
is_lend
.
HasValue
&&
item
.
is_lend
.
Value
==
2
&&
((
item
.
lend_balance
??
0
)
>
0
))
//归还金额
{
item
.
amount
=
-(
item
.
amount
);
item
.
amount_rmb
=
-(
item
.
amount_rmb
);
}
}
}
return
data
;
}
public
CommonApiResponseDto
<
List
<
FinanceDetailsDto
>>
GetFinanceDetails
(
GetCashFlowStatementInput
input
)
{
try
{
var
data
=
GetFinanceFeeList
(
input
);
var
dto
=
data
.
Select
(
x
=>
new
FinanceDetailsDto
{
Amount
=
Convert
.
ToDecimal
(
x
.
amount
),
AmountRmb
=
Convert
.
ToDecimal
(
x
.
amount
),
CompanyName
=
x
.
company_name
,
Currency
=
x
.
dic
,
DepartmentName
=
x
.
department_name
,
FeeSuperType
=
x
.
type_name
,
FeeId
=
x
.
cost_no
,
Accounting
=
x
.
accounting_subject_name
,
Reason
=
string
.
IsNullOrEmpty
(
x
.
cost_reason
)
?
x
.
cost_remark
:
x
.
cost_reason
,
PayTime
=
x
.
pay_time
.
HasValue
?
x
.
pay_time
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceiveUnit
=
x
.
bank_company
}).
ToList
();
return
new
CommonApiResponseDto
<
List
<
FinanceDetailsDto
>>
{
Data
=
dto
};
}
catch
(
Exception
e
)
{
return
new
CommonApiResponseDto
<
List
<
FinanceDetailsDto
>>
{
IsSuccess
=
false
,
Message
=
e
.
Message
};
}
}
}
}
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
c9504005
...
...
@@ -1374,7 +1374,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="PayName"></param>
/// <param name="ismanager">是否管理成本</param>
/// <returns></returns>
//
[BailunAuthentication(LoginMode.Enforce)]
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
[
HttpPost
]
[
BrowseLog
(
"Bailun_data"
,
"访问【百伦数据中心】->【财务报表】->【管理成本报表】->【查询】页面"
,
0
)]
public
JsonResult
AdministrativeCostJson
(
int
t
,
DateTime
start
,
DateTime
end
,
int
?
paycompanyid
,
int
?
ismanager
)
...
...
@@ -2009,7 +2009,6 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
string
ListAdministrativeCostJson
(
DateTime
start
,
DateTime
end
,
int
?
paycompanyid
,
string
headname
,
string
categoryname
,
int
type
,
int
issub
,
int
?
ismanager
)
{
var
user
=
HttpContextHelper
.
Current
?.
User
;
...
...
Bailun.DC.WebApi/Controllers/FinanceController.cs
View file @
c9504005
...
...
@@ -56,5 +56,14 @@ namespace Bailun.DC.WebApi.Controllers
return
new
FinanceService
().
GetFinanceFeeDetailsPage
(
input
);
}
#
endregion
/// <summary>
/// 获取付现流水报表明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"getFinanceDetails"
)]
public
CommonApiResponseDto
<
List
<
FinanceDetailsDto
>>
GetFinanceDetails
(
GetCashFlowStatementInput
input
)
=>
new
FinanceService
().
GetFinanceDetails
(
input
);
}
}
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