Commit 2d7d5fe7 by guojx

Merge branch 'feature-2023-11-cloud' into 'master'

Feature 2023 11 cloud

See merge request !1577
parents ac231f53 1107dc9c
...@@ -28,6 +28,8 @@ public enum NoticeMessageTypeEnum { ...@@ -28,6 +28,8 @@ public enum NoticeMessageTypeEnum {
TASK_TRANS(2010, "话务任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_trans", "/pages/route/index?pageType=", "hbapp_task_list_new", "TelServiceTaskByStoreManage", "haobanNotice"), TASK_TRANS(2010, "话务任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_trans", "/pages/route/index?pageType=", "hbapp_task_list_new", "TelServiceTaskByStoreManage", "haobanNotice"),
PERFORMANCE_TASK_UPDATE(2011, "指标任务变更通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "performance_task_update", "/pages/route/index?pageType=", "hbapp_task_kpi_detail", "targetTaskByUpdate", "haobanNotice"),
STORE_ACCOUNT(3001, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list", "accountApplication", "haobanNotice"), STORE_ACCOUNT(3001, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list", "accountApplication", "haobanNotice"),
// //
......
package com.gic.haoban.manage.web.qo.data;
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/9/27 11:13
*/
@Data
public class DataIndexExplainVO implements Serializable {
private String id;
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;
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;
}
}
package com.gic.haoban.manage.web.qo.data;
import lombok.Data;
import java.io.Serializable;
/**
* @Author guojx
* @Date 2023/9/27 11:06
*/
@Data
public class DataIndexQO implements Serializable {
/**
* 指标code
*/
private String indexCode;
/**
* 指标名称
*/
private String indexName;
/**
* 0:不满意 1:满意
*/
private Integer indexEvaluate;
/**
* 不满意原因
*/
private String reason;
/**
* 自定义原因
*/
private String customReason;
private String enterpriseId;
private String clerkId;
}
package com.gic.haoban.manage.web.qo.data;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author guojx
* @Date 2023/11/24 12:21
*/
@Data
public class DataMemberExtendQO implements Serializable {
/**
* 门店查询参数. 区经可以为空,查询所有管辖门店
*/
private String storeId;
/**
* 企业ID.
*/
private String enterpriseId;
/**
* 微信企业
*/
private String wxEnterpriseId;
/**
* 如果是区经,用于查询管辖门店权限
*/
private String clerkId;
private String params;
/**
* 1:日 2:周 3:月 :4:自定义
*/
private Integer dateType;
/**
* 1:实时 0:离线
*/
private Integer realFlag;
/**
* 1:会员总数 2:新增会员
*/
private Integer totalMemberFlag;
/**
* 权限渠道范围
*/
private List<String> channelCodeList;
public boolean isReal() {
return realFlag != null && realFlag == 1;
}
public boolean isTotalMember() {
return totalMemberFlag != null && totalMemberFlag == 1;
}
}
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 HandleQO implements Serializable {
/**
* 组装的参数,JSON字符串.数据组提供的yapi文档上有.
* 注:门店参数storeId根据storeSelect参数计算
*/
private String params;
/**
* 数据组配置的接口key。数据组提供的yapi文档上有
*/
private String apolloKey;
/**
* 门店查询参数. 区经可以为空,查询所有管辖门店
*/
private String storeId;
/**
* 企业ID.
*/
private String enterpriseId;
/**
* 微信企业
*/
private String wxEnterpriseId;
/**
* 如果是区经,用于查询管辖门店权限
*/
private String clerkId;
}
package com.gic.haoban.manage.web.utils;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.DataApiUtils;
import lombok.extern.slf4j.Slf4j;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
/**
* @Author guojx
* @Date 2023/11/29 10:49
*/
@Slf4j
public class DateFillUtils {
public static List<String> getDay(String date) {
List<String> dateList = new ArrayList<>();
try {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
calendar.setTime(df.parse(date));
calendar.add(Calendar.DATE, -29);
String temp = df.format(calendar.getTime());
while (temp.compareTo(date) <= 0) {
dateList.add(temp.substring(5));
calendar.add(Calendar.DATE, 1);
temp = df.format(calendar.getTime());
}
} catch (Exception e) {
log.error("时间匹配调整:{}", e.getMessage(), e);
}
return dateList;
}
public static List<String> getCustom(String start, String end) {
List<String> dateList = new ArrayList<>();
try {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
calendar.setTime(df.parse(start));
String temp = df.format(calendar.getTime());
while (temp.compareTo(end) <= 0) {
dateList.add(temp.substring(5));
calendar.add(Calendar.DATE, 1);
temp = df.format(calendar.getTime());
}
} catch (Exception e) {
log.error("时间匹配调整:{}", e.getMessage(), e);
}
return dateList;
}
public static List<String> getWeek(String date) {
List<String> dateList = new ArrayList<>();
try {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
calendar.setTime(df.parse(date));
calendar.add(Calendar.WEEK_OF_YEAR, -11);
String temp = df.format(calendar.getTime());
JSONObject jsonObject = new JSONObject();
jsonObject.put("pageNum", 1);
jsonObject.put("pageSize", 20);
jsonObject.put("startDate", temp);
jsonObject.put("endDate", date);
Map<String, Object> res = DataApiUtils.http(jsonObject.toJSONString(), "data_pub_date_week");
List<JSONObject> list = DataApiUtils.getPageList(res);
for (JSONObject json : list) {
dateList.add(json.getString("weekYear"));
}
log.info("week data:{}", list);
} catch (Exception e) {
log.error("时间匹配调整:{}", e.getMessage(), e);
}
return dateList;
}
public static List<String> getYear(String date) {
List<String> dateList = new ArrayList<>();
Integer year = Integer.parseInt(date);
Integer min = year - 11;
for (int i = min; i <= year; i++) {
dateList.add(i + "");
}
return dateList;
}
public static List<String> getMonth(String date) {
List<String> dateList = new ArrayList<>();
try {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM");
calendar.setTime(df.parse(date));
calendar.add(Calendar.MONTH, -11);
String temp = df.format(calendar.getTime());
while (temp.compareTo(date) <= 0) {
dateList.add(temp);
calendar.add(Calendar.MONTH, 1);
temp = df.format(calendar.getTime());
}
} catch (Exception e) {
log.error("时间匹配调整:{}", e.getMessage(), e);
}
return dateList;
}
public static void main(String[] args) {
log.info("" + JSONObject.toJSONString(getWeek("2023-11-27")));
}
}
package com.gic.haoban.manage.web.vo.data;
import lombok.Data;
import java.io.Serializable;
/**
* @Author guojx
* @Date 2023/11/24 13:54
*/
@Data
public class DataMemberExtendVO implements Serializable {
private String channelCode;
/**
* 开卡会员
*/
private Integer openMbrNum;
/**
* 昨日开卡会员
*/
private Integer lastOpenMbrNum;
/**
* 关联会员
*/
private Integer relMbrNum;
/**
* 昨日关联会员
*/
private Integer lastRelMbrNum;
/**
* 关联会员环比
*/
private Double relMbrNumRatio;
/**
* 关联会员同比
*/
private Double relMbrNumSply;
/**
* 开卡会员环比
*/
private Double openMbrNumRatio;
/**
* 开卡会员同比
*/
private Double openMbrNumSply;
/**
* 1:服务门店
*/
private Integer serviceFlag;
}
...@@ -161,4 +161,8 @@ ...@@ -161,4 +161,8 @@
<dubbo:reference interface="com.gic.enterprise.api.service.content.ValueAddedServicesOrderApiService" id="valueAddedServicesOrderApiService" <dubbo:reference interface="com.gic.enterprise.api.service.content.ValueAddedServicesOrderApiService" id="valueAddedServicesOrderApiService"
timeout="10000" retries="0" check="false"/> timeout="10000" retries="0" check="false"/>
<dubbo:reference id="dataIndexApiService" interface="com.gic.enterprise.api.service.data.DataIndexApiService" timeout="10000" retries="0" check="false" />
<dubbo:reference id="enterpriseChannelApiService" interface="com.gic.enterprise.api.service.EnterpriseChannelApiService" timeout="10000" retries="0" check="false"/>
</beans> </beans>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment