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