Commit 51c85584 authored by huangjie's avatar huangjie

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

# Conflicts:
#	dsk-operate-ui/vue.config.js
parents f3d7145f c58d2c8d
package com.dsk.web.controller.common;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
......@@ -72,7 +73,8 @@ public class CaptchaController
else if ("char".equals(captchaType))
{
capStr = code = captchaProducer.createText();
image = captchaProducer.createImage(capStr);
// image = captchaProducer.createImage(capStr);
image = captchaImage(capStr);
}
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
......@@ -91,4 +93,47 @@ public class CaptchaController
ajax.put("img", Base64.encode(os.toByteArray()));
return ajax;
}
private static final int WIDTH = 120; // 图片宽度
private static final int HEIGHT = 40; // 图片高度
private static final int CODE_LENGTH = 4; // 验证码长度
private BufferedImage captchaImage(String capStr) {
// 创建图片缓冲区
BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
// 获取画笔
Graphics graphics = image.getGraphics();
// 绘制背景
graphics.setColor(Color.WHITE);
graphics.fillRect(0, 0, WIDTH, HEIGHT);
// 绘制验证码
graphics.setFont(new Font("Arial", Font.BOLD, 28));
for (int i = 0; i < capStr.length(); i++) {
graphics.setColor(getRandomColor());
graphics.drawString(String.valueOf(capStr.charAt(i)), (i + 1) * (WIDTH / (CODE_LENGTH + 1)), 30);
}
// 添加干扰线
for (int i = 0; i < 3; i++) {
graphics.setColor(getRandomColor());
graphics.drawLine((int) (Math.random() * WIDTH), (int) (Math.random() * HEIGHT),
(int) (Math.random() * WIDTH), (int) (Math.random() * HEIGHT));
}
// 释放资源
graphics.dispose();
return image;
}
// 获取随机颜色
private static Color getRandomColor() {
int r = (int) (Math.random() * 256);
int g = (int) (Math.random() * 256);
int b = (int) (Math.random() * 256);
return new Color(r, g, b);
}
}
......@@ -119,6 +119,13 @@ public class EnterpriseProjectController {
return enterpriseProjectService.bidPlanPage(body);
}
@ApiOperation(value = "招标计划项目类型(openApi)")
@RequestMapping(value = "/bidPlanProjectType",method = RequestMethod.POST)
public R bidPlanProjectType(@RequestBody @Valid EnterpriseProjectBidPlanProjectTypeBody body) throws Exception {
return enterpriseProjectService.bidPlanProjectType(body);
}
@ApiOperation(value = "招标计划详情(openApi)")
@RequestMapping(value = "/bidPlanDetail", method = RequestMethod.POST)
public R bidPlanDetail(@RequestBody @Valid EnterpriseProjectBidPlanDetailBody body) throws Exception {
......
......@@ -3,6 +3,7 @@ package com.dsk.web.controller.search.macroMarket;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.dtos.*;
import com.dsk.system.service.EconomicService;
import com.dsk.web.controller.tool.IpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......
/**
*
*/
package com.dsk.web.controller.search.macroMarket;
package com.dsk.web.controller.tool;
import java.util.Arrays;
import java.util.List;
......
package com.dsk.web.controller.search.macroMarket;
package com.dsk.web.controller.tool;
import org.apache.commons.lang3.StringUtils;
......
......@@ -14,7 +14,7 @@ ruoyi:
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
captchaType: char
# 开发环境配置
server:
......
......@@ -46,4 +46,9 @@ public class CacheConstants
* 查甲方 菜单选线
*/
public static final String DATA_UIPGROUPDATA = "data:uipGroupData";
/**
* 查甲方 菜单选线
*/
public static final String PERSONAL_LOCATION = "personal:location";
}
......@@ -34,7 +34,10 @@ public class BasePage {
*/
private Integer pageMaxSize;
private String field;
/**
* 总中标金额
*/
private String field = "bidSumAmount";
private String order;
......
......@@ -25,6 +25,11 @@ public class EnterpriseProjectBidPlanPageBody extends BasePage {
*/
private String keys;
/**
* 项目类型
*/
private String buildingProjectType;
/*
* 排序字段:1金额倒序,2金额正序,3发布时间倒序,4发布时间正序,15预计招标时间倒序,16预计招标时间正序
*/
......
package com.dsk.common.core.domain.model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import javax.validation.constraints.NotNull;
/**
* @ClassName EnterpriseProjectBidPlanProjectTypeBody
* @Description
* @Author Dgm
* @Date 2023/7/13 9:37
* @Version
*/
@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class EnterpriseProjectBidPlanProjectTypeBody {
/**
* 企业id
*/
@NotNull(message = "企业id不能为空")
private Integer cid;
public boolean isVaildCid() {
return 0 == cid;
}
}
......@@ -16,5 +16,16 @@ public class OpRegionalLocalDto {
*/
private Integer provinceId;
/**
* 市Id
*/
private Integer cityId;
/**
* 区 Id
*/
private Integer areaId;
private String ip;
}
......@@ -17,6 +17,17 @@ public class SpecialPurposeBondsDto {
*/
private Integer provinceId;
/**
* 市Id
*/
private Integer cityId;
/**
* 区Id
*/
private Integer areaId;
/**
* 项目类型
*/
......
......@@ -17,6 +17,17 @@ public class SpecialPurposeBondsPageDto extends BasePage {
*/
private Integer provinceId;
/**
* 市Id
*/
private Integer cityId;
/**
* 区Id
*/
private Integer areaId;
/**
* 排序字段 默认-投资金额
*/
......
......@@ -5,7 +5,7 @@ VUE_APP_TITLE = 数字化经营履约全生命链路管理系统
ENV = 'development'
# 数字化经营履约全生命链路管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = '/prod-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -8,3 +8,11 @@ export function infoHeader(data) {
data: data
})
}
//企业数据统计
export function statistic(data) {
return request({
url: '/enterprise/statistic',
method: 'post',
data: data
})
}
......@@ -116,3 +116,11 @@ export function bidPlanPage(data) {
data: data
})
}
// 招标计划项目类型
export function bidPlanProjectType(data) {
return request({
url: '/enterpriseProject/bidPlanProjectType',
method: 'post',
data: data
})
}
......@@ -215,6 +215,13 @@ export function claim(param) {
data: param
})
}
//城投平台-取消认领
export function cancelClaim(name) {
return request({
url:`/customer/cancelClaim/`+name,
method: 'PUT',
})
}
//批量获取城投企业id
export function getUipIdByCid(param) {
return request({
......
......@@ -202,6 +202,14 @@ aside {
white-space: nowrap;
overflow: hidden;
}
.text-cl2{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
ul, li {
list-style: none;
......@@ -314,7 +322,7 @@ ul, li {
.is-scrolling-left+.el-table__fixed,.is-scrolling-middle+.el-table__fixed,.is-scrolling-right+.el-table__fixed{
box-shadow:none;
height: auto !important;
bottom: 16px;
bottom: 16px !important;
}
.el-table__body tr.current-row > td.el-table__cell{
background: none;
......@@ -703,5 +711,8 @@ ul, li {
border-radius: 0;
padding: 10px;
}
.el-table__fixed {height:auto !important; bottom:17px !important; }
//固定列的阴影问题
.el-table__fixed {
box-shadow: 4px 0 9px -5px rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 4px 0 9px -5px rgba(0, 0, 0, 0.12);
}
......@@ -1180,3 +1180,10 @@
//top: 10px !important;
line-height: 34px !important;
}
.el-table__fixed {
height: auto !important;
bottom: 17px !important;
//box-shadow: 4px 0 9px -5px rgba(0, 0, 0, 0.12);
//-webkit-box-shadow: 4px 0 9px -5px rgba(0, 0, 0, 0.12);
}
......@@ -51,6 +51,11 @@ export default {
padding-top: 84px;
}
}
.EnterpriseData{
.app-main {
overflow: initial;
}
}
</style>
<style lang="scss">
......
......@@ -91,7 +91,7 @@ export default {
box-shadow: 0 1px 4px rgba(0,21,41,.08);
position: fixed;
top:0;
z-index: 9999;
z-index: 999;
.left-menu{
float: left;
......
......@@ -2,7 +2,7 @@
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" @handleBar="handleSideBar" id="sidebar"/>
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide,EnterpriseData:$route.name=='EnterpriseData'}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar :offsetWidth="offsetWidth"/>
</div>
......
......@@ -169,7 +169,7 @@ export const constantRoutes = [
path: '/radar/debtProject/details/:id',
component: () => import('@/views/radar/debtProject/details'),
name: 'debtProjectDetails',
meta: { title: '企业专项债详情', icon: 'radar' }
meta: { title: '政府专项债项目详情', icon: 'radar' }
}
]
},
......
......@@ -47,8 +47,8 @@
<div class="ps1">
<div class="wordprimary ps2" @click="toDetail(scope.row,'')">{{scope.row.companyName}}</div>
<div class="ps3">
<div @click="toDetail(scope.row,'gjjl')">写跟进<img src="@/assets/images/project/edit_1.png"></div>
<div @click="toDetail(scope.row,'business')">编辑信息<img src="@/assets/images/project/edit_2.png"></div>
<div @click="toDetail(scope.row,'gjjl')"><img class="i" src="@/assets/images/project/edit_1.png"><img class="o" src="@/assets/images/project/edit_11.png"></div>
<div @click="toDetail(scope.row,'business')"><img class="i" src="@/assets/images/project/edit_2.png"><img class="o" src="@/assets/images/project/edit_22.png"></div>
</div>
</div>
</template>
......@@ -601,23 +601,34 @@ export default {
display: flex;
justify-content: space-between;
.ps2{
width: 270px;
width: 350px;
}
.ps3{
width: 155px;
width: 60px;
display: flex;
justify-content: right;
>div{
margin-left: 12px;
&:hover{
color: #0CBC6D;
cursor: pointer;
}
>img{
float: right;
margin: 3px 0 0 4px;
width: 14px;
}
.i{
display: inline-block;
}
.o{
display: none;
}
&:hover{
cursor: pointer;
.i{
display: none;
}
.o{
display: inline-block;
}
}
}
}
}
......
......@@ -31,6 +31,7 @@
</template>
<script>
export default {
name: 'Sidebar',
props: {
......@@ -50,6 +51,10 @@ export default {
type: Boolean,
default: true
},
statisticObj:{
type:Object,
default: {}
},
isCustomer: {
type: Boolean,
default: false
......@@ -142,6 +147,141 @@ export default {
},
created() {
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute))
},
watch:{
statisticObj:{
handler(val) {
let arr = JSON.parse(JSON.stringify(val))
for(var i in arr){
for(var j in arr[i]){
switch (j) {
case 'ownershipStructure':
if(arr[i][j]<1){
this.sideRoute[0].children[2].disabled = true;
}
break;
case 'leadingMember':
if(arr[i][j]<1){
this.sideRoute[0].children[3].disabled = true;
}
break;
case 'outboundInvestment':
if(arr[i][j]<1){
this.sideRoute[0].children[4].disabled = true;
}
break;
case 'branch':
if(arr[i][j]<1){
this.sideRoute[0].children[5].disabled = true;
}
break;
case 'landInfo':
if(arr[i][j]<1){
this.sideRoute[2].children[0].disabled = true;
this.sideRoute[4].children[1].disabled = true;
}
break;
case 'busProposedProjectV1':
if(arr[i][j]<1){
this.sideRoute[2].children[1].disabled = true;
}
break;
case 'specialDebt':
if(arr[i][j]<1){
this.sideRoute[2].children[2].disabled = true;
}
break;
case 'bidPlan':
if(arr[i][j]<1){
this.sideRoute[2].children[3].disabled = true;
}
break;
case 'biddingAnnouncement':
if(arr[i][j]<1){
this.sideRoute[2].children[4].disabled = true;
}
break;
case 'proBiddingAnnouncement':
if(arr[i][j]<1){
this.sideRoute[2].children[5].disabled = true;
}
break;
case 'adminLicensing':
if(arr[i][j]<1){
this.sideRoute[2].children[6].disabled = true;
}
break;
case 'customer':
if(arr[i][j]<1){
this.sideRoute[3].children[0].disabled = true;
}
break;
case 'supplier':
if(arr[i][j]<1){
this.sideRoute[3].children[1].disabled = true;
}
break;
case 'coopBiddingAgency':
if(arr[i][j]<1){
this.sideRoute[3].children[2].disabled = true;
}
break;
case 'historySend':
if(arr[i][j]<1){
this.sideRoute[3].children[3].disabled = true;
}
break;
case 'tenderRecordV1':
if(arr[i][j]<1){
this.sideRoute[3].children[4].disabled = true;
}
break;
case 'adminSanction':
if(arr[i][j]<1){
this.sideRoute[5].children[0].disabled = true;
}
break;
case 'abnormalOperation':
if(arr[i][j]<1){
this.sideRoute[5].children[1].disabled = true;
}
break;
case 'dishonestExecutee':
if(arr[i][j]<1){
this.sideRoute[5].children[2].disabled = true;
}
break;
case 'dishonestExecutor':
if(arr[i][j]<1){
this.sideRoute[5].children[3].disabled = true;
}
break;
case 'adjudicativeDoc':
if(arr[i][j]<1){
this.sideRoute[5].children[4].disabled = true;
}
break;
case 'courtAnnouncement':
if(arr[i][j]<1){
this.sideRoute[5].children[5].disabled = true;
}
break;
case 'openAnnouncement':
if(arr[i][j]<1){
this.sideRoute[5].children[6].disabled = true;
}
break;
default:
break;
}
}
}
}
}
},
methods: {
handleOpen(key, keyPath) {
......
......@@ -3,7 +3,7 @@
<Header :company-id="companyId" :companyInfo="companyInfo" :cooDetail="cooDetail" v-if="companyId" @close-detail="closeDetail" />
<div class="flex-box part-main">
<div class="part-left">
<side-bar @currentPath="showPartPage" :pathName="currentPath.pathName" :partBoxHeight="partBoxHeight" :customerId="customerId" :isCompany="isCompany" :isCustomer="isCustomer" />
<side-bar :statisticObj="statisticObj" ref="sidebar" @currentPath="showPartPage" :pathName="currentPath.pathName" :partBoxHeight="partBoxHeight" :customerId="customerId" :isCompany="isCompany" :isCustomer="isCustomer" />
</div>
<div class="part-right">
<div id="partBox" v-if="companyId">
......@@ -64,7 +64,7 @@
<script>
import { idRemark } from '@/api/common'
import { infoHeader } from '@/api/detail/party-a/index'
import { infoHeader,statistic } from '@/api/detail/party-a/index'
import { customerInfo } from '@/api/detail/party-a/cooperate'
import elementResizeDetectorMaker from "element-resize-detector"
import Header from "./component/Header"
......@@ -104,6 +104,9 @@ import Preference from "./preference" //招标偏好
import Cooperate from "./cooperate" //合作情况
import DecisionMaking from "./decisionMaking" //决策链条
import Gjjl from "../../project/projectList/component/gjjl" //跟进记录
import {
urbanInvestmentPage,
} from '@/api/detail/party-a/urbanLnvestment'
export default {
name: 'PartyA',
components: {
......@@ -156,6 +159,7 @@ export default {
currentPath: {
pathName: 'overview' //默认展示页
},
statisticObj:{},
partBoxHeight: null,
cooDetail: false
}
......@@ -234,14 +238,34 @@ export default {
this.$nextTick(() => {
this.listenSider()
})
this.handleQuery()
this.getStatistic();
this.handleQuery();
this.association(this.$route.query.customerId)
}
},
async getStatistic(){
let res = await statistic({companyId:this.companyId});
if(res.code==200){
this.statisticObj = res.data
}
},
async handleQuery() {
let res = await infoHeader({companyId:this.companyId})
if(res.code==200){
this.companyInfo = res.data || {}
let data = {
pageNum: 1,
pageSize: 5,
provinceIds: [this.companyInfo.provinceId],
cityIds: [this.companyInfo.cityId],
}
urbanInvestmentPage(data).then(res => {
if(res.data.totalCount<1){
let arr = JSON.parse(JSON.stringify(this.$refs.sidebar.sideRoute))
arr[4].children[2].disabled = true;
this.$refs.sidebar.sideRoute = arr
}
})
if(this.companyInfo && this.companyInfo.companyName){
this.$nextTick(()=>{
document.getElementById('tagTitle').innerText = this.companyInfo.companyName
......
......@@ -5,6 +5,7 @@
:form-data="formData"
:query-params="queryParams"
:isExcel="true"
@handle-search="handleSearch"
:total="tableDataTotal"
/>
......@@ -33,7 +34,7 @@
<script>
import mixin from '../mixins/mixin'
import {bidPlanPage} from '@/api/detail/party-a/opport'
import {bidPlanPage,bidPlanProjectType} from '@/api/detail/party-a/opport'
export default {
name: 'Biddingplan',
props: ['companyId'],
......@@ -59,7 +60,10 @@ export default {
{label: '标的物类型', prop: 'objectType', minWidth: '100'},
{label: '预计招标日期', prop: 'planTenderDateStart', sortable: 'custom', descending: '15', ascending: '16', minWidth: '110'}
],
formData: [],
formData: [
{ type: 4, fieldName: 'buildingProjectType', value: '', placeholder: '项目类型', options: []},
{ type: 3, fieldName: 'keys', value: '', placeholder: '输入项目名称关键词查询', options: [], width: 220}
],
//列表
tableLoading:false,
tableData:[],
......@@ -70,8 +74,19 @@ export default {
},
created() {
this.handleQuery()
this.handleOption()
},
methods: {
async handleOption(){
let res = await bidPlanProjectType({cid: this.companyId})
if(res.code==200){
let buildingProjectType = res.data.map(item => {
let it = {name:item.buildingProjectType+'('+item.count+')',value:item.buildingProjectType}
return it
})
this.setFormData('buildingProjectType', buildingProjectType)
}
},
async handleQuery(params) {
this.tableLoading = true
let param = params?params:this.queryParams
......
......@@ -52,7 +52,7 @@ export default {
defaultSort: {prop: 'planStartTime', order: 'descending'},
forData: [
{label: '项目名称', prop: 'projectName', minWidth: '300', slot: true},
{label: '成交金额(万元)', prop: 'money', sortable: 'custom', descending: '1', ascending: '2', width: '150'},
// {label: '成交金额(万元)', prop: 'money', sortable: 'custom', descending: '1', ascending: '2', width: '150'},
{label: '项目类别', prop: 'projectCategories', width: '100'},
{label: '计划开工日期', prop: 'planStartTime', sortable: 'custom', descending: '3', ascending: '4', width: '130'},
{label: '计划完工日期', prop: 'planEndTime', sortable: 'custom', descending: '13', ascending: '14', width: '130'},
......
......@@ -153,7 +153,7 @@
</template>
<script>
import { changePath } from '@/assets/js/common'
import { changePath,encodeStr } from '@/assets/js/common'
var Swiper = require('@/assets/lib/swiper/swiper-bundle.min.js')
import "@/assets/lib/swiper/swiper-bundle.css"
import { claim } from "@/api/common"
......@@ -163,8 +163,10 @@ export default {
props: ['companyId', 'companyInfo', 'statistic'],
data() {
return {
encodeStr,
newStatic: null,
labelList: [], //企业标签
customerId:'',
claimLoading: false,
ifClaim: 0, //是否认领
showMore: false,
......@@ -213,7 +215,8 @@ export default {
this.claimLoading = false
if(res.code==200){
this.dialogVisible=true
this.ifClaim = 1
this.companyInfo.claimStatus = 1
this.customerId = res.data.customerId
}
}else{
this.$message.warning('对不起,当前不能认领')
......@@ -227,7 +230,7 @@ export default {
let res = await api.cancelClaim(this.companyInfo.companyName)
if(res.code==200){
this.dialogVisible1 = false;
this.getClaimStatus();
this.companyInfo.claimStatus = 0
}else{
this.$message.error(res.msg)
}
......@@ -325,7 +328,15 @@ export default {
},
renlin(){
this.dialogVisible=false;
// this.$router.push({path:'/home',query: {id:'1'}})
// window.location.href = window.location.origin+window.location.pathname+'?customerId='+this.customerId+'&path=business'
this.$router.replace({
path: '/enterprise/'+encodeStr(this.companyId),
query: {
'customerId': this.customerId,
'path':'business'
} ,
})
this.$router.go(0)
// 跳转地址
},
renHide(){
......
......@@ -122,7 +122,7 @@ export default {
margin-right: 22px;
font-weight: bold;
font-size: 20px;
color: #0081FF;
color: #232323;
padding: 24px 16px 0 16px;
span{
font-size: 16px;
......@@ -132,7 +132,7 @@ export default {
padding: 14px 16px 10px 16px;
justify-content: space-between;
font-size: 14px;
color: #416587;
color: #232323;
div{
flex-shrink: 0;
}
......
......@@ -4,6 +4,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick" class="tabpane selfTab">
<el-tab-pane label="股东" name="first"></el-tab-pane>
<el-tab-pane label="对外投资" name="second"></el-tab-pane>
<el-tab-pane label="分支机构" name="third"></el-tab-pane>
</el-tabs>
<div class="table-item">
<div class="rela-person" v-show="activeName=='first'">实际控制人:{{financial&&financial.actualController || '--'}}</div>
......@@ -69,14 +70,47 @@
</div>
</template>
</el-table>
<el-table :data="affiliatesData" border style="width: 100%" v-show="activeName=='third'">
<el-table-column label="序号" width="55" align="left" >
<template slot-scope="scope">{{ affiliatesParams.pageNum * affiliatesParams.pageSize - affiliatesParams.pageSize + scope.$index + 1 }}</template>
</el-table-column>
<el-table-column min-width="140" label="被投资企业名称">
<template slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.id)}`:`/company/${encodeStr(scope.row.id)}`" tag="a" class="a-link" v-if="scope.row.id&&scope.row.name" v-html="scope.row.name"></router-link>
<div v-else v-html="scope.row.name || '--'"></div>
<div class="tags" v-if="scope.row.status || scope.row.biddingCount|| scope.row.landInfoCount|| scope.row.proposedProjectCount">
<span class="tag" :class="labelArr.includes(scope.row.status)?'style2':'style1'" v-if="scope.row.status">{{scope.row.status}}</span>
<span class="tag style1" v-if="scope.row.proposedProjectCount">拟建{{scope.row.proposedProjectCount}}</span>
<span class="tag style1" v-if="scope.row.landInfoCount">土地{{scope.row.landInfoCount}}</span>
<span class="tag style1" v-if="scope.row.biddingCount">招标{{scope.row.biddingCount}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="operName" label="负责人"></el-table-column>
<el-table-column label="地区">
<template slot-scope="scope">
{{scope.row.provinceName}}
<template v-if="scope.row.cityName">
-
</template>
{{scope.row.cityName}}
<template v-if="scope.row.districtName">
-
</template>
{{scope.row.districtName}}
</template>
</el-table-column>
<el-table-column prop="startDate" label="成立日期"></el-table-column>
</el-table>
<div class="rela-more" v-show="activeName=='second'&& shipTotal>shipParams.pageSize"><span class="a-link" @click="handlePath">查看更多数据 ></span></div>
<div class="rela-more" v-show="activeName=='third'&& affiliatesTotal>affiliatesParams.pageSize"><span class="a-link" @click="handlePath1">查看更多数据 ></span></div>
</div>
</div>
</template>
<script>
import {encodeStr, changePath} from "@/assets/js/common"
import {bestStockPage, investment} from '@/api/detail/party-a/overview'
import {bestStockPage, investment,affiliates} from '@/api/detail/party-a/overview'
import NoData from '../../component/noData'
export default {
name: 'Relationship',
......@@ -103,12 +137,20 @@ export default {
pageSize: 5
},
shipTotal: 0,
affiliatesData:[],
affiliatesParams: {
cid: this.companyId,
pageNum: 1,
pageSize: 5
},
affiliatesTotal: 0,
labelArr:['失信联合惩戒企业','严重行政处罚','司法纠纷','注销', '注销企业']
}
},
created() {
this.handleQuery()
this.handleInvest()
this.getAffiliatesData()
},
mounted() {
},
......@@ -136,10 +178,20 @@ export default {
this.shipTotal = res.total
}
},
async getAffiliatesData(){
let res = await affiliates(this.affiliatesParams)
if(res.code==200){
this.affiliatesData = res.rows
this.affiliatesTotal = res.total
}
},
handleClick(){
},
handlePath(){
changePath(this, 'overseas')
},
handlePath1(){
changePath(this, 'branch')
}
}
}
......
<template>
<div class="flex-box app-container part-container">
<div class="tender-list">
<div class="tender-list" ref="zbggScroll" @scroll="scrollbottom()">
<div class="common-title">招标公告</div>
<template v-if="zbggList.length>0">
<div class="tender-item" v-for="(item, index) in zbggList" :key="index">
<div class="flex-box tender-title"><div class="text-cl1" :title="item.projectName"><router-link :to="'/radar/Notice/details/'+item.bid" tag="a" class="a-link">{{item.projectName}}</router-link></div><span :class="item.projectCategory=='项目动态'?'style2':item.tag=='招投标'?'style4':'style1'" v-if="item.projectCategory">{{item.projectCategory}}</span></div>
<div class="flex-box tender-title"><div class="text-cl2" :title="item.projectName"><router-link :to="'/radar/Notice/details/'+item.bid" tag="a" class="a-link">{{item.projectName}}</router-link></div><span :class="item.projectCategory=='项目动态'?'style2':item.tag=='招投标'?'style4':'style1'" v-if="item.projectCategory">{{item.projectCategory}}</span></div>
<span class="tender-time"><span @click="handleUrl(item.url)" style="cursor: pointer;">{{item.dataSource}}</span> {{item.issueTime}}</span>
</div>
</template>
......@@ -12,11 +12,11 @@
<no-data />
</div>
</div>
<div class="tender-list">
<div class="tender-list" ref="trendScroll" @scroll="scrollbottom(true)">
<div class="common-title">企业动态</div>
<template v-if="trendList.length>0">
<div class="tender-item" v-for="(item, index) in trendList" :key="index">
<div class="flex-box tender-title"><div class="text-cl1" :title="tendTitle(item.details)">{{tendTitle(item.details)}}</div><span :class="item.parentDimension=='新增分支机构'?'style2':item.parentDimension=='新增施工工法'?'style3':'style1'">{{item.parentDimension}}</span></div>
<div class="flex-box tender-title"><div class="text-cl2" :title="tendTitle(item.details)">{{tendTitle(item.details)}}</div><span :class="item.parentDimension=='新增分支机构'?'style2':item.parentDimension=='新增施工工法'?'style3':'style1'">{{item.parentDimension}}</span></div>
<span class="tender-time">{{item.createTime}}</span>
</div>
</template>
......@@ -42,17 +42,20 @@ export default {
cid: this.companyId,
sort: 3,
pageNum: 1,
pageSize: 5
pageSize: 6
},
//招标公告数据
zbggList:[],
zbggTotal:0,
trendParams: {
companyId: this.companyId,
pageNum: 1,
pageSize: 5
pageSize: 6
},
//企业动态数据
trendList:[]
trendList:[],
trendTotal:0,
}
},
computed: {
......@@ -83,17 +86,54 @@ export default {
dynamicPage(this.trendParams)
])
if(notice.code==200){
this.zbggList = notice.rows
this.zbggList = notice.rows;
this.zbggTotal = notice.total;
}
if(namic.code==200){
this.trendList = namic.rows
this.trendList = namic.rows;
this.trendTotal = namic.total;
}
},
handleUrl(url){
if(url){
window.open(url, "_blank")
}
},
async getBidNotice(){
let notice = await bidNoticePage(this.zbggParams)
if(notice.code==200){
this.zbggTotal = notice.total;
this.zbggList = this.zbggList.concat(notice.rows)
}
},
async getDynamic(){
let dynamic = await dynamicPage(this.trendParams)
if(dynamic.code==200){
this.trendTotal = dynamic.total;
this.trendList = this.trendList.concat(dynamic.rows)
}
},
scrollbottom(type){
let scrllEl = type ? this.$refs.trendScroll : this.$refs.zbggScroll
let scrollHeight = scrllEl.scrollHeight
let clientHeight = scrllEl.clientHeight
let scrollTop = scrllEl.scrollTop
if(scrollHeight - (scrollTop+clientHeight) <= 1 ){
if(type){
if(this.trendParams.pageNum*this.trendParams.pageSize>=this.trendTotal){
return
}
this.trendParams.pageNum+=1;
this.getDynamic()
}else{
if(this.zbggParams.pageNum*this.zbggParams.pageSize>=this.zbggTotal){
return
}
this.zbggParams.pageNum+=1;
this.getBidNotice()
}
}
},
}
}
</script>
......@@ -108,8 +148,9 @@ export default {
width: calc(50% - 8px);
padding: 24px 16px;
background: #FFFFFF;
overflow: hidden;
overflow-y:scroll ;
border-radius: 4px;
height: 512px;
.common-title{
margin-bottom: 10px;
}
......
......@@ -133,7 +133,7 @@ export default {
border-radius: 4px;
.tab-header{
img{
margin-bottom: -3px;
margin-bottom: 2px;
width: 14px;
height: 14px;
cursor: pointer;
......
<template>
<div class="region">
<div class="region_left">
<span class="province">{{province}}</span>
<span class="icon">
<i class="el-icon-location"></i>
切换
</span>
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>
</div>
</div>
</template>
<script>
import { location } from '@/api/macro/macro'
import dataRegion from '@/assets/json/dataRegion'
export default {
name:'region',
props:['province','dataQuery'],
data(){
return {
props: {
value: 'id',
label: 'label',
checkStrictly: true
},
addressList: [],
address:'',
provinceId:[],
location:''
}
},
watch: {
province(newValue, oldValue){
this.location = newValue;
},
},
created(){
this.dataRegion()
this.location=this.province
},
methods:{
addressListbtn() {
let nodesObj = this.$refs.address.getCheckedNodes()[0];
this.location=nodesObj.pathLabels[nodesObj.pathLabels.length-1];
this.provinceId=nodesObj.path;
let data={}
data.province=this.location
data.provinceId=this.provinceId
data.provinces=nodesObj.pathLabels
this.$parent.addressListbtn(data)
},
//地区
async dataRegion() {
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then(res => {
// if (res.data.code == 200) {
// console.log(res.data.data)
// }
// })
var str = [];
for (let x = 0; x < 3; x++) {
for (let i = 0; i < dataRegion.length; i++) {
if (dataRegion[i].regionLevel == x + 1 && x + 1 == 1) {
str.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 2) {
for (let j = 0; j < str.length; j++) {
if (str[j].id == dataRegion[i].parentId) {
str[j].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}
}
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 3) {
for (let j = 0; j < str.length; j++) {
for (let k = 0; k < str[j].children.length; k++) {
if (str[j].children[k].id == dataRegion[i].parentId) {
str[j].children[k].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId
// "children":[]
});
}
}
}
}
}
}
this.addressList = str;
},
}
}
</script>
<style lang="scss" scoped>
.region{
height: 48px;
background: #F8FBFF;
border-radius: 4px;
margin-bottom: 12px;
.region_left{
background: url("~@/assets/images/economies/img_bg.png") no-repeat;
background-size: 100%;
width: 603px;
height: 48px;
position: relative;
padding-left: 16px;
.province{
font-size: 20px;
cursor: pointer;
font-weight: 700;
color: #004F9C;
margin-right: 12px;
line-height: 48px;
height: 48px;
float: left;
}
.icon{
width: 24px;
color: #0081FF;
font-size: 12px;
display: inline-block;
height: 48px;
i{
margin-left: 4px;
font-size: 16px;
color:#0081FF;
padding-top: 7px;
}
}
.cascader-region {
position: absolute;
left: 20px;
top: 8px;
opacity: 0;
line-height: 22px;
width: 100px;
}
}
}
</style>
......@@ -329,9 +329,9 @@ export default {
if(this.provinceId.length >= 2){
item.areaId=this.provinceId[2]
}
if(this.dataQuery.id){
item.id=this.dataQuery.id
}
// if(this.dataQuery.id){
// item.id=this.dataQuery.id
// }
this.compareList.splice(0,1,item);
this.value1Flag=true
this.addressValue1=this.dataQuery.province.join('-')
......@@ -472,9 +472,9 @@ export default {
if(code.length >= 3){
item.areaId=code[2]
}
if(this.dataQuery.id){
item.id=this.dataQuery.id
}
// if(this.dataQuery.id){
// item.id=this.dataQuery.id
// }
this.compareList.splice(index-1,1,item);
let list=[];
......
......@@ -35,7 +35,7 @@
</el-table-column>
<el-table-column label="产业类型" prop="projectType"></el-table-column>
<el-table-column :label="oneYear">
<el-table-column prop="money" label="金额(亿元)" sortable> </el-table-column>
<el-table-column prop="money" label="金额(亿元)" sortable></el-table-column>
<el-table-column prop="rate" label="占比(%)"> </el-table-column>
</el-table-column>
<el-table-column :label="twoYear">
......@@ -114,6 +114,12 @@ export default {
}
}
}
for(let i=0; i<list.length; i++){
list[i].money=Number(list[i].money).toFixed(2)
list[i].rate=Number(list[i].rate).toFixed(2)
list[i].lastMoney=Number(list[i].lastMoney).toFixed(2)
list[i].lastRate=Number(list[i].lastRate).toFixed(2)
}
this.tableData=list.reverse()
})
},
......@@ -220,7 +226,7 @@ export default {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return Number(Number(prev) + Number(curr)).toFixed(3)
return Number(Number(prev) + Number(curr)).toFixed(2)
} else {
return prev;
}
......
......@@ -22,8 +22,8 @@
<img v-else src="@/assets/images/economies/icon_down.png">
</div>
<div id="echartsZS" style="height: 75px;"></div>
<div class="item-text up" v-if="(recentlyYear.gdpGrowth-nextYearMap.gdpGrowth) > 0">{{nextYearMap.year}}年上升<span>{{(recentlyYear.gdpGrowth-nextYearMap.gdpGrowth).toFixed(2).toString()}}%</span></div>
<div class="item-text down" v-else>{{nextYearMap.year}}年下降<span>{{(this.recentlyYear.gdpGrowth-this.nextYearMap.gdpGrowth).toFixed(2).toString().substring(1)}}%</span></div>
<div class="item-text up" v-if="(recentlyYear.gdpGrowth-nextYearMap.gdpGrowth) > 0">{{nextYearMap.year}}年上升<span>{{recentlyYear.gdpGrowthCompare}}%</span></div>
<div class="item-text down" v-else>{{nextYearMap.year}}年下降<span>{{recentlyYear.gdpGrowthCompare}}%</span></div>
</div>
<div class="item">
<div class="item-title"><i style="background: #3AD0D1;"></i>{{recentlyYear.year}}年人口</div>
......@@ -56,19 +56,19 @@
</div>
<div id="echartsYE" style="height: 75px;"></div>
<div class="item-text up" v-if="recentlyYear.govDebtBalance > nextYearMap.govDebtBalance">
{{nextYearMap.year}}年上升<span>{{((recentlyYear.govDebtBalance - nextYearMap.govDebtBalance)/nextYearMap.govDebtBalance*100).toFixed(2)}}%</span></div>
<div class="item-text down" v-else>{{nextYearMap.year}}年下降<span>{{((recentlyYear.govDebtBalance - nextYearMap.govDebtBalance)/nextYearMap.govDebtBalance*100).toFixed(2).toString().substring(1)}}%</span></div>
{{nextYearMap.year}}年上升<span>{{recentlyYear.govDebtBalanceCompare}}%</span></div>
<div class="item-text down" v-else>{{nextYearMap.year}}年下降<span>{{recentlyYear.govDebtBalanceCompare}}%</span></div>
</div>
</div>
</div>
<div class="content content2">
<div class="common-title">经济信息</div>
<div class="content-box">
<span @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png">下属辖区 <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span>
<span @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png">城投平台 <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span>
<span><img src="@/assets/images/economies/icon_3.png">城投平台授信余额 <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span>
<span><img src="@/assets/images/economies/icon_4.png">城投平台应收账款 <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span>
<span><img src="@/assets/images/economies/icon_5.png">城投平台有息债务 <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span>
<span class="text" @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png"><span>下属辖区</span> <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span>
<span class="text" @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png"><span>城投平台</span> <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_3.png"><span>城投平台授信余额</span> <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_4.png"><span>城投平台应收账款</span> <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span>
<span class="text"><img src="@/assets/images/economies/icon_5.png"><span>城投平台有息债务</span> <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span>
</div>
</div>
<div class="content content3">
......@@ -268,7 +268,7 @@ export default {
pageIndex: 1,
pageSize: 10,
tableDataTotal: 0,
labelData:[2021,2022],
labelData:[],
valData:[],
valData1:[],
valData2:[],
......@@ -280,6 +280,8 @@ export default {
},
created() {
this.getData()
let mydate=new Date();
this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1]
this.$nextTick(()=>{
// console.log(this.dataQuery)
})
......@@ -325,11 +327,11 @@ export default {
regional(params).then(res => {
this.recentlyYear=res.data[0].recentlyYear;
this.nextYearMap=res.data[0].nextYearMap;
this.valData=[this.nextYearMap.gdp,this.recentlyYear.gdp]
this.valData1=[this.nextYearMap.gdpGrowth,this.recentlyYear.gdpGrowth]
this.valData2=[this.nextYearMap.population,this.recentlyYear.population]
this.valData3=[this.nextYearMap.gbr,this.recentlyYear.gbr]
this.valData4=[this.nextYearMap.govDebtBalance,this.recentlyYear.govDebtBalance]
this.valData=[this.getMoneyNum(this.nextYearMap.gdp),this.getMoneyNum(this.recentlyYear.gdp)]
this.valData1=[this.getMoneyNum(this.nextYearMap.gdpGrowth),this.getMoneyNum(this.recentlyYear.gdpGrowth)]
this.valData2=[this.getMoneyNum(this.nextYearMap.population),this.getMoneyNum(this.recentlyYear.population)]
this.valData3=[this.getMoneyNum(this.nextYearMap.gbr),this.getMoneyNum(this.recentlyYear.gbr)]
this.valData4=[this.getMoneyNum(this.nextYearMap.govDebtBalance),this.getMoneyNum(this.recentlyYear.govDebtBalance)]
this.initChart()
this.initChart1()
this.initChart2()
......@@ -676,7 +678,8 @@ export default {
},
childMethod(key) {
let data=this.dataQuery
data.pId=this.dataQuery.provinceId
data.pId=this.provinceId;
this.dataQuery.provinceId=this.provinceId;
switch (key) {
case 1:
this.$parent.handleClick('second', data);
......@@ -685,7 +688,8 @@ export default {
this.$router.push({
path: '/macro/urban',
query:{
provinceId:this.dataQuery.provinceId
provinceId:this.dataQuery.provinceId,
province:this.dataQuery.province,
}
})
break;
......@@ -695,6 +699,12 @@ export default {
}
},
getMoneyNum(num){
if (!num) return 0;
num = num + ''
if (num.indexOf(',') != -1) return num.replace(/\,/g, '');
else return num;
}
}
}
</script>
......@@ -762,7 +772,7 @@ export default {
.content2{
.content-box{
margin-top: 18px;
span{
.text{
border-right: 1px solid #E4E4E4;
display: inline-block;
color: rgba(35,35,35,0.8);
......@@ -770,11 +780,15 @@ export default {
padding-left: 16px;
width: 20%;
line-height: 26px;
position: relative;
span{
padding-left: 24px;
}
img{
width: 16px;
height: 16px;
margin-right: 4px;
margin-bottom: -4px;
position: absolute;
top: 4px;
}
label{
font-weight: 700;
......
<template>
<div class="app-container">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="flex-box eco-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="地区经济" name="first"></el-tab-pane>
......@@ -7,20 +8,20 @@
<el-tab-pane label="产业结构" name="third"></el-tab-pane>
<el-tab-pane label="地区经济对比" name="four"></el-tab-pane>
</el-tabs>
<div class="location">
<span><i class="el-icon-location"></i>{{province}}</span>
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>
<!--<el-select v-model="provinceId" class="cascader-region">-->
<!--<el-option-->
<!--v-for="(item,index) in addressList"-->
<!--:key="index"-->
<!--:label="item.label"-->
<!--:value="item.id"-->
<!--@click.native="addressListbtn(item.label,item.id)"-->
<!--&gt;</el-option>-->
<!--</el-select>-->
</div>
<!--<div class="location">-->
<!--<span><i class="el-icon-location"></i>{{province}}</span>-->
<!--<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'-->
<!--@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>-->
<!--&lt;!&ndash;<el-select v-model="provinceId" class="cascader-region">&ndash;&gt;-->
<!--&lt;!&ndash;<el-option&ndash;&gt;-->
<!--&lt;!&ndash;v-for="(item,index) in addressList"&ndash;&gt;-->
<!--&lt;!&ndash;:key="index"&ndash;&gt;-->
<!--&lt;!&ndash;:label="item.label"&ndash;&gt;-->
<!--&lt;!&ndash;:value="item.id"&ndash;&gt;-->
<!--&lt;!&ndash;@click.native="addressListbtn(item.label,item.id)"&ndash;&gt;-->
<!--&lt;!&ndash;&gt;</el-option>&ndash;&gt;-->
<!--&lt;!&ndash;</el-select>&ndash;&gt;-->
<!--</div>-->
</div>
<RegionalEconomy v-if="activeName === 'first' && province" :dataQuery="dataQuery" :provinceId="provinceId"></RegionalEconomy>
<LocalEconomy v-if="activeName === 'second' && province" :dataQuery="dataQuery" :provinceId="provinceId"></LocalEconomy>
......@@ -33,6 +34,7 @@
import RegionalEconomy from './component/regionalEconomy'
import LocalEconomy from './component/localEconomy'
import Comparison from './component/comparison'
import Region from '../component/region'
import IndustrialStructure from './component/industrialStructure'
import { location } from '@/api/macro/macro'
import dataRegion from '@/assets/json/dataRegion'
......@@ -43,6 +45,7 @@ export default {
LocalEconomy,
Comparison,
IndustrialStructure,
Region
},
data() {
return {
......@@ -61,24 +64,40 @@ export default {
},
created() {
this.dataQuery=this.$route.query;
// let params={}
// if(this.dataQuery.provinceId){
// params.provinceId=this.dataQuery.provinceId
// }
if(this.dataQuery.provinceId){
this.province=this.dataQuery.province;
this.dataQuery.province=[this.dataQuery.province]
if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0];
}else {
this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province];
}
this.provinceId.push(this.dataQuery.provinceId)
}else {
location({}).then(res => {
this.province=res.data.province;
if(res.data.area){
this.province=res.data.area
}else {
if(res.data.city){
this.province=res.data.city
}else {
this.province=res.data.province
}
}
if(!this.dataQuery.provinceId){
this.dataQuery.provinceId=res.data.provinceId
let arr=[this.province]
if(res.data.areaId){
this.dataQuery.provinceId=[res.data.provinceId,res.data.cityId,res.data.areaId]
this.provinceId=[res.data.provinceId,res.data.cityId,res.data.areaId]
}else {
if(res.data.cityId){
this.provinceId=[res.data.provinceId,res.data.cityId]
}else {
this.provinceId=[res.data.provinceId]
}
}
let arr=[res.data.province]
this.dataQuery.province=arr;
this.provinceId.push(res.data.provinceId)
}else {
this.provinceId.push(this.dataQuery.provinceId)
this.provinceId=this.dataQuery.provinceId
}
})
}
......@@ -87,7 +106,6 @@ export default {
this.activeName=this.dataQuery.activeName;
}
this.dataRegion()
// let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){
// this.activeName = name;
......@@ -95,7 +113,6 @@ export default {
},
methods: {
handleClick(key,item) {
console.log(key)
if(key === 'four'){
this.activeName=key
}
......@@ -123,73 +140,26 @@ export default {
}
// sessionStorage.setItem('currentTab', this.activeName)
},
//地区
async dataRegion() {
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then(res => {
// if (res.data.code == 200) {
// console.log(res.data.data)
// }
// })
var str = [];
for (let x = 0; x < 3; x++) {
for (let i = 0; i < dataRegion.length; i++) {
if (dataRegion[i].regionLevel == x + 1 && x + 1 == 1) {
str.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 2) {
for (let j = 0; j < str.length; j++) {
if (str[j].id == dataRegion[i].parentId) {
str[j].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}
}
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 3) {
for (let j = 0; j < str.length; j++) {
for (let k = 0; k < str[j].children.length; k++) {
if (str[j].children[k].id == dataRegion[i].parentId) {
str[j].children[k].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId
// "children":[]
});
}
}
}
}
}
}
this.addressList = str;
},
addressListbtn() {
let nodesObj = this.$refs.address.getCheckedNodes()[0];
// console.log(nodesObj)
this.province=nodesObj.pathLabels[nodesObj.pathLabels.length-1];
this.provinceId=nodesObj.path;
this.dataQuery.province=nodesObj.pathLabels;
// this.dataQuery.provinceId=nodesObj.path[nodesObj.path.length-1];
// console.log(this.dataQuery)
// this.province=label;
// this.provinceId=id;
// this.dataQuery.provinceId=id;
// this.dataQuery.province=label;
addressListbtn(data) {
this.province=data.province;
this.provinceId=data.provinceId;
this.dataQuery.province=data.provinces;
let params={}
if(data){
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
}
location(params).then(res => {
console.log(res.data)
})
}
}
}
......
<template>
<div class="app-container enterprises">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="flex-box eco-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本地企业" name="first"></el-tab-pane>
<el-tab-pane label="异地备案" name="second"></el-tab-pane>
</el-tabs>
<div class="location"><i class="el-icon-location"></i>{{province}}</div>
<!--<div class="location"><i class="el-icon-location"></i>{{province}}</div>-->
</div>
<div class="content">
<div class="search">
......@@ -18,7 +19,7 @@
placeholder="资质资格"
collapse-tags
clearable></el-cascader>
<el-input placeholder="输入企业名称关键词" v-model="queryParams.ename" clearable @clear="handleSearch()">
<el-input placeholder="输入关键词查询" v-model="queryParams.ename" clearable @clear="handleSearch()">
<el-button slot="append" @click="handleSearch()">搜索</el-button>
</el-input>
<span class="total">{{tableDataTotal}}</span>
......@@ -90,13 +91,16 @@
import {encodeStr} from "@/assets/js/common.js"
import aptitudeCode from '@/assets/json/aptitudeCode'
import { enterprise,location,getUipIdByCid } from '@/api/macro/macro'
import Region from '../component/region'
export default {
name: 'Enterprises',
// components: {LocalEnterprises,Offsite},
components: {Region},
data() {
return {
encodeStr,
activeName: 'first',
dataQuery:{},
queryParams:{
ename:'',
codeStr:'',
......@@ -119,13 +123,13 @@ export default {
province:'',
provinceId:'',
show_page:true,
MaxPage:500
MaxPage:500,
}
},
created() {
location({}).then(res => {
this.province=res.data.province;
this.provinceId=res.data.provinceId;
this.provinceId=res.data.provinceId
this.querySubmit()
})
this.aptitudeCode()
......@@ -211,7 +215,6 @@ export default {
this.querySubmit()
},
handleClick(){
console.log(this.activeName)
this.queryParams.codeStr=[]
this.aptitudeType='';
this.queryParams={
......@@ -260,6 +263,28 @@ export default {
});
},
addressListbtn(data) {
this.province=data.province;
this.provinceId=data.provinceId[data.provinceId.length-1];
this.dataQuery.province=data.provinces;
let params={}
if(data){
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
}
this.querySubmit()
location(params).then(res => {
console.log(res.data)
})
}
}
}
</script>
......@@ -331,17 +356,22 @@ export default {
}
}
::v-deep .el-input.el-input-group{
width: 250px;
width: 240px;
height: 32px;
.el-input__inner{
height: 32px;
border-right: 0;
}
.el-input__suffix{
margin-top: -1px;
}
.el-input-group__append{
width: 59px;
background: #F5F5F5;
color:#0081FF;
border-left: 0;
padding: 0;
text-align: center;
}
}
.total{
......@@ -374,6 +404,21 @@ export default {
margin-top: 8px;
}
}
::v-deep .el-table{
th{
font-size: 12px !important;
font-weight: 400 !important;
}
.el-table__fixed-header-wrapper th{
background: #F0F3FA;
}
td.el-table__cell{
border-bottom: 0;
}
.caret-wrapper{
width: 10px;
}
}
}
}
}
......
<template>
<div class="app-container qyzx">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="content">
<div class="common-title">专项债项目</div>
<div class="content-box">
<div class="content-box" v-if="!state">
<div class="box-left">
<div id="echarts" style="height: 400px"></div>
</div>
......@@ -26,6 +27,12 @@
</el-table>
</div>
</div>
<div class="content-box" v-else>
<div class="empty">
<img class="img" src="@/assets/images/project/empty.png">
<div class="p1">抱歉,暂无专项债项目数据</div>
</div>
</div>
</div>
<div class="content">
<div class="common-title flex-box">
......@@ -76,9 +83,13 @@
<script>
import * as echarts from 'echarts';
import { statistics,projectsPage } from '@/api/macro/macro'
import { statistics,projectsPage,location } from '@/api/macro/macro'
import Region from '../component/region'
export default {
name: 'Financing',
components: {
Region
},
data() {
return {
queryParams:{},
......@@ -90,15 +101,48 @@ export default {
pageSize: 10,
tableDataTotal: 0,
show_page:true,
MaxPage:1000
MaxPage:1000,
dataQuery:{},
province:'',
provinceId:[],
state:false,
}
},
created() {
this.getStatistics()
location({}).then(res => {
if(res.data.area){
this.province=res.data.area
}else {
if(res.data.city){
this.province=res.data.city
}else {
this.province=res.data.province
}
}
if(!this.dataQuery.provinceId){
if(res.data.areaId){
this.dataQuery.provinceId=[res.data.provinceId,res.data.cityId,res.data.areaId]
this.provinceId=[res.data.provinceId,res.data.cityId,res.data.areaId]
}else {
if(res.data.cityId){
this.provinceId=[res.data.provinceId,res.data.cityId]
}else {
this.provinceId=[res.data.provinceId]
}
}
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
this.$nextTick(() => {
this.getData()
this.$nextTick(()=>{
this.getStatistics()
})
})
},
mounted() {
},
methods: {
getData(){
......@@ -110,6 +154,15 @@ export default {
if(this.tableParams.order){
params.order=this.tableParams.order
}
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
projectsPage(params).then(res => {
this.tableLoading = false
this.listData=res.data.list;
......@@ -122,6 +175,15 @@ export default {
},
getStatistics(){
let params={};
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
if(this.queryParams.field){
params.field=this.queryParams.field
}
......@@ -145,15 +207,27 @@ export default {
return New.value - old.value
})
let data=[]
if(arr.length >= 10){
for(let i=0; i<10; i++){
data.push(arr[i])
}
}else {
for(let i=0; i<arr.length; i++){
data.push(arr[i])
}
}
this.total=this.tableData.length;
if(this.tableData.length > 0){
this.state=false;
this.initChart(data)
}else {
this.state=true;
}
})
},
initChart(data) {
this.$nextTick(() => {
let myChart = echarts.init(document.getElementById("echarts"))
let option ={
tooltip: {
trigger: 'item',
......@@ -196,6 +270,8 @@ export default {
]
}
myChart.setOption(option);
})
},
formatStatus: function(row, column, cellValue) {
return cellValue? cellValue : '-'
......@@ -301,7 +377,30 @@ export default {
message: '功能正在开发中',
type: 'warning'
});
},
addressListbtn(data) {
this.province=data.province;
this.provinceId=data.provinceId;
this.dataQuery.province=data.provinces;
let params={}
if(data){
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
}
location(params).then(res => {
console.log(res.data)
})
this.pageIndex = 1;
this.getData()
this.getStatistics()
},
}
}
</script>
......@@ -334,6 +433,26 @@ export default {
.box-left{
width: 55%;
}
.empty{
margin: 0 auto;
height: 550px;
text-align: center;
.img{
width: 108px;
height: 108px;
margin-bottom: 24px;
margin-top: 150px;
}
.p1{
color: #333333;
font-size: 16px;
}
.p2{
color: #999999;
font-size: 14px;
margin-top: 8px;
}
}
.box-right{
float: right;
::v-deep .el-table{
......
......@@ -7,7 +7,7 @@
</div>
</div>
<div class="text">{{value}}全国项目招标数量达到{{totalCount}}万个,招标数量前五的地区分别是
{{tableData[0].type}}{{tableData[0].count}}个)、{{tableData[1].type}}{{tableData[1].count}}个)、{{tableData[2].type}}{{tableData[2].count}}个)、{{tableData[3].type}}{{tableData[3].count}}个)、{{tableData[4].type}}{{tableData[4].count}}个)。</div>
{{tableData[1].type}}{{tableData[1].count}}个)、{{tableData[2].type}}{{tableData[2].count}}个)、{{tableData[3].type}}{{tableData[3].count}}个)、{{tableData[4].type}}{{tableData[4].count}}个)、{{tableData[5].type}}{{tableData[5].count}}个)。</div>
<div class="main1">
<div id="zb-echarts" style="height: 250px"></div>
<p class="tips"><i class="el-icon-info"></i>数据来源大司空建筑大数据平台,统计范围为{{value}}全国公开的招标项目,未公开的不含在内</p>
......@@ -67,7 +67,9 @@
<el-table-column label="序号" width="60" align="left">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column prop="type" label="地区"/>
<el-table-column label="地区">
<template slot-scope="scope">{{ scope.row.type === '全国'? '未公示地区': scope.row.type}}</template>
</el-table-column>
<el-table-column prop="count" sortable label="招标数量" align="right"/>
<el-table-column prop="rate" sortable label="占比(%)" align="right"/>
</el-table>
......@@ -80,7 +82,7 @@
<span class="common-title">全国招标项目概览</span>
</div>
</div>
<div class="text">通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。</div>
<div class="text">通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。</div>
<div class="main1">
<div id="gl-echarts" style="height: 250px"></div>
<p class="tips"><i class="el-icon-info"></i>数据来源大司空建筑大数据平台,统计范围为{{year}}年全国公开的招标项目,未公开的不含在内</p>
......@@ -88,7 +90,7 @@
<div class="main2">
<div class="selectYear">
<el-select v-model="year" filterable class="form-content-width" placeholder="请选择" @change="changeValue()">
<el-option v-for="(item, index) in yearData" :key="index" :label="item" :value="item" />
<el-option v-for="(item, index) in yearData" :key="index" :label="item.label" :value="item.value" />
</el-select>
</div>
<div class="table-item">
......@@ -119,7 +121,7 @@ export default {
name: 'NationalEconomies',
data() {
return {
year:'2023',
year:'近一年',
yearOptions: [
{ label: '近五年', value: '近五年' },
{ label: '近三年', value: '近三年' },
......@@ -146,6 +148,10 @@ export default {
type:'',
count:'',
},
{
type:'',
count:'',
},
],
tableData1:[],
dataSort:[
......@@ -163,22 +169,37 @@ export default {
value:'近五年',
punishDateShowPopper: false,
punishDate: "",
yearData:[],
yearData:[
{ label: '近一年', value: '近一年' },
{ label: '近二年', value: '近二年' },
{ label: '近三年', value: '近三年' },
],
myChart:'',
myChart1:'',
}
},
created() {
let params={}
this.getDataByProvince(params)
this.getDataByProvince({})
let mydate=new Date();
var startTime, endTime, Year, Month, Day,startyear
Year = mydate.getFullYear();
Month = mydate.getMonth() + 1;
Day = mydate.getDate();
Month = Month < 10 ? '0' + Month : Month
Day = Day < 10 ? '0' + Day : Day
startyear=mydate.getFullYear()-1;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
let params={
startDate:startTime,
endDate:endTime
}
this.getDataByMonth(params)
this.$nextTick(()=>{
// this.initChart()
// this.initChart1()
})
getYear().then(res => {
this.yearData=res.rows;
})
window.addEventListener("resize", this.resizeEcharts);
},
beforeDestroy(){
......@@ -198,6 +219,13 @@ export default {
getDataByProvince(params){
countGroupByProvince(params).then(res => {
this.tableData=res.data.provinceDate;
let arr=[]
for (let i=0; i<res.data.provinceDate.length; i++){
if(res.data.provinceDate[i].type != '全国'){
arr.push(res.data.provinceDate[i])
}
}
this.dataList=arr;
this.totalCount=res.data.totalCount;
this.initChart()
})
......@@ -232,7 +260,7 @@ export default {
},
xAxis: {
type: 'category',
data: this.tableData.map(item => item.type),
data: this.dataList.map(item => item.type),
axisLabel: {
show: true,
// "interval": 0,
......@@ -244,7 +272,7 @@ export default {
},
series: [
{
data: this.tableData.map(item => item.count),
data: this.dataList.map(item => item.count),
type: 'bar',
barWidth: 16,
itemStyle: {
......@@ -290,6 +318,11 @@ export default {
xAxis: {
type: 'category',
data: this.tableData1.map(item => item.label),
axisLabel: {
show: true,
// "interval": 0,
"rotate": this.year === '近二年'|| this.year === '近三年'? 40: 0 //X轴倾斜度
},
},
yAxis: {
type: 'value'
......@@ -402,7 +435,36 @@ export default {
}
},
changeValue(){
this.getDataByMonth({year:this.year})
let mydate=new Date();
var startTime, endTime, Year, Month, Day,startyear
Year = mydate.getFullYear();
Month = mydate.getMonth() + 1;
Day = mydate.getDate();
Month = Month < 10 ? '0' + Month : Month
Day = Day < 10 ? '0' + Day : Day
switch (this.year) {
case "近三年":
startyear=mydate.getFullYear()-3;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "近二年":
startyear=mydate.getFullYear()-2;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "近一年":
startyear=mydate.getFullYear()-1;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
}
let params={
startDate:startTime,
endDate:endTime
}
this.getDataByMonth(params)
}
}
......
......@@ -10,7 +10,7 @@
<div class="main1">
<div style="height: 300px;">
<div class="left">
<div class="item" v-for="(item,index) in glData" :class="typeIndex === index ? 'color':''" @click="handleClick(1,index)">{{item.major}}企业<i></i></div>
<div class="item" v-for="(item,index) in glData" :class="typeIndex === index ? 'color':''" @click="handleClick(1,index)">{{item.major}}施工总承包<i></i></div>
</div>
<div class="right">
<div id="gl-echarts" style="height: 260px;background: #ffffff;"></div>
......
......@@ -14,7 +14,7 @@
</div>
<p class="solid"></p>
</div>
<!-- 企业专项债 -->
<!-- 政府专项债 -->
<debtProject v-if="personnelHerf=='debtProject'" />
<!-- 土地交易 -->
<Land v-if="personnelHerf=='Land'" />
......@@ -52,7 +52,7 @@
personnelList: [{
key: 'debtProject',
status: true,
value: '企业专项债项目',
value: '政府专项债项目',
},
{
......
......@@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://47.104.91.229:9099/prod-api`,
// target: `http://122.9.160.122:9011`,
target: `http://47.104.91.229:9099/prod-api `,
// target: `http://192.168.60.126:9011`,
// target: `http://192.168.60.27:8766`,
changeOrigin: true,
......
......@@ -121,6 +121,12 @@ public class EnterpriseProjectService {
return dskOpenApiUtil.responsePage(map);
}
public R bidPlanProjectType(EnterpriseProjectBidPlanProjectTypeBody body) throws Exception {
if (body.isVaildCid()) return R.ok(new ArrayList<>());
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterpriseProject/bidPlanProjectType", BeanUtil.beanToMap(body, false, false));
return BeanUtil.toBean(map, R.class);
}
public R bidPlanDetail(EnterpriseProjectBidPlanDetailBody body) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterpriseProject/bidPlanDetail", BeanUtil.beanToMap(body, false, false));
......
......@@ -2,14 +2,19 @@ package com.dsk.system.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.dsk.common.constant.CacheConstants;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.redis.RedisCache;
import com.dsk.common.dtos.*;
import com.dsk.common.utils.DateUtils;
import com.dsk.common.utils.DskOpenApiUtil;
import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.service.EconomicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.apache.commons.collections4.MapUtils;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Map;
/**
......@@ -22,9 +27,12 @@ import java.util.Map;
@Service
public class EconomicServiceImpl implements EconomicService {
@Autowired
@Resource
private DskOpenApiUtil dskOpenApiUtil;
@Resource
private RedisCache redisCache;
@Override
public AjaxResult nationalPage(OpRegionalEconomicDataV1PageDto dto) {
if (ObjectUtil.isEmpty(dto.getYear())) {
......@@ -48,7 +56,27 @@ public class EconomicServiceImpl implements EconomicService {
@Override
public AjaxResult location(OpRegionalLocalDto detailsDto) {
Long userId = SecurityUtils.getLoginUser().getUserId();
String redisKey = CacheConstants.PERSONAL_LOCATION + userId;
if (ObjectUtil.isEmpty(detailsDto.getProvinceId()) && ObjectUtil.isEmpty(detailsDto.getCityId()) && ObjectUtil.isEmpty(detailsDto.getAreaId())) {
if (ObjectUtil.isNotEmpty(redisKey)) {
Map<String, Object> cacheMap = redisCache.getCacheMap(redisKey);
if (MapUtils.isNotEmpty(cacheMap)) {
return AjaxResult.success(cacheMap);
}
}
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/economic/location", BeanUtil.beanToMap(detailsDto, false, false));
Integer code = MapUtils.getInteger(map, "code", 300);
if (!code.equals(HttpStatus.OK.value())) {
throw new RuntimeException();
}
Map data = MapUtils.getMap(map, "data", null);
if (ObjectUtil.isNotEmpty(detailsDto.getProvinceId()) || ObjectUtil.isNotEmpty(detailsDto.getCityId()) || ObjectUtil.isNotEmpty(detailsDto.getAreaId())) {
redisCache.setCacheMap(redisKey, data);
}
return BeanUtil.toBean(map, AjaxResult.class);
}
......
......@@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.dsk.acc.openapi.client.util.CommonUtils;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.model.EnterpriseInfoHeaderBody;
import com.dsk.common.dtos.ComposeQueryDto;
import com.dsk.common.utils.DskOpenApiUtil;
import com.dsk.system.service.RegionalEnterprisesService;
......@@ -14,8 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @ClassName RegionalEnterprisesServiceImpl
......@@ -37,45 +35,91 @@ public class RegionalEnterprisesServiceImpl implements RegionalEnterprisesServic
if (code.equals(HttpStatus.OK.value())) {
Map data = MapUtils.getMap(map, "data", null);
List<Object> list = CommonUtils.assertAsArray(MapUtils.getObject(data, "list", ""));
// 常合作客户
List<Integer> getTopCustomerIds = getTopCustomerIds(list);
Map<String,Object> topCustomerIdsMap = new HashMap<>(1);
topCustomerIdsMap.put("ids", getTopCustomerIds);
Map<String, Object> topCustomerMap = dskOpenApiUtil.requestBody("/operate/enterprise/selectCompanyNameList", topCustomerIdsMap);
// 常合作供应商
List<Integer> getTopSupplierIds = getTopSupplierIds(list);
Map<String,Object> topSupplierIdsMap = new HashMap<>(1);
topSupplierIdsMap.put("ids", getTopSupplierIds);
Map<String, Object> topSupplierMap = dskOpenApiUtil.requestBody("/operate/enterprise/selectCompanyNameList", topSupplierIdsMap);
if (CollectionUtils.isNotEmpty(list)) {
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
companyMap.put("topCustomer", null);
//常合作客户id
Integer topCustomerId = MapUtils.getInteger(companyMap, "topCustomerId");
EnterpriseInfoHeaderBody body = new EnterpriseInfoHeaderBody();
body.setCompanyId(topCustomerId);
if (ObjectUtil.isNotEmpty(topCustomerId)) {
Map<String, Object> infoHeaderMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/infoHeader", BeanUtil.beanToMap(body, false, false));
Integer infoHeaderCode = MapUtils.getInteger(infoHeaderMap, "code", 300);
if (infoHeaderCode.equals(HttpStatus.OK.value())) {
Map infoHeaderData = MapUtils.getMap(infoHeaderMap, "data", null);
String companyName = MapUtils.getString(infoHeaderData, "companyName", null);
Integer topCustomerCode = MapUtils.getInteger(topCustomerMap, "code", 300);
if (topCustomerCode.equals(HttpStatus.OK.value())) {
List<Map<String, Object>> companyNameList = (List<Map<String, Object>>)MapUtils.getObject(topCustomerMap, "data", null);
for (Map<String, Object> comMap : companyNameList) {
Integer id = MapUtils.getInteger(comMap, "id", 0);
if (id.equals(topCustomerId)) {
String companyName = MapUtils.getString(comMap, "companyName", null);
companyMap.put("topCustomer", companyName);
} else {
companyMap.put("topCustomer", null);
}
} else {
companyMap.put("topCustomer", null);
}
}
}
//常合作供应商id
Integer topSupplierId = MapUtils.getInteger(companyMap, "topSupplierId");
body.setCompanyId(topSupplierId);
companyMap.put("topSupplier", null);
if (ObjectUtil.isNotEmpty(topSupplierId)) {
Map<String, Object> infoHeaderMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/infoHeader", BeanUtil.beanToMap(body, false, false));
Integer infoHeaderCode = MapUtils.getInteger(infoHeaderMap, "code", 300);
if (infoHeaderCode.equals(HttpStatus.OK.value())) {
Map infoHeaderData = MapUtils.getMap(infoHeaderMap, "data", null);
String companyName = MapUtils.getString(infoHeaderData, "companyName", null);
Integer topSupplierCode = MapUtils.getInteger(topSupplierMap, "code", 300);
if (topSupplierCode.equals(HttpStatus.OK.value())) {
List<Map<String, Object>> companyNameList = (List<Map<String, Object>>)MapUtils.getObject(topSupplierMap, "data", null);
for (Map<String, Object> comMap : companyNameList) {
Integer id = MapUtils.getInteger(comMap, "id", 0);
if (id.equals(topCustomerId)) {
String companyName = MapUtils.getString(comMap, "companyName", null);
companyMap.put("topSupplier", companyName);
} else {
companyMap.put("topSupplier", null);
}
} else {
companyMap.put("topSupplier", null);
}
}
}
}
}
}
return BeanUtil.toBean(map, AjaxResult.class);
}
/***
*@Description: 获取企业Id-客户
*@Param:
*@return: java.util.List<java.lang.Integer>
*@Author: Dgm
*@date: 2023/7/11 16:04
*/
public List<Integer> getTopCustomerIds(List<Object> list) {
List<Integer> getIds = new ArrayList<>(20);
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
//常合作客户id
Integer topCustomerId = MapUtils.getInteger(companyMap, "topCustomerId");
getIds.add(topCustomerId);
}
return getIds;
}
/***
*@Description: 获取企业Id-供应商
*@Param:
*@return: java.util.List<java.lang.Integer>
*@Author: Dgm
*@date: 2023/7/11 16:04
*/
public List<Integer> getTopSupplierIds(List<Object> list) {
List<Integer> getIds = new ArrayList<>(20);
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
//常合作供应商id
Integer topSupplierId = MapUtils.getInteger(companyMap, "topSupplierId");
getIds.add(topSupplierId);
}
return getIds;
}
}
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