Commit 26d15f92 authored by lcl's avatar lcl

u

parent 652df105
......@@ -46,7 +46,7 @@ public class DCustomerController extends BaseController {
*/
@GetMapping("/info/{customerKey}")
public R<DCustomer> info(@PathVariable String customerKey) {
return R.ok(baseService.getById(customerKey));
return R.ok(baseService.info(customerKey));
}
/**
......
......@@ -2,9 +2,11 @@ package com.dsk.cscec.domain;
import java.util.Date;
import java.io.Serializable;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.cscec.domain.vo.CertificateVo;
import lombok.Data;
/**
......@@ -532,19 +534,49 @@ public class DCustomer implements Serializable {
*/
private Date loadTime;
/**
* 企业合作数量
*营业执照url
*/
@TableField(exist = false)
private Integer enterpriseCooperationCount;
private List<CertificateVo> businessLicenseList;
/**
* 项目合作数量
* 组织机构代码证url
*/
@TableField(exist = false)
private Integer projectCooperationCount;
private List<CertificateVo> orgCertificateList;
/**
* jsk企业id
* 税务登记证url
*/
@TableField(exist = false)
private Integer companyId;
private List<CertificateVo> taxCertificateList;
/**
* 资质证书url
*/
@TableField(exist = false)
private List<CertificateVo> qualificationCertificateList;
/**
* 安全生产url
*/
@TableField(exist = false)
private List<CertificateVo> safetyCertificateList;
/**
* 增值税一般纳税人资格证明url
*/
@TableField(exist = false)
private List<CertificateVo> ratepayerCertificateList;
/**
* 业绩报告url
*/
@TableField(exist = false)
private List<CertificateVo> performanceCertificateList;
/**
* 考察报告url
*/
@TableField(exist = false)
private List<CertificateVo> inspectionCertificateList;
/**
* 其他url
*/
@TableField(exist = false)
private List<CertificateVo> otherCertificateList;
}
package com.dsk.cscec.domain.vo;
import lombok.Data;
/**
* @Author lcl
* @Data 2023/12/28 14:13
*/
@Data
public class CertificateVo {
/**
* 文件链接
*/
private String docLink;
/**
* 文件名称
*/
private String docName;
/**
* 记录时间
*/
private String loadTime;
}
......@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.CustomerInfoBo;
import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.domain.vo.CertificateVo;
import com.dsk.cscec.domain.vo.CustomerInfoVo;
import com.dsk.cscec.domain.vo.DCustomerListVo;
import org.apache.ibatis.annotations.Param;
......@@ -31,5 +32,23 @@ public interface DCustomerMapper extends BaseMapper<DCustomer> {
*/
Page<CustomerInfoVo> queryListByType(IPage<CustomerInfoBo> build, @Param("bo") CustomerInfoBo bo);
List<CertificateVo> selectBusinessLicense(String customerId);
List<CertificateVo> selectOrgCertificate(String customerId);
List<CertificateVo> selectTaxCertificate(String customerId);
List<CertificateVo> selectQualificationCertificate(String customerId);
List<CertificateVo> selectSafetyCertificate(String customerId);
List<CertificateVo> selectRatepayerCertificate(String customerId);
List<CertificateVo> selectPerformanceCertificate(String customerId);
List<CertificateVo> selectInspectionCertificate(String customerId);
List<CertificateVo> selectOtherCertificate(String customerId);
}
......@@ -21,5 +21,7 @@ public interface IDCustomerService extends IService<DCustomer> {
List<DCustomerListVo> exportList(DCustomerSearchBo bo);
DCustomer info(String customerKey);
}
......@@ -89,6 +89,35 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
return records;
}
@Override
public DCustomer info(String customerKey) {
DCustomer customer = baseMapper.selectById(customerKey);
setCertificate(customer);
return customer;
}
private void setCertificate(DCustomer customer) {
if (ObjectUtils.isEmpty(customer)) return;
//营业执照url
customer.setBusinessLicenseList(baseMapper.selectBusinessLicense(customer.getCustomerId()));
//组织机构代码证url
customer.setOrgCertificateList(baseMapper.selectOrgCertificate(customer.getCustomerId()));
//税务登记证url
customer.setTaxCertificateList(baseMapper.selectTaxCertificate(customer.getCustomerId()));
//资质证书url
customer.setQualificationCertificateList(baseMapper.selectQualificationCertificate(customer.getCustomerId()));
//安全生产url
customer.setSafetyCertificateList(baseMapper.selectSafetyCertificate(customer.getCustomerId()));
//增值税一般纳税人资格证明url
// customer.setRatepayerCertificateList(baseMapper.selectRatepayerCertificate(customer.getCustomerId()));
//业绩报告url
customer.setPerformanceCertificateList(baseMapper.selectPerformanceCertificate(customer.getCustomerId()));
//考察报告url
customer.setInspectionCertificateList(baseMapper.selectInspectionCertificate(customer.getCustomerId()));
//其他url
customer.setOtherCertificateList(baseMapper.selectOtherCertificate(customer.getCustomerId()));
}
private void dealWithCustomerClass(DCustomerSearchBo bo) {
if (!ObjectUtils.isEmpty(bo.getCustomerClass())) {
List<String> list = new ArrayList<>();
......
......@@ -180,4 +180,31 @@
</if>
order by approve_date2 desc
</select>
<select id="selectBusinessLicense" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_business_license where customer_id =#{customerId}
</select>
<select id="selectOrgCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_org_certificate where customer_id =#{customerId}
</select>
<select id="selectTaxCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_tax_certificate where customer_id =#{customerId}
</select>
<select id="selectQualificationCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_qualification_certificate where customer_id =#{customerId}
</select>
<select id="selectSafetyCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_safety_certificate where customer_id =#{customerId}
</select>
<select id="selectRatepayerCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_business_license where customer_id =#{customerId}
</select>
<select id="selectPerformanceCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_performance_certificate where customer_id =#{customerId}
</select>
<select id="selectInspectionCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_inspection_certificate where customer_id =#{customerId}
</select>
<select id="selectOtherCertificate" resultType="com.dsk.cscec.domain.vo.CertificateVo">
select * from d_customer_other_certificate where customer_id =#{customerId}
</select>
</mapper>
\ No newline at end of file
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