Commit 5e271c97 authored by danfuman's avatar danfuman

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents e0aaaf7b 9c36359b
...@@ -40,7 +40,7 @@ public class TenantTimerTask { ...@@ -40,7 +40,7 @@ public class TenantTimerTask {
/** /**
* 每小时更新一次咨询机构经营范围 * 每小时更新一次咨询机构经营范围
*/ */
@Scheduled(cron = "0 0 * 1/1 * ? ") //@Scheduled(cron = "0 0 * 1/1 * ? ")
public void updateAdvisoryBodyBusinessScope() { public void updateAdvisoryBodyBusinessScope() {
log.info("执行定时更新咨询机构经营范围(1h/次)"); log.info("执行定时更新咨询机构经营范围(1h/次)");
TenantHelper.ignore(advisoryBodyService::updateAdvisoryBodyBusinessScope); TenantHelper.ignore(advisoryBodyService::updateAdvisoryBodyBusinessScope);
......
...@@ -5,7 +5,6 @@ import com.dsk.common.core.controller.BaseController; ...@@ -5,7 +5,6 @@ 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.common.utils.poi.ExcelUtil; import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.cscec.domain.bo.AddDCustomerLaborLeaderBo; import com.dsk.cscec.domain.bo.AddDCustomerLaborLeaderBo;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo; import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
...@@ -53,9 +52,7 @@ public class CustomerInfoController extends BaseController { ...@@ -53,9 +52,7 @@ public class CustomerInfoController extends BaseController {
*/ */
@PostMapping("/exportCustomerList") @PostMapping("/exportCustomerList")
public void exportCustomerList(@RequestBody CustomerInfoBo bo, HttpServletResponse response) { public void exportCustomerList(@RequestBody CustomerInfoBo bo, HttpServletResponse response) {
List<CustomerInfoVo> list = iCustomerInfoService.exportCustomerList(bo); iCustomerInfoService.exportCustomerList(bo, response);
ExcelUtils<CustomerInfoVo> util = new ExcelUtils<>(CustomerInfoVo.class);
util.exportExcel(response, list, bo.getCustomerClass(),"大数据经营管理支撑服务平台供应商导出", true);
} }
/** /**
......
package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 劳务分包企业导出
*
* @author sxk
* @date 2024.06.07
* @time 17:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerInfoLaborCompanyVo extends CustomerInfoVo {
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/
@Excel(name = "供应商名称", width = 30)
private String customerNameExport;
/**
* 二级市场企业编码
*/
@Excel(name = "二级市场企业编码", width = 15)
private String secondaryCode;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 15)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 20)
private String groupSpecialty;
/**
* 法人代表
*/
@Excel(name = "法人代表", width = 10)
private String representative;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 10)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率(%)", width = 20)
private String taxRate;
/**
* 施工承包范围
*/
@Excel(name = "施工承包范围", width = 60)
private String constructJobScope;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
private String credential;
/**
* 注册资金
*/
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 20)
private Double registerCapital;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 联系人电话
*/
@Excel(name = "联系人电话", width = 15)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 15, dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 公司合作数量
*/
@Excel(name = "公司合作数量", width = 15)
private Integer enterpriseCooperationCount;
/**
* 合作项目数量
*/
@Excel(name = "合作项目数量", width = 15)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 15)
private String creditLevel;
}
package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 劳务分包队伍导出
*
* @author sxk
* @date 2024.06.07
* @time 17:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerInfoLaborQueueVo extends CustomerInfoVo {
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/
@Excel(name = "供应商名称", width = 30)
private String customerNameExport;
/**
* 二级市场企业编码
*/
@Excel(name = "二级市场企业编码", width = 15)
private String secondaryCode;
/**
* 统一社会信用代码/营业执照号码
*/
@Excel(name = "营业执照号码", width = 30)
private String unifySocialCode;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 15)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 法人代表
*/
@Excel(name = "法人代表", width = 10)
private String representative;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 联系人电话
*/
@Excel(name = "联系人电话", width = 15)
private String contactPhone;
/**
* 注册资金
*/
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 20)
private Double registerCapital;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 15)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率(%)", width = 20)
private String taxRate;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
private String credential;
//TODO:主项资质
//TODO:劳务资质
/**
* 队长名称
*/
@Excel(name = "施工队长", width = 10)
private String leaderName;
/**
* 劳务队长联系电话
*/
@Excel(name = "联系电话", width = 15)
private String laborCaptainPhone;
/**
* 劳务队长身份证号
*/
@Excel(name = "身份证号码", width = 20)
private String laborCaptainIdcard;
/**
* 队伍规模人数
*/
@Excel(name = "队伍规模", cellType = Excel.ColumnType.NUMERIC, width = 10)
private Double serviceTeamPersonnum;
/**
* 专业特长
*/
@Excel(name = "专业特长", width = 10)
private String serviceTeamSpeciality;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 15, dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 公司合作数量
*/
@Excel(name = "公司合作数量", width = 15)
private Integer enterpriseCooperationCount;
/**
* 合作项目数量
*/
@Excel(name = "合作项目数量", width = 15)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 15)
private String creditLevel;
}
package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 物资设备企业导出
*
* @author sxk
* @date 2024.06.07
* @time 17:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerInfoMaterialDeviceVo extends CustomerInfoVo {
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/
@Excel(name = "供应商名称", width = 30)
private String customerNameExport;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 15)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 20)
private String groupSpecialty;
/**
* 法人代表
*/
@Excel(name = "法人代表", width = 10)
private String representative;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 15)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率(%)", width = 20)
private String taxRate;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
private String credential;
/**
* 注册资金
*/
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 20)
private Double registerCapital;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 联系人电话
*/
@Excel(name = "联系人电话", width = 15)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 15, dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 公司合作数量
*/
@Excel(name = "公司合作数量", width = 15)
private Integer enterpriseCooperationCount;
/**
* 合作项目数量
*/
@Excel(name = "合作项目数量", width = 15)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 15)
private String creditLevel;
}
package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 机械施工企业导出
*
* @author sxk
* @date 2024.06.07
* @time 17:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerInfoMechanicConstructionVo extends CustomerInfoVo {
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/
@Excel(name = "供应商名称", width = 30)
private String customerNameExport;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 15)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 20)
private String groupSpecialty;
/**
* 法人代表
*/
@Excel(name = "法人代表", width = 10)
private String representative;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 15)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率(%)", width = 20)
private String taxRate;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
private String credential;
/**
* 注册资金
*/
@Excel(name = "注册资本(万元)", cellType = Excel.ColumnType.NUMERIC, width = 20)
private Double registerCapital;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 联系人电话
*/
@Excel(name = "联系人电话", width = 15)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 15, dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 公司合作数量
*/
@Excel(name = "公司合作数量", width = 15)
private Integer enterpriseCooperationCount;
/**
* 合作项目数量
*/
@Excel(name = "合作项目数量", width = 15)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 15)
private String creditLevel;
}
package com.dsk.cscec.domain.vo;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 专业分包企业导出
*
* @author sxk
* @date 2024.06.07
* @time 17:15
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerInfoProfessionalSubtractVo extends CustomerInfoVo {
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/
@Excel(name = "供应商名称", width = 30)
private String customerNameExport;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 15)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 20)
private String groupSpecialty;
/**
* 法人代表
*/
@Excel(name = "法人代表", width = 10)
private String representative;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 15)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率(%)", width = 20)
private String taxRate;
/**
* 施工承包范围
*/
@Excel(name = "施工承包范围", width = 60)
private String constructJobScope;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
private String credential;
/**
* 注册资金
*/
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 20)
private Double registerCapital;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 联系人电话
*/
@Excel(name = "联系人电话", width = 15)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 15, dateFormat = "yyyy-MM-dd")
private Date approveDate2;
/**
* 公司合作数量
*/
@Excel(name = "公司合作数量", width = 15)
private Integer enterpriseCooperationCount;
/**
* 合作项目数量
*/
@Excel(name = "合作项目数量", width = 15)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 15)
private String creditLevel;
}
...@@ -18,6 +18,9 @@ import java.util.Date; ...@@ -18,6 +18,9 @@ import java.util.Date;
public class CustomerInfoVo implements Serializable { public class CustomerInfoVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 序号
*/
@Excel(name = "序号", width = 6) @Excel(name = "序号", width = 6)
private Integer num; private Integer num;
/** /**
...@@ -31,7 +34,6 @@ public class CustomerInfoVo implements Serializable { ...@@ -31,7 +34,6 @@ public class CustomerInfoVo implements Serializable {
/** /**
* 供应商编号 * 供应商编号
*/ */
@Excel(name = "供应商编号", width = 15)
private String customerCode; private String customerCode;
/** /**
* 供应商名称 * 供应商名称
...@@ -41,117 +43,94 @@ public class CustomerInfoVo implements Serializable { ...@@ -41,117 +43,94 @@ public class CustomerInfoVo implements Serializable {
* 供应商名称导出 * 供应商名称导出
* 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性 * 列表查询时customerName可能作为查询关键字被标红,所以单独设置此属性
*/ */
@Excel(name = "供应商名称", width = 30)
private String customerNameExport; private String customerNameExport;
/** /**
* 二级市场企业编码 * 二级市场企业编码
*/ */
@Excel(name = "二级市场企业编码", width = 15)
private String secondaryCode; private String secondaryCode;
/** /**
* 统一社会信用代码/营业执照号码 * 统一社会信用代码/营业执照号码
*/ */
@Excel(name = "统一社会信用代码/营业执照号码", width = 30)
private String unifySocialCode; private String unifySocialCode;
/** /**
* 推荐公司 * 推荐公司
*/ */
@Excel(name = "推荐单位", width = 30)
private String recommendOrg; private String recommendOrg;
/** /**
* 注册地区域 * 注册地区域
*/ */
@Excel(name = "公司注册区域", width = 10)
private String registerRegion; private String registerRegion;
/** /**
* 省份 * 省份
*/ */
@Excel(name = "公司注册省", width = 10)
private String registerProvince; private String registerProvince;
/** /**
* 城市 * 城市
*/ */
@Excel(name = "公司注册市", width = 10)
private String registerCity; private String registerCity;
/** /**
* 法人代表 * 法人代表
*/ */
@Excel(name = "法人代表", width = 10)
private String representative; private String representative;
/** /**
* 联系人 * 联系人
*/ */
@Excel(name = "公司联系人", width = 10)
private String contactPerson; private String contactPerson;
/** /**
* 联系人电话 * 联系人电话
*/ */
@Excel(name = "联系人电话", width = 10)
private String contactPhone; private String contactPhone;
/** /**
* 注册资金 * 注册资金
*/ */
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 10)
private Double registerCapital; private Double registerCapital;
/** /**
* 纳税人身份 * 纳税人身份
*/ */
@Excel(name = "纳税人身份", width = 10)
private String paytaxType; private String paytaxType;
/** /**
* 纳税人税率 * 纳税人税率
*/ */
@Excel(name = "纳税人税率", width = 10)
private String taxRate; private String taxRate;
/** /**
* 资质等级 * 资质等级
*/ */
@Excel(name = "资质等级", width = 10)
private String credential; private String credential;
/** /**
* 队长名称 * 队长名称
*/ */
@Excel(name = "劳务队长", width = 10)
private String leaderName; private String leaderName;
/** /**
* 劳务队长联系电话 * 劳务队长联系电话
*/ */
@Excel(name = "队长联系电话", width = 10)
private String laborCaptainPhone; private String laborCaptainPhone;
/** /**
* 劳务队长身份证号 * 劳务队长身份证号
*/ */
@Excel(name = "队长身份证号", width = 10)
private String laborCaptainIdcard; private String laborCaptainIdcard;
/** /**
* 队伍规模人数 * 队伍规模人数
*/ */
@Excel(name = "队伍规模", cellType = Excel.ColumnType.NUMERIC, width = 10)
private Double serviceTeamPersonnum; private Double serviceTeamPersonnum;
/** /**
* 专业特长 * 专业特长
*/ */
@Excel(name = "专业特长", width = 10)
private String serviceTeamSpeciality; private String serviceTeamSpeciality;
/** /**
* 准入时间 * 准入时间
*/ */
@Excel(name = "准入时间", width = 10, dateFormat = "yyyy-MM-dd")
private Date approveDate2; private Date approveDate2;
/** /**
* 公司合作数量 * 公司合作数量
*/ */
@Excel(name = "公司合作数量", width = 10)
private Integer enterpriseCooperationCount; private Integer enterpriseCooperationCount;
/** /**
* 合作项目数量 * 合作项目数量
*/ */
@Excel(name = "合作项目数量", width = 10)
private Integer projectCooperationCount; private Integer projectCooperationCount;
/** /**
* 考评等级 * 考评等级
*/ */
@Excel(name = "分包商等级", width = 10)
private String creditLevel; private String creditLevel;
/** /**
* 供应商状态 * 供应商状态
...@@ -164,7 +143,6 @@ public class CustomerInfoVo implements Serializable { ...@@ -164,7 +143,6 @@ public class CustomerInfoVo implements Serializable {
/** /**
* 集团专业类别 * 集团专业类别
*/ */
@Excel(name = "专业类别", width = 20)
private String groupSpecialty; private String groupSpecialty;
/** /**
* 施工承包范围 * 施工承包范围
......
...@@ -13,6 +13,7 @@ import com.dsk.cscec.domain.vo.CustomerApproveVo; ...@@ -13,6 +13,7 @@ import com.dsk.cscec.domain.vo.CustomerApproveVo;
import com.dsk.cscec.domain.vo.CustomerCooperationVo; import com.dsk.cscec.domain.vo.CustomerCooperationVo;
import com.dsk.cscec.domain.vo.CustomerInfoVo; import com.dsk.cscec.domain.vo.CustomerInfoVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -35,7 +36,7 @@ public interface ICustomerInfoService extends IService<DCustomer> { ...@@ -35,7 +36,7 @@ public interface ICustomerInfoService extends IService<DCustomer> {
/** /**
* 导出供应商分类列表 * 导出供应商分类列表
*/ */
List<CustomerInfoVo> exportCustomerList(CustomerInfoBo bo); void exportCustomerList(CustomerInfoBo bo, HttpServletResponse response);
/** /**
* 供应商准入情况 * 供应商准入情况
......
...@@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.excel.ExcelUtils;
import com.dsk.common.exception.ServiceException;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.AdvisoryBodyManageQueryConstants; import com.dsk.cscec.constant.AdvisoryBodyManageQueryConstants;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
...@@ -31,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -31,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -65,8 +68,10 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -65,8 +68,10 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
Page<CustomerInfoVo> page = baseMapper.queryListByType(query.build(), bo); Page<CustomerInfoVo> page = baseMapper.queryListByType(query.build(), bo);
AtomicInteger sortNum = new AtomicInteger(1); AtomicInteger sortNum = new AtomicInteger(1);
if (CollectionUtils.isNotEmpty(page.getRecords())) { if (CollectionUtils.isNotEmpty(page.getRecords())) {
page.getRecords().forEach(item->{ page.getRecords().forEach(item -> {
item.setCustomerNameExport(item.getCustomerName()); if (StringUtils.isNotBlank(bo.getCustomerName())) {
item.setCustomerNameExport(StringUtils.removeRed(item.getCustomerName()));
}
item.setNum(sortNum.getAndIncrement()); item.setNum(sortNum.getAndIncrement());
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId()); DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量 //企业合作数量
...@@ -100,8 +105,55 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -100,8 +105,55 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
* 导出供应商分类列表 * 导出供应商分类列表
*/ */
@Override @Override
public List<CustomerInfoVo> exportCustomerList(CustomerInfoBo bo) { public void exportCustomerList(CustomerInfoBo bo, HttpServletResponse response) {
return this.queryPageList(bo, new PageQuery()).getRows(); String customerClass = bo.getCustomerClass();
List<CustomerInfoVo> originList = this.queryPageList(bo, new PageQuery()).getRows();
switch (customerClass) {
case "专业分包":
new ExcelUtils<>(CustomerInfoProfessionalSubtractVo.class).exportExcel(
response,
BeanUtil.copyToList(originList, CustomerInfoProfessionalSubtractVo.class),
customerClass,
"大数据经营管理支撑服务平台供应商导出",
true);
break;
case "租赁":
new ExcelUtils<>(CustomerInfoMechanicConstructionVo.class).exportExcel(
response,
BeanUtil.copyToList(originList, CustomerInfoMechanicConstructionVo.class),
customerClass,
"大数据经营管理支撑服务平台供应商导出",
true);
break;
case "分供":
new ExcelUtils<>(CustomerInfoMaterialDeviceVo.class).exportExcel(
response,
BeanUtil.copyToList(originList, CustomerInfoMaterialDeviceVo.class),
customerClass,
"大数据经营管理支撑服务平台供应商导出",
true);
break;
case "劳务分包":
List<CustomerInfoLaborCompanyVo> laborCompanyVos = BeanUtil.copyToList(originList, CustomerInfoLaborCompanyVo.class);
new ExcelUtils<>(CustomerInfoLaborCompanyVo.class).exportExcel(
response,
laborCompanyVos,
customerClass,
"大数据经营管理支撑服务平台供应商导出",
true);
break;
case "劳务分包队伍":
List<CustomerInfoLaborQueueVo> laborQueueVoList = BeanUtil.copyToList(originList, CustomerInfoLaborQueueVo.class);
new ExcelUtils<>(CustomerInfoLaborQueueVo.class).exportExcel(
response,
laborQueueVoList,
customerClass,
"大数据经营管理支撑服务平台供应商导出",
true);
break;
default:
throw new ServiceException("供应商类别参数错误");
}
} }
@Override @Override
...@@ -282,49 +334,25 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto ...@@ -282,49 +334,25 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
public Integer addLaborLeader(AddDCustomerLaborLeaderBo bo) { public Integer addLaborLeader(AddDCustomerLaborLeaderBo bo) {
DCustomer customer = BeanUtil.toBean(bo, DCustomer.class); DCustomer customer = BeanUtil.toBean(bo, DCustomer.class);
//如果数据库中存在该供应商,则填充相应信息 //如果数据库中存在该供应商,则填充相应信息
DCustomer originCustomer = baseMapper.selectList(new LambdaQueryWrapper<DCustomer>() Assert.isFalse(baseMapper.exists(new LambdaQueryWrapper<DCustomer>()
.eq(DCustomer::getCusomerName, bo.getCusomerName()) .eq(DCustomer::getRecommendOrgId, AdvisoryBodyManageQueryConstants.LEVEL1_COMPANY_ID)
.orderByDesc(DCustomer::getApproveDate2)).get(0); .eq(DCustomer::getCustomerClass, "劳务分包")
if (ObjectUtil.isNotNull(originCustomer)) { .eq(DCustomer::getCusomerName, bo.getCusomerName())), "该供应商已存在");
//财务客商编码
customer.setFinCustomerCode(originCustomer.getFinCustomerCode()); //填充省市信息
//法人代表 Map<String, Object> map = opportunityRadarService.enterpriseByName(bo.getCusomerName());
customer.setRepresentative(originCustomer.getRepresentative()); if (!ObjectUtils.isEmpty(map.get("data"))) {
//工商注册号 Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
customer.setRegisterNo(originCustomer.getRegisterNo()); //注册省份
customer.setRegisterProvince(MapUtil.getStr(data, "province"));
//注册城市
customer.setRegisterCity(MapUtil.getStr(data, "city"));
//注册资金 //注册资金
customer.setRegisterCapital(originCustomer.getRegisterCapital()); customer.setRegisterCapital(MapUtil.getDouble(data, "registeredCapitalStr"));
//注册地区域 //法定代表人
customer.setRegisterRegion(originCustomer.getRegisterRegion()); customer.setResponsiblePerson(MapUtil.getStr(data, "legalPerson"));
//省份
customer.setRegisterProvince(originCustomer.getRegisterProvince());
//城市
customer.setRegisterCity(originCustomer.getRegisterCity());
//联系人
customer.setContactPerson(originCustomer.getContactPerson());
//电话
customer.setContactPhone(originCustomer.getContactPhone());
//一体化客商类型
customer.setFinCustomerType(originCustomer.getFinCustomerType());
//客商性质
customer.setCustomerKind(originCustomer.getCustomerKind());
//是否业主
customer.setIsowner(originCustomer.getIsowner());
//是否供应商
customer.setIscustomer(originCustomer.getIscustomer());
//税率类型
customer.setTaxType(originCustomer.getTaxType());
//是否冻结
customer.setIsfreeze(originCustomer.getIsfreeze());
} else {
//填充省市信息
Map<String, Object> map = opportunityRadarService.enterpriseByName(bo.getCusomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
customer.setRegisterProvince(MapUtil.getStr(data, "province"));
customer.setRegisterCity(MapUtil.getStr(data, "city"));
}
} }
customer.setCustomerKey(baseMapper.selectOne(new LambdaQueryWrapper<DCustomer>() customer.setCustomerKey(baseMapper.selectOne(new LambdaQueryWrapper<DCustomer>()
.orderByDesc(DCustomer::getCustomerKey) .orderByDesc(DCustomer::getCustomerKey)
.last("LIMIT 1")).getCustomerKey() + 1); .last("LIMIT 1")).getCustomerKey() + 1);
......
...@@ -109,8 +109,7 @@ ...@@ -109,8 +109,7 @@
</select> </select>
<select id="queryAdvisoryBodyByProjectKey" resultType="com.dsk.cscec.domain.AdvisoryBody"> <select id="queryAdvisoryBodyByProjectKey" resultType="com.dsk.cscec.domain.AdvisoryBody">
select select ab.*
<include refid="allColumn"></include>
from advisory_body ab from advisory_body ab
left join advisory_body_project abp left join advisory_body_project abp
on abp.advisory_body_cid = ab.advisory_body_cid on abp.advisory_body_cid = ab.advisory_body_cid
...@@ -118,9 +117,10 @@ ...@@ -118,9 +117,10 @@
</select> </select>
<sql id="allColumn"> <sql id="allColumn">
ab.advisory_body_id, ab.advisory_body_id,
ab.advisory_body_cid, ab.advisory_body_cid,
ab.advisory_body_name, ab.advisory_body_name,
ab.business_scope, ab.business_scope,
ab.create_by, ab.create_by,
ab.create_time, ab.create_time,
......
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