Browse Source

渠道档案汇总导出开发

anderx 6 months ago
parent
commit
72990364f9

+ 361 - 0
src/main/java/com/goafanti/customer/bo/OutSelectUserChannelArchives.java

@@ -0,0 +1,361 @@
+package com.goafanti.customer.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.goafanti.common.utils.excel.Excel;
+
+import java.util.Date;
+
+public class OutSelectUserChannelArchives {
+    private String id;
+    @Excel(name = "客户名称")
+    private String nickname;
+    @Excel(name = "客户类型",readConverterExp = "0=私有渠道,1=公共渠道,2=签单渠道,3=外联渠道",width = 8)
+    private Integer shareType;
+    private Integer signBills;
+    private String businessScope;
+    @Excel(name = "渠道类型",readConverterExp = "1=其他,2=民主党派,3=园区,4=民间组织,5=战略合作单位",width = 8)
+    private Integer channelType;
+    @Excel(name = "企业数",width = 8)
+    private Integer enterpriseCount;
+
+    private String industry;
+    @Excel(name = "联系人")
+    private String contactName;
+    private String contactMobile;
+    @Excel(name = "所属人")
+    private String adminName;
+    @Excel(name = "面谈项目")
+    private String intendedProject;
+    @Excel(name = "考核指标")
+    private String channelIndicators;
+    @Excel(name = "面谈思路及目的")
+    private String interviewIdeas;
+    @Excel(name = "面谈人及分工")
+    private String interviewDistribution;
+    private Integer  patentCount;
+    private Integer inventionPatentCount;
+    private Integer utilityModelCount;
+    private Integer appearancePatentCount;
+    private Integer softwareWorksCount;
+    private Integer otherCount;
+    private Integer standard;
+
+    private String financialData;
+
+    private String earlyCommunication;
+
+    /**
+     * 母/子公司数
+     */
+    private Integer companyCount;
+    /**
+     * 社保人数
+     */
+    private Integer socialSecurityCount;
+    /**
+     * 对外投资控股的企业数
+     */
+    private Integer externalInvestCount;
+    /**
+     * 对外投资控股的行业
+     */
+
+    private String externalInvestIndustryName;
+    /**
+     * 对外投资控股的企业名称
+     */
+    /**
+     * 对外投资控股的企业编号
+     */
+//    @Excel(name = "对外投资控股的企业编号")
+//    private String externalInvestId;
+    /**
+     * 对外投资控股的行业名称
+     */
+
+    @Excel(name = "所属部门")
+    private String depName;
+    @Excel(name = "修改时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+    @Excel(name = "省",width = 8)
+    private String province;
+    @Excel(name = "市",width = 8)
+    private String city;
+    @Excel(name = "区",width = 8)
+    private String area;
+    @Excel(name = "公出面谈信息")
+    private String publicContent;
+
+    public Integer getStandard() {
+        return standard;
+    }
+
+    public void setStandard(Integer standard) {
+        this.standard = standard;
+    }
+
+    public Integer getCompanyCount() {
+        return companyCount;
+    }
+
+    public void setCompanyCount(Integer companyCount) {
+        this.companyCount = companyCount;
+    }
+
+    public Integer getSocialSecurityCount() {
+        return socialSecurityCount;
+    }
+
+    public void setSocialSecurityCount(Integer socialSecurityCount) {
+        this.socialSecurityCount = socialSecurityCount;
+    }
+
+    public Integer getExternalInvestCount() {
+        return externalInvestCount;
+    }
+
+    public void setExternalInvestCount(Integer externalInvestCount) {
+        this.externalInvestCount = externalInvestCount;
+    }
+
+    public String getExternalInvestIndustryName() {
+        return externalInvestIndustryName;
+    }
+
+    public void setExternalInvestIndustryName(String externalInvestIndustryName) {
+        this.externalInvestIndustryName = externalInvestIndustryName;
+    }
+
+
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
+    public String getPublicContent() {
+        return publicContent;
+    }
+
+    public void setPublicContent(String publicContent) {
+        this.publicContent = publicContent;
+    }
+
+    public Integer getSignBills() {
+        return signBills;
+    }
+
+    public void setSignBills(Integer signBills) {
+        this.signBills = signBills;
+    }
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public Integer getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(Integer channelType) {
+        this.channelType = channelType;
+    }
+
+    public Integer getEnterpriseCount() {
+        return enterpriseCount;
+    }
+
+    public void setEnterpriseCount(Integer enterpriseCount) {
+        this.enterpriseCount = enterpriseCount;
+    }
+
+    public String getContactName() {
+        return contactName;
+    }
+
+    public void setContactName(String contactName) {
+        this.contactName = contactName;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+    public String getChannelIndicators() {
+        return channelIndicators;
+    }
+
+    public void setChannelIndicators(String channelIndicators) {
+        this.channelIndicators = channelIndicators;
+    }
+
+    public String getInterviewIdeas() {
+        return interviewIdeas;
+    }
+
+    public void setInterviewIdeas(String interviewIdeas) {
+        this.interviewIdeas = interviewIdeas;
+    }
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public String getInterviewDistribution() {
+        return interviewDistribution;
+    }
+
+    public void setInterviewDistribution(String interviewDistribution) {
+        this.interviewDistribution = interviewDistribution;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public String getIndustry() {
+        return industry;
+    }
+
+    public void setIndustry(String industry) {
+        this.industry = industry;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getFinancialData() {
+        return financialData;
+    }
+
+    public void setFinancialData(String financialData) {
+        this.financialData = financialData;
+    }
+
+    public String getEarlyCommunication() {
+        return earlyCommunication;
+    }
+
+    public void setEarlyCommunication(String earlyCommunication) {
+        this.earlyCommunication = earlyCommunication;
+    }
+
+    public Integer getPatentCount() {
+        return patentCount;
+    }
+
+    public void setPatentCount(Integer patentCount) {
+        this.patentCount = patentCount;
+    }
+
+    public Integer getInventionPatentCount() {
+        return inventionPatentCount;
+    }
+
+    public void setInventionPatentCount(Integer inventionPatentCount) {
+        this.inventionPatentCount = inventionPatentCount;
+    }
+
+    public Integer getUtilityModelCount() {
+        return utilityModelCount;
+    }
+
+    public void setUtilityModelCount(Integer utilityModelCount) {
+        this.utilityModelCount = utilityModelCount;
+    }
+
+    public Integer getAppearancePatentCount() {
+        return appearancePatentCount;
+    }
+
+    public void setAppearancePatentCount(Integer appearancePatentCount) {
+        this.appearancePatentCount = appearancePatentCount;
+    }
+
+    public Integer getSoftwareWorksCount() {
+        return softwareWorksCount;
+    }
+
+    public void setSoftwareWorksCount(Integer softwareWorksCount) {
+        this.softwareWorksCount = softwareWorksCount;
+    }
+
+    public Integer getOtherCount() {
+        return otherCount;
+    }
+
+    public void setOtherCount(Integer otherCount) {
+        this.otherCount = otherCount;
+    }
+}

+ 20 - 2
src/main/java/com/goafanti/customer/service/impl/UserArchivesServiceImpl.java

@@ -11,6 +11,7 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.InputSelectUserArchives;
 import com.goafanti.customer.bo.OutSelectUserArchives;
+import com.goafanti.customer.bo.OutSelectUserChannelArchives;
 import com.goafanti.customer.bo.UserArchivesDetails;
 import com.goafanti.customer.service.CustomerService;
 import com.goafanti.customer.service.UserArchivesService;
@@ -401,8 +402,25 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
             List<selectByUidAidBo> userArchivesInterviews = userArchivesInterviewMapper.selectByUidAid(e.getId(), null);
             e.setPublicContent(pushContent(userArchivesInterviews));
         });
-        NewExcelUtil<OutSelectUserArchives> newExcelUtil = new NewExcelUtil<>(OutSelectUserArchives.class);
-        return newExcelUtil.exportExcel( list,"用户档案",uploadPath);
+        String sheetName = "用户档案";
+        if (in.getNewChannel()==1){
+            sheetName="渠道档案";
+            NewExcelUtil<OutSelectUserChannelArchives> newExcelUtil = new NewExcelUtil<>(OutSelectUserChannelArchives.class);
+            List<OutSelectUserChannelArchives> newList = new ArrayList<>();
+            //将类型转换
+            list.stream().forEach(e ->{
+                OutSelectUserChannelArchives outSelectUserChannelArchives = new OutSelectUserChannelArchives();
+                BeanUtils.copyProperties(e,outSelectUserChannelArchives);
+                newList.add(outSelectUserChannelArchives);
+            });
+            return newExcelUtil.exportExcel( newList,sheetName,uploadPath);
+        }else {
+            NewExcelUtil<OutSelectUserArchives> newExcelUtil = new NewExcelUtil<>(OutSelectUserArchives.class);
+            return newExcelUtil.exportExcel( list,sheetName,uploadPath);
+        }
+
+
+
     }