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;
}
......
<template>
<div :ref="refStr" class="custom-money-select screen-popper" id="custom-money-select">
<div :class="['input-block', isSelectOption?'rote':'']">
<div class="block" @click="isSelectOption=!isSelectOption" @mouseenter="handleMouseenter" @mouseleave="handleMouseleave">
<el-input class="custom-money-input" v-model="value" :placeholder="placeholder" readonly>
<template slot="suffix">
<span @click.stop="handleClear" :class="[isClear&&isHover?'el-icon-circle-close':'el-icon-arrow-down']"></span>
</template>
</el-input>
</div>
<div class="options-block" v-if="isSelectOption">
<div class="arrow"></div>
<div @click="handleClick(option)" :class="['option', value==option?'active':'']" :key="i" v-for="(option, i) in options">
<template v-if="option == '自定义'">
<!--<div class="number-box">-->
<!--<input type="number" v-model="startMoney" class="number-input" clearable>&nbsp;&nbsp;&nbsp;&nbsp;<input v-model="endMoney" class="number-input" type="text" clearable>&nbsp;&nbsp;万元&nbsp;&nbsp;<el-button @click.stop="handleConfirm" class="number-button" type="primary">确定</el-button>-->
<!--</div>-->
<div style="position: relative">
自定义
<div class="popper_box" style="position: absolute" v-if="value === '自定义'">
<div class="popper_wrap">
<el-input class="popper_input" type="number" clearable v-model="startMoney"></el-input>
</div>
<div class="popper_wrap">
<el-input class="popper_input" type="number" clearable v-model="endMoney"></el-input>
</div>
<div style="">
<el-button size="mini" @click.stop="cancellation">取消</el-button>
<el-button type="primary" size="mini" @click.stop="handleConfirm">确定</el-button>
</div>
</div>
</div>
</template>
<template v-else>
<span>{{option}}</span> <span v-if="value==option" class="el-icon-check"></span>
</template>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
'placeholder': {
type: String,
default: '请选择'
},
'ref-str': {
type: String,
default: `timeselect${String(Math.random(0, 100)).slice(2)}`,
},
permissions: { //文本权限相关字段
type: Array,
default: () => {},
},
powerLabel: {
type: String,
default: ''
},
moneyList: {
type: Array,
default: () => [],
}
},
computed: {
isClear() {
if(!this.isSelectOption && this.value) {
return true
}else {
return false
}
}
},
data() {
return {
value: '',
options: ['一亿以上', '5000万-1亿', '1000万-5000万', '1000万以下', '自定义'],
isSelectOption: false,
startMoney: '',
endMoney: '',
isHover: false
}
},
mounted() {
this.handleAppClick()
if(this.moneyList&&this.moneyList.length>0){
this.options = this.moneyList
}
},
destroyed() {
const app = document.getElementById('app')
app.removeEventListener('click', ()=>{}, true)
},
methods: {
// 判断是否点击的为组件内部
handleAppClick() {
const app = document.getElementById('app')
app.addEventListener('click', (e) => {
const dom = this.$refs[this.refStr]
const flag = dom && dom.contains(e.target)
// const flag = document.getElementById('custom-money-select').contains(e.target)
!flag ? this.isSelectOption = false : ''
// if(this.value == '自定义' && !this.startMoney && !this.endMoney) {
// this.value = ''
// this.$emit('input', '')
// this.$emit('handle-search')
// }
}, true)
},
// 清除
handleClear() {
if(this.isClear && this.isHover) {
this.value = ''
this.startMoney = ''
this.endMoney = ''
this.$emit('input', '')
this.$emit('handle-search')
}else {
this.isSelectOption = true
}
},
// 鼠标移入后的回调
handleMouseenter() {
this.isHover = true
},
// 鼠标离开后的回调
handleMouseleave() {
this.isHover = false
},
// 选项点击后的回调
handleClick(value) {
this.value = value
let moneyStr = ''
if(value == '自定义') {
this.value = '自定义';
}else {
this.startMoney = ''
this.endMoney = ''
this.isSelectOption = false
switch (value) {
case '10亿以上':
moneyStr = [100000]
break;
case '一亿以上':
moneyStr = [10000]
break;
case '5亿-10亿':
moneyStr = [50000, 100000]
break;
case '1亿-10亿':
moneyStr = [10000, 100000]
break;
case '1亿-5亿':
moneyStr = [10000, 50000]
break;
case '5000万-1亿':
moneyStr = [5000, 10000]
break;
case '1000万-5000万':
moneyStr = [1000, 5000]
break;
case '2000万-1亿':
moneyStr = [2000, 10000]
break;
case '400万-2000万':
moneyStr = [400, 2000]
break;
case '5000万以下':
moneyStr = [, 5000]
break;
case '1000万以下':
moneyStr = [, 1000]
break;
case '400万以下':
moneyStr = [, 400]
break;
default:
moneyStr = [, 1000]
break;
}
this.$emit('input', moneyStr)
this.$emit('handle-search')
}
},
// 自定义取消
cancellation(){
this.isSelectOption = false
this.value = ''
this.$emit('input', '')
this.$emit('handle-search')
},
// 自定义确认点击后的回调
handleConfirm() {
this.isSelectOption = false
if(!this.startMoney && !this.endMoney) {
this.value = ''
this.$emit('input', '')
}else {
if(this.endMoney && this.startMoney) {
this.value = `${this.startMoney}-${this.endMoney}万`
}else {
if(this.startMoney) {
this.value = `大于等于${this.startMoney}万`
}
if(this.endMoney) {
this.value = `小于等于${this.endMoney}万`
}
}
let moneyStr = [this.startMoney, this.endMoney]
this.$emit('input', moneyStr)
}
this.$emit('handle-search')
}
}
}
</script>
<style lang="scss">
.custom-money-select {
width: 120px;
height: 34px;
position: relative;
.input-block {
margin: 0;
width: 100%;
height: 100%;
cursor: pointer;
.block {
width: 100%;
height: 100%;
>.custom-money-input.el-input {
width: 100%;
height: 100%;
>input {
width: 100%;
height: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border-radius: 2px;
}
}
}
.el-input__suffix {
transform: rotateZ(0);
width: 25px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
&.rote {
.el-input__suffix {
transform: rotateZ(180deg);
}
}
}
.options-block {
position: absolute;
margin-top: 12px;
min-width: 120px;
font-size: 14px;
color: #666666;
background-color: #fff;
border: 1px solid #E4E7ED;
padding: 6px 0;
border-radius: 4px;
z-index: 10;
// .arrow {
// position: absolute;
// width: 0;
// height: 0;
// top: -12px;
// left: 35px;
// border: 6px solid transparent;
// border-bottom-color: #E4E7ED;
// &::after {
// position: absolute;
// display: inline-block;
// left: -4px;
// top: -2px;
// content: '';
// width: 0;
// height: 0;
// border: 4px solid transparent;
// border-bottom-color: #fff;
// z-index: 9;
// }
// }
.option {
padding: 0 24px 0 16px;
box-sizing: border-box;
width: 140px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.number-box {
display: flex;
align-items: center;
>span {
margin: 0 10px;
}
.number-input {
padding: 0 24px 0 10px;
width: 100px !important;
height: 30px;
line-height: 30px;
border: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border-radius: 2px;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
}
&[type="number"]{
-moz-appearance: textfield;
}
}
.number-button {
padding: 0;
width: 60px;
height: 30px;
line-height: 30px;
margin-left: 10px;
}
}
>span {
display: inline-block;
}
&.active {
background-color: #F2F7FF;
color: #0381FA;
}
&:hover {
background-color: #F5F7FA;
}
}
}
.number-input {
padding: 0 24px 0 10px;
width: 60px !important;
height: 30px;
line-height: 30px;
border: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 206px;
border: 1px solid #DCDCDC;
border-radius: 2px;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
}
&[type="number"]{
-moz-appearance: textfield;
}
}
.number-button {
padding: 0;
width: 60px;
height: 30px;
line-height: 30px;
margin-left: 10px;
}
.popper_box {
position: absolute;
left: 128px;
bottom: -15px;
background: #ffffff;
width: 186px;
color: #606266;
text-indent: 0;
padding: 16px;
padding-top: 0px;
border: 1px solid #e0e0e0;
.popper_wrap {
margin-top: 16px;
display: inline-block;
.popper_input {
width: 100px;
display: inline-block;
margin: 0px 8px;
line-height: 34px;
}
.el-input__inner {
width: 100px;
}
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type='number'] {
-moz-appearance: textfield;
}
}
.popper_box div:last-child {
display: flex;
justify-content: center;
margin-top: 16px;
}
}
</style>
......@@ -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)
},
//分页
......
......@@ -53,12 +53,12 @@
<div class="search">
<el-form ref="queryForm" :model="queryParams" :inline="true" size="small">
<el-form-item prop="address">
<el-select v-model="queryParams.address" placeholder="项目地区">
<el-select v-model="queryParams.address" placeholder="项目地区" style="width: 150px;">
<el-option v-for="(item,index) in addressList" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="type">
<el-select v-model="queryParams.type" placeholder="项目类型">
<el-select v-model="queryParams.type" multiple collapse-tags clearable placeholder="项目类型" :class="queryParams.type.length > 1 ? 'selectTag' : ''" style="width: 170px;">
<el-option v-for="(item,index) in typeList" :key="index" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
......@@ -73,9 +73,7 @@
<div class="box-right">
<el-table
:data="jtList"
element-loading-text="Loading"
border
show-summary
max-height="250"
fit
highlight-current-row
......@@ -95,14 +93,110 @@
</div>
</div>
<el-row>
<el-col :span="12">
<el-col :span="14">
<div id="zbph-echarts" style="height: 500px;"></div>
</el-col>
<el-col :span="12">
<el-col :span="10">
<div class="search">
<el-form ref="queryForm" :model="queryParams" :inline="true" size="small">
<el-form-item prop="money">
<custom-money-select
:moneyList="moneyList"
v-model="queryParams.money"
placeholder="中标金额"
@handle-search="changeSelect" />
</el-form-item>
<el-form-item prop="address">
<el-select v-model="queryParams.address" placeholder="项目地区" style="width: 150px;">
<el-option v-for="(item,index) in addressList" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="type">
<el-select v-model="queryParams.type" multiple collapse-tags clearable placeholder="项目类型" :class="queryParams.type.length > 1 ? 'selectTag' : ''" style="width: 170px;">
<el-option v-for="(item,index) in typeList" :key="index" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="time">
<custom-time-select
:timeList="timeList"
v-model="queryParams.time"
placeholder="中标日期"
@handle-search="changeSelect"/>
</el-form-item>
</el-form>
</div>
<div class="box-right">
<el-table
:data="jtList"
border
max-height="400"
fit
highlight-current-row
>
<el-table-column prop="name" label="企业名称" width="120"/>
<el-table-column prop="count" label="中标数量(个)" align="right" sortable/>
<el-table-column prop="amount" label="中标金额(万元)" align="right" sortable/>
</el-table>
</div>
</el-col>
</el-row>
</div>
<div class="content_wap3">
<el-tabs v-model="activeName" @tab-click="handleClickTab">
<el-tab-pane label="大项目最新中标" name="first">
<div class="list">
<div class="item" v-for="(item,index) in projectList" :key="index">
<p class="list-title"><router-link :to="`/biddetail/${item.id}`" tag="a" class="a-link" v-if="item.id" v-html="item.projectName"></router-link></p>
<div class="list-content">
<p class="list-content-text">
<span>中标企业:</span>
<span>{{item.companyName || '--'}}</span>
</p>
<p class="list-content-text">
<span>中标金额:</span>
<span>{{item.amount}}万元</span>
</p>
<p class="list-content-text">
<span>中标日期:</span>
<span>{{item.winBidTime || '--'}}</span>
</p>
<p class="list-content-text">
<span>招标人:</span>
<span>{{item.projectUnit || '--'}}</span>
</p>
</div>
</div>
</div>
<div class="pagination-box" v-if="totalCount>queryParams2.pageSize">
<el-pagination background :current-page="queryParams2.pageNum" :page-size="queryParams2.pageSize" :total="totalCount" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div>
</el-tab-pane>
<el-tab-pane label="大项目最新招标" name="second">
<div class="list">
<div class="item" v-for="(item,index) in zbList" :key="index">
<p class="list-title"><router-link :to="`/biddetail/${item.bid}`" tag="a" class="a-link" v-if="item.bid" v-html="item.projectName"></router-link></p>
<div class="list-content">
<p class="list-content-text">
<span>总投资:</span>
<span>{{item.projectAmount}}万元</span>
</p>
<p class="list-content-text">
<span>招标人:</span>
<span>{{item.tenderee || '--'}}</span>
</p>
<p class="list-content-text">
<span>发布日期:</span>
<span>{{item.issueTime || '--'}}</span>
</p>
</div>
</div>
</div>
<div class="pagination-box" v-if="zbTableTotal>queryParams3.pageSize">
<el-pagination background :current-page="queryParams3.pageNum" :page-size="queryParams3.pageSize" :total="zbTableTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<!--员工视角-->
<div class="staff" v-if="user === 2">
......@@ -166,7 +260,7 @@
</div>
</div>
<div class="trends">
<el-tabs v-model="activeName" @tab-click="handleClickTab">
<el-tabs v-model="activeName" @tab-click="handleClickTab1">
<el-tab-pane label="甲方舆情" name="first">
<div class="main-box">
<el-timeline>
......@@ -305,10 +399,12 @@
import dataRegion from '@/assets/json/dataRegion'
import "@/assets/styles/public.css";
import CustomTimeSelect from './component/CustomTimeSelect'
import CustomMoneySelect from './component/CustomMoneySelect'
import { bigWinningBidsPage,bigBidPage } from '@/api/index'
export default {
name: "Index",
components: {
CustomTimeSelect,
CustomTimeSelect,CustomMoneySelect,
},
data() {
return {
......@@ -372,30 +468,55 @@ export default {
],
pmData:[
{
name:'朱博',
name:'中治建工集团有限公司',
value:334,
value1:164,
},
{
name:'陈伟',
name:'中机中联工程有限公司',
value:230,
value1:130,
},
{
name:'张天翼',
name:'中铁五局集团第六公司',
value:156,
value1:150,
},
{
name:'李晨旭',
name:'中铁长江交通设计公司',
value:112,
value1:130,
},
{
name:'徐阳',
name:'重庆设计院有限公公司',
value:110,
value1:90,
},
{
name:'中铁五局集团第六公司',
value:100,
value1:91,
},
{
name:'中铁五局集团第六公司',
value:99,
value1:102,
},
{
name:'重庆设计院有限公公司',
value:80,
value1:90,
},
{
name:'中铁五局集团第六公司',
value:100,
value1:91,
},
{
name:'中铁五局集团第六公司',
value:99,
value1:102,
},
],
rankIconsSize:'24',
rankIcons:[// 排序图标
......@@ -404,6 +525,11 @@ export default {
require('@/assets/images/index/3.png'),
require('@/assets/images/index/4.png'),
require('@/assets/images/index/5.png'),
require('@/assets/images/index/6.png'),
require('@/assets/images/index/7.png'),
require('@/assets/images/index/8.png'),
require('@/assets/images/index/9.png'),
require('@/assets/images/index/10.png'),
],
user:1,
activeName:'first',
......@@ -502,17 +628,48 @@ export default {
},
],
addressList:[],
typeList:['施工类项目'],
typeList:['施工类项目','施工类项目1','施工类项目2','施工类项目3','施工类项目4'],
queryParams:{
address:'',
type:''
type:[],
money:'',
time:'',
},
queryParams1:{
address:'',
type:[],
money:'',
time:'',
},
queryParams2:{
provinceId:'',
projects:[],
amount:'',
time:'',
pageNum:1,
pageSize:10
},
queryParams3:{
provinceId:'',
projects:[],
amount:'',
time:'',
pageNum:1,
pageSize:10
},
timeList: ['近三天', '近七天', '近半月', '自定义'],
moneyList: ['2亿以上', '5亿以上', '10亿以上', '自定义'],
projectList:[],
zbList:[],
totalCount:0,
zbTableTotal:0,
};
},
created() {
this.dataRegion()
this.getBigWinningBidsPage()
if(this.user === 1){
this.$nextTick(()=>{
this.initChart(this.jtList)
......@@ -521,6 +678,26 @@ export default {
}
},
methods: {
getBigWinningBidsPage(){
let params={}
bigWinningBidsPage(this.queryParams2).then(res=>{
console.log(res)
if(res.code == 200){
this.projectList=res.rows;
this.totalCount=res.total;
}
})
},
getBigBidPage(){
let params={}
bigBidPage(this.queryParams3).then(res=>{
console.log(res)
if(res.code == 200){
this.zbList=res.rows;
this.zbTableTotal=res.total;
}
})
},
//地区
async dataRegion() {
var str = [];
......@@ -654,15 +831,20 @@ export default {
require('@/assets/images/index/3.png'),
require('@/assets/images/index/4.png'),
require('@/assets/images/index/5.png'),
require('@/assets/images/index/6.png'),
require('@/assets/images/index/7.png'),
require('@/assets/images/index/8.png'),
require('@/assets/images/index/9.png'),
require('@/assets/images/index/10.png'),
]
let myChart = echarts.init(document.getElementById("zbph-echarts"))
let option ={
legend: {
show: true,
x:'center',
y:'bottom',
padding:[0,0,10,0],
x:'right',
y:'top',
padding:[10,0,10,0],
itemWidth: 24,
itemHeight: 10,
textStyle:{
......@@ -686,7 +868,7 @@ export default {
}
},
axisLabel: {
margin: 80,
margin: 200,
textStyle: {
align: 'left',
},
......@@ -698,6 +880,7 @@ export default {
1: {
height: 24,
width: 24,
// marginBottom:-15,
align: 'center',
backgroundColor: {
image: rankPic[0]
......@@ -735,6 +918,46 @@ export default {
image: rankPic[4]
}
},
6: {
height: 24,
width: 24,
align: 'center',
backgroundColor: {
image: rankPic[5]
}
},
7: {
height: 24,
width: 24,
align: 'center',
backgroundColor: {
image: rankPic[6]
}
},
8: {
height: 24,
width: 24,
align: 'center',
backgroundColor: {
image: rankPic[7]
}
},
9: {
height: 24,
width: 24,
align: 'center',
backgroundColor: {
image: rankPic[8]
}
},
10: {
height: 24,
width: 24,
align: 'center',
backgroundColor: {
image: rankPic[9]
}
},
}
},
},
......@@ -743,7 +966,7 @@ export default {
},
grid: {
left: '20%',
top: 20,
top: 40,
right: 20,
bottom: 60,
},
......@@ -762,10 +985,6 @@ export default {
data: this.pmData.map(item => item.value),
barGap: 0,
type: 'bar',
// stack: 'total',
// emphasis: {
// focus: 'series'
// },
itemStyle:{
color: '#14C9C9',
barBorderRadius:[0, 20, 20, 0]
......@@ -773,15 +992,10 @@ export default {
barWidth: 8,
},
{
// realtimeSort: true,
name:'目标产值',
data: this.pmData.map(item => item.value1),
barGap: 0,
type: 'bar',
// stack: 'total',
// emphasis: {
// focus: 'series'
// },
itemStyle:{
color: '#92C9FF',
barBorderRadius:[0, 20, 20, 0]
......@@ -796,8 +1010,14 @@ export default {
});
},
handleClickTab(){
if(this.activeName === 'first'){
this.getBigWinningBidsPage()
}
if(this.activeName === 'second'){
this.getBigBidPage()
}
},
handleClickTab1(){},
handleChange(){
this.user = this.user === 1 ? 2 : 1;
if(this.user === 1){
......@@ -811,6 +1031,12 @@ export default {
console.log("11111")
// this.$emit('handle-search')
},
handleCurrentChange(){
},
handleSizeChange(){
},
}
};
</script>
......@@ -931,8 +1157,6 @@ export default {
}
}
.box-right{
width: 90%;
float: right;
......@@ -1039,7 +1263,97 @@ export default {
}
}
}
.content_wap3{
margin-top: 12px;
background: #ffffff;
::v-deep .el-tabs{
.el-tabs__header{
margin-bottom: 0;
}
.el-tabs__item{
height: 54px;
line-height: 54px;
font-size: 16px;
}
.el-tabs__item.is-active{
font-weight: 700;
color: #232323;
}
.el-tabs__nav-wrap{
padding:0 24px;
}
.el-tabs__active-bar{
border-radius: 8px;
}
.el-tabs__nav-wrap::after{
height: 1px;
}
}
.list{
margin: 0 16px;
.item{
border-bottom: 1px solid #EFEFEF;
padding: 16px 0;
.list-title{
font-size: 16px;
font-weight: 700;
color: #3D3D3D;
line-height: 23px;
cursor: pointer;
.list-titel-a{
text-decoration: none;
color:#3D3D3D;
}
a{
color: #3D3D3D;
}
a:hover{
color:#0081FF;
}
}
.list-content {
margin-top: 16px;
display: flex;
justify-content: start;
align-items: center;
.list-content-text {
display: flex;
justify-content: start;
align-items: center;
margin-right: 32px;
font-size: 14px;
span:first-child {
font-weight: 400;
color: rgba(35, 35, 35, 0.4);
line-height: 15px
}
span:last-child {
font-weight: 400;
color: rgba(35, 35, 35, 0.8);
line-height: 15px
}
.blue {
color: #0081FF !important;
cursor: pointer;
}
}
}
}
}
}
::v-deep .selectTag{
.el-select__tags{
.el-tag{
&:first-child{
width: 90px;
}
}
}
}
}
......
......@@ -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