Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
9ea4f06d
Commit
9ea4f06d
authored
Mar 19, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/haoban3.0/haoban-manage3.0.git
into developer
parents
d7d9c04b
7a7bd91c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
0 deletions
+79
-0
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+55
-0
MyApplicationContextAware.java
...gic/haoban/manage/web/init/MyApplicationContextAware.java
+14
-0
StoreDetailVO.java
...main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
+9
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+1
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
9ea4f06d
...
@@ -5,8 +5,10 @@ import java.text.SimpleDateFormat;
...
@@ -5,8 +5,10 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -22,6 +24,10 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -22,6 +24,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.dict.api.dto.CityDTO
;
import
com.gic.dict.api.dto.CountyDTO
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.dto.ProvinceDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
...
@@ -40,6 +46,7 @@ import com.gic.haoban.manage.api.service.DepartmentApiService;
...
@@ -40,6 +46,7 @@ import com.gic.haoban.manage.api.service.DepartmentApiService;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.web.anno.IgnoreLogin
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.StoreDetailVO
;
import
com.gic.haoban.manage.web.vo.StoreDetailVO
;
...
@@ -171,7 +178,54 @@ public class StoreController extends WebBaseController{
...
@@ -171,7 +178,54 @@ public class StoreController extends WebBaseController{
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDate
(
enterpriseId
,
storeId
,
date
);
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDate
(
enterpriseId
,
storeId
,
date
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
}
}
//获取首页销售数据
@IgnoreLogin
@RequestMapping
(
"/get-area-list"
)
public
HaobanResponse
getArea
(
Integer
type
,
String
id
)
{
if
(
type
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
List
<
ProvinceDTO
>
provinceList
=
new
ArrayList
<
ProvinceDTO
>();
List
<
CityDTO
>
cityList
=
new
ArrayList
<
CityDTO
>();
List
<
CountyDTO
>
countyList
=
new
ArrayList
<
CountyDTO
>();
switch
(
type
)
{
// 省
case
1
:
for
(
String
key
:
GlobalDictMap
.
provinceMap
.
keySet
())
{
provinceList
.
add
(
GlobalDictMap
.
provinceMap
.
get
(
key
));
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
provinceList
);
// 市
case
2
:
Map
<
String
,
CityDTO
>
tabCityMap
=
GlobalDictMap
.
cityMap
;
Map
<
String
,
CityDTO
>
cityMap
=
new
HashMap
<
String
,
CityDTO
>();
Set
<
Map
.
Entry
<
String
,
CityDTO
>>
citySet
=
tabCityMap
.
entrySet
();
for
(
Map
.
Entry
<
String
,
CityDTO
>
entry
:
citySet
)
{
if
(
entry
.
getValue
().
getProvinceId
().
equals
(
id
))
{
cityMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
for
(
String
key
:
cityMap
.
keySet
())
{
cityList
.
add
(
cityMap
.
get
(
key
));
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cityList
);
case
3
:
Map
<
String
,
CountyDTO
>
tabCountyMap
=
GlobalDictMap
.
countyMap
;
Map
<
String
,
CountyDTO
>
countyMap
=
new
HashMap
<
String
,
CountyDTO
>();
Set
<
Map
.
Entry
<
String
,
CountyDTO
>>
tabSet
=
tabCountyMap
.
entrySet
();
for
(
Map
.
Entry
<
String
,
CountyDTO
>
entry
:
tabSet
)
{
if
(
entry
.
getValue
().
getCityId
().
equals
(
id
))
{
countyMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
for
(
String
key
:
countyMap
.
keySet
())
{
countyList
.
add
(
countyMap
.
get
(
key
));
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
countyList
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_8
);
}
//获取首页销售数据
//获取首页销售数据
@RequestMapping
(
"/change-store-detail"
)
@RequestMapping
(
"/change-store-detail"
)
public
HaobanResponse
saleDate
(
String
wxEnterpriseId
,
String
storeId
,
String
staffId
,
String
changeField
,
String
oldValue
,
String
newValue
)
{
public
HaobanResponse
saleDate
(
String
wxEnterpriseId
,
String
storeId
,
String
staffId
,
String
changeField
,
String
oldValue
,
String
newValue
)
{
...
@@ -263,6 +317,7 @@ public class StoreController extends WebBaseController{
...
@@ -263,6 +317,7 @@ public class StoreController extends WebBaseController{
if
(
vo
.
getCloseTime
()!=
null
){
if
(
vo
.
getCloseTime
()!=
null
){
vo
.
setCloseTimeStr
(
sdf
.
format
(
vo
.
getCloseTime
()));
vo
.
setCloseTimeStr
(
sdf
.
format
(
vo
.
getCloseTime
()));
}
}
vo
.
setAreaId
(
store
.
getAreaId
());
vo
.
setStoreAddress
(
store
.
getFullArea
()+
" "
+
store
.
getStoreAddress
());
vo
.
setStoreAddress
(
store
.
getFullArea
()+
" "
+
store
.
getStoreAddress
());
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
staffDepartmentRelatedId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
staffDepartmentRelatedId
);
vo
.
setClerkCode
(
staffDepartmentRelatedDTO
.
getClerkCode
());
vo
.
setClerkCode
(
staffDepartmentRelatedDTO
.
getClerkCode
());
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/init/MyApplicationContextAware.java
View file @
9ea4f06d
...
@@ -3,17 +3,31 @@ package com.gic.haoban.manage.web.init;
...
@@ -3,17 +3,31 @@ package com.gic.haoban.manage.web.init;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.service.ManagerDictService
;
@Component
@Component
public
class
MyApplicationContextAware
implements
ApplicationContextAware
{
public
class
MyApplicationContextAware
implements
ApplicationContextAware
{
private
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
private
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
private
static
ApplicationContext
applicationContext
;
private
static
ApplicationContext
applicationContext
;
@Autowired
private
ManagerDictService
managerDictService
;
@Override
@Override
public
void
setApplicationContext
(
ApplicationContext
appContext
)
throws
BeansException
{
public
void
setApplicationContext
(
ApplicationContext
appContext
)
throws
BeansException
{
GlobalDictMap
.
countyMap
=
managerDictService
.
getCountysMap
();
GlobalDictMap
.
cityMap
=
managerDictService
.
getCitysMap
();
GlobalDictMap
.
provinceMap
=
managerDictService
.
getProvincesMap
();
GlobalDictMap
.
dictMap
=
managerDictService
.
getDictList
();
GlobalDictMap
.
storeCategoryDictMap
=
managerDictService
.
getStoreCategoryDictList
();
log
.
info
(
"数据字典放入缓存"
);
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
View file @
9ea4f06d
...
@@ -37,6 +37,15 @@ public class StoreDetailVO implements Serializable {
...
@@ -37,6 +37,15 @@ public class StoreDetailVO implements Serializable {
private
String
storeImage
;
private
String
storeImage
;
private
Double
storeArea
;
private
Double
storeArea
;
private
String
areaId
;
public
String
getAreaId
()
{
return
areaId
;
}
public
void
setAreaId
(
String
areaId
)
{
this
.
areaId
=
areaId
;
}
public
String
getClerkCode
()
{
public
String
getClerkCode
()
{
return
clerkCode
;
return
clerkCode
;
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
9ea4f06d
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.BindApiService"
id=
"bindApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.BindApiService"
id=
"bindApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
id=
"auditApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
id=
"auditApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditSettingApiService"
id=
"auditSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditSettingApiService"
id=
"auditSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.dict.api.service.ManagerDictService"
id=
"managerDictService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
...
...
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