Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
fbb45b7c
Commit
fbb45b7c
authored
Dec 17, 2020
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1004065] 手动关联RAYS书刊新增出版社筛选
parent
9e186615
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
16 deletions
+42
-16
BookAdviserBiz.java
...rc/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
+2
-2
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+32
-10
BookAdviserFacade.java
...n/java/com/pcloud/book/book/facade/BookAdviserFacade.java
+3
-1
BookAdviserFacadeImpl.java
...m/pcloud/book/book/facade/impl/BookAdviserFacadeImpl.java
+5
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
View file @
fbb45b7c
...
@@ -207,7 +207,7 @@ public interface BookAdviserBiz {
...
@@ -207,7 +207,7 @@ public interface BookAdviserBiz {
void
refactorData
(
Long
parentId
,
Long
originTempletId
,
Long
secondTempletId
);
void
refactorData
(
Long
parentId
,
Long
originTempletId
,
Long
secondTempletId
);
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
,
Integer
currentPage
,
Integer
numPerPage
);
/**
/**
* 设置书刊是否已下印状态
* 设置书刊是否已下印状态
...
@@ -312,5 +312,5 @@ public interface BookAdviserBiz {
...
@@ -312,5 +312,5 @@ public interface BookAdviserBiz {
/**
/**
* 导出编辑书刊列表(ERP项目用)
* 导出编辑书刊列表(ERP项目用)
*/
*/
Map
<
String
,
Object
>
exportAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
);
Map
<
String
,
Object
>
exportAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
fbb45b7c
...
@@ -895,7 +895,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -895,7 +895,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
@Override
@Override
@ParamLog
(
"获取编辑书刊列表(ERP项目用)"
)
@ParamLog
(
"获取编辑书刊列表(ERP项目用)"
)
public
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Integer
currentPage
,
Integer
numPerPage
)
{
public
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
,
Integer
currentPage
,
Integer
numPerPage
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"uniqueNumber"
,
uniqueNumber
);
paramMap
.
put
(
"uniqueNumber"
,
uniqueNumber
);
...
@@ -906,6 +906,19 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -906,6 +906,19 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
}
}
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
}
}
if
(
agentId
!=
null
&&
agentId
>
0
){
List
<
Long
>
allAdvisers4Agent
=
adviserConsr
.
getByAgentId
(
agentId
);
if
(
CollectionUtils
.
isEmpty
(
allAdvisers4Agent
))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
if
(
paramMap
.
containsKey
(
"adviserIds"
)){
List
<
Long
>
adviserIds
=
(
List
<
Long
>)
paramMap
.
get
(
"adviserIds"
);
adviserIds
.
retainAll
(
allAdvisers4Agent
);
}
else
{
paramMap
.
put
(
"adviserIds"
,
allAdvisers4Agent
);
}
}
PageBeanNew
<
ErpAdviserBookVO
>
pageBeanNew
=
bookAdviserDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listAdviserBook4Erp"
);
PageBeanNew
<
ErpAdviserBookVO
>
pageBeanNew
=
bookAdviserDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listAdviserBook4Erp"
);
List
<
ErpAdviserBookVO
>
bookVOS
=
pageBeanNew
.
getRecordList
();
List
<
ErpAdviserBookVO
>
bookVOS
=
pageBeanNew
.
getRecordList
();
if
(!
CollectionUtils
.
isEmpty
(
bookVOS
))
{
if
(!
CollectionUtils
.
isEmpty
(
bookVOS
))
{
...
@@ -1985,8 +1998,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1985,8 +1998,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
* 导出编辑书刊列表(ERP项目用)
* 导出编辑书刊列表(ERP项目用)
*/
*/
@Override
@Override
public
Map
<
String
,
Object
>
exportAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
)
{
public
Map
<
String
,
Object
>
exportAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
)
{
if
(
StringUtils
.
isBlank
(
isbn
)
&&
StringUtils
.
isBlank
(
uniqueNumber
)
&&
StringUtils
.
isBlank
(
adviserName
)){
if
(
StringUtils
.
isBlank
(
isbn
)
&&
StringUtils
.
isBlank
(
uniqueNumber
)
&&
StringUtils
.
isBlank
(
adviserName
)
&&
!
NumberUtil
.
isNumber
(
agentId
)
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"请筛选后再下载!"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"请筛选后再下载!"
);
}
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
...
@@ -1999,18 +2012,27 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1999,18 +2012,27 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
}
}
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
}
}
if
(
agentId
!=
null
&&
agentId
>
0
){
List
<
Long
>
allAdvisers4Agent
=
adviserConsr
.
getByAgentId
(
agentId
);
if
(
CollectionUtils
.
isEmpty
(
allAdvisers4Agent
))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"当前列表为空,请重新筛选再下载!"
);
}
if
(
paramMap
.
containsKey
(
"adviserIds"
)){
List
<
Long
>
adviserIds
=
(
List
<
Long
>)
paramMap
.
get
(
"adviserIds"
);
adviserIds
.
retainAll
(
allAdvisers4Agent
);
}
else
{
paramMap
.
put
(
"adviserIds"
,
allAdvisers4Agent
);
}
}
List
<
ErpAdviserBookVO
>
bookVOS
=
bookAdviserDao
.
listAdviserBook4Erp
(
paramMap
);
List
<
ErpAdviserBookVO
>
bookVOS
=
bookAdviserDao
.
listAdviserBook4Erp
(
paramMap
);
if
(
ListUtils
.
isEmpty
(
bookVOS
)){
if
(
ListUtils
.
isEmpty
(
bookVOS
)){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"当前列表为空,请重新筛选再下载!"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"当前列表为空,请重新筛选再下载!"
);
}
}
List
<
CompletableFuture
<
Boolean
>>
futures
=
new
ArrayList
();
List
<
CompletableFuture
<
Boolean
>>
futures
=
new
ArrayList
();
for
(
int
i
=
0
;
i
<=
bookVOS
.
size
()
/
100
;
i
++)
{
int
beginIndex
=
i
*
100
;
int
limitNumber
=
100
;
int
endIndex
=
beginIndex
+
100
;
for
(
int
i
=
0
;
i
<
(
bookVOS
.
size
()
%
limitNumber
==
0
?
bookVOS
.
size
()
/
limitNumber
:
bookVOS
.
size
()
/
limitNumber
+
1
);
i
++)
{
if
(
i
==
(
bookVOS
.
size
()
-
1
)/
100
){
List
<
ErpAdviserBookVO
>
bookVOList
=
bookVOS
.
stream
().
skip
(
i
*
limitNumber
).
limit
(
limitNumber
).
collect
(
Collectors
.
toList
());
endIndex
=
bookVOS
.
size
();
}
List
<
ErpAdviserBookVO
>
bookVOList
=
bookVOS
.
subList
(
beginIndex
,
endIndex
);
futures
.
add
(
CompletableFuture
.
supplyAsync
(()
->
{
futures
.
add
(
CompletableFuture
.
supplyAsync
(()
->
{
this
.
setBookInfo4Erp
(
bookVOList
);
this
.
setBookInfo4Erp
(
bookVOList
);
return
true
;
return
true
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookAdviserFacade.java
View file @
fbb45b7c
...
@@ -209,12 +209,14 @@ public interface BookAdviserFacade {
...
@@ -209,12 +209,14 @@ public interface BookAdviserFacade {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"uniqueNumber"
,
value
=
"uniqueNumber"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"uniqueNumber"
,
value
=
"uniqueNumber"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"adviserName"
,
value
=
"adviserName"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@ApiImplicitParam
(
name
=
"adviserName"
,
value
=
"adviserName"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"agentId"
,
value
=
"agentId"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listAdviserBook4Erp"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"listAdviserBook4Erp"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
listAdviserBook4Erp
(
@RequestHeader
(
"token"
)
String
token
,
ResponseDto
<?>
listAdviserBook4Erp
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
,
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
,
@RequestParam
(
value
=
"agentId"
,
required
=
false
)
Long
agentId
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
PermissionException
,
JsonParseException
,
BizException
;
throws
PermissionException
,
JsonParseException
,
BizException
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookAdviserFacadeImpl.java
View file @
fbb45b7c
...
@@ -198,10 +198,11 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
...
@@ -198,10 +198,11 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
,
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
,
@RequestParam
(
value
=
"agentId"
,
required
=
false
)
Long
agentId
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
PermissionException
,
JsonParseException
,
BizException
{
throws
PermissionException
,
JsonParseException
,
BizException
{
return
new
ResponseDto
<>(
bookAdviserBiz
.
listAdviserBook4Erp
(
isbn
,
uniqueNumber
,
adviserName
,
currentPage
,
numPerPage
));
return
new
ResponseDto
<>(
bookAdviserBiz
.
listAdviserBook4Erp
(
isbn
,
uniqueNumber
,
adviserName
,
agentId
,
currentPage
,
numPerPage
));
}
}
/**
/**
...
@@ -211,9 +212,10 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
...
@@ -211,9 +212,10 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
public
ResponseDto
<?>
exportAdviserBook4Erp
(
@RequestHeader
(
"token"
)
String
token
,
public
ResponseDto
<?>
exportAdviserBook4Erp
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"uniqueNumber"
,
required
=
false
)
String
uniqueNumber
,
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
)
@RequestParam
(
value
=
"adviserName"
,
required
=
false
)
String
adviserName
,
@RequestParam
(
value
=
"agentId"
,
required
=
false
)
Long
agentId
)
throws
PermissionException
,
JsonParseException
,
BizException
{
throws
PermissionException
,
JsonParseException
,
BizException
{
return
new
ResponseDto
<>(
bookAdviserBiz
.
exportAdviserBook4Erp
(
isbn
,
uniqueNumber
,
adviserName
));
return
new
ResponseDto
<>(
bookAdviserBiz
.
exportAdviserBook4Erp
(
isbn
,
uniqueNumber
,
adviserName
,
agentId
));
}
}
@Override
@Override
...
...
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