Compare commits
2 Commits
1fb945a40f
...
aeda8f2fda
| Author | SHA1 | Date | |
|---|---|---|---|
| aeda8f2fda | |||
| 194c3712f8 |
@@ -227,7 +227,24 @@ public class GridCmpmService {
|
|||||||
Map<String, Integer> historyLevelCountMap = getCustLevelCountMap(custManagerDTO, "last");
|
Map<String, Integer> historyLevelCountMap = getCustLevelCountMap(custManagerDTO, "last");
|
||||||
Map<String, Integer> custLevelCompLm = calculateLevelChanges(historyLevelCountMap, currentLevelCountMap);
|
Map<String, Integer> custLevelCompLm = calculateLevelChanges(historyLevelCountMap, currentLevelCountMap);
|
||||||
vo.setCustLevelCompLm(custLevelCompLm);
|
vo.setCustLevelCompLm(custLevelCompLm);
|
||||||
vo.setCustLevelCount(currentLevelCountMap);
|
|
||||||
|
// 在 vo.setCustLevelCompLm 之前,按顺序重新组织数据
|
||||||
|
String[] order = {"5星", "4星", "3星", "2星", "1星", "基础", "长尾"};
|
||||||
|
Map<String, Integer> orderedCustLevelCompLm = new LinkedHashMap<>();
|
||||||
|
for (String itemKey : order) {
|
||||||
|
if (custLevelCompLm.containsKey(itemKey)) {
|
||||||
|
orderedCustLevelCompLm.put(itemKey, custLevelCompLm.get(itemKey));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setCustLevelCompLm(orderedCustLevelCompLm);
|
||||||
|
// custLevelCount 同理
|
||||||
|
Map<String, Integer> orderedCustLevelCount = new LinkedHashMap<>();
|
||||||
|
for (String itemKey : order) {
|
||||||
|
if (currentLevelCountMap.containsKey(itemKey)) {
|
||||||
|
orderedCustLevelCount.put(itemKey, currentLevelCountMap.get(itemKey));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setCustLevelCount(orderedCustLevelCount);
|
||||||
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public interface CustMapMapper extends BaseMapper<CustInfoRadar> {
|
|||||||
|
|
||||||
List<CustMapExcelVO> exportCustMapListByPolygon(CustMapPolygonExcelDTO custMapPolygonExcelDTO );
|
List<CustMapExcelVO> exportCustMapListByPolygon(CustMapPolygonExcelDTO custMapPolygonExcelDTO );
|
||||||
|
|
||||||
List<CustMapVO> selectLngAndLat(@Param("offset") int offset, @Param("limit") int limit);
|
List<CustMapVO> selectLngAndLat(@Param("lastId") long lastId, @Param("limit") int limit);
|
||||||
|
|
||||||
void saveCodeToCustMap(@Param("updateDataList") List<Map<String, Object>> updateDataLis);
|
void saveCodeToCustMap(@Param("updateDataList") List<Map<String, Object>> updateDataLis);
|
||||||
|
|
||||||
|
|||||||
@@ -85,12 +85,12 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
|||||||
//pointInGeometryScheduled
|
//pointInGeometryScheduled
|
||||||
@Override
|
@Override
|
||||||
public void pointInGeometryScheduled() {
|
public void pointInGeometryScheduled() {
|
||||||
int pageSize = 1000; // 每页处理1000条数据
|
int pageSize = 1000;
|
||||||
int offset = 0;
|
long lastId = 0L;
|
||||||
List<CustMapVO> custMapVOS;
|
List<CustMapVO> custMapVOS;
|
||||||
do {
|
do {
|
||||||
// 分页查询客户地图数据
|
// 分页查询客户地图数据
|
||||||
custMapVOS = custMapMapper.selectLngAndLat(offset, pageSize);
|
custMapVOS = custMapMapper.selectLngAndLat(lastId, pageSize);
|
||||||
// 收集需要更新的数据
|
// 收集需要更新的数据
|
||||||
List<Map<String, Object>> updateDataList = new ArrayList<>();
|
List<Map<String, Object>> updateDataList = new ArrayList<>();
|
||||||
for (CustMapVO custMapVO : custMapVOS) {
|
for (CustMapVO custMapVO : custMapVOS) {
|
||||||
@@ -121,6 +121,10 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
|||||||
if (!updateDataList.isEmpty()) {
|
if (!updateDataList.isEmpty()) {
|
||||||
custMapMapper.saveCodeToCustMap(updateDataList);
|
custMapMapper.saveCodeToCustMap(updateDataList);
|
||||||
}
|
}
|
||||||
|
// 关键:移动游标
|
||||||
|
if (!custMapVOS.isEmpty()) {
|
||||||
|
lastId = custMapVOS.get(custMapVOS.size() - 1).getId();
|
||||||
|
}
|
||||||
// 避免数据库连接过多占用,适当休眠
|
// 避免数据库连接过多占用,适当休眠
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
@@ -128,9 +132,8 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
|||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (custMapVOS.size() == pageSize); // 当查询结果小于页大小时,说明已处理完所有数据
|
} while (!custMapVOS.isEmpty()); // 当查询结果小于页大小时,说明已处理完所有数据
|
||||||
|
log.info("地址解析定时任务执行完成");
|
||||||
log.info("地址解析定时任务执行完成, 共处理{}条数据", offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -265,7 +268,6 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
|||||||
flattenFeoTree(geoInfoDTO, allGeoInfoDTOList);
|
flattenFeoTree(geoInfoDTO, allGeoInfoDTOList);
|
||||||
}
|
}
|
||||||
log.info("扁平化区域列表大小: {}", allGeoInfoDTOList.size());
|
log.info("扁平化区域列表大小: {}", allGeoInfoDTOList.size());
|
||||||
|
|
||||||
log.info("<-------------------Loading completed.------------------->");
|
log.info("<-------------------Loading completed.------------------->");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ public class VisitInfoDTO {
|
|||||||
@ApiModelProperty(value = "异常走访标签 0正常 1走访频率异常 2走访持续时长异常 3签退时间异常")
|
@ApiModelProperty(value = "异常走访标签 0正常 1走访频率异常 2走访持续时长异常 3签退时间异常")
|
||||||
private String abnormalVisitTag;
|
private String abnormalVisitTag;
|
||||||
|
|
||||||
|
/** 营销方式 0实地 1电话 2短信 3拜访未触达 4其他(不清楚含义) */
|
||||||
|
@ApiModelProperty(value = "营销方式")
|
||||||
|
private String marketingWay;
|
||||||
|
|
||||||
|
/** 走访结果 0已走访 1过期未走访 2走访未触达 3待走访 */
|
||||||
|
@ApiModelProperty(value = "走访结果")
|
||||||
|
private String interRes;
|
||||||
|
|
||||||
//后端直接工具获取的请求参数,前端不用传
|
//后端直接工具获取的请求参数,前端不用传
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|||||||
@@ -120,4 +120,12 @@ public class VisitInfoVO {
|
|||||||
@ApiModelProperty(value = "走访备注")
|
@ApiModelProperty(value = "走访备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/** 营销方式 0实地 1电话 2短信 3拜访未触达 4其他(不清楚含义) */
|
||||||
|
@ApiModelProperty(value = "营销方式")
|
||||||
|
private String marketingWay;
|
||||||
|
|
||||||
|
/** 走访结果 0已走访 1过期未走访 2走访未触达 3待走访 */
|
||||||
|
@ApiModelProperty(value = "走访结果")
|
||||||
|
private String interRes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import com.ruoyi.ibs.list.mapper.*;
|
|||||||
import com.ruoyi.ibs.list.service.ICustInfoRetailService;
|
import com.ruoyi.ibs.list.service.ICustInfoRetailService;
|
||||||
import com.ruoyi.system.mapper.SysIndustryMapper;
|
import com.ruoyi.system.mapper.SysIndustryMapper;
|
||||||
import com.ruoyi.system.service.ISysIndustryService;
|
import com.ruoyi.system.service.ISysIndustryService;
|
||||||
import jdk.nashorn.internal.parser.JSONParser;
|
//import jdk.nashorn.internal.parser.JSONParser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.ruoyi.ibs.tabs.enums.IndexThresholdTypeEnum;
|
|||||||
import com.ruoyi.ibs.tabs.mapper.CustTabListInfoMapper;
|
import com.ruoyi.ibs.tabs.mapper.CustTabListInfoMapper;
|
||||||
import com.ruoyi.ibs.tabs.service.ICustTabDetailService;
|
import com.ruoyi.ibs.tabs.service.ICustTabDetailService;
|
||||||
import com.ruoyi.ibs.tabs.service.ICustTabListInfoService;
|
import com.ruoyi.ibs.tabs.service.ICustTabListInfoService;
|
||||||
import javafx.util.Builder;
|
//import javafx.util.Builder;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -90,9 +90,12 @@
|
|||||||
<select id="selectLngAndLat" resultType="CustMapVO">
|
<select id="selectLngAndLat" resultType="CustMapVO">
|
||||||
select id,longitude,latitude
|
select id,longitude,latitude
|
||||||
from cust_info_radar
|
from cust_info_radar
|
||||||
where code is null and longitude is not null and latitude is not null
|
where code is null
|
||||||
-- and id < 20000
|
and longitude is not null
|
||||||
limit #{offset}, #{limit}
|
and latitude is not null
|
||||||
|
and id > #{lastId}
|
||||||
|
order by id
|
||||||
|
limit #{limit}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="saveCodeToCustMap">
|
<update id="saveCodeToCustMap">
|
||||||
|
|||||||
@@ -1384,7 +1384,7 @@
|
|||||||
<select id="selectVisitInfoList" parameterType="VisitInfoDTO" resultType="VisitInfoVO">
|
<select id="selectVisitInfoList" parameterType="VisitInfoDTO" resultType="VisitInfoVO">
|
||||||
select vi.id,vi.campaign_id,vi.campaign_name,vi.vis_name,vi.vis_id,vi.dept_id,d.dept_name,vi.vis_time,vi.cust_name,vi.cust_type,vi.cust_idc,
|
select vi.id,vi.campaign_id,vi.campaign_name,vi.vis_name,vi.vis_id,vi.dept_id,d.dept_name,vi.vis_time,vi.cust_name,vi.cust_type,vi.cust_idc,
|
||||||
vi.social_credit_code,vi.create_by,vi.create_time,vi.update_by,vi.update_time,vi.remark,vi.sign_in_time,vi.sign_out_time,vi.sign_in_address,
|
vi.social_credit_code,vi.create_by,vi.create_time,vi.update_by,vi.update_time,vi.remark,vi.sign_in_time,vi.sign_out_time,vi.sign_in_address,
|
||||||
vi.sign_out_address,vi.abnormal_visit_tag,vi.abnormal_visit_info,vi.sign_in_coordinate,vi.sign_out_coordinate,vi.is_valid_cust
|
vi.sign_out_address,vi.abnormal_visit_tag,vi.abnormal_visit_info,vi.sign_in_coordinate,vi.sign_out_coordinate,vi.is_valid_cust,vi.marketing_way,vi.inter_res
|
||||||
from visit_info vi
|
from visit_info vi
|
||||||
left join sys_dept d on vi.dept_id = d.dept_id
|
left join sys_dept d on vi.dept_id = d.dept_id
|
||||||
<where>
|
<where>
|
||||||
@@ -1393,6 +1393,8 @@
|
|||||||
<if test="custIdc != null and custIdc != ''"> and vi.cust_idc = #{custIdc}</if>
|
<if test="custIdc != null and custIdc != ''"> and vi.cust_idc = #{custIdc}</if>
|
||||||
<if test="socialCreditCode != null and socialCreditCode != ''"> and vi.social_credit_code = #{socialCreditCode}</if>
|
<if test="socialCreditCode != null and socialCreditCode != ''"> and vi.social_credit_code = #{socialCreditCode}</if>
|
||||||
<if test="abnormalVisitTag != null and abnormalVisitTag != ''"> and vi.abnormal_visit_tag = #{abnormalVisitTag}</if>
|
<if test="abnormalVisitTag != null and abnormalVisitTag != ''"> and vi.abnormal_visit_tag = #{abnormalVisitTag}</if>
|
||||||
|
<if test="marketingWay != null and marketingWay != ''"> and vi.marketing_way = #{marketingWay}</if>
|
||||||
|
<if test="interRes != null and interRes != ''"> and vi.inter_res = #{interRes}</if>
|
||||||
<if test="visTime != null">
|
<if test="visTime != null">
|
||||||
and (vi.sign_in_time like concat(#{visTime}, '%') or vi.sign_out_time like concat(#{visTime}, '%'))
|
and (vi.sign_in_time like concat(#{visTime}, '%') or vi.sign_out_time like concat(#{visTime}, '%'))
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ VUE_APP_MOCK_API = '/mock-api'
|
|||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
# 设置是否启动Mock
|
# 设置是否启动Mock
|
||||||
VUE_APP_MOCK= true
|
VUE_APP_MOCK= false
|
||||||
|
|
||||||
#测试地址
|
#测试地址
|
||||||
VUE_APP_STAGE_URL = 'http://158.234.96.76:8080'
|
VUE_APP_STAGE_URL = 'http://158.234.96.76:8080'
|
||||||
|
|||||||
@@ -81,6 +81,35 @@
|
|||||||
<el-option label="签退时间异常" value="3"></el-option>
|
<el-option label="签退时间异常" value="3"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="营销方式">
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.marketingWay"
|
||||||
|
placeholder="请选择"
|
||||||
|
@blur="handleSearch"
|
||||||
|
clearable
|
||||||
|
@clear="handleSearch"
|
||||||
|
>
|
||||||
|
<el-option label="实地" value="0"></el-option>
|
||||||
|
<el-option label="电话" value="1"></el-option>
|
||||||
|
<el-option label="短信" value="2"></el-option>
|
||||||
|
<el-option label="拜访未触达" value="3"></el-option>
|
||||||
|
<el-option label="其他" value="4"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="走访结果">
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.interRes"
|
||||||
|
placeholder="请选择"
|
||||||
|
@blur="handleSearch"
|
||||||
|
clearable
|
||||||
|
@clear="handleSearch"
|
||||||
|
>
|
||||||
|
<el-option label="已走访" value="0"></el-option>
|
||||||
|
<el-option label="过期未走访" value="1"></el-option>
|
||||||
|
<el-option label="走访未触达" value="2"></el-option>
|
||||||
|
<el-option label="待走访" value="3"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -238,6 +267,35 @@
|
|||||||
width="150px"
|
width="150px"
|
||||||
v-if="columns[14].visible"
|
v-if="columns[14].visible"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="left"
|
||||||
|
prop="marketingWay"
|
||||||
|
label="营销方式"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="120px"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.marketingWay == '0'">实地</span>
|
||||||
|
<span v-else-if="scope.row.marketingWay == '1'">电话</span>
|
||||||
|
<span v-else-if="scope.row.marketingWay == '2'">短信</span>
|
||||||
|
<span v-else-if="scope.row.marketingWay == '3'">拜访未触达</span>
|
||||||
|
<span v-else-if="scope.row.marketingWay == '4'">其他</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="left"
|
||||||
|
prop="interRes"
|
||||||
|
label="走访结果"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="120px"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.interRes == '0'">已走访</span>
|
||||||
|
<span v-else-if="scope.row.interRes == '1'">过期未走访</span>
|
||||||
|
<span v-else-if="scope.row.interRes == '2'">走访未触达</span>
|
||||||
|
<span v-else-if="scope.row.interRes == '3'">待走访</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="left"
|
align="left"
|
||||||
prop="abnormalVisitTag"
|
prop="abnormalVisitTag"
|
||||||
@@ -313,7 +371,9 @@ export default {
|
|||||||
visTime: "",
|
visTime: "",
|
||||||
custIdc: "",
|
custIdc: "",
|
||||||
socialCreditCode: '',
|
socialCreditCode: '',
|
||||||
abnormalVisitTag: ''
|
abnormalVisitTag: '',
|
||||||
|
marketingWay: '',
|
||||||
|
interRes: ''
|
||||||
},
|
},
|
||||||
campsourceList: [],
|
campsourceList: [],
|
||||||
columns: [
|
columns: [
|
||||||
@@ -405,6 +465,8 @@ export default {
|
|||||||
custIdc: this.searchForm.custIdc,
|
custIdc: this.searchForm.custIdc,
|
||||||
socialCreditCode: this.searchForm.socialCreditCode,
|
socialCreditCode: this.searchForm.socialCreditCode,
|
||||||
abnormalVisitTag: this.searchForm.abnormalVisitTag,
|
abnormalVisitTag: this.searchForm.abnormalVisitTag,
|
||||||
|
marketingWay: this.searchForm.marketingWay,
|
||||||
|
interRes: this.searchForm.interRes,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user