Commit 55c14647 authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/dev20230707' into dev20230707

parents 3f10931b 248d4a76
package com.dsk.web.controller.customer;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.service.ICustomerOverviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 客户概览
* @author lcl
* @create 2023/8/15
*/
@RestController
@RequestMapping("/customer/overview")
public class CustomerOverviewController extends BaseController {
@Autowired
private ICustomerOverviewService baseService;
/**
* 客户统计
*/
@GetMapping("/statistics")
public AjaxResult statistics(){
return AjaxResult.success(baseService.statistics(new CustomerSearchDto()));
}
/**
* 客户合作情况
*/
@GetMapping("/cooperation/top")
public AjaxResult cooperationTop(){
return AjaxResult.success(baseService.cooperationTop(new CustomerSearchDto()));
}
/**
* 客户信资评级
*/
@GetMapping("/credit/level")
public AjaxResult creditLevel(){
return AjaxResult.success(baseService.creditLevel(new CustomerSearchDto()));
}
}
......@@ -99,6 +99,14 @@ public class JskCombineInfoController extends BaseController {
return baseService.centralEnterprseChild();
}
/**
* 查央企子公司 翻页
*/
@PostMapping("/centralEnterprse/child/page")
public AjaxResult centralEnterprseChildPage(@RequestBody JSONObject object) {
return baseService.centralEnterprseChildPage(object);
}
/**
* 查地方国企
*/
......@@ -106,4 +114,28 @@ public class JskCombineInfoController extends BaseController {
public AjaxResult centralEnterprseLocal(@RequestBody JSONObject object) {
return baseService.centralEnterprseLocal(object);
}
/**
* 查地方国企 翻页
*/
@PostMapping("/centralEnterprse/local/page")
public AjaxResult centralEnterprseLocalPage(@RequestBody JSONObject object) {
return baseService.centralEnterprseLocalPage(object);
}
/**
* 民营企业
*/
@PostMapping("/centralEnterprse/social")
public AjaxResult centralEnterprseSocial() {
return baseService.centralEnterprseSocial();
}
/**
* 民营企业 翻页
*/
@PostMapping("/centralEnterprse/social/page")
public AjaxResult centralEnterprseSocialPage(@RequestBody JSONObject object) {
return baseService.centralEnterprseSocialPage(object);
}
}
import request from "@/utils/request";
// 大项目最新中标
export function bigWinningBidsPage(data) {
return request({
url: '/index/bigWinningBidsPage',
method: 'post',
data: data
})
}
// 大项目最新招标
export function bigBidPage(data) {
return request({
url: '/index/bigBidPage',
method: 'post',
data: data
})
}
......@@ -233,6 +233,17 @@ ul, li {
.el-select .el-input .el-select__caret{
color: #232323;
}
.el-cascader .el-input .el-icon-arrow-down{
color: #232323;
}
.custom-money-select .el-input .el-icon-arrow-down{
color: #232323;
font-size: 14px;
}
.custom-time-select .el-input .el-icon-arrow-down{
color: #232323;
font-size: 14px;
}
.query-box{
justify-content: space-between;
}
......
This diff is collapsed.
......@@ -13,8 +13,8 @@
<span class="search-box-t"
:class=" queryParams.companyType||
queryParams.companyTypes.length > 0 ? 'search-box-ta' : ''"
@click="handleSearch1">筛选<i :class="searchState ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"></i></span>
<div v-show="searchState" ref="showContent" class="search-main">
@click="handleSearch1">筛选<i :class="searchState ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i></span>
<div v-show="searchState" id="showContent" class="search-main">
<div class="item">
<span class="wrap_label">科技型企业</span>
<div class="item_ckquery">
......@@ -98,9 +98,9 @@
{label: '企业地区', prop: 'address', minWidth: '150'},
],
formData: [
{ type: 4, fieldName: 'combineMemberLevel', value: '', placeholder: '成员层级', options:[]},
{ type: 4, fieldName: 'businessType', value: '', placeholder: '主营业务', options:[]},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true}, placeholder: '地区', options:[]},
{ type: 4, fieldName: 'combineMemberLevels', value: '', placeholder: '成员层级', options:[]},
{ type: 1, fieldName: 'businessType', value: '', placeholder: '主营业务', options:[]},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '地区', options:[]},
{ type: 6, fieldName: 'money', value: '', placeholder: '注册资本', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[] },
{ type: 0, fieldName: 'penalizeReasonType', value: '', placeholder: '筛选', options: []},
{ type: 3, fieldName: 'searchValue', value: '', placeholder: '输入关键词查询'},
......@@ -115,16 +115,20 @@
value:'集团本身'
},
{
name:'一级公司',
value:'一级公司'
name:'一级公司',
value:'一级公司'
},
{
name:'二级公司',
value:'二级公司'
name:'二级公司',
value:'二级公司'
},
{
name:'三级子公司',
value:'三级子公司'
name:'三级公司',
value:'三级公司'
},
{
name:'其他公司',
value:'其他公司'
},
],
kjxqy:[
......@@ -163,7 +167,8 @@
moneyList: ['1000万以下', '1000万-5000万', '5000万-1亿', '1亿-10亿','10亿以上', '自定义'],
qyType:[],
cgblList:['100%','50%以上','20%以上','5%以上','1%-5%'],
cgblName:''
cgblName:'',
paramsData:[], //储存组件筛选的条件
}
},
watch:{
......@@ -214,18 +219,25 @@
// 筛选
handleSearch1(event){
// this.searchState=!this.searchState;
let dom = this.$refs.showContent;
if (!dom.contains(event.target)) {
this.searchState = !this.searchState;
document.removeEventListener('click', this.handleQuery);
let dom = document.getElementById("showContent");
if(dom){
if (!dom.contains(event.target)) {
this.searchState = !this.searchState;
document.removeEventListener('click', this.handleQuery);
}
}
},
handleQuery(params){
this.paramsData=params;
let data = this.getAreaList(params || this.queryParams)
memberList(data).then(res=>{
this.tableData = res.rows
this.tableDataTotal = res.total
this.isSkeleton = false
if(res.code === 200){
this.tableData = res.rows
this.tableDataTotal = res.total
}else {
this.tableData = []
}
})
},
//地区
......@@ -284,8 +296,9 @@
}else{
this.queryParams[name] = []
}
this.handleQuery();
// this.$forceUpdate();
this.paramsData.companyType=this.queryParams.companyType
this.paramsData.companyTypes=this.queryParams.companyTypes
this.handleQuery(this.paramsData);
},
handleChange(key,name) {
if(key === '1'){
......@@ -328,14 +341,14 @@
getAreaList(params){
if(params.province&&params.province.length>0){
let arr = this.$children[0].$refs.cascader[0].getCheckedNodes()
let provinceIds = [], cityIds = [], areaIds = []
let provinceIds = [], cityIds = [], districtIds = []
for (var i in arr) {
if (arr[i].parent) {
if (!arr[i].parent.checked) {
if(arr[i].hasChildren || arr[i].level==2){
cityIds.push(arr[i].data.id)
}else{
areaIds.push(arr[i].data.id)
districtIds.push(arr[i].data.id)
}
}
} else {
......@@ -345,19 +358,22 @@
delete params.province
provinceIds.length>0?params.provinceIds = provinceIds:''
cityIds.length>0?params.cityIds = cityIds:''
areaIds.length>0?params.areaIds = areaIds:''
districtIds.length>0?params.districtIds = districtIds:''
// provinceIds.length>0?this.queryParams.provinceIds = provinceIds:''
// cityIds.length>0?this.queryParams.cityIds = cityIds:''
// districtIds.length>0?this.queryParams.districtIds = districtIds:''
}
return params
},
sortChange({ column, prop, order }){
this.queryParams.field = prop
this.queryParams.orderName = prop
if(column.order === "ascending"){
this.queryParams.order = 'asc'
this.queryParams.orderType = 'asc'
}else if(column.order === "descending"){
this.queryParams.order = 'desc'
this.queryParams.orderType = 'desc'
}else {
this.queryParams.order=''
this.queryParams.field=''
this.queryParams.orderType=''
this.queryParams.orderName=''
}
this.pageIndex = 1;
this.handleQuery()
......@@ -388,7 +404,7 @@
font-size: 14px;
font-weight: 400;
line-height: 32px;
color: #232323;
color: #999999;
margin-right: 8px;
text-align: center;
width: 82px;
......@@ -462,5 +478,24 @@
}
}
}
::v-deep .el-table{
.has-gutter{
tr{
th:nth-last-child(2){
border-right:0;
}
td:nth-last-child(2){
border-right:0;
}
}
}
.el-table__cell.gutter{
background: #F0F3FA;
}
}
::v-deep .el-icon-arrow-down,.el-icon-arrow-up{
font-size: 14px;
color:#232323 !important;
}
}
</style>
......@@ -77,7 +77,7 @@
{label: '业主单位', prop: 'projectUnit', slot: true,minWidth: '200'},
],
formData: [
{ type: 7, fieldName: 'combineMemberLevel', value: '',props: {multiple: true}, placeholder: '项目地区', options:[]},
{ type: 7, fieldName: 'province', value: '',props: {multiple: true,value: 'id',expandTrigger: 'hover'}, placeholder: '项目地区', options:[]},
{ type: 5, fieldName: 'time', value: '', placeholder: '中标时间', startTime: 'startBidTime', endTime: 'endBidTime',timeList:[] },
{ type: 6, fieldName: 'money', value: '', placeholder: '中标金额', startMoney: 'minAmount', endMoney: 'maxAmount',moneyList:[] },
{ type: 4, fieldName: 'boundTypes', value: '', placeholder: '业绩类型', options: []},
......@@ -136,7 +136,7 @@
methods: {
handleQuery(params){
this.isSkeleton = true
let data = params ? params : this.queryParams;
let data = this.getAreaList(params || this.queryParams)
if(data.cgbl){
if(data.cgbl === '100%'){
data.minStockPercent=1
......@@ -214,6 +214,30 @@
this.addressList = str;
this.formData[0].options=str;
},
getAreaList(params){
if(params.province&&params.province.length>0){
let arr = this.$children[0].$refs.cascader[0].getCheckedNodes()
let provinceIds = [], cityIds = [], districtIds = []
for (var i in arr) {
if (arr[i].parent) {
if (!arr[i].parent.checked) {
if(arr[i].hasChildren || arr[i].level==2){
cityIds.push(arr[i].data.id)
}else{
districtIds.push(arr[i].data.id)
}
}
} else {
provinceIds.push(arr[i].data.id)
}
}
delete params.province
provinceIds.length>0?params.provinceIds = provinceIds:''
cityIds.length>0?params.cityIds = cityIds:''
districtIds.length>0?params.districtIds = districtIds:''
}
return params
},
}
}
</script>
......@@ -229,5 +253,20 @@
margin-right: 24px;
}
}
::v-deep .el-table{
.has-gutter{
tr{
th:nth-last-child(2){
border-right:0;
}
td:nth-last-child(2){
border-right:0;
}
}
}
.el-table__cell.gutter{
background: #F0F3FA;
}
}
}
</style>
......@@ -53,14 +53,14 @@
queryParams: {
combineId:'54355f88a5b16d3e52f74931f5567853',
pageNum: 1,
pageSize: 10
pageSize: 20
},
forData: [
{label: '资质名称', prop: 'qualificationName'},
{label: '拥有该资质成员', prop: 'companyCount', slot: true},
],
formData: [
{ type: 4, fieldName: 'combineMemberLevel', value: '', placeholder: '筛选', options:[]},
{ type: 1, fieldName: 'qualificationType', value: '', placeholder: '筛选', options:[],width:260},
],
tableData:[],
tableDataTotal:0,
......@@ -77,9 +77,13 @@
this.isSkeleton = true
let data = params ? params : this.queryParams
certificateList(data).then(res=>{
this.tableData = res.rows
this.tableDataTotal = res.total
this.isSkeleton = false
if(res.code === 200){
this.tableData = res.rows
this.tableDataTotal = res.total
}else {
this.tableData = []
}
})
},
getCertificateList(){
......@@ -113,5 +117,20 @@
margin-right: 24px;
}
}
::v-deep .el-table{
.has-gutter{
tr{
th:nth-last-child(2){
border-right:0;
}
td:nth-last-child(2){
border-right:0;
}
}
}
.el-table__cell.gutter{
background: #F0F3FA;
}
}
}
</style>
......@@ -6,7 +6,9 @@
custom-class="client-drawer"
:with-header="false"
@closed="cancel">
<skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton>
<tables
v-if="!isSkeleton"
:indexFixed="true"
:tableLoading="tableLoading"
:tableData="tableData"
......@@ -17,8 +19,10 @@
style="margin: 12px;"
>
<template slot="companyName" slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.companyId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link" v-if="scope.row.companyId&&scope.row.companyName" v-html="scope.row.companyName"></router-link>
<div v-else v-html="scope.row.companyName || '--'"></div>
<div @click="cancel">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.companyId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link" v-if="scope.row.companyId&&scope.row.companyName" v-html="scope.row.companyName"></router-link>
</div>
<!--<div v-else v-html="scope.row.companyName || '&#45;&#45;'"></div>-->
</template>
</tables>
</el-drawer>
......@@ -39,6 +43,7 @@ export default {
data() {
return {
drawer: false,
isSkeleton:true,
queryParams: {
id: this.data.id,
pageNum: 1,
......@@ -64,10 +69,10 @@ export default {
},
methods: {
async handleQuery(params) {
this.tableLoading = true
this.isSkeleton = true
let param = params?params:this.queryParams
let res = await memberCertificateList(param)
this.tableLoading = false
this.isSkeleton = false
if(res.code==200){
this.tableData = res.rows
}
......
......@@ -151,6 +151,9 @@ export default {
case '一亿以上':
moneyStr = [10000]
break;
case '5亿-10亿':
moneyStr = [50000, 100000]
break;
case '1亿-10亿':
moneyStr = [10000, 100000]
break;
......@@ -396,7 +399,7 @@ export default {
.popper_box {
position: absolute;
left: 128px;
left: 125px;
bottom: -15px;
background: #ffffff;
width: 186px;
......@@ -404,7 +407,7 @@ export default {
text-indent: 0;
padding: 16px;
padding-top: 0px;
border: 1px solid #e0e0e0;
border: 1px solid #E4E7ED;
.popper_wrap {
margin-top: 16px;
display: inline-block;
......
......@@ -14,7 +14,7 @@
:style="form.width?'width:'+form.width+'px':'max-width: 110px'"
:placeholder="form.placeholder"
@change="changeSelect">
<el-option v-for="(item, index) in form.options" :key="index" :label="item.name" :value="item.value" />
<el-option v-for="(item, index) in form.options" :key="index" :label="item.name" :value="item.value" :disabled="item.disabled"/>
</el-select>
</template>
<!-- 年月日 -->
......@@ -51,7 +51,7 @@
style="max-width: 170px"
:placeholder="form.placeholder"
@change="changeSelect">
<el-option v-for="(item, index) in form.options" :key="index" :label="item.name" :value="item.value" :disabled="item.disabled"/>
<el-option v-for="(item, index) in form.options" :key="index" :label="item.name" :value="item.value"/>
</el-select>
</template>
<!-- 时间、自定义 -->
......@@ -179,6 +179,9 @@ export default {
height: 34px;
line-height: 34px;
padding-right: 27px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item{
margin-right: 8px !important;
......@@ -213,12 +216,12 @@ export default {
display: flex;
border-radius: 2px 0px 0px 2px;
border: 1px solid #D9D9D9;
line-height: 32px;
height: 32px;
line-height: 34px;
height: 34px;
span {
width: 60px;
height: 30px;
line-height: 28px;
height: 32px;
line-height: 32px;
font-size: 14px;
background: #F5F5F5;
text-align: center;
......@@ -240,11 +243,13 @@ export default {
}
::v-deep .el-input__inner {
border: 0;
line-height: 30px;
height: 30px;
line-height: 32px;
height: 32px;
position: absolute;
top: 0;
padding-right: 32px;
padding-right: 22px;
font-size: 12px;
padding-left: 8px;
}
}
.fromTime{
......
......@@ -59,7 +59,16 @@ export default {
handleSearch(){
let params = this.formParams()
params.pageNum = 1
this.queryParams.pageNum = 1
this.queryParams.pageNum = 1;
if(params.companyTypes){
if(params.companyTypes.length === 0){
delete params.companyTypes
}
}
if(!params.companyType){
delete params.companyType
}
this.handleQuery(params)
},
//分页
......
This diff is collapsed.
......@@ -75,7 +75,7 @@
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/>
<el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" sortable width="150"/>
<el-table-column prop="sumMoney" label="中标总金额 (万元)" align="right" :formatter="formatStatus" width="140"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" width="120"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus"/>
</el-table>
</div>
</div>
......@@ -130,7 +130,7 @@
</div>
</div>
<div class="content_box">
<div class="box-left" style="width: 60%;">
<div class="box-left">
<div id="echarts4" style="height: 300px"></div>
</div>
<div class="box-right">
......@@ -175,7 +175,7 @@
border
show-summary
max-height="280"
:summary-method="getSummaries"
:summary-method="getSummaries1"
fit
highlight-current-row
:default-sort = "{prop: 'count', order: 'descending'}"
......@@ -208,7 +208,7 @@
</div>
</div>
<div class="content_box" v-if="topList.length > 0 && !isSkeleton">
<div class="box-left" style="width: 60%;">
<div class="box-left">
<div id="echarts6" style="height: 300px"></div>
</div>
<div class="box-right">
......@@ -218,7 +218,7 @@
border
show-summary
max-height="280"
:summary-method="getSummaries1"
:summary-method="getSummaries2"
fit
highlight-current-row
:default-sort = "{prop: 'count', order: 'descending'}"
......@@ -227,9 +227,9 @@
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column prop="month" label="时间" :formatter="formatStatus" width="120"/>
<el-table-column prop="sgRate" label="施工类项目下浮率(%)" align="right" :formatter="formatStatus" width="170"/>
<el-table-column prop="kcsjRate" label="勘察设计类项目下浮率(%)" align="right" :formatter="formatStatus" width="200"/>
<el-table-column prop="jlRate" label="监理类项目下浮率(%)" align="right" :formatter="formatStatus" width="170"/>
<el-table-column prop="sgRate" label="施工类下浮率(%)" align="right" :formatter="formatStatus" width="160"/>
<el-table-column prop="kcsjRate" label="勘察设计类下浮率(%)" align="right" :formatter="formatStatus"/>
<el-table-column prop="jlRate" label="监理类下浮率(%)" align="right" :formatter="formatStatus" width="160"/>
</el-table>
</div>
</div>
......@@ -306,9 +306,13 @@
this.xmtjList.forEach(item =>{
item.money=Number(item.money)
})
var list=[];
for(var i=0;i<10;i++){
list.push(res.data.date[i])
}
if(res.data){
this.$nextTick(() => {
this.initChart1(res.data.date)
this.initChart1(list)
})
}
})
......@@ -406,11 +410,6 @@
initChart1(data) {
this.$nextTick(() => {
let myChart = echarts.init(document.getElementById("echarts1"))
let list1=[],list2=[]
for(var i=0; i<data.length; i++) {
list1.push(data[i].count)
list2.push(data[i].money)
}
let option ={
tooltip: {
trigger: 'axis',
......@@ -421,7 +420,7 @@
xAxis: {
type: 'category',
axisLabel: { //坐标轴刻度标签的相关设置
margin: 15, //刻度标签与轴线之间的距离
margin: 10, //刻度标签与轴线之间的距离
color:"#666666",
show: true,
interval: 0
......@@ -474,8 +473,8 @@
],
grid: {
top:30,
left:80,
right:90,
left:70,
right:100,
bottom:30,
},
series: [
......@@ -483,7 +482,7 @@
name:'中标金额(万元)',
smooth: false, //平滑
type:"line",
symbolSize: 6,
symbolSize: 5,
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
......@@ -694,7 +693,7 @@
type: 'category',
axisLabel: { //坐标轴刻度标签的相关设置
margin: 15, //刻度标签与轴线之间的距离
color:"#666666"
color:"#666666",
},
axisTick: false, //坐标轴刻度
axisPointer: {
......@@ -801,8 +800,10 @@
xAxis: {
type: 'category',
axisLabel: { //坐标轴刻度标签的相关设置
margin: 15, //刻度标签与轴线之间的距离
color:"#666666"
margin: 10, //刻度标签与轴线之间的距离
color:"#666666",
// show: true,
// interval: 0
},
axisTick: false, //坐标轴刻度
axisPointer: {
......@@ -845,8 +846,8 @@
],
grid: {
top:30,
left:80,
right:90,
left:70,
right:70,
bottom:30,
},
series: [
......@@ -854,7 +855,7 @@
name:'下浮率',
smooth: false, //平滑
type:"line",
symbolSize: 6,
symbolSize: 5,
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
......@@ -869,7 +870,7 @@
{
name:'统计项目数量',
type: 'bar',
barWidth: 20,
barWidth: 18,
tooltip: {
valueFormatter: function (value) {
return value + '个';
......@@ -1060,6 +1061,37 @@
return sums;
},
getSummaries1(param){
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '平均下浮率';
return;
}
if (index === 0 ||index === 3) {
sums[index] = '-';
return;
}
const values = data.map(item => Number(item[column.property]));
let length=0
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
length=values.length
return Number(prev) + Number(curr)
} else {
return prev;
}
}, 0);
if (index === 2) {
sums[index] = (Number(sums[index])/length).toFixed(2);
return;
}
});
return sums;
},
getSummaries2(param){
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
......@@ -1150,10 +1182,10 @@
display: flex;
justify-content: space-between;
.box-left{
width: 60%;
width: 50%;
}
.box-right{
width: 33%;
width: 43%;
float: right;
::v-deep .el-table{
.sort-caret.ascending{
......
package com.dsk.system.domain.customer.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author lcl
* @create 2023/5/16
*/
@Data
@NoArgsConstructor
public class CustomerSearchDto implements Serializable {
/**
* 企业id
......@@ -22,6 +27,10 @@ public class CustomerSearchDto implements Serializable {
* 企业名称
*/
private String companyName;
/**
* 企业性质
*/
private String companyNature;
/**
* 客户id
*/
......@@ -34,5 +43,41 @@ public class CustomerSearchDto implements Serializable {
* 客户状态 0:正常 1:历史
*/
private Integer status;
/**
* 是否上市 0:否 1:是
*/
private Integer isOn;
/**
* 省id
*/
private List<Integer> provinceIds;
/**
* 市id
*/
private List<Integer> cityIds;
/**
* 区id
*/
private List<Integer> districtIds;
/**
* 企业性质
*/
private List<String> companyNatures;
/**
* 信资等级
*/
private List<String> creditLevels;
/**
* 数据权限
*/
private Map<String, Object> params;
public Map<String, Object> getParams() {
if (params == null) {
params = new HashMap<>();
}
return params;
}
}
package com.dsk.system.domain.customer.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 客户分析
*
* @author lcl
* @create 2023/8/15
*/
@Data
public class CustomerAnalyzeVo implements Serializable {
/**
* 客户id
*/
private String customerId;
/**
* 企业名称
*/
private String companyName;
/**
* 企业id
*/
private Integer companyId;
/**
* 城投id
*/
private String uipId;
/**
* 项目数量
*/
private Integer businessCount;
/**
* 总投资金额
*/
private Double totalAmount;
}
......@@ -71,11 +71,11 @@ public class JskCombineSearchDto implements Serializable {
/**
* 中标时间(开始)
*/
private Date startBidTime;
private String startBidTime;
/**
* 中标时间(结束)
*/
private Date endBidTime;
private String endBidTime;
/**
* 业绩类型
*/
......
......@@ -37,6 +37,17 @@ public class JskCombineInfoService {
public TableDataInfo memberList(JskCombineSearchDto dto) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/combine/memberList", BeanUtil.beanToMap(dto, false, false));
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
if (!ObjectUtils.isEmpty(data.get("list"))) {
List<Map<String, Object>> list = (List<Map<String, Object>>) data.get("list");
list.parallelStream().forEach(res -> {
Integer companyId = MapUtils.getInteger(res, "companyId");
String companyName = MapUtils.getString(res, "companyName");
res.put("uipId", enterpriseService.getUipIdByCompanyNameOrCompanyId(companyName, companyId));
});
}
}
return dskOpenApiUtil.responsePage(map);
}
......@@ -106,8 +117,28 @@ public class JskCombineInfoService {
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseChildPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/child/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseLocal(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/local", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseLocalPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/local/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseSocial() {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/social", null);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseSocialPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/social/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
}
......@@ -3,12 +3,14 @@ package com.dsk.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerAnalyzeVo;
import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerStatusListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -20,7 +22,7 @@ import java.util.List;
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {
List<CustomerListVo> selectList(@Param("dto") CustomerSearchDto dto);
List<CustomerListVo> selectList(CustomerSearchDto dto);
List<Customer> selectUserList(Long userId);
......@@ -30,7 +32,11 @@ public interface CustomerMapper extends BaseMapper<Customer> {
List<CustomerStatusListVo> selectStatusListByCompanyName(@Param("companyNames") List<String> companyNames, @Param("userId") Long userId);
// List<String> selectUipIdList(@Param("uipIds") List<String> uipIds, @Param("userId") Long userId);
int selectCustomerCount(CustomerSearchDto dto);
List<CustomerAnalyzeVo> selectCooperationTop(CustomerSearchDto dto);
List<Map<String, Object>> selectCreditLevelGroup(CustomerSearchDto dto);
}
package com.dsk.system.service;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerAnalyzeVo;
import java.util.List;
import java.util.Map;
/**
* @author lcl
* @create 2023/8/15
*/
public interface ICustomerOverviewService {
Map<String, Object> statistics(CustomerSearchDto dto);
List<CustomerAnalyzeVo> cooperationTop(CustomerSearchDto dto);
List<Map<String, Object>> creditLevel(CustomerSearchDto dto);
}
package com.dsk.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerAnalyzeVo;
import com.dsk.system.mapper.CustomerMapper;
import com.dsk.system.service.ICustomerOverviewService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 客户概览相关
* @author lcl
* @create 2023/8/15
*/
@Service
public class CustomerOverviewServiceImpl implements ICustomerOverviewService {
@Resource
private CustomerMapper customerMapper;
@Override
public Map<String, Object> statistics(CustomerSearchDto dto) {
Map<String, Object> resultMap = new HashMap<>();
dto.setUserId(SecurityUtils.getUserId());
//总
resultMap.put("totalCount",customerMapper.selectCustomerCount(dto));
//国企
dto.setCompanyNature("国有企业");
resultMap.put("nationCount",customerMapper.selectCustomerCount(dto));
//央企
dto.setCompanyNature("央企");
resultMap.put("centreCount",customerMapper.selectCustomerCount(dto));
//事业
dto.setCompanyNature("事业单位");
resultMap.put("undertakingCount",customerMapper.selectCustomerCount(dto));
return resultMap;
}
@Override
public List<CustomerAnalyzeVo> cooperationTop(CustomerSearchDto dto) {
dto.setUserId(SecurityUtils.getUserId());
return customerMapper.selectCooperationTop(dto);
}
@Override
public List<Map<String, Object>> creditLevel(CustomerSearchDto dto) {
dto.setUserId(SecurityUtils.getUserId());
return customerMapper.selectCreditLevelGroup(dto);
}
}
......@@ -26,8 +26,39 @@
left join (
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{dto.userId} and ctu.status = #{dto.status}
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
where ctu.user_id = #{userId} and ctu.status = #{status}
<if test="companyName != null and companyName != '' "> and ct.company_name like concat('%',#{companyName},'%')</if>
<if test="isOn != null "> and ct.is_on = #{isOn}</if>
<if test="provinceIds != null and provinceIds.size > 0 ">
and ct.province_id in
<foreach collection="provinceIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="cityIds != null and cityIds.size > 0 ">
and ct.city_id in
<foreach collection="cityIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="districtIds != null and districtIds.size > 0 ">
and ct.district_id in
<foreach collection="districtIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="companyNatures != null and companyNatures.size > 0 ">
and ct.company_nature in
<foreach collection="companyNatures" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="creditLevels != null and creditLevels.size > 0 ">
and ct.credit_level in
<foreach collection="creditLevels" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by ct.create_time desc
</select>
......@@ -69,16 +100,37 @@
</foreach>
</select>
<!-- <select id="selectUipIdList" resultType="java.lang.String">-->
<!-- select-->
<!-- ct.uip_id-->
<!-- from customer ct-->
<!-- join customer_user ctu on ct.customer_id = ctu.customer_id-->
<!-- where ctu.user_id = #{userId} and ctu.status = 0 and ct.uip_id in-->
<!-- <foreach collection="uipIds" item="uipId" open="(" separator="," close=")">-->
<!-- #{uipId}-->
<!-- </foreach>-->
<!-- </select>-->
<select id="selectCustomerCount" resultType="java.lang.Integer">
select
count(ct.customer_id)
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.status = 0 and ctu.user_id = #{userId}
<if test="companyNature != null and companyNature != ''"> and ct.company_nature = #{companyNature} </if>
</select>
<select id="selectCooperationTop" resultType="com.dsk.system.domain.customer.vo.CustomerAnalyzeVo">
select
ct.customer_id, ct.company_name, ct.company_id, ct.uip_id, count(bi.id) businessCount,
sum(bi.investment_amount) totalAmount
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
left join business_info bi on (bi.customer_id = ct.customer_id and bi.status = 2)
where ctu.status = 0 and ctu.user_id = #{userId}
group by ct.customer_id
order by totalAmount desc
limit 10
</select>
<select id="selectCreditLevelGroup" resultType="java.util.Map">
select
ct.credit_level creditLevel, count(ct.credit_level) customerCount
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId}
group by ct.credit_level
order by ct.credit_level desc
</select>
</mapper>
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