0227海宁pad走访+行政区划编码定时任务修改
This commit is contained in:
@@ -227,7 +227,24 @@ public class GridCmpmService {
|
||||
Map<String, Integer> historyLevelCountMap = getCustLevelCountMap(custManagerDTO, "last");
|
||||
Map<String, Integer> custLevelCompLm = calculateLevelChanges(historyLevelCountMap, currentLevelCountMap);
|
||||
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();
|
||||
try{
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface CustMapMapper extends BaseMapper<CustInfoRadar> {
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -85,12 +85,12 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
||||
//pointInGeometryScheduled
|
||||
@Override
|
||||
public void pointInGeometryScheduled() {
|
||||
int pageSize = 1000; // 每页处理1000条数据
|
||||
int offset = 0;
|
||||
int pageSize = 1000;
|
||||
long lastId = 0L;
|
||||
List<CustMapVO> custMapVOS;
|
||||
do {
|
||||
// 分页查询客户地图数据
|
||||
custMapVOS = custMapMapper.selectLngAndLat(offset, pageSize);
|
||||
custMapVOS = custMapMapper.selectLngAndLat(lastId, pageSize);
|
||||
// 收集需要更新的数据
|
||||
List<Map<String, Object>> updateDataList = new ArrayList<>();
|
||||
for (CustMapVO custMapVO : custMapVOS) {
|
||||
@@ -121,6 +121,10 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
||||
if (!updateDataList.isEmpty()) {
|
||||
custMapMapper.saveCodeToCustMap(updateDataList);
|
||||
}
|
||||
// 关键:移动游标
|
||||
if (!custMapVOS.isEmpty()) {
|
||||
lastId = custMapVOS.get(custMapVOS.size() - 1).getId();
|
||||
}
|
||||
// 避免数据库连接过多占用,适当休眠
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
@@ -128,9 +132,8 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
}
|
||||
} while (custMapVOS.size() == pageSize); // 当查询结果小于页大小时,说明已处理完所有数据
|
||||
|
||||
log.info("地址解析定时任务执行完成, 共处理{}条数据", offset);
|
||||
} while (!custMapVOS.isEmpty()); // 当查询结果小于页大小时,说明已处理完所有数据
|
||||
log.info("地址解析定时任务执行完成");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -265,7 +268,6 @@ public class AddressAnalyseServiceImpl implements AddressAnalyseService {
|
||||
flattenFeoTree(geoInfoDTO, allGeoInfoDTOList);
|
||||
}
|
||||
log.info("扁平化区域列表大小: {}", allGeoInfoDTOList.size());
|
||||
|
||||
log.info("<-------------------Loading completed.------------------->");
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,13 @@ public class VisitInfoDTO {
|
||||
@ApiModelProperty(value = "异常走访标签 0正常 1走访频率异常 2走访持续时长异常 3签退时间异常")
|
||||
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;
|
||||
|
||||
@@ -120,4 +120,12 @@ public class VisitInfoVO {
|
||||
@ApiModelProperty(value = "走访备注")
|
||||
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.system.mapper.SysIndustryMapper;
|
||||
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.poi.ss.usermodel.Row;
|
||||
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.service.ICustTabDetailService;
|
||||
import com.ruoyi.ibs.tabs.service.ICustTabListInfoService;
|
||||
import javafx.util.Builder;
|
||||
//import javafx.util.Builder;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -90,9 +90,12 @@
|
||||
<select id="selectLngAndLat" resultType="CustMapVO">
|
||||
select id,longitude,latitude
|
||||
from cust_info_radar
|
||||
where code is null and longitude is not null and latitude is not null
|
||||
-- and id < 20000
|
||||
limit #{offset}, #{limit}
|
||||
where code is null
|
||||
and longitude is not null
|
||||
and latitude is not null
|
||||
and id > #{lastId}
|
||||
order by id
|
||||
limit #{limit}
|
||||
</select>
|
||||
|
||||
<update id="saveCodeToCustMap">
|
||||
|
||||
@@ -1384,7 +1384,7 @@
|
||||
<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,
|
||||
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
|
||||
left join sys_dept d on vi.dept_id = d.dept_id
|
||||
<where>
|
||||
@@ -1393,6 +1393,8 @@
|
||||
<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="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">
|
||||
and (vi.sign_in_time like concat(#{visTime}, '%') or vi.sign_out_time like concat(#{visTime}, '%'))
|
||||
</if>
|
||||
|
||||
@@ -14,7 +14,7 @@ VUE_APP_MOCK_API = '/mock-api'
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
# 设置是否启动Mock
|
||||
VUE_APP_MOCK= true
|
||||
VUE_APP_MOCK= false
|
||||
|
||||
#测试地址
|
||||
VUE_APP_STAGE_URL = 'http://158.234.96.76:8080'
|
||||
|
||||
@@ -81,6 +81,35 @@
|
||||
<el-option label="签退时间异常" value="3"></el-option>
|
||||
</el-select>
|
||||
</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-button
|
||||
type="primary"
|
||||
@@ -238,6 +267,35 @@
|
||||
width="150px"
|
||||
v-if="columns[14].visible"
|
||||
></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
|
||||
align="left"
|
||||
prop="abnormalVisitTag"
|
||||
@@ -313,7 +371,9 @@ export default {
|
||||
visTime: "",
|
||||
custIdc: "",
|
||||
socialCreditCode: '',
|
||||
abnormalVisitTag: ''
|
||||
abnormalVisitTag: '',
|
||||
marketingWay: '',
|
||||
interRes: ''
|
||||
},
|
||||
campsourceList: [],
|
||||
columns: [
|
||||
@@ -405,6 +465,8 @@ export default {
|
||||
custIdc: this.searchForm.custIdc,
|
||||
socialCreditCode: this.searchForm.socialCreditCode,
|
||||
abnormalVisitTag: this.searchForm.abnormalVisitTag,
|
||||
marketingWay: this.searchForm.marketingWay,
|
||||
interRes: this.searchForm.interRes,
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user