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
6e9fded1
Commit
6e9fded1
authored
Jan 13, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
a2dbb37a
526dd48d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
215 additions
and
25 deletions
+215
-25
StoreDTO.java
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
+1
-1
StoreInfoDTO.java
...ore-api/src/main/java/com/gic/store/dto/StoreInfoDTO.java
+10
-0
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+9
-11
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
StoreFieldVO.java
...in/java/com/gic/store/web/vo/storefield/StoreFieldVO.java
+15
-5
No files found.
gic-store-api/src/main/java/com/gic/store/dto/StoreDTO.java
View file @
6e9fded1
...
...
@@ -34,7 +34,7 @@ public class StoreDTO extends StoreInfoDTO implements Serializable {
private
List
<
Integer
>
storeGroupIdList
;
private
String
storeGroupName
;
private
Integer
isEditStoreGroup
;
private
Integer
isEditStoreGroup
=
0
;
private
Integer
fromEnterpriseId
;
private
String
fromEnterpriseName
;
...
...
gic-store-api/src/main/java/com/gic/store/dto/StoreInfoDTO.java
View file @
6e9fded1
...
...
@@ -58,6 +58,8 @@ public class StoreInfoDTO implements Serializable {
*/
private
String
areaId
;
private
String
countyId
;
/**
* 经度
*/
...
...
@@ -472,4 +474,12 @@ public class StoreInfoDTO implements Serializable {
public
void
setLocation
(
List
<
Double
>
location
)
{
this
.
location
=
location
;
}
public
String
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
String
countyId
)
{
this
.
countyId
=
countyId
;
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
6e9fded1
...
...
@@ -408,6 +408,7 @@ public class StoreApiServiceImpl implements StoreApiService {
List
<
StoreDTO
>
result
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
StoreDTO
storeDTO
=
JSON
.
toJavaObject
(
list
.
get
(
i
),
StoreDTO
.
class
);
storeDTO
.
setAreaId
(
storeDTO
.
getCountyId
());
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getLatitude
())
&&
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getLongitude
())
&&
CollectionUtils
.
isNotEmpty
(
storeDTO
.
getLocation
())){
double
v
=
GeoUtils
.
arcDistance
(
Double
.
valueOf
(
storeSearchDTO
.
getLatitude
()),
Double
.
valueOf
(
storeSearchDTO
.
getLongitude
()),
...
...
@@ -627,16 +628,13 @@ public class StoreApiServiceImpl implements StoreApiService {
@Override
public
ServiceResponse
<
StoreDTO
>
getStoreByStoreCode
(
Integer
enterpriseId
,
Integer
regionId
,
String
storeCode
)
{
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setStoreCode
(
storeCode
);
storeSearchDTO
.
setRegionId
(
regionId
);
ServiceResponse
<
Page
<
StoreDTO
>>
response
=
this
.
listStore
(
storeSearchDTO
,
1
,
1
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
List
<
StoreDTO
>
result
=
response
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
return
ServiceResponse
.
success
(
result
.
get
(
0
));
}
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDBDTO
.
setStoreCode
(
storeCode
);
storeSearchDBDTO
.
setRegionId
(
regionId
);
com
.
github
.
pagehelper
.
Page
<
StoreDTO
>
page
=
this
.
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
1
);
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
return
ServiceResponse
.
success
(
page
.
getResult
().
get
(
0
));
}
return
ServiceResponse
.
success
();
}
...
...
@@ -922,7 +920,7 @@ public class StoreApiServiceImpl implements StoreApiService {
esDTO
.
setBusinessTimeList
(
dto
.
getBusinessTimeList
());
esDTO
.
setPhotoList
(
dto
.
getPhotoList
());
esDTO
.
setAddress
(
dto
.
getAddress
());
Double
[]
location
=
{
Double
.
valueOf
(
dto
.
getLongitude
()),
Double
.
valueOf
(
dto
.
getLatitude
())};
Double
[]
location
=
{
Double
.
valueOf
(
StringUtils
.
isBlank
(
dto
.
getLongitude
())?
"0"
:
dto
.
getLongitude
()),
Double
.
valueOf
(
StringUtils
.
isBlank
(
dto
.
getLatitude
())?
"0"
:
dto
.
getLatitude
())};
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
esDTO
));
jsonObject
.
put
(
"location"
,
location
);
List
<
StoreExtendDTO
>
storeExtendDTOList
=
dto
.
getStoreExtendList
();
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/ClerkController.java
View file @
6e9fded1
...
...
@@ -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 @
6e9fded1
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
;
}
}
gic-store-web/src/main/java/com/gic/store/web/vo/storefield/StoreFieldVO.java
View file @
6e9fded1
package
com
.
gic
.
store
.
web
.
vo
.
storefield
;
import
com.gic.store.constant.StoreFieldTypeEnum
;
import
org.apache.commons.lang.StringUtils
;
import
java.io.Serializable
;
...
...
@@ -61,6 +62,11 @@ public class StoreFieldVO implements Serializable{
*/
private
Integer
isFilter
;
/**
* 与ERP映射的门店字段
*/
private
String
erpRelCode
;
public
Integer
getStoreFieldId
()
{
return
storeFieldId
;
}
...
...
@@ -134,11 +140,7 @@ public class StoreFieldVO implements Serializable{
}
public
Integer
getIsErpMapping
()
{
return
isErpMapping
;
}
public
void
setIsErpMapping
(
Integer
isErpMapping
)
{
this
.
isErpMapping
=
isErpMapping
;
return
StringUtils
.
isBlank
(
this
.
erpRelCode
)
?
0
:
1
;
}
public
Integer
getIsFilter
()
{
...
...
@@ -148,4 +150,12 @@ public class StoreFieldVO implements Serializable{
public
void
setIsFilter
(
Integer
isFilter
)
{
this
.
isFilter
=
isFilter
;
}
public
String
getErpRelCode
()
{
return
erpRelCode
;
}
public
void
setErpRelCode
(
String
erpRelCode
)
{
this
.
erpRelCode
=
erpRelCode
;
}
}
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