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
b2c1062c
Commit
b2c1062c
authored
Jan 09, 2024
by
guojx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-2023-12-data-rank' into 'master'
Feature 2023 12 data rank See merge request
!1611
parents
8663e7d1
da2f810a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
447 additions
and
16 deletions
+447
-16
DataController.java
...gic/haoban/manage/web/controller/data/DataController.java
+122
-16
StoreRankController.java
...aoban/manage/web/controller/data/StoreRankController.java
+156
-0
ClerkListQO.java
...n/java/com/gic/haoban/manage/web/qo/data/ClerkListQO.java
+34
-0
DateFillUtils.java
...n/java/com/gic/haoban/manage/web/utils/DateFillUtils.java
+12
-0
IndexVO.java
.../main/java/com/gic/haoban/manage/web/vo/rank/IndexVO.java
+67
-0
StoreRankAreaVO.java
...va/com/gic/haoban/manage/web/vo/rank/StoreRankAreaVO.java
+53
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+3
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/data/DataController.java
View file @
b2c1062c
...
@@ -6,6 +6,8 @@ import com.ctrip.framework.apollo.Config;
...
@@ -6,6 +6,8 @@ import com.ctrip.framework.apollo.Config;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.DataApiUtils
;
import
com.gic.commons.util.DataApiUtils
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.GlobalVar
;
...
@@ -59,6 +61,8 @@ public class DataController {
...
@@ -59,6 +61,8 @@ public class DataController {
private
EnterpriseChannelApiService
enterpriseChannelApiService
;
private
EnterpriseChannelApiService
enterpriseChannelApiService
;
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
private
ClerkService
clerkService
;
private
String
isProd
()
{
private
String
isProd
()
{
Config
config
=
ConfigService
.
getConfig
(
"COMMON.gic-properties"
);
Config
config
=
ConfigService
.
getConfig
(
"COMMON.gic-properties"
);
...
@@ -67,6 +71,97 @@ public class DataController {
...
@@ -67,6 +71,97 @@ public class DataController {
}
}
/**
/**
* 获取销售和会员的导购列表数据
* 返回字段具体看数据组接口文档:http://yapi.gicdev.com/project/5177/interface/api/179038
* http://yapi.gicdev.com/project/5177/interface/api/179362
* @param qo
* @return
*/
@RequestMapping
(
value
=
"list-clerk-data"
)
@ResponseBody
public
RestResponse
listClerkData
(
@RequestBody
ClerkListQO
qo
)
{
String
params
=
qo
.
getParams
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
params
);
String
enterpriseId
=
jsonObject
.
getString
(
"enterpriseId"
);
String
storeId
=
jsonObject
.
getString
(
"storeId"
);
if
(
StringUtils
.
isBlank
(
enterpriseId
)
||
StringUtils
.
isBlank
(
storeId
))
{
return
RestResponse
.
failure
(
"-1"
,
"企业id或者门店id为空"
);
}
List
<
String
>
deleteList
=
new
ArrayList
<>();
List
<
String
>
normalList
=
new
ArrayList
<>();
List
<
String
>
allList
=
new
ArrayList
<>();
List
<
ClerkListDTO
>
clerkList
=
clerkService
.
getClerkByStoreIdOfAllStatus
(
enterpriseId
,
storeId
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkList
))
{
for
(
ClerkListDTO
dto
:
clerkList
)
{
Integer
status
=
dto
.
getStatus
();
allList
.
add
(
dto
.
getClerkId
());
if
(
status
!=
null
&&
status
==
0
)
{
deleteList
.
add
(
dto
.
getClerkId
());
}
else
{
normalList
.
add
(
dto
.
getClerkId
());
}
}
}
if
(
CollectionUtils
.
isEmpty
(
deleteList
))
{
deleteList
.
add
(
"no_delete_clerk_id"
);
}
if
(
CollectionUtils
.
isEmpty
(
normalList
))
{
deleteList
.
add
(
"no_normal_clerk_id"
);
}
if
(
CollectionUtils
.
isEmpty
(
allList
))
{
deleteList
.
add
(
"no_clerk_id"
);
}
Integer
clerkType
=
qo
.
getQueryDataType
();
boolean
isSale
=
clerkType
==
1
;
Integer
pageNum
=
jsonObject
.
getInteger
(
"pageNum"
);
String
apolloKey
=
qo
.
getApolloKey
();
boolean
isFirstPage
=
pageNum
==
1
;
if
(
isSale
)
{
jsonObject
.
put
(
"storeGroup"
,
9
);
}
else
{
jsonObject
.
put
(
"groupType"
,
9
);
}
jsonObject
.
put
(
"clerkId"
,
normalList
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
Map
<
String
,
Object
>
res
=
DataApiUtils
.
http
(
jsonObject
.
toJSONString
(),
apolloKey
);
Page
page
=
DataApiUtils
.
getPageData
(
res
);
List
<
JSONObject
>
pageList
=
DataApiUtils
.
getPageList
(
res
);
if
(
CollectionUtils
.
isEmpty
(
pageList
))
{
pageList
=
new
ArrayList
<>();
}
if
(
isFirstPage
)
{
if
(
isSale
)
{
jsonObject
.
put
(
"storeGroup"
,
7
);
}
else
{
jsonObject
.
put
(
"groupType"
,
8
);
}
jsonObject
.
put
(
"clerkId"
,
allList
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
JSONObject
total
=
getTotalJson
(
jsonObject
,
apolloKey
);
if
(
total
!=
null
)
{
pageList
.
add
(
0
,
total
);
}
}
int
totalPage
=
page
.
getTotalCount
()
%
page
.
getPageSize
()
!=
0
?
page
.
getTotalCount
()
/
page
.
getPageSize
()
+
1
:
page
.
getTotalCount
()
/
page
.
getPageSize
();
boolean
isLastPage
=
totalPage
==
pageNum
;
if
(
isLastPage
)
{
// 最后一页添加离职导购数据
jsonObject
.
put
(
"clerkId"
,
deleteList
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
if
(
isSale
)
{
jsonObject
.
put
(
"storeGroup"
,
7
);
}
else
{
jsonObject
.
put
(
"groupType"
,
8
);
}
JSONObject
deleteTotal
=
getTotalJson
(
jsonObject
,
apolloKey
);
if
(
deleteTotal
!=
null
)
{
deleteTotal
.
put
(
"clerkName"
,
"离职导购(汇总)"
);
pageList
.
add
(
deleteTotal
);
}
}
return
RestResponse
.
successResult
(
page
);
}
/**
* 会员封装数据
* 会员封装数据
* @param qo
* @param qo
* @return
* @return
...
@@ -159,6 +254,10 @@ public class DataController {
...
@@ -159,6 +254,10 @@ public class DataController {
List
<
JSONObject
>
list
=
DataApiUtils
.
getDataList
(
res
);
List
<
JSONObject
>
list
=
DataApiUtils
.
getDataList
(
res
);
if
(
list
==
null
)
{
if
(
list
==
null
)
{
list
=
new
ArrayList
<>();
list
=
new
ArrayList
<>();
}
else
{
if
(
list
.
size
()
>
0
)
{
list
.
get
(
0
).
put
(
"mbrType"
,
"合计"
);
}
}
}
jsonParam
.
put
(
"groupType"
,
2
);
jsonParam
.
put
(
"groupType"
,
2
);
res
=
DataApiUtils
.
http
(
jsonParam
.
toJSONString
(),
apolloKey
);
res
=
DataApiUtils
.
http
(
jsonParam
.
toJSONString
(),
apolloKey
);
...
@@ -194,8 +293,8 @@ public class DataController {
...
@@ -194,8 +293,8 @@ public class DataController {
}
}
BigDecimal
bd
=
new
BigDecimal
(
a
.
toString
());
BigDecimal
bd
=
new
BigDecimal
(
a
.
toString
());
bd
=
bd
.
multiply
(
new
BigDecimal
(
100
));
bd
=
bd
.
multiply
(
new
BigDecimal
(
100
));
bd
=
bd
.
divide
(
new
BigDecimal
(
b
.
toString
()));
bd
=
bd
.
divide
(
new
BigDecimal
(
b
.
toString
())
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
bd
=
bd
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//
bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);
return
bd
.
toString
();
return
bd
.
toString
();
}
}
...
@@ -234,20 +333,15 @@ public class DataController {
...
@@ -234,20 +333,15 @@ public class DataController {
String
storeIdParam
=
jsonObject
.
getString
(
"storeId"
);
String
storeIdParam
=
jsonObject
.
getString
(
"storeId"
);
boolean
hasStoreId
=
StringUtils
.
isNotBlank
(
storeIdParam
);
boolean
hasStoreId
=
StringUtils
.
isNotBlank
(
storeIdParam
);
if
(!
hasStoreId
)
{
if
(!
hasStoreId
)
{
List
<
String
>
storeIdList
=
new
ArrayList
<>();
getAuthStore
(
qo
.
getStoreId
(),
qo
.
getClerkId
(),
qo
.
getWxEnterpriseId
(),
jsonObject
);
String
storeId
=
qo
.
getStoreId
();
if
(
StringUtils
.
isBlank
(
storeId
))
{
storeIdList
=
storeAuthUtils
.
queryClerkStoreIds
(
qo
.
getClerkId
(),
qo
.
getWxEnterpriseId
());
}
else
{
storeIdList
.
add
(
storeId
);
}
if
(
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
//区经有全部门店权限
jsonObject
.
put
(
"storeId"
,
storeIdList
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
}
}
}
String
apolloKey
=
qo
.
getApolloKey
();
String
apolloKey
=
qo
.
getApolloKey
();
boolean
notNeedStoreIdParam
=
"data_store_rank_index_info"
.
equals
(
apolloKey
);
if
(
notNeedStoreIdParam
)
{
jsonObject
.
remove
(
"storeId"
);
}
Map
<
String
,
Object
>
res
=
DataApiUtils
.
http
(
jsonObject
.
toJSONString
(),
apolloKey
);
Map
<
String
,
Object
>
res
=
DataApiUtils
.
http
(
jsonObject
.
toJSONString
(),
apolloKey
);
boolean
isNeedFill
=
(
apolloKey
.
contains
(
"data_mbr_scale_stat_new_custm_overview"
)
boolean
isNeedFill
=
(
apolloKey
.
contains
(
"data_mbr_scale_stat_new_custm_overview"
)
...
@@ -256,8 +350,10 @@ public class DataController {
...
@@ -256,8 +350,10 @@ public class DataController {
apolloKey
.
contains
(
"week"
))
apolloKey
.
contains
(
"week"
))
&&
jsonObject
.
containsKey
(
"storeGroup"
)
&&
&&
jsonObject
.
containsKey
(
"storeGroup"
)
&&
((
apolloKey
.
contains
(
"data_sales"
)
&&
((
apolloKey
.
contains
(
"data_sales"
)
&&
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
3
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
4
))
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
3
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
4
||
(
apolloKey
.
contains
(
"data_mbr"
)
&&
jsonObject
.
getInteger
(
"storeGroup"
)
==
2
));
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
))
||
(
apolloKey
.
contains
(
"data_mbr"
)
&&
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
2
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
)));
if
(
isNeedFill
)
{
if
(
isNeedFill
)
{
log
.
info
(
"需要补零"
);
log
.
info
(
"需要补零"
);
List
<
JSONObject
>
resultList
=
DataApiUtils
.
getDataList
(
res
);
List
<
JSONObject
>
resultList
=
DataApiUtils
.
getDataList
(
res
);
...
@@ -268,7 +364,17 @@ public class DataController {
...
@@ -268,7 +364,17 @@ public class DataController {
if
(
apolloKey
.
contains
(
"day"
))
{
if
(
apolloKey
.
contains
(
"day"
))
{
dateTypeList
=
DateFillUtils
.
getDay
(
jsonObject
.
getString
(
"bizDate"
));
dateTypeList
=
DateFillUtils
.
getDay
(
jsonObject
.
getString
(
"bizDate"
));
}
else
if
(
apolloKey
.
contains
(
"month"
))
{
}
else
if
(
apolloKey
.
contains
(
"month"
))
{
dateTypeList
=
DateFillUtils
.
getMonth
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
7
));
//data_sales_perf_anal_cont_clerk_month_overview
//data_sales_perf_anal_cont_month_overview
//data_mbr_scale_stat_month_clerk_overview
//data_mbr_scale_stat_new_month_overview
//data_mbr_scale_stat_new_month_clerk_overview
boolean
isYearMonthQuery
=
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
;
if
(
isYearMonthQuery
)
{
dateTypeList
=
DateFillUtils
.
getMonthOfYear
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
4
));
}
else
{
dateTypeList
=
DateFillUtils
.
getMonth
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
7
));
}
}
else
if
(
apolloKey
.
contains
(
"week"
))
{
}
else
if
(
apolloKey
.
contains
(
"week"
))
{
dateTypeList
=
DateFillUtils
.
getWeek
(
jsonObject
.
getString
(
"startDate"
));
dateTypeList
=
DateFillUtils
.
getWeek
(
jsonObject
.
getString
(
"startDate"
));
}
else
if
(
apolloKey
.
contains
(
"custm"
))
{
}
else
if
(
apolloKey
.
contains
(
"custm"
))
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/data/StoreRankController.java
0 → 100644
View file @
b2c1062c
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
data
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.web.qo.PageQo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.dto.data.DataIndexExplainDTO
;
import
com.gic.enterprise.api.dto.rank.StoreRankAreaDTO
;
import
com.gic.enterprise.api.dto.rank.StoreRankIndexDTO
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.enterprise.api.service.data.DataIndexApiService
;
import
com.gic.enterprise.api.service.rank.StoreRankApiService
;
import
com.gic.enterprise.service.CustomSettingApiService
;
import
com.gic.haoban.manage.web.vo.rank.IndexVO
;
import
com.gic.haoban.manage.web.vo.rank.StoreRankAreaVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 单项排行榜
* @Author guojx
* @Date 2023/12/28 14:14
*/
@Controller
@RequestMapping
(
"store-rank"
)
@Slf4j
public
class
StoreRankController
{
@Autowired
private
StoreRankApiService
storeRankApiService
;
@Autowired
private
CustomSettingApiService
customSettingApiService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
@Autowired
private
DataIndexApiService
dataIndexApiService
;
public
static
final
String
RANK_INDEX_DB_NAME
=
"tab_store_pk_index_dict"
;
public
static
final
String
ORDER_FIELD
=
"custom_order_field_name"
;
public
static
final
String
ORDER_FIELD_DESC
=
"custom_order_field_name_desc"
;
/**
* 企业竞赛单项
* @param enterpriseId
* @return
*/
@RequestMapping
(
value
=
"sales-structure"
)
@ResponseBody
public
RestResponse
<
List
<
IndexVO
>>
salesStructure
(
String
enterpriseId
,
String
storeId
)
{
Map
<
String
,
Object
>
queryMap
=
new
HashMap
<>();
queryMap
.
put
(
ORDER_FIELD
,
"indexSort"
);
queryMap
.
put
(
ORDER_FIELD_DESC
,
1
);
Page
<
JSONObject
>
page
=
customSettingApiService
.
page
(
RANK_INDEX_DB_NAME
,
queryMap
,
1
,
100
).
getResult
();
List
<
JSONObject
>
list
=
page
.
getResult
();
List
<
IndexVO
>
indexList
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
list
),
IndexVO
.
class
);
List
<
DataIndexExplainDTO
>
dictIndex
=
dataIndexApiService
.
listDataIndexExplain
();
Map
<
String
,
DataIndexExplainDTO
>
map
=
dictIndex
.
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getIndexCode
(),
e
->
e
));
for
(
IndexVO
vo
:
indexList
)
{
DataIndexExplainDTO
dto
=
map
.
get
(
vo
.
getIndexCode
());
if
(
dto
!=
null
)
{
vo
.
setIndexExample
(
dto
.
getIndexExample
());
vo
.
setIndexName
(
dto
.
getIndexName
());
vo
.
setApiColName
(
dto
.
getApiColName
());
vo
.
setIndexExplain
(
dto
.
getIndexExplain
());
vo
.
setIndexRemark
(
dto
.
getIndexRemark
());
}
}
List
<
StoreRankIndexDTO
>
enterpriseIndexList
=
storeRankApiService
.
listStoreRankIndex
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
enterpriseIndexList
))
{
return
RestResponse
.
successResult
(
Collections
.
emptyList
());
}
Set
<
String
>
set
=
enterpriseIndexList
.
stream
().
map
(
e
->
e
.
getIndexCode
()).
collect
(
Collectors
.
toSet
());
indexList
=
indexList
.
stream
().
filter
(
e
->
set
.
contains
(
e
.
getIndexCode
())).
collect
(
Collectors
.
toList
());
List
<
IndexVO
>
resultList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
indexList
)
&&
StringUtils
.
isNotBlank
(
storeId
))
{
PageQo
pageQo
=
new
PageQo
();
pageQo
.
setPageNum
(
1
);
pageQo
.
setPageSize
(
1
);
for
(
IndexVO
temp
:
indexList
)
{
if
(
listStoreRankArea
(
pageQo
,
enterpriseId
,
temp
.
getIndexCode
(),
storeId
).
getResult
().
getTotalCount
()
>
0
)
{
resultList
.
add
(
temp
);
}
}
return
RestResponse
.
successResult
(
resultList
);
}
return
RestResponse
.
successResult
(
indexList
);
}
/**
* 赛区列表
* @param pageQo
* @param enterpriseId
* @param indexCode
* @param storeId
* @return
*/
@RequestMapping
(
"list-store-rank-area"
)
@ResponseBody
public
RestResponse
<
Page
<
StoreRankAreaVO
>>
listStoreRankArea
(
PageQo
pageQo
,
String
enterpriseId
,
String
indexCode
,
String
storeId
)
{
List
<
String
>
authStoreIdList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
storeId
))
{
authStoreIdList
.
add
(
storeId
);
}
Page
<
StoreRankAreaDTO
>
page
=
storeRankApiService
.
pageStoreRankArea
(
enterpriseId
,
indexCode
,
null
,
null
,
pageQo
.
getBasePageInfo
(),
authStoreIdList
);
Page
<
StoreRankAreaVO
>
voPage
=
EntityUtil
.
changeEntityNew
(
Page
.
class
,
page
);
List
<
StoreRankAreaVO
>
voList
=
EntityUtil
.
changeEntityListNew
(
StoreRankAreaVO
.
class
,
page
.
getResult
());
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
for
(
StoreRankAreaVO
vo
:
voList
)
{
StoreWidgetDTO
storeWidgetDTO
=
storeWidgetService
.
getStoreWidgetBykey
(
vo
.
getStoreWidgetId
());
if
(
storeWidgetDTO
!=
null
)
{
//0:所有门店 1:门店类型 2:门店标签 3:门店区域 4:门店分组 5:部分门店
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
String
areaName
;
switch
(
selectType
)
{
case
0
:
areaName
=
"所有门店"
;
break
;
case
1
:
areaName
=
"门店类型"
;
break
;
case
2
:
areaName
=
"门店标签"
;
break
;
case
3
:
areaName
=
"门店区域"
;
break
;
case
4
:
areaName
=
"门店分组"
;
break
;
case
5
:
areaName
=
"部分门店"
;
break
;
default
:
areaName
=
"未知"
;
}
vo
.
setAreaName
(
areaName
);
}
}
}
voPage
.
setResult
(
voList
);
return
RestResponse
.
successResult
(
voPage
);
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/data/ClerkListQO.java
0 → 100644
View file @
b2c1062c
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
data
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author guojx
* @Date 2023/11/23 9:13
*/
@Data
public
class
ClerkListQO
implements
Serializable
{
/**
* 1:销售 2:会员
*/
private
Integer
queryDataType
=
1
;
/**
* 数据组配置的接口key。数据组提供的yapi文档上有
*/
private
String
apolloKey
;
/**
* 组装的参数,JSON字符串.数据组提供的yapi文档上有.
* 销售:data_sales_perf_anal_cont_clerk_group 会员:
* 0: 'data_mbr_scale_stat_clerk_overview',
* 1: 'data_mbr_scale_stat_week_clerk_overview',
* 2: 'data_mbr_scale_stat_month_clerk_overview',
* 3: 'data_mbr_scale_stat_year_clerk_overview',
* 4: 'data_mbr_scale_stat_custm_clerk_overview'
* params里面的销售的storeGroup字段和会员的groupType字段不需要,如果有,也是无效,后端定值覆盖
*/
private
String
params
;
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/utils/DateFillUtils.java
View file @
b2c1062c
...
@@ -120,6 +120,18 @@ public class DateFillUtils {
...
@@ -120,6 +120,18 @@ public class DateFillUtils {
return
dateList
;
return
dateList
;
}
}
public
static
List
<
String
>
getMonthOfYear
(
String
date
)
{
List
<
String
>
dateList
=
new
ArrayList
<>();
for
(
int
i
=
1
;
i
<=
12
;
i
++)
{
if
(
i
<
10
)
{
dateList
.
add
(
date
+
"-0"
+
i
);
}
else
{
dateList
.
add
(
date
+
"-"
+
i
);
}
}
return
dateList
;
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
log
.
info
(
""
+
JSONObject
.
toJSONString
(
getWeek
(
"2023-11-27"
)));
log
.
info
(
""
+
JSONObject
.
toJSONString
(
getWeek
(
"2023-11-27"
)));
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/rank/IndexVO.java
0 → 100644
View file @
b2c1062c
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
rank
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.Serializable
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @Author guojx
* @Date 2023/12/25 9:56
*/
@Data
public
class
IndexVO
implements
Serializable
{
private
String
indexCode
;
private
String
indexName
;
private
String
indexExplain
;
/**
* 前端使用:指标说明:若指标注释中有需要说明的
*/
private
List
<
String
>
indexRemarkList
;
/**
* 前端使用:指标例子
*/
private
List
<
String
>
indexExampleList
;
/**
* 指标说明:若指标注释中有需要说明的,英文分号隔开,可能多个。
*/
private
String
indexRemark
;
/**
* 指标例子: 英文分号隔开,可能多个
*/
private
String
indexExample
;
/**
* yapi文档上的驼峰字段名称
*/
private
String
apiColName
;
/**
* 观云台原指标code
*/
private
String
itemId
;
public
List
<
String
>
getIndexRemarkList
()
{
if
(
StringUtils
.
isNotBlank
(
indexRemark
))
{
return
Arrays
.
stream
(
indexRemark
.
split
(
";"
)).
collect
(
Collectors
.
toList
());
}
return
indexRemarkList
;
}
public
List
<
String
>
getIndexExampleList
()
{
if
(
StringUtils
.
isNotBlank
(
indexExample
))
{
return
Arrays
.
stream
(
indexExample
.
split
(
";"
)).
collect
(
Collectors
.
toList
());
}
return
indexExampleList
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/rank/StoreRankAreaVO.java
0 → 100644
View file @
b2c1062c
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
rank
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author guojx
* @Date 2023/12/25 15:44
*/
@Data
public
class
StoreRankAreaVO
implements
Serializable
{
private
String
competitionAreaId
;
/**
* 赛区范围
*/
private
String
areaName
;
private
String
indexCode
;
/**
* 赛区名称
*/
private
String
name
;
/**
* 是否显示指标(0:否,1:是)
*/
private
Integer
showIndex
;
/**
* 是否固化门店(0:否,1:是)
*/
private
Integer
fixedStore
;
/**
* 管辖门店控件id
*/
private
String
storeWidgetId
;
private
String
creatorUserId
;
private
String
creatorName
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
storeCount
;
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
b2c1062c
...
@@ -167,4 +167,7 @@
...
@@ -167,4 +167,7 @@
<dubbo:reference
id=
"enterpriseChannelApiService"
interface=
"com.gic.enterprise.api.service.EnterpriseChannelApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseChannelApiService"
interface=
"com.gic.enterprise.api.service.EnterpriseChannelApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"storeRankApiService"
interface=
"com.gic.enterprise.api.service.rank.StoreRankApiService"
timeout=
"100000"
retries=
"0"
check=
"false"
/>
</beans>
</beans>
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