Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
c3e20e2b
Commit
c3e20e2b
authored
Jan 09, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店导出修改
parent
503e1364
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
180 additions
and
8 deletions
+180
-8
ClerkController.java
...in/java/com/gic/store/web/controller/ClerkController.java
+57
-8
ClerkQrcodeQO.java
...c/main/java/com/gic/store/web/qo/store/ClerkQrcodeQO.java
+123
-0
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/ClerkController.java
View file @
c3e20e2b
...
...
@@ -6,25 +6,26 @@ import com.gic.auth.dto.MenuDTO;
import
com.gic.auth.service.MenuApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.DataDownloadUtils
;
import
com.gic.download.utils.DownloadReport
;
import
com.gic.download.utils.DownloadUtils
;
import
com.gic.download.utils.ExecutorPoolSingleton
;
import
com.gic.download.constants.QrcodeTypeEnum
;
import
com.gic.download.qo.QrcodeContent
;
import
com.gic.download.utils.*
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.context.RequestContext
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.DownloadReportApiService
;
import
com.gic.enterprise.service.QrCodeApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.store.constant.ClerkLogReasonEnum
;
import
com.gic.store.dto.ClerkDTO
;
import
com.gic.store.dto.ClerkLogDTO
;
import
com.gic.store.dto.ClerkSearchDTO
;
import
com.gic.store.dto.ClerkStoreListDTO
;
import
com.gic.store.dto.*
;
import
com.gic.store.service.ClerkApiService
;
import
com.gic.store.service.ClerkLogApiService
;
import
com.gic.store.web.qo.PageQO
;
import
com.gic.store.web.qo.clerk.ClerkQO
;
import
com.gic.store.web.qo.store.ClerkQrcodeQO
;
import
com.gic.wechat.business.api.service.fwh.WeixinBaseFunService
;
import
com.gic.wechat.business.api.service.wxa.WeixinWxaFunService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -53,6 +54,14 @@ public class ClerkController extends DownloadUtils {
private
ClerkLogApiService
clerkLogApiService
;
@Autowired
private
MenuApiService
menuApiService
;
@Autowired
private
QrCodeApiService
qrCodeApiService
;
@Autowired
private
WeixinBaseFunService
weixinBaseFunService
;
@Autowired
private
WeixinWxaFunService
weixinWxaFunService
;
@Autowired
private
DownloadReportApiService
downloadReportApiService
;
@RequestMapping
(
"/list-clerk-field"
)
public
RestResponse
listClerkField
()
{
...
...
@@ -140,6 +149,46 @@ public class ClerkController extends DownloadUtils {
return
RestResponse
.
success
(
reportId
);
}
@RequestMapping
(
"clerk-qrcode-download"
)
public
RestResponse
clerkQrcodeDownload
(
@RequestBody
ClerkQrcodeQO
clerkQrcodeQO
){
int
total
=
clerkQrcodeQO
.
getContent
().
size
();
if
(
clerkQrcodeQO
.
getIsAll
()
==
1
){
ClerkSearchDTO
clerkSearchDTO
=
clerkQrcodeQO
.
getClerkSearchDTO
();
clerkSearchDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
ServiceResponse
<
Integer
>
totalClerkServiceResponse
=
clerkApiService
.
getTotalClerk
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
clerkSearchDTO
);
total
=
totalClerkServiceResponse
.
getResult
();
if
(
totalClerkServiceResponse
.
getResult
()
==
0
)
{
return
RestResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
ErrorCode
.
NOTEXISTS
.
getMsg
());
}
}
new
QrcodeDownload
(){
@Override
public
List
<
QrcodeContent
>
getContent
(
int
pageNum
,
int
pageSize
){
if
(
clerkQrcodeQO
.
getIsAll
()
==
1
){
ClerkSearchDTO
clerkSearchDTO
=
clerkQrcodeQO
.
getClerkSearchDTO
();
clerkSearchDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
ServiceResponse
<
Page
<
ClerkStoreListDTO
>>
result
=
clerkApiService
.
listClerk
(
clerkSearchDTO
.
getEnterpriseId
(),
clerkSearchDTO
,
pageNum
,
500
);
List
<
ClerkStoreListDTO
>
clerkStoreList
=
result
.
getResult
().
getResult
();
List
<
QrcodeContent
>
clerkDTOS
=
new
ArrayList
<>();
for
(
ClerkStoreListDTO
clerkStoreListDTO
:
clerkStoreList
)
{
List
<
ClerkDTO
>
clerkList
=
clerkStoreListDTO
.
getClerkList
();
for
(
ClerkDTO
clerkDTO
:
clerkList
)
{
QrcodeContent
qrcodeContent
=
new
QrcodeContent
();
qrcodeContent
.
setTitle
(
clerkDTO
.
getClerkName
());
qrcodeContent
.
setCustomParams
(
clerkDTO
.
getClerkId
()+
""
);
clerkDTOS
.
add
(
qrcodeContent
);
}
}
return
clerkDTOS
;
}
else
{
return
EntityUtil
.
changeEntityListByJSON
(
QrcodeContent
.
class
,
clerkQrcodeQO
.
getContent
());
}
}
}.
takeQrcode
(
EntityUtil
.
changeEntityByJSON
(
com
.
gic
.
download
.
qo
.
QrcodeQO
.
class
,
clerkQrcodeQO
),
total
,
QrcodeTypeEnum
.
CLERK
.
getType
(),
downloadReportApiService
,
weixinBaseFunService
,
weixinWxaFunService
,
qrCodeApiService
);
return
RestResponse
.
success
();
}
private
String
getDataContent
()
{
String
dataContent
;
Integer
moduleMenuId
=
(
Integer
)
RequestContext
.
getContext
().
getRequest
().
getAttribute
(
"moduleMenuId"
);
...
...
gic-store-web/src/main/java/com/gic/store/web/qo/store/ClerkQrcodeQO.java
0 → 100644
View file @
c3e20e2b
package
com
.
gic
.
store
.
web
.
qo
.
store
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
com.gic.store.dto.ClerkSearchDTO
;
import
org.apache.commons.lang.StringUtils
;
import
com.gic.store.dto.StoreSearchDTO
;
public
class
ClerkQrcodeQO
implements
Serializable
{
private
Integer
h5
=
0
;
private
String
appletIds
;
private
String
fwhIds
;
private
String
scenesValueIds
;
private
Integer
type
;
//1临时二维码 2永久二维码
private
Date
endTime
;
private
Integer
isAll
=
0
;
private
List
<
QrcodeContent
>
content
;
private
String
callBackService
;
private
String
callBackMethod
;
private
String
fileName
;
private
ClerkSearchDTO
clerkSearchDTO
;
public
Integer
getH5
()
{
return
h5
;
}
public
void
setH5
(
Integer
h5
)
{
if
(
h5
!=
null
&&
StringUtils
.
isNotBlank
(
h5
+
""
)){
this
.
h5
=
h5
;
}
}
public
String
getAppletIds
()
{
return
appletIds
;
}
public
void
setAppletIds
(
String
appletIds
)
{
this
.
appletIds
=
appletIds
;
}
public
String
getFwhIds
()
{
return
fwhIds
;
}
public
void
setFwhIds
(
String
fwhIds
)
{
this
.
fwhIds
=
fwhIds
;
}
public
String
getScenesValueIds
()
{
return
scenesValueIds
;
}
public
void
setScenesValueIds
(
String
scenesValueIds
)
{
this
.
scenesValueIds
=
scenesValueIds
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
List
<
QrcodeContent
>
getContent
()
{
return
content
;
}
public
void
setContent
(
List
<
QrcodeContent
>
content
)
{
this
.
content
=
content
;
}
public
String
getCallBackService
()
{
return
callBackService
;
}
public
void
setCallBackService
(
String
callBackService
)
{
this
.
callBackService
=
callBackService
;
}
public
String
getCallBackMethod
()
{
return
callBackMethod
;
}
public
void
setCallBackMethod
(
String
callBackMethod
)
{
this
.
callBackMethod
=
callBackMethod
;
}
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
Integer
getIsAll
()
{
return
isAll
;
}
public
void
setIsAll
(
Integer
isAll
)
{
this
.
isAll
=
isAll
;
}
public
ClerkSearchDTO
getClerkSearchDTO
()
{
return
clerkSearchDTO
;
}
public
void
setClerkSearchDTO
(
ClerkSearchDTO
clerkSearchDTO
)
{
this
.
clerkSearchDTO
=
clerkSearchDTO
;
}
}
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