Commit e4f17a5a authored by yht15023815643's avatar yht15023815643

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

parents df6fca02 9a49095a
......@@ -48,6 +48,14 @@ public class BusinessOverviewController extends BaseController {
return AjaxResult.success(baseService.typeAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(), status)));
}
/**
* 项目类别分析
*/
@GetMapping("/category/analyze/{status}")
public AjaxResult categoryAnalyze(@PathVariable Integer status) {
return AjaxResult.success(baseService.categoryAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(), status)));
}
/**
* 公招项目地区统计
*
......
import request from "@/utils/request";
// 集团中标统计
export function countByCompany(data) {
return request({
url: '/index/countByCompany',
method: 'post',
data: data
})
}
// 企业中标排行榜
export function bidRank(data) {
return request({
......
......@@ -88,6 +88,34 @@ export const constantRoutes = [
}
]
},
// {
// path: '',
// component: Layout,
// hidden: true,
// redirect: 'economies',
// children: [
// {
// path: '/macro/economies',
// component: () => import('@/views/macro/economies'),
// name: 'Economies',
// meta: { title: '区域经济', icon: 'macro' }
// }
// ]
// },
{
path: '',
component: Layout,
hidden: true,
redirect: 'urban',
children: [
{
path: '/macro/urban',
component: () => import('@/views/macro/urban'),
name: 'Urban',
meta: { title: '城投平台', icon: 'macro' }
}
]
},
{
path: '/user',
component: Layout,
......
<template>
<div>
<el-dialog
class="popups"
:visible.sync="dialogVisible"
width="534px"
:close-on-click-modal="false"
@close="resetForm('ruleForm')"
>
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>添加客户</span>
</div>
<el-form class="popform j" :model="queryParam" :rules="rules" ref="ruleForm" label-width="130px">
<el-form-item label="企业名称:" class="row" prop="companyName">
<el-input type="text" placeholder="请输入" v-model="queryParam.companyName" @input="getCompany(1)"></el-input>
<div class="resultlist infinite-list" v-if="showlist" id="box" v-infinite-scroll="load" style="overflow:auto">
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name" :key="companypage"></span></div>
</div>
</el-form-item>
<el-form-item label="客户等级:" class="row">
<el-select placeholder="请选择" v-model="queryParam.customerLevel">
<el-option v-for="(item,index) in customerLevel" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item label="法定代表人:" class="row">
<el-input type="text" placeholder="请输入" v-model="queryParam.legalPerson"></el-input>
</el-form-item>
<el-form-item label="注册资本(万):" class="row">
<el-input type="text" placeholder="请输入" v-model="queryParam.registerCapital" @input='number'></el-input>
</el-form-item>
<el-form-item label="企业注册地:" class="row">
<el-cascader :props="props" @change="getAddr($event)" ref="address" v-model="queryParam.address" :options="addressList" clearable></el-cascader>
</el-form-item>
<el-form-item label="统一社会信用代码:" class="row">
<el-input type="text" placeholder="请输入" v-model="queryParam.creditCode"></el-input>
</el-form-item>
<div class="popbot">
<div class="wordprimary" @click="toct">前往城投平台寻找客户线索></div>
<div class="btn btn_cancel h32" @click="resetForm('ruleForm')">返回</div>
<div class="btn btn_primary h32" @click="submitForm('ruleForm')">添加</div>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { getDictType, getEnterprise } from '@/api/main'
import { addCustomer, getCustomerList, importData } from '@/api/custom/custom'
import prvinceTree from '@/assets/json/provinceTree'
export default {
name: '',
components: {
},
props: {
data:{}
},
data() {
return {
props:{ checkStrictly: true, expandTrigger: 'hover' },
dialogVisible: this.data.open,
//添加客户
queryParam:{
companyId:'',//jsk企业id
companyName:'',//客户名称(企业名称
customerLevel:'',//客户等级
legalPerson:'',//法定代表人
registerCapital:'',//注册资本
registerAddress:'',//企业注册地址
creditCode:'',//社会统一信用代码
address:'',//选择的地址
provinceId:'',
cityId:'',
districtId:'',
},
rules:{
companyName:[{ required: true, message: '请输入非空格字符!', trigger: 'blur' },]
},
showlist:false,
customerLevel:[]
}
},
created() {
this.prvinceTree()
this.getDictType()
console.log(this.dialogVisible)
console.log('1111111111')
},
computed: {},
methods:{
async prvinceTree() {
this.addressList = prvinceTree;
this.getadd(this.addressList)
},
getDictType(){
//获取客户等级
getDictType('customer_level_type').then(result=>{
this.customerLevel = result.code == 200 ? result.data:[]
})
},
open() {
// this.dialogVisible = true;
},
resetForm(formName) {
this.queryParam = {
companyId:'',//jsk企业id
companyName:'',//客户名称(企业名称
customerLevel:'',//客户等级
legalPerson:'',//法定代表人
registerCapital:'',//注册资本
registerAddress:'',//企业注册地址
creditCode:'',//社会统一信用代码
address:'',//选择的地址
provinceId:'',
cityId:'',
districtId:'',
},
this.dialogVisible = false
this.showlist = false
},
getAddr(obj){
if(obj.length == 0){
this.queryParam.provinceId = ''
this.queryParam.cityId = ''
this.queryParam.districtId = ''
return false
}
let labelString = this.$refs.address.getCheckedNodes()[0].pathLabels.join("-");
this.queryParam.registerAddress = labelString
this.queryParam.provinceId = obj[0]
this.queryParam.cityId = obj.length>=1 ? obj[1]:''
this.queryParam.districtId = obj.length>=2 ? obj[2]:''
},
//获取建设库客户
getCompany(value){
this.queryParam.companyId = null
if(value == 1){
this.companData = []
this.companypage = 1
}
if (this.queryParam.companyName.length>=2){
let param = {
keyword:this.queryParam.companyName,
page:{
limit:20,
page:this.companypage
}
}
getEnterprise(JSON.stringify(param)).then(result=>{
if(result.code != 200){
return false
}
if(result.data.list != null && result.data.list.length>0){
this.isscroll = true
if (this.companData.length===0) {
this.companData = result.data.list
} else {
let arr2 = result.data.list
arr2.unshift(2, 0);
Array.prototype.splice.apply(this.companData, arr2);
}
if(this.companData.length===0) {
this.showlist = false
}else{
this.showlist = true
}
this.companypage += 1
}else{
this.isscroll = false
}
})
}
},
load(){
if(this.isscroll){
this.getCompany(2)
}
},
selCompany(item){
this.queryParam.companyId = item.jskEid
this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '')
this.queryParam.legalPerson = item.legalPerson
let registeredCapitalStr = ""
if(item.registeredCapitalStr == "0" || item.registeredCapitalStr == 0){
registeredCapitalStr = ''
}else{
registeredCapitalStr = item.registeredCapitalStr
}
this.queryParam.registerCapital = registeredCapitalStr
this.queryParam.creditCode = item.creditCode
this.queryParam.provinceId = item.provinceId
this.queryParam.cityId = item.cityId
this.queryParam.districtId = item.cityId
let list = []
if(item.provinceId != null && item.provinceId != "")
list.push(item.provinceId)
if(item.cityId != null && item.cityId != "")
list.push(item.cityId)
if(item.districtId != null && item.districtId != "")
list.push(item.districtId)
this.$nextTick(()=>{
this.queryParam.address = list
let _this = this
setTimeout(function() {
if(_this.$refs.address){
_this.queryParam.registerAddress = _this.$refs.address.getCheckedNodes()[0].pathLabels.join("-")
}
},1000)
})
this.showlist = false
},
//添加客户
submitForm(formName) {
// if(this.queryParam.companyId=="" || this.queryParam.companyId == null){
// this.$message.error({message:'请选择企业!',showClose:true})
//
// return;
// }
this.$refs[formName].validate((valid) => {
if (valid) {
addCustomer(this.queryParam).then(result=>{
if(result.code == 200){
this.$message.success('添加成功!')
this.dialogVisible = false
this.resetForm('ruleForm')
}else{
this.$message.error(result.msg)
}
})
} else {
}
});
},
toct(){
this.$router.push({path:'/macro/urban'})
},
//输入数字
number(value){
if(value == '')
this.queryParam.registerCapital = value
else
this.queryParam.registerCapital = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入6位小数
},
//处理注册地数据
getadd(row) {
this.addrcallback(row,this.getadd)
},
addrcallback(row,callback){
if(row){
row.forEach(item => {
item.value = item.id
callback && callback(item.children)
})
}
},
},
}
</script>
<style scoped>
</style>
......@@ -366,6 +366,9 @@
}
},
created() {
if(this.$route.query.key){
this.searchParam.companyName=this.$route.query.key;
}
if(this.$route.query.type === '1'){
this.searchParam.companyNatures=['国有企业']
}
......
......@@ -39,11 +39,11 @@
<el-col :span="6">
<div class="search">
<div class="head_title">快速查找</div>
<el-input placeholder="输入企业名称查询">
<el-input placeholder="输入企业名称查询" v-model="key">
<i slot="prefix" class="el-icon-search"></i>
<el-button slot="append">搜索</el-button>
<el-button slot="append" @click="handleSearch">搜索</el-button>
</el-input>
<div class="search_btn"><i class="el-icon-plus"></i>新建项目</div>
<div class="search_btn" @click="handleAdd"><i class="el-icon-plus"></i>新建项目</div>
</div>
</el-col>
</el-row>
......@@ -175,6 +175,7 @@
</div>
</div>
</div>
<AddCustom :data="data" v-if="data.open"></AddCustom>
</div>
</template>
......@@ -183,13 +184,17 @@
import * as echarts from 'echarts'
import {encodeStr} from "@/assets/js/common"
import { statistics, cooperationTop, creditLevel,getFollowList } from '@/api/custom/custom'
import AddCustom from '../component/addCustom'
export default {
name: 'Overview',
components: {
AddCustom
},
data() {
return {
encodeStr,
activeName:'first',
key:'',
statistics:{},
hzqkList:[],
creditLevel:[],
......@@ -209,6 +214,9 @@
params:{
startTime:'',
endTime:''
},
data:{
open:false
}
}
},
......@@ -234,7 +242,6 @@
methods: {
getData(){
statistics().then(res=>{
console.log(res.data)
this.statistics=res.data;
})
cooperationTop().then(res=>{
......@@ -246,7 +253,9 @@
list.push(res.data[i])
}
}
this.initChart(list)
if(list.length > 0){
this.initChart(list)
}
})
creditLevel().then(res=>{
for(let i=0; i<res.data.length; i++){
......@@ -286,6 +295,7 @@
}, 10)
},
initChart(data){
//业主单位合作情况
this.option = {
legend: {
......@@ -507,6 +517,17 @@
this.getFollowList()
}
},
handleSearch(){
this.$router.push({
path: '/custom/customList',
query:{
key:this.key
}
})
},
handleAdd(){
this.data.open=true
},
}
}
</script>
......@@ -626,6 +647,7 @@
color:#FFFFFF;
font-size: 14px;
margin-top: 12px;
cursor: pointer;
i{
margin-right: 12px;
}
......
This diff is collapsed.
......@@ -5,7 +5,11 @@
<span class="province">{{province}}</span>
<span class="icon">
<i class="el-icon-location"></i>切换
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'
<el-select v-if="key =='5'" v-model="address" class="cascader-region" @change="addressListbtn1">
<el-option v-for="(item,index) in addressList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select>
<el-cascader v-else ref="address" class="cascader-region" popper-class='cascader-region-addd'
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>
</span>
</div>
......@@ -17,7 +21,7 @@
import dataRegion from '@/assets/json/dataRegion'
export default {
name:'region',
props:['province','dataQuery'],
props:['province','dataQuery','type'],
data(){
return {
props: {
......@@ -28,7 +32,8 @@
addressList: [],
address:'',
provinceId:[],
location:''
location:'',
key:'',
}
},
watch: {
......@@ -39,10 +44,12 @@
created(){
this.dataRegion()
this.location=this.province
this.key=this.type;
},
methods:{
addressListbtn() {
let nodesObj = this.$refs.address.getCheckedNodes()[0];
this.location=nodesObj.pathLabels[nodesObj.pathLabels.length-1];
this.provinceId=nodesObj.path;
let data={}
......@@ -52,6 +59,18 @@
this.$parent.addressListbtn(data)
localStorage.setItem('location', true)
},
addressListbtn1() {
let obj = this.addressList.find((option) => option.id === this.address);
this.location=obj.label;
this.provinceId=[obj.id];
let data={}
data.province=this.location
data.provinceId=this.provinceId
data.provinces=[this.location]
console.log(data,"|||||||")
this.$parent.addressListbtn(data)
localStorage.setItem('location', true)
},
//地区
async dataRegion() {
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
......
......@@ -732,16 +732,6 @@ export default {
this.$parent.handleClick('second', data);
break;
case 2:
// this.$router.push({
// path: '/macro/urban',
// query:{
// provinceId:this.dataQuery.provinceId,
// province:this.dataQuery.province,
// }
// })
console.log(this.dataQuery.provinceId)
console.log(this.dataQuery.province)
// return
this.$router.push({name: 'Urban',
params: {
provinceId: this.dataQuery.provinceId,
......
......@@ -76,7 +76,13 @@ export default {
if(Array.isArray(this.dataQuery.provinceId)){
this.provinceId=this.dataQuery.provinceId
}else {
this.provinceId.push(this.dataQuery.provinceId)
if(this.dataQuery.cityId){
this.provinceId=[this.dataQuery.provinceId,this.dataQuery.cityId,this.dataQuery.areaId]
}else if(this.dataQuery.cityId){
this.provinceId=[this.dataQuery.provinceId,this.dataQuery.cityId]
}else {
this.provinceId=[this.dataQuery.provinceId]
}
}
}else {
location({}).then(res => {
......
<template>
<div class="app-container enterprises">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn" :type="5"></Region>
<div class="flex-box eco-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本地企业" name="first"></el-tab-pane>
......@@ -291,17 +291,8 @@ export default {
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]
}
params.provinceId=this.provinceId
}
this.querySubmit()
location(params).then(res => {
console.log(res.data)
......
......@@ -46,7 +46,7 @@
</el-table-column>
<el-table-column label="地区" min-width="150" align="left" fixed>
<template slot-scope="scope">
<router-link :to="{path:'/macro/economies',query:{id:scope.row.id,provinceId:scope.row.provinceId,province:scope.row.province}}" tag="a" class="a-link">{{ scope.row.province}}{{scope.row.city ? '-': ''}}{{ scope.row.city}}{{scope.row.area ? '-': ''}}{{ scope.row.area}}</router-link>
<span @click="clickTo(scope.row)">{{ scope.row.province}}{{scope.row.city ? '-': ''}}{{ scope.row.city}}{{scope.row.area ? '-': ''}}{{ scope.row.area}}</span>
</template>
</el-table-column>
<el-table-column label="年度明细" prop="id" width="90" align="center" fixed>
......@@ -324,6 +324,26 @@
message: '功能正在开发中',
type: 'warning'
});
},
clickTo(item){
let params={
id:item.id,
province:item.area ? item.area : item.city ? item.city : item.province,
}
if(item.areaId){
params.provinceId=item.provinceId
params.cityId=item.cityId
params.areaId=item.areaId
}else if(item.cityId !=0){
params.provinceId=item.provinceId
params.cityId=item.cityId
}else {
params.provinceId=item.provinceId
}
this.$router.push({
path: '/macro/economies',
query:params
})
}
}
}
......
......@@ -217,9 +217,9 @@
<el-table-column prop="econData002" label="有息债务/总负债(%)" :formatter="formatStatus" width="160" align="right"/>
<el-table-column prop="tdr" label="资产负债率(%)" :formatter="formatStatus" width="140" align="right"/>
<el-table-column prop="ofcb" label="综合融资成本(%)" :formatter="formatStatus" width="150" align="right"/>
<el-table-column prop="cashRatio" label="现金比率" :formatter="formatStatus" width="110" align="right"/>
<el-table-column prop="cashFlowRatio" label="现金流量比率" :formatter="formatStatus" width="120" align="right"/>
<el-table-column prop="cashDebtRatio" label="现金到期债务比" :formatter="formatStatus" width="120" align="right"/>
<el-table-column prop="cashRatio" label="现金比率(%)" :formatter="formatStatus" width="110" align="right"/>
<el-table-column prop="cashFlowRatio" label="现金流量比率(%)" :formatter="formatStatus" width="120" align="right"/>
<el-table-column prop="cashDebtRatio" label="现金到期债务比(%)" :formatter="formatStatus" width="120" align="right"/>
<el-table-column prop="creditBalance" label="授信余额(亿元)" :formatter="formatStatus" width="130" align="right"/>
<el-table-column prop="econData003" label="授信余额/全部债务(%)" :formatter="formatStatus" width="160" align="right"/>
<el-table-column prop="ebitdaIcr" label="EBITDA保障倍数" :formatter="formatStatus" width="150" align="right"/>
......
......@@ -16,6 +16,10 @@ public class BusinessAnalyzeVo implements Serializable {
* 项目类型
*/
private String projectType;
/**
* 项目类别
*/
private String projectCategory;
/**
* 资金来源
*/
......
......@@ -84,12 +84,22 @@ public class EnterpriseBussinessService {
dataMap.put("sourceList", null);
String source = MapUtils.getString(dataMap, "source");
if (ObjectUtil.isNotEmpty(source)) {
List<EnterpriseBussinessVo> enterpriseSource = new ArrayList<>();
List<EnterpriseBussinessVo> enterpriseBussinessVoList = JSONUtil.toList(source, EnterpriseBussinessVo.class);
if (ObjectUtil.isNotEmpty(enterpriseBussinessVoList.get(0))) {
EnterpriseBussinessVo vo = enterpriseBussinessVoList.get(0);
dataMap.put("sourceId", vo.getSource_id());
dataMap.put("sourceType", vo.getSource_type());
dataMap.put("sourceList", enterpriseBussinessVoList);
if (ObjectUtil.isNotEmpty(body.getSources())) {
for (EnterpriseBussinessVo bussinessVo : enterpriseBussinessVoList) {
String source_type = bussinessVo.getSource_type();
if (body.getSources().contains(source_type)) {
enterpriseSource.add(bussinessVo);
}
}
dataMap.put("sourceList", enterpriseSource);
}
}
}
}
......@@ -173,12 +183,22 @@ public class EnterpriseBussinessService {
dataMap.put("sourceType", null);
String source = MapUtils.getString(dataMap, "source");
if (ObjectUtil.isNotEmpty(source)) {
List<EnterpriseBussinessVo> enterpriseSource = new ArrayList<>();
List<EnterpriseBussinessVo> enterpriseBussinessVoList = JSONUtil.toList(source, EnterpriseBussinessVo.class);
if (ObjectUtil.isNotEmpty(enterpriseBussinessVoList.get(0))) {
EnterpriseBussinessVo vo = enterpriseBussinessVoList.get(0);
dataMap.put("sourceId", vo.getSource_id());
dataMap.put("sourceType", vo.getSource_type());
dataMap.put("sourceList", enterpriseBussinessVoList);
if (ObjectUtil.isNotEmpty(body.getSources())) {
for (EnterpriseBussinessVo bussinessVo : enterpriseBussinessVoList) {
String source_type = bussinessVo.getSource_type();
if (body.getSources().contains(source_type)) {
enterpriseSource.add(bussinessVo);
}
}
dataMap.put("sourceList", enterpriseSource);
}
}
}
}
......
......@@ -289,22 +289,22 @@ public class EnterpriseService {
List<CustomerStatusListVo> claimStatusList = iCustomerService.selectStatusListByCompanyName(companyNames);
Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
bondCreditRatingBatchMap.put("cIds", cIds);
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
objArrayList = (ArrayList) object;
}
}
// Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
// bondCreditRatingBatchMap.put("cIds", cIds);
// Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
// Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
// ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
// if (codeRating.equals(HttpStatus.OK.value())) {
// Object object = bondCreditRatingMap.get("data");
// if (ObjectUtil.isNotEmpty(object)) {
// objArrayList = (ArrayList) object;
// }
// }
//按照城投企业id合并两个list
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
companyMap.put("bratingSubjectLevel", null);
// companyMap.put("bratingSubjectLevel", null);
String uipId = MapUtils.getString(companyMap, "uipId");
String companyName = MapUtils.getString(companyMap, "companyName", "");
if (ObjectUtil.isNotEmpty(companyName) && ObjectUtil.isNotEmpty(body.getKeys())) {
......@@ -354,12 +354,12 @@ public class EnterpriseService {
companyMap.put("claimStatus", vo.getStatus());
}
}
for (Map<String, Object> m : objArrayList) {
Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
if (companyIdCredit.equals(companyId)) {
companyMap.put("bratingSubjectLevel", m.get("bratingSubjectLevel"));
}
}
// for (Map<String, Object> m : objArrayList) {
// Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
// if (companyIdCredit.equals(companyId)) {
// companyMap.put("bratingSubjectLevel", m.get("bratingSubjectLevel"));
// }
// }
}
return new TableDataInfo(list, MapUtils.getInteger(data, "totalCount", 0));
......
......@@ -116,4 +116,6 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo> {
List<BusinessAnalyzeVo> selectTypeAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> selectCategoryAnalyze(BusinessSearchDto dto);
}
......@@ -20,6 +20,8 @@ public interface IBusinessOverviewService {
List<BusinessAnalyzeVo> typeAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> categoryAnalyze(BusinessSearchDto dto);
AjaxResult countGroupByProvince(JSONObject object);
AjaxResult rangByMoney(JSONObject object);
......
......@@ -60,6 +60,12 @@ public class BusinessOverviewServiceImpl implements IBusinessOverviewService {
return businessInfoMapper.selectTypeAnalyze(dto);
}
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public List<BusinessAnalyzeVo> categoryAnalyze(BusinessSearchDto dto) {
return businessInfoMapper.selectCategoryAnalyze(dto);
}
@Override
public AjaxResult countGroupByProvince(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/marketAnalysis/project/countGroupByProvince", object);
......
......@@ -62,17 +62,17 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
}
List<CustomerStatusListVo> customerStatusListVos = iCustomerService.selectStatusListByCompanyName(companyNames);
Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
bondCreditRatingBatchMap.put("cIds", cIds);
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
objArrayList = (ArrayList)object;
}
}
// Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
// bondCreditRatingBatchMap.put("cIds", cIds);
// Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
// Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
// ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
// if (codeRating.equals(HttpStatus.OK.value())) {
// Object object = bondCreditRatingMap.get("data");
// if (ObjectUtil.isNotEmpty(object)) {
// objArrayList = (ArrayList)object;
// }
// }
//按照城投企业id合并两个list
//按照城投企业id合并两个list
......@@ -86,27 +86,27 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
companyName = companyName.replaceAll("</font>","");
}
companyMap.put("claimStatus", null);
companyMap.put("bratingSubjectLevel", null);
// companyMap.put("bratingSubjectLevel", null);
for (CustomerStatusListVo vo : customerStatusListVos) {
if (companyName.equals(vo.getCompanyName())) {
companyMap.put("claimStatus", vo.getStatus());
}
}
// 去除重复的数据
Set<UrbanInvestmentPlatformSubjectLevelDto> subjectLevelDtoSet = new HashSet<>();
for (Map<String, Object> m : objArrayList) {
UrbanInvestmentPlatformSubjectLevelDto dto = new UrbanInvestmentPlatformSubjectLevelDto();
Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
String rate = MapUtils.getString(m, "bratingSubjectLevel");
dto.setCompanyId(companyIdCredit);
dto.setBratingSubjectLevel(rate);
subjectLevelDtoSet.add(dto);
}
for (UrbanInvestmentPlatformSubjectLevelDto dto : subjectLevelDtoSet) {
if (dto.getCompanyId().equals(companyId)) {
companyMap.put("bratingSubjectLevel", dto.getBratingSubjectLevel());
}
}
// Set<UrbanInvestmentPlatformSubjectLevelDto> subjectLevelDtoSet = new HashSet<>();
// for (Map<String, Object> m : objArrayList) {
// UrbanInvestmentPlatformSubjectLevelDto dto = new UrbanInvestmentPlatformSubjectLevelDto();
// Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
// String rate = MapUtils.getString(m, "bratingSubjectLevel");
// dto.setCompanyId(companyIdCredit);
// dto.setBratingSubjectLevel(rate);
// subjectLevelDtoSet.add(dto);
// }
// for (UrbanInvestmentPlatformSubjectLevelDto dto : subjectLevelDtoSet) {
// if (dto.getCompanyId().equals(companyId)) {
// companyMap.put("bratingSubjectLevel", dto.getBratingSubjectLevel());
// }
// }
}
return BeanUtil.toBean(map, AjaxResult.class);
}
......
......@@ -401,6 +401,17 @@
bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
group by bi.project_type
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
</select>
<select id="selectCategoryAnalyze" resultType="com.dsk.system.domain.business.vo.BusinessAnalyzeVo">
select
bi.project_category,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
group by bi.project_category
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
</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