Commit 1d2cdd7d authored by lcl's avatar lcl

u

parent 3af0c2d5
...@@ -5,12 +5,19 @@ import com.dsk.common.core.controller.BaseController; ...@@ -5,12 +5,19 @@ import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R; import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.excel.ExcelUtils;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.DCustomerListVo;
import com.dsk.cscec.service.IDCustomerService; import com.dsk.cscec.service.IDCustomerService;
import com.dsk.jsk.domain.JskCombineSearchDto;
import com.dsk.jsk.domain.vo.JskCombineWinBidProjectExportVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* 组织维表(DCustomer)表控制层 * 组织维表(DCustomer)表控制层
* *
...@@ -30,7 +37,7 @@ public class DCustomerController extends BaseController { ...@@ -30,7 +37,7 @@ public class DCustomerController extends BaseController {
* 供应商总台账筛选 * 供应商总台账筛选
*/ */
@PostMapping("/all/searchList") @PostMapping("/all/searchList")
public TableDataInfo<DCustomer> allSearchList(@RequestBody DCustomerSearchBo bo,@RequestBody PageQuery query) { public TableDataInfo<DCustomerListVo> allSearchList(@RequestBody DCustomerSearchBo bo,@RequestBody PageQuery query) {
return baseService.allSearchList(bo,query); return baseService.allSearchList(bo,query);
} }
...@@ -42,6 +49,16 @@ public class DCustomerController extends BaseController { ...@@ -42,6 +49,16 @@ public class DCustomerController extends BaseController {
return R.ok(baseService.getById(customerKey)); return R.ok(baseService.getById(customerKey));
} }
/**
* 供应商信息
*/
@PostMapping("/export")
public void export(@RequestBody DCustomerSearchBo bo, HttpServletResponse response) {
List<DCustomerListVo> list = baseService.exportList(bo);
ExcelUtils<DCustomerListVo> util = new ExcelUtils<>(DCustomerListVo.class);
util.exportExcel(response, list, "集团中标","", true);
}
} }
package com.dsk.cscec.domain.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author lcl
* @Data 2023/12/18 14:14
*/
@Data
public class DCustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* jsk企业id
*/
private Integer companyId;
/**
* 客商主键
*/
private Long customerKey;
/**
* ipm供应商id
*/
private String customerId;
/**
* 税号
*/
private String taxNumber;
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 5)
private String customerCode;
/**
* 供应商名称
*/
@Excel(name = "供应商名称", width = 10)
private String customerName;
/**
* 推荐公司
*/
@Excel(name = "推荐公司", width = 10)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "注册地区域", width = 5)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "省份", width = 5)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "城市", width = 5)
private String registerCity;
/**
* 注册资金
*/
@Excel(name = "注册资金", width = 5)
private Double registerCapital;
/**
* 供应商类别
*/
@Excel(name = "供应商类别", width = 5)
private String customerClass;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 5)
private String groupSpecialty;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 5)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率", width = 5)
private String taxRate;
/**
* 供应商状态
*/
@Excel(name = "供应商状态", width = 5)
private String customerState;
/**
* 队长名称
*/
@Excel(name = "劳务队长", width = 5)
private String leaderName;
/**
* 劳务队长身份证号
*/
@Excel(name = "劳务队长身份证号", width = 5)
private String laborCaptainIdcard;
/**
* 劳务队长联系电话
*/
@Excel(name = "劳务队长联系电话", width = 5)
private String laborCaptainPhone;
/**
* 队伍规模人数
*/
@Excel(name = "队伍规模人数", width = 5)
private Double serviceTeamPersonnum;
/**
* 专业特长
*/
@Excel(name = "专业特长", width = 5)
private String serviceTeamSpeciality;
/**
* 施工承包范围
*/
@Excel(name = "施工承包范围", width = 5)
private String constructJobScope;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 5)
private String credential;
/**
* 联系人
*/
@Excel(name = "联系人", width = 5)
private String contactPerson;
/**
* 电话
*/
@Excel(name = "电话", width = 5)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 5 , dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 考评等级
*/
@Excel(name = "考评等级", width = 5)
private String creditLevel;
/**
* 企业合作数量
*/
private Integer enterpriseCooperationCount;
/**
* 项目合作数量
*/
private Integer projectCooperationCount;
}
...@@ -8,6 +8,7 @@ import com.dsk.cscec.domain.DCustomer; ...@@ -8,6 +8,7 @@ import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.CustomerInfoBo; import com.dsk.cscec.domain.bo.CustomerInfoBo;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.CustomerInfoVo; import com.dsk.cscec.domain.vo.CustomerInfoVo;
import com.dsk.cscec.domain.vo.DCustomerListVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -20,7 +21,7 @@ import java.util.List; ...@@ -20,7 +21,7 @@ import java.util.List;
*/ */
public interface DCustomerMapper extends BaseMapper<DCustomer> { public interface DCustomerMapper extends BaseMapper<DCustomer> {
Page<DCustomer> allSearchList(IPage<DCustomerSearchBo> build, @Param("bo") DCustomerSearchBo bo); Page<DCustomerListVo> allSearchList(IPage<DCustomerSearchBo> build, @Param("bo") DCustomerSearchBo bo);
/** /**
* 分类查询供应商列表 * 分类查询供应商列表
......
...@@ -5,6 +5,9 @@ import com.dsk.common.core.domain.PageQuery; ...@@ -5,6 +5,9 @@ import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.DCustomerListVo;
import java.util.List;
/** /**
* 组织维表(DCustomer)表服务接口 * 组织维表(DCustomer)表服务接口
...@@ -14,7 +17,9 @@ import com.dsk.cscec.domain.bo.DCustomerSearchBo; ...@@ -14,7 +17,9 @@ import com.dsk.cscec.domain.bo.DCustomerSearchBo;
*/ */
public interface IDCustomerService extends IService<DCustomer> { public interface IDCustomerService extends IService<DCustomer> {
TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query); TableDataInfo<DCustomerListVo> allSearchList(DCustomerSearchBo bo, PageQuery query);
List<DCustomerListVo> exportList(DCustomerSearchBo bo);
} }
...@@ -9,6 +9,7 @@ import com.dsk.common.core.domain.PageQuery; ...@@ -9,6 +9,7 @@ import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.DCustomerListVo;
import com.dsk.cscec.mapper.DCustomerMapper; import com.dsk.cscec.mapper.DCustomerMapper;
import com.dsk.cscec.mapper.DSubcontractMapper; import com.dsk.cscec.mapper.DSubcontractMapper;
import com.dsk.cscec.service.IDCustomerService; import com.dsk.cscec.service.IDCustomerService;
...@@ -39,9 +40,9 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -39,9 +40,9 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
private BusinessOpportunityRadarService opportunityRadarService; private BusinessOpportunityRadarService opportunityRadarService;
@Override @Override
public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) { public TableDataInfo<DCustomerListVo> allSearchList(DCustomerSearchBo bo, PageQuery query) {
dealWithCustomerClass(bo); dealWithCustomerClass(bo);
Page<DCustomer> page = baseMapper.allSearchList(query.build(), bo); Page<DCustomerListVo> page = baseMapper.allSearchList(query.build(), bo);
if (CollectionUtils.isNotEmpty(page.getRecords())) { if (CollectionUtils.isNotEmpty(page.getRecords())) {
page.getRecords().parallelStream().forEach(item->{ page.getRecords().parallelStream().forEach(item->{
//企业合作数量 //企业合作数量
...@@ -63,6 +64,15 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer ...@@ -63,6 +64,15 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
return TableDataInfo.build(page); return TableDataInfo.build(page);
} }
@Override
public List<DCustomerListVo> exportList(DCustomerSearchBo bo) {
dealWithCustomerClass(bo);
PageQuery query = new PageQuery();
query.setPageNum(1);
query.setPageSize(1000);
return baseMapper.allSearchList(query.build(), bo).getRecords();
}
private void dealWithCustomerClass(DCustomerSearchBo bo) { private void dealWithCustomerClass(DCustomerSearchBo bo) {
if (!ObjectUtils.isEmpty(bo.getCustomerClass())) { if (!ObjectUtils.isEmpty(bo.getCustomerClass())) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.DCustomerMapper"> <mapper namespace="com.dsk.cscec.mapper.DCustomerMapper">
<select id="allSearchList" resultType="com.dsk.cscec.domain.DCustomer"> <select id="allSearchList" resultType="com.dsk.cscec.domain.vo.DCustomerListVo">
select select
customer_key, customer_id, customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business, customer_key, customer_id, customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business,
paytax_type, tax_rate, customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality, paytax_type, tax_rate, customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality,
......
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