Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
maliang
lwby_copyright_book_data
Commits
c7568b02
You need to sign in or sign up before continuing.
Commit
c7568b02
authored
May 08, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传bug修复
parent
1a349026
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
CopyrightDao.java
src/main/java/com/boot/security/server/dao/CopyrightDao.java
+3
-0
CopyrightBookServiceImpl.java
...ecurity/server/service/impl/CopyrightBookServiceImpl.java
+18
-1
bookMonthDetail.html
...urces/static/pages/copyrightBookData/bookMonthDetail.html
+2
-0
No files found.
src/main/java/com/boot/security/server/dao/CopyrightDao.java
View file @
c7568b02
...
...
@@ -13,6 +13,9 @@ public interface CopyrightDao {
@Select
(
"select roleId from sys_role_user where userId=#{userId}"
)
Integer
selectRoleId
(
@Param
(
"userId"
)
Long
userId
);
@Select
(
"SELECT a.report_date AS reportDate,a.copyright_id as copyrightId from bi_report.report_book_settlement_month a where a.release_status =1"
)
List
<
BaseSettlement
>
selectReleaseCopyright
();
List
<
Long
>
selectUserAll
();
List
<
BaseSettlement
>
selectTableListMonth
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
,
@Param
(
"status"
)
Integer
status
);
...
...
src/main/java/com/boot/security/server/service/impl/CopyrightBookServiceImpl.java
View file @
c7568b02
...
...
@@ -124,12 +124,13 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
}
baseSettlement
.
setCountSettlement
(
Double
.
valueOf
(
df
.
format
(
baseSettlement
.
getSettlementAmount
()+
baseSettlement
.
getSettlementAdAmount
())));
}
Integer
count
=
copyrightDao
.
selectTableListMonthCount
(
baseSettlementList
);
Integer
count
=
copyrightDao
.
selectTableListMonthCount
(
baseSettlementList
,
status
);
return
PageTableHandler
.
getJSONObject
(
baseSettlements
,
count
);
}
@Override
public
String
selectBookSettlement
(
Integer
copyrightId
,
String
startTime
,
String
endTime
,
Long
bookId
,
String
bookName
,
Integer
page
,
Integer
limit
)
{
Integer
roleId
=
copyrightDao
.
selectRoleId
(
UserUtil
.
getLoginUser
().
getId
());
List
<
BaseSettlement
>
baseSettlementList
=
new
ArrayList
<>();
if
(
copyrightId
==
null
||
copyrightId
==
0
){
baseSettlementList
=
copyrightDao
.
selectCopyrightById
(
UserUtil
.
getLoginUser
().
getId
());
...
...
@@ -139,9 +140,25 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
baseSettlementList
.
add
(
baseSettlement
);
}
List
<
BaseSettlement
>
list
=
new
ArrayList
<>();
if
(
roleId
!=
3
){
list
=
copyrightDao
.
selectReleaseCopyright
();
}
List
<
BaseSettlement
>
baseSettlements
=
copyrightDao
.
selectBookDetail
(
baseSettlementList
,
bookId
,
bookName
,
startTime
,
endTime
,
page
-
1
,
limit
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
BaseSettlement
baseSettlement
:
baseSettlements
)
{
Boolean
flag
=
false
;
for
(
BaseSettlement
settlement
:
list
)
{
if
(
(
settlement
.
getReportDate
().
equals
(
baseSettlement
.
getReportDate
()))
&&
(
settlement
.
getCopyrightId
()==
baseSettlement
.
getCopyrightId
())){
flag
=
true
;
break
;
}
}
if
(
flag
==
false
&&
list
.
size
()>
0
){
baseSettlements
.
remove
(
baseSettlement
);
break
;
}
if
(
baseSettlement
.
getTotalAmount
()==
null
){
baseSettlement
.
setTotalAmount
(
0
d
);
}
...
...
src/main/resources/static/pages/copyrightBookData/bookMonthDetail.html
View file @
c7568b02
...
...
@@ -173,6 +173,8 @@
console
.
log
(
startTime
);
console
.
log
(
endTime
);
console
.
log
(
copyrights
);
var
list
=
{
bookId
:
bookId
,
bookName
:
bookName
,
startTime
:
startTime
,
endTime
:
endTime
,
copyrightIds
:
copyrights
};
tableIns
.
reload
({
where
:{
bookId
:
bookId
,
bookName
:
bookName
,
startTime
:
startTime
,
endTime
:
endTime
,
copyrightIds
:
copyrights
}})
}
...
...
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