Commit 158089d4 authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents 5aeea0b5 a669235c
......@@ -342,17 +342,27 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public R addDefaultCompany() {
//获取所有供应商企业名称
List<String> list = customerMapper.allSearchCompanyNameList();
List<Integer> idList = new ArrayList<>();
for (String companyName : list) {
//循环匹配 得到能关联上的企业id
Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
idList.add(companyId);
//如果没有上一次的企业id数据则直接返回
if (RedisUtils.hasKey("monitorCompanyList")){
idList = RedisUtils.getCacheList("monitorCompanyList");
}else {
List<String> list = customerMapper.allSearchCompanyNameList();
for (String companyName : list) {
//循环匹配 得到能关联上的企业id
Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
idList.add(companyId);
}
}
RedisUtils.setCacheList("monitorCompanyList",idList);
//设置过期时间两天
RedisUtils.expire("monitorCompanyList",172800);
}
PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo();
addVo.setSystemCode("ZJYJ");
addVo.setCid(idList);
......
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