Commit b81698b6 authored by liuChang's avatar liuChang

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

parents 3fafa369 e082e8a5
......@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.QueryConstants;
import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.domain.bo.AdvisoryBodyBo;
......@@ -69,6 +70,14 @@ public class CustomerInfoServiceImpl extends ServiceImpl<DCustomerMapper, DCusto
item.setEnterpriseCooperationCount(subcontractMapper.selectEnterpriseCountByCustomerId(item.getCustomerId()));
//项目合作数量
item.setProjectCooperationCount(subcontractMapper.selectProjectCountByCustomerId(item.getCustomerId()));
//关键字标红
if(!ObjectUtils.isEmpty(bo.getCustomerName())){
item.setCustomerName(StringUtils.markInRed(item.getCustomerName(), bo.getCustomerName()));
}
//关键字标红
if(!ObjectUtils.isEmpty(bo.getLeaderName())){
item.setCustomerName(StringUtils.markInRed(item.getLeaderName(), bo.getLeaderName()));
}
try {
Map<String, Object> map = opportunityRadarService.enterpriseByName(item.getCustomerName());
if (!ObjectUtils.isEmpty(map.get("data"))) {
......
......@@ -45,14 +45,15 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
dealWithCustomerClass(bo);
Page<DCustomerListVo> page = baseMapper.allSearchList(query.build(), bo);
if (CollectionUtils.isNotEmpty(page.getRecords())) {
page.getRecords().parallelStream().forEach(item->{
page.getRecords().parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量
item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量
item.setProjectCooperationCount(vo.getProjectCooperationCount());
showCustomerClass(item);
//关键字标红
if(!ObjectUtils.isEmpty(bo.getCustomerName())){
if (!ObjectUtils.isEmpty(bo.getCustomerName())) {
item.setCustomerName(StringUtils.markInRed(item.getCustomerName(), bo.getCustomerName()));
}
try {
......@@ -62,7 +63,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
Integer companyId = MapUtil.getInt(data, "jskEid");
item.setCompanyId(companyId);
}
}catch (Exception e){
} catch (Exception e) {
//
}
});
......@@ -75,13 +76,14 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
dealWithCustomerClass(bo);
PageQuery query = new PageQuery();
List<DCustomerListVo> records = baseMapper.allSearchList(query.build(), bo).getRecords();
if(CollectionUtils.isNotEmpty(records)){
records.parallelStream().forEach(item->{
if (CollectionUtils.isNotEmpty(records)) {
records.parallelStream().forEach(item -> {
DCustomerListVo vo = subcontractMapper.selectStatisticByCustomerId(item.getCustomerId());
//企业合作数量
item.setEnterpriseCooperationCount(vo.getEnterpriseCooperationCount());
//项目合作数量
item.setProjectCooperationCount(vo.getProjectCooperationCount());
showCustomerClass(item);
});
}
return records;
......@@ -92,7 +94,7 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
List<String> list = new ArrayList<>();
Integer isTeam = null;
for (String customerClass : bo.getCustomerClass()) {
switch (customerClass){
switch (customerClass) {
case "专业分包":
list.add("专业分包");
break;
......@@ -103,17 +105,17 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
list.add("租赁");
break;
case "劳务分包":
if(isTeam == null){
if (isTeam == null) {
isTeam = 0;
}else if(isTeam == 1) {
} else if (isTeam == 1) {
isTeam = null;
}
list.add("劳务分包");
break;
case "劳务队伍":
if(isTeam == null) {
if (isTeam == null) {
isTeam = 1;
}else if(isTeam == 0) {
} else if (isTeam == 0) {
isTeam = null;
}
list.add("劳务分包");
......@@ -126,5 +128,25 @@ public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer
bo.setIsTeam(isTeam);
}
}
private void showCustomerClass(DCustomerListVo vo) {
if (!ObjectUtils.isEmpty(vo.getCustomerClass())) {
switch (vo.getCustomerClass()) {
case "分供":
vo.setCustomerClass("物资设备");
break;
case "租赁":
vo.setCustomerClass("施工机械");
break;
case "劳务分包":
if (!ObjectUtils.isEmpty(vo.getLeaderName())) {
vo.setCustomerClass("劳务队伍");
}
break;
default:
break;
}
}
}
}
......@@ -111,7 +111,7 @@
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="qyVisible=false">取消</el-button>
<el-button @click="handleCancel1">取消</el-button>
<el-button type="primary" @click="handleAdd">确定</el-button>
</div>
</el-dialog>
......@@ -227,13 +227,17 @@
this.addEnterprise()
},
changeCheckbox(item){
console.log(item)
if (this.cid.indexOf(item.id) == -1) {
this.cid.push(item.id)
} else {
this.cid.splice(this.cid.indexOf(item.id), 1)
}
},
handleCancel1(){
this.qyVisible=false;
this.companyName=''
this.dataList=[]
},
handleAdd(){
let data={
cid:this.cid
......
......@@ -75,7 +75,7 @@
</div>
<div class="main-item" style="line-height: 32px;">
<div class="label">手机号码</div>
<el-input class="phone" v-model="queryParams.phones" placeholder="请输入手机号"></el-input>
<el-input class="phone" v-model="queryParams.phones" placeholder="请输入手机号" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</div>
</div>
<div class="search">
......
......@@ -236,6 +236,7 @@
height: 550px;
text-align: center;
border-top: 1px solid #EFEFEF;
background: #ffffff;
.img{
width: 108px;
height: 108px;
......
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