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
ca37ff09
Commit
ca37ff09
authored
Dec 26, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整管理成本明细,改为从库表读取
parent
1ce850e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
39 deletions
+53
-39
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+14
-1
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+39
-38
No files found.
Bailun.DC.Services/FinanceReportServices.cs
View file @
ca37ff09
...
@@ -253,7 +253,7 @@ namespace Bailun.DC.Services
...
@@ -253,7 +253,7 @@ namespace Bailun.DC.Services
/// <param name="start">付款开始时间</param>
/// <param name="start">付款开始时间</param>
/// <param name="end">付款结束时间</param>
/// <param name="end">付款结束时间</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
Models
.
dc_base_finance_managecost
>
ListFinanceManageCost
(
DateTime
start
,
DateTime
end
,
string
feesupertype
,
int
?
paycompanyid
)
public
List
<
Models
.
dc_base_finance_managecost
>
ListFinanceManageCost
(
DateTime
start
,
DateTime
end
,
string
feesupertype
,
string
feesubtype
,
string
departmentname
,
int
?
paycompanyid
)
{
{
var
sqlparam
=
new
DynamicParameters
();
var
sqlparam
=
new
DynamicParameters
();
var
list
=
new
List
<
Models
.
dc_base_finance_managecost
>();
var
list
=
new
List
<
Models
.
dc_base_finance_managecost
>();
...
@@ -266,6 +266,19 @@ namespace Bailun.DC.Services
...
@@ -266,6 +266,19 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"type"
,
feesupertype
);
sqlparam
.
Add
(
"type"
,
feesupertype
);
}
}
if
(!
string
.
IsNullOrEmpty
(
feesubtype
))
{
sql
+=
" and fee_sub_type=@subtype"
;
sqlparam
.
Add
(
"subtype"
,
feesubtype
);
}
if
(!
string
.
IsNullOrEmpty
(
departmentname
))
{
sql
+=
" and department_name=@department_name"
;
sqlparam
.
Add
(
"department_name"
,
departmentname
);
}
if
(
paycompanyid
.
HasValue
&&
paycompanyid
.
Value
>
0
)
if
(
paycompanyid
.
HasValue
&&
paycompanyid
.
Value
>
0
)
{
{
sql
+=
" and company_value="
+
paycompanyid
.
Value
;
sql
+=
" and company_value="
+
paycompanyid
.
Value
;
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
ca37ff09
...
@@ -392,7 +392,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -392,7 +392,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
listInterest
=
new
Services
.
FinanceReportServices
().
ListInterestExpense
(
cwurl
);
var
listInterest
=
new
Services
.
FinanceReportServices
().
ListInterestExpense
(
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);
var
listValue
=
new
List
<
Tuple
<
string
,
List
<
decimal
>>>();
var
listValue
=
new
List
<
Tuple
<
string
,
List
<
decimal
>>>();
var
listCol
=
new
List
<
string
>();
var
listCol
=
new
List
<
string
>();
var
listColVal
=
new
List
<
int
>();
var
listColVal
=
new
List
<
int
>();
...
@@ -728,7 +728,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -728,7 +728,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
url
+=
"&feeSuperType="
+
categoryname
;
url
+=
"&feeSuperType="
+
categoryname
;
}
}
var
list
=
new
Services
.
FinanceReportServices
().
ListFinanceManageCost
(
start
,
end
,
categoryname
,
paycompanyid
);
//new Services.FinanceReportServices().ListOtherCost(url);
var
list
=
new
Services
.
FinanceReportServices
().
ListFinanceManageCost
(
start
,
end
,
categoryname
,
""
,
""
,
paycompanyid
);
//new Services.FinanceReportServices().ListOtherCost(url);
var
listValue
=
new
List
<
Tuple
<
string
,
List
<
decimal
>>>();
var
listValue
=
new
List
<
Tuple
<
string
,
List
<
decimal
>>>();
var
listCol
=
heads
.
Split
(
"|"
).
ToList
();
var
listCol
=
heads
.
Split
(
"|"
).
ToList
();
...
@@ -823,20 +823,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -823,20 +823,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <returns></returns>
/// <returns></returns>
public
string
ListAdministrativeCostJson
(
DateTime
start
,
DateTime
end
,
int
?
paycompanyid
,
string
headname
,
string
categoryname
,
int
type
,
int
issub
)
public
string
ListAdministrativeCostJson
(
DateTime
start
,
DateTime
end
,
int
?
paycompanyid
,
string
headname
,
string
categoryname
,
int
type
,
int
issub
)
{
{
var
url
=
ConfigHelper
.
GetByName
(
"FeeUrl"
)
+
"?o=0"
;
//
var url = ConfigHelper.GetByName("FeeUrl") + "?o=0";
url
+=
"&startDate="
+
start
.
ToString
(
"yyyy-MM-dd"
)
+
"&endDate="
+
end
.
ToString
(
"yyyy-MM-dd"
);
//
url += "&startDate=" + start.ToString("yyyy-MM-dd") + "&endDate=" + end.ToString("yyyy-MM-dd");
if
(
paycompanyid
.
HasValue
&&
paycompanyid
.
Value
>
0
)
//
if (paycompanyid.HasValue && paycompanyid.Value>0)
{
//
{
url
+=
"&companyValue="
+
paycompanyid
.
Value
;
//
url += "&companyValue=" + paycompanyid.Value;
}
//
}
if
(!
string
.
IsNullOrEmpty
(
headname
))
if
(!
string
.
IsNullOrEmpty
(
headname
))
{
{
if
(
type
==
1
)
if
(
type
==
1
)
{
{
url
+=
"&departmentName="
+
headname
;
//
url += "&departmentName=" + headname;
}
}
else
else
{
{
...
@@ -845,40 +845,41 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -845,40 +845,41 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
if
(
objPayCompany
!=
null
)
if
(
objPayCompany
!=
null
)
{
{
val
=
objPayCompany
.
company_value
;
paycompanyid
=
objPayCompany
.
company_value
;
}
}
url
+=
"&companyValue="
+
val
;
}
}
}
}
if
(!
string
.
IsNullOrEmpty
(
categoryname
))
//
if (!string.IsNullOrEmpty(categoryname))
{
//
{
if
(
issub
==
0
)
//
if (issub == 0)
{
//
{
url
+=
"&feeSuperType="
+
categoryname
;
//
url += "&feeSuperType=" + categoryname;
}
//
}
else
//
else
{
//
{
url
+=
"&feeSubType="
+
categoryname
;
//
url += "&feeSubType=" + categoryname;
}
//
}
}
//}
//var obj = new Services.FinanceReportServices().ListOtherCost(url);
var
obj
=
new
Services
.
FinanceReportServices
().
ListFinanceManageCost
(
start
,
end
,
(
issub
==
0
?
categoryname
:
""
),
(
issub
!=
0
?
categoryname
:
""
),
(
type
==
1
?
headname
:
""
),
paycompanyid
);
var
obj
=
new
Services
.
FinanceReportServices
().
ListOtherCost
(
url
);
if
(
obj
.
Count
>
0
)
if
(
obj
.
Count
>
0
)
{
{
var
m
=
new
Models
.
Api
.
mOtherFee
{
var
m
=
new
Models
.
dc_base_finance_managecost
{
no
=
""
,
no
=
""
,
company
N
ame
=
""
,
company
_n
ame
=
""
,
amount
=
obj
.
Sum
(
a
=>
a
.
amount
),
amount
=
obj
.
Sum
(
a
=>
a
.
amount
),
amount
Rmb
=
obj
.
Sum
(
a
=>
a
.
amountR
mb
),
amount
_rmb
=
obj
.
Sum
(
a
=>
a
.
amount_r
mb
),
currency
=
""
,
currency
=
""
,
department
N
ame
=
""
,
department
_n
ame
=
""
,
fee
SubT
ype
=
""
,
fee
_sub_t
ype
=
""
,
fee
SuperT
ype
=
"合计"
,
fee
_super_t
ype
=
"合计"
,
};
};
obj
.
Add
(
m
);
obj
.
Add
(
m
);
...
@@ -886,17 +887,17 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -886,17 +887,17 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
list
=
obj
.
Select
(
a
=>
new
{
var
list
=
obj
.
Select
(
a
=>
new
{
amount
=
a
.
amount
.
ToString
(
"###,###.##"
),
amount
=
a
.
amount
.
ToString
(
"###,###.##"
),
amountRmb
=
a
.
amount
R
mb
.
ToString
(
"###,###.##"
),
amountRmb
=
a
.
amount
_r
mb
.
ToString
(
"###,###.##"
),
a
.
companyN
ame
,
companyName
=
a
.
company_n
ame
,
a
.
currency
,
a
.
currency
,
a
.
departmentN
ame
,
departmentName
=
a
.
department_n
ame
,
a
.
feeSubT
ype
,
feeSubType
=
a
.
fee_sub_t
ype
,
a
.
feeSuperT
ype
,
feeSuperType
=
a
.
fee_super_t
ype
,
a
.
no
,
a
.
no
,
a
.
manageCostT
ype
,
manageCostType
=
a
.
manage_cost_t
ype
,
a
.
receiveU
nit
,
receiveUnit
=
a
.
receive_u
nit
,
a
.
reason
,
a
.
reason
,
payTime
=
a
.
pay
Time
.
HasValue
?
a
.
payT
ime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
payTime
=
a
.
pay
_time
.
HasValue
?
a
.
pay_t
ime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
}).
ToList
();
}).
ToList
();
...
...
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