Commit 1f49191c authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents aef2fa12 6da1283b
......@@ -173,6 +173,14 @@ tenant:
- biz_dict_data
- push_monitor_rules
- push_monitor_info
- d_customer_business_license
- d_customer_inspection_certificate
- d_customer_org_certificate
- d_customer_other_certificate
- d_customer_performance_certificate
- d_customer_qualification_certificate
- d_customer_safety_certificate
- d_customer_tax_certificate
# MyBatisPlus配置
......
......@@ -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<>();
......
......@@ -8,6 +8,7 @@ import com.dsk.common.constant.Constants;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.excel.ExcelUtils;
import com.dsk.common.exception.ServiceException;
import com.dsk.common.utils.redis.RedisUtils;
import com.dsk.jsk.domain.JskCombineSearchDto;
import com.dsk.jsk.domain.bo.ComposeQueryDto;
import com.dsk.jsk.service.EnterpriseService;
......@@ -24,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.util.*;
/**
......@@ -42,18 +44,25 @@ public class ExportService {
private String EXPORT_BACK_URL;
public AjaxResult aptitudeFile(MultipartFile file) throws Exception {
int exportCount = 1;
if (RedisUtils.hasKey("aptitudeFileExportCount")){
exportCount = RedisUtils.getCacheObject("aptitudeFileExportCount");
if (exportCount>=3){
return AjaxResult.error("每天最多导出3次");
}
}
ComposeQueryDto composeQueryDto = new ComposeQueryDto();
//识别Excel内容
List<AptitudeVo> companyNameList = new ExcelUtils<>(AptitudeVo.class).importExcel(file.getInputStream(), 2);
if (companyNameList.isEmpty()) {
throw new ServiceException("表格中不存在待导入数据!");
throw new ServiceException("表格中不存在待查询数据!");
}
List<String> list = new ArrayList<>();
for (int i = 0; i < companyNameList.size(); i++) {
if (i>499){
break;
if (i<500){
list.add(companyNameList.get(i).getCompanyName());
}
list.add(companyNameList.get(i).getCompanyName());
}
composeQueryDto.setKeyword(String.join(",",list));
SimpleDateFormat sdf =new SimpleDateFormat("yyyyMMdd");
......@@ -72,6 +81,8 @@ public class ExportService {
composeQueryDto.setExportBackUrl(EXPORT_BACK_URL);
composeQueryDto.setExportExeclName(fileName);
dskOpenApiUtil.requestBody("/operate/export/zjyj/aptitude", BeanUtil.beanToMap(composeQueryDto,false,false));
RedisUtils.setCacheObject("aptitudeFileExportCount",exportCount);
RedisUtils.expire("aptitudeFileExportCount", Duration.ofHours(24));
return AjaxResult.success();
}
......
......@@ -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
......@@ -6,8 +6,8 @@
<div class="design-header fields-header">字段组件</div>
<div class="design-main fields-main">
<vuedraggable :list="defaultComOptions" :group="{name: 'customComGroup', pull: 'clone', put: false}" class="design-draggable-fields"
draggable=".draggable-fields-item" ghostClass="dragClass" :clone="targetComClone" :sort="false" :disabled="!subfieldModuleList.length"
@end="fieldsOnEnd">
draggable=".draggable-fields-item" ghostClass="subfield-origin-dragClass" :clone="targetComClone" :sort="false"
:disabled="!subfieldModuleList.length" @end="fieldsOnEnd">
<transition-group name="fade" tag="div" class="draggable-fields-list">
<div class="draggable-fields-item" :class="{'has-no-subfield-module' : !subfieldModuleList.length}"
v-for="(item,index) of defaultComOptions" :key="index" @click="fieldsItemClick">
......@@ -22,19 +22,21 @@
<div class="custom-form-design-options">
<div class="design-header options-header">表单配置</div>
<div class="design-main options-main">
<el-form class="custom-design-el-form" ref="customDesignFormRef" :rules="{}" @submit.native.prevent>
<el-form class="custom-design-el-form" ref="customDesignFormRef" :model="" :rules="{}" @submit.native.prevent>
<!-- 最外层dragg容器 拖动模块module .subfield-module-dragg-target-icon -->
<vuedraggable :list="subfieldModuleList" group="customSubfieldmodule" class="subfield-module-container"
draggable=".subfield-module-item-container" handle=".subfield-module-dragg-target-icon" :animation="340">
<!-- 添加的分栏模块以及chidren模块 -->
<transition-group name="fade" tag="div" class="subfield-module-list">
<vuedraggable v-for="(item,index) of subfieldModuleList" draggable=".subfield-item-container"
handle=".subfield-module-item-dragg-target-icon" tag="subfield-module" :list="item.children" group="customComGroup"
:component-data="createComponentData(item)" :key="item.uid" :animation="340">
<subfield-item v-for="(child,index) of item.children" :key="child.uid" :parentUid="item.uid" :childModuleInfo="child"
@removeModuleItem="removeModuleItem"></subfield-item>
</vuedraggable>
<div class="subfield-module-draggable-list" v-for="(item,index) of subfieldModuleList" :key="item.uid">
<vuedraggable draggable=".subfield-item-container" handle=".subfield-module-item-dragg-target-icon" tag="subfield-module"
:list="item.children" group="customComGroup" :component-data="createComponentData(item)" :animation="340"
ghostClass="subfield-item-dragClass" :sort="true">
<subfield-item v-for="(child,index) of item.children" :key="child.uid" :parentUid="item.uid" :childModuleInfo="child"
@removeModuleItem="removeModuleItem"></subfield-item>
</vuedraggable>
</div>
</transition-group>
</vuedraggable>
......@@ -107,7 +109,6 @@ export default {
targetComClone(v) {
const cloneTarget = JSON.parse(JSON.stringify(v));
cloneTarget.uid = v4();
console.log(cloneTarget);
return cloneTarget;
},
// 字段组件结束拖动
......@@ -161,7 +162,7 @@ export default {
}
},
removeDialogClose() {
this.removeSubfieldModuleUid = "";
this.removeSubfieldModule = {};
},
removeOk() {
const index = this.subfieldModuleList.findIndex(item => item.uid == this.removeSubfieldModule.uid);
......@@ -184,8 +185,27 @@ export default {
display: flex;
min-width: 1140px;
.dragClass {
border: 1px solid #0081ff;
.subfield-origin-dragClass,
.subfield-item-dragClass {
display: flex;
align-items: center;
background: rgba(0, 129, 255, 0.3);
height: 56px;
padding: 0px 16px;
box-sizing: border-box;
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
font-weight: 400;
& > img {
width: 16px;
height: 16px;
margin-right: 16px;
}
}
.subfield-origin-dragClass {
height: auto;
}
.design-header {
......@@ -254,7 +274,7 @@ export default {
padding: 0px 16px;
box-sizing: border-box;
margin-top: 12px;
cursor: pointer;
cursor: move;
user-select: none;
&:hover {
......
......@@ -57,7 +57,7 @@ export default {
.subfield-module-item-dragg-target-icon {
width: 14px;
height: 14px;
cursor: pointer;
cursor: move;
}
::v-deep .subfield-module-form-item {
......
......@@ -97,7 +97,7 @@ export default {
& > img {
width: 14px;
height: 14px;
cursor: pointer;
cursor: move;
}
& > span {
font-size: 14px;
......
......@@ -153,8 +153,8 @@ export default {
const _form = queryConditionFiltering(this.form);
// 处理时间
if (_form?.cooperationTime?.length) {
_form.projectStartTime = _form?.cooperationTime[0];
_form.projectEndTime = _form?.cooperationTime[1];
_form.minLastCooperateDate = _form?.cooperationTime[0];
_form.maxLastCooperateDate = _form?.cooperationTime[1];
}
delete _form.cooperationTime;
......
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