Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BudgetManagementSystem
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
王利雷
BudgetManagementSystem
Commits
24cf3c9a
Commit
24cf3c9a
authored
Apr 23, 2019
by
shj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会议费的展示:数字的变化
parent
e2ca3cf9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
Conference.java
src/main/java/beans/Conference.java
+6
-0
DetailHandler.java
src/main/java/handlers/DetailHandler.java
+4
-4
IDetailService.java
src/main/java/service/IDetailService.java
+2
-0
DetailService.java
src/main/java/service/impl/DetailService.java
+9
-0
No files found.
src/main/java/beans/Conference.java
View file @
24cf3c9a
...
...
@@ -34,8 +34,14 @@ public class Conference extends Item {
this
.
experts
=
experts
;
}
/**
* 不能简单的把乘以天数,天数与费用的关系详见专家费用规定
* @return
*/
@Override
public
double
computeUnitPrice
()
{
int
d
=
getDays
();
return
getPrice
()*
getPeople
()*
getDays
();
}
...
...
src/main/java/handlers/DetailHandler.java
View file @
24cf3c9a
...
...
@@ -86,14 +86,14 @@ public class DetailHandler {
object
.
put
(
"travel"
,
sub
);
req_sofar
+=
req
;
sum_sofar
+=
sum
;
//
劳务
费
//
会议
费
sub
=
new
JSONObject
();
req
=
budget
.
getRequirement
().
get
Labour
();
sum
=
detailService
.
sum
Labour
(
budget
.
getLabour
());
req
=
budget
.
getRequirement
().
get
Conference
();
sum
=
detailService
.
sum
Conference
(
budget
.
getConferences
());
sub
.
put
(
"req"
,
req
);
sub
.
put
(
"sum"
,
sum
);
sub
.
put
(
"diff"
,
req
-
sum
);
object
.
put
(
"
labour
"
,
sub
);
object
.
put
(
"
conference
"
,
sub
);
req_sofar
+=
req
;
sum_sofar
+=
sum
;
//产权费
...
...
src/main/java/service/IDetailService.java
View file @
24cf3c9a
...
...
@@ -13,4 +13,6 @@ public interface IDetailService {
double
sumLabour
(
Map
<
Labour
,
Integer
>
labour
);
double
sumProperty
(
Map
<
Property
,
Integer
>
properties
);
double
sumConference
(
Map
<
Conference
,
Integer
>
conferences
);
}
src/main/java/service/impl/DetailService.java
View file @
24cf3c9a
...
...
@@ -43,4 +43,13 @@ public class DetailService implements IDetailService {
}
return
sum
;
}
@Override
public
double
sumConference
(
Map
<
Conference
,
Integer
>
conferences
)
{
double
sum
=
0.0
;
for
(
Conference
item
:
conferences
.
keySet
())
{
sum
+=(
item
.
computeUnitPrice
()*
conferences
.
get
(
item
));
}
return
sum
;
}
}
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