Commit 46c4cb04 authored by lcl's avatar lcl

u

parent 8647c2fb
...@@ -541,5 +541,10 @@ public class DCustomer implements Serializable { ...@@ -541,5 +541,10 @@ public class DCustomer implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
private Integer projectCooperationCount; private Integer projectCooperationCount;
/**
* jsk企业id
*/
@TableField(exist = false)
private Integer companyId;
} }
package com.dsk.cscec.service.impl; package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -10,12 +13,17 @@ import com.dsk.cscec.mapper.DCustomerMapper; ...@@ -10,12 +13,17 @@ import com.dsk.cscec.mapper.DCustomerMapper;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.mapper.DSubcontractMapper; import com.dsk.cscec.mapper.DSubcontractMapper;
import com.dsk.cscec.service.IDCustomerService; import com.dsk.cscec.service.IDCustomerService;
import com.dsk.search.service.BusinessOpportunityRadarService;
import lombok.extern.slf4j.Slf4j;
import org.springdoc.core.converters.models.PageableAsQueryParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 组织维表(DCustomer)表服务实现类 * 组织维表(DCustomer)表服务实现类
...@@ -23,11 +31,14 @@ import java.util.List; ...@@ -23,11 +31,14 @@ import java.util.List;
* @author lcl * @author lcl
* @since 2023-12-08 14:57:26 * @since 2023-12-08 14:57:26
*/ */
@Slf4j
@Service @Service
public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements IDCustomerService { public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements IDCustomerService {
@Resource @Resource
private DSubcontractMapper subcontractMapper; private DSubcontractMapper subcontractMapper;
@Autowired
private BusinessOpportunityRadarService opportunityRadarService;
@Override @Override
public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) { public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) {
...@@ -39,6 +50,16 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -39,6 +50,16 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
customer.setEnterpriseCooperationCount(subcontractMapper.selectEnterpriseCountByCustomerId(customer.getCustomerId())); customer.setEnterpriseCooperationCount(subcontractMapper.selectEnterpriseCountByCustomerId(customer.getCustomerId()));
//项目合作数量 //项目合作数量
customer.setProjectCooperationCount(subcontractMapper.selectProjectCountByCustomerId(customer.getCustomerId())); customer.setProjectCooperationCount(subcontractMapper.selectProjectCountByCustomerId(customer.getCustomerId()));
try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
customer.setCompanyId(companyId);
}
}catch (Exception e){
//
}
} }
} }
return TableDataInfo.build(page); return TableDataInfo.build(page);
......
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