Commit 60ede402 authored by Administrator's avatar Administrator

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

parents f8d1bbf2 c2b1e8ca
......@@ -27,11 +27,26 @@ public class BusinessOverviewController extends BaseController {
private IBusinessOverviewService baseService;
/**
* 项目统计
* 项目状态统计
*/
@GetMapping("/statistics")
public AjaxResult statistics(){
return AjaxResult.success(baseService.statistics(new BusinessSearchDto(SecurityUtils.getUserId())));
@GetMapping("/status/statistics")
public AjaxResult statusStatistics(){
return AjaxResult.success(baseService.statusStatistics(new BusinessSearchDto(SecurityUtils.getUserId())));
}
/**
* 项目资金分析
*/
@GetMapping("/amount/analyze")
public AjaxResult amountAnalyze(){
return AjaxResult.success(baseService.amountAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(),0)));
}
/**
* 项目类型分析
*/
@GetMapping("/type/analyze")
public AjaxResult typeAnalyze(){
return AjaxResult.success(baseService.typeAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(),2)));
}
/**
......
package com.dsk.web.controller.dsk;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.system.domain.dsk.dto.JskCombineCertificateDto;
......@@ -72,4 +74,36 @@ public class JskCombineInfoController extends BaseController {
public R groupCertificateCount(@RequestBody JskCombineSearchDto dto) throws Exception {
return baseService.groupCertificateCount(dto);
}
/**
* 集团户搜索
*/
@PostMapping("/index")
public AjaxResult index(@RequestBody JSONObject object) {
return baseService.index(object);
}
/**
* 查央企
*/
@PostMapping("/centralEnterprse")
public AjaxResult centralEnterprse() {
return baseService.centralEnterprse();
}
/**
* 查央企子公司
*/
@PostMapping("/centralEnterprse/child")
public AjaxResult centralEnterprseChild() {
return baseService.centralEnterprseChild();
}
/**
* 查地方国企
*/
@PostMapping("/centralEnterprse/local")
public AjaxResult centralEnterprseLocal(@RequestBody JSONObject object) {
return baseService.centralEnterprseLocal(object);
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -119,7 +119,6 @@
import dataRegion from '@/assets/json/dataRegion'
import economiesDetail from './economies-detail'
import skeleton from '../../component/skeleton'
import axios from 'axios'
export default {
name: 'NationalEconomies',
components: {
......
......@@ -33,8 +33,8 @@
<el-table-column prop="type" label="项目类型" :formatter="formatStatus" width="100"/>
<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="140"/>
<el-table-column prop="money" label="中标总金额 (万元)" align="right" :formatter="formatStatus" width="150"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" width="120"/>
<el-table-column prop="money" label="中标总金额 (万元)" align="right" :formatter="formatStatus" sortable width="170"/>
<el-table-column prop="moneyRate" label="金额占比(%)" align="right" :formatter="formatStatus" sortable width="140"/>
</el-table>
</div>
</div>
......@@ -73,7 +73,7 @@
</el-table-column>
<el-table-column prop="province" label="地区" :formatter="formatStatus" width="100"/>
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable width="130"/>
<el-table-column prop="countRate" label="数量占比(%)" align="right" :formatter="formatStatus" width="120"/>
<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>
......@@ -114,7 +114,7 @@
</el-table-column>
<el-table-column prop="rangeName" label="中标金额" :formatter="formatStatus"/>
<el-table-column prop="count" label="中标数量 (个)" align="right" :formatter="formatStatus" sortable/>
<el-table-column prop="rate" label="占比(%)" align="right" :formatter="formatStatus" width="100"/>
<el-table-column prop="rate" label="占比(%)" align="right" :formatter="formatStatus" width="120" sortable/>
</el-table>
</div>
</div>
......@@ -278,8 +278,19 @@
this.dataRegion()
this.yearsData()
this.getCountBidByType()
this.$nextTick(() => {
})
setTimeout(() => {
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
}, 1000);
},
mounted() {
},
beforeDestroy(){
......@@ -292,16 +303,14 @@
countBidByType(params).then(res => {
this.isSkeleton=false;
this.xmtjList=res.data.date;
this.xmtjList.forEach(item =>{
item.money=Number(item.money)
})
if(res.data){
this.$nextTick(() => {
this.initChart1(res.data.date)
})
}
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
})
},
getCountBidGroupByProvince(){
......@@ -394,8 +403,6 @@
}
})
},
initChart1(data) {
this.$nextTick(() => {
let myChart = echarts.init(document.getElementById("echarts1"))
......@@ -408,57 +415,107 @@
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#FFFFFF'
}
type: 'cross'
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
axisLabel: { //坐标轴刻度标签的相关设置
margin: 15, //刻度标签与轴线之间的距离
color:"#666666",
show: true,
interval: 0
},
axisTick: false, //坐标轴刻度
axisPointer: {
type: 'shadow'
},
data: data.map(item => item.type),
},
yAxis: {
yAxis: [
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
name: '单位:个',
nameLocation: 'start',
nameTextStyle: {
padding: [0, 0, 0, -60], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
},
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
name: '单位:万元',
nameLocation: 'start',
nameTextStyle: {
padding: [0, 0, 0, 72], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
}
],
grid: {
top:30,
left:100,
right:30,
left:80,
right:90,
bottom:30,
},
color:['#ADC0FF', '#E9C8FF'],
series: [
{
name:'中标数量(个)',
name:'中标金额(万元)',
smooth: false, //平滑
type:"line",
symbolSize: 6, //折线拐点大小
itemStyle: {
normal: {
borderWidth: 4,
lineStyle: { width: 2 }
symbolSize: 6,
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value + '万元'
}
},
data:list1,
itemStyle: {
color: '#14C9C9'
},
data:data.map(item => item.money),
},
{
name:'中标总金额(万元)',
smooth: false, //平滑
type:"line",
symbolSize: 6, //折线拐点大小
name:'中标总数(个)',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value + '个';
}
},
itemStyle: {
normal: {
borderWidth: 4,
lineStyle: { width: 2 }
normal:{
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#56A5FF'
}, {
offset: 1,
color: '#1B8EFF'
}])
}
},
data:list2,
data:data.map(item => item.count),
}
]
}
......@@ -1006,18 +1063,20 @@
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
if (index === 1) {
sums[index] = '平均下浮率';
return;
}
if (index === 1) {
if (index === 0) {
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;
......@@ -1025,7 +1084,7 @@
}, 0);
if (index === 2||index === 3||index === 4) {
sums[index] = Number(sums[index]).toFixed(2);
sums[index] = (Number(sums[index])/length).toFixed(2);
return;
}
});
......
......@@ -19,9 +19,9 @@
</div>
</el-form-item>
<el-form-item label="招采单位:" class="row" prop="ownerCompany">
<el-input type="text" placeholder="请输入" v-model="queryParam.ownerCompany" @input="getCompany" :οnkeyup="queryParam.ownerCompany=queryParam.ownerCompany.replace(/^\s+|\s+$/g,'')"></el-input>
<div class="resultlist" v-if="showlist" id="box">
<div v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name"></span></div>
<el-input type="text" placeholder="请输入" v-model="queryParam.ownerCompany" @input="getCompany(1)" :οnkeyup="queryParam.ownerCompany=queryParam.ownerCompany.replace(/^\s+|\s+$/g,'')"></el-input>
<div class="resultlist infinite-list" v-if="showlist" v-infinite-scroll="load" id="box" 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">
......@@ -96,6 +96,8 @@
projectType:[],//项目类型
projectCategory:[],//项目类别
proList:[],//项目列表
companypage:1,
isscroll:false,
}
},
mounted(){
......@@ -135,20 +137,41 @@
},
//获取建设库客户
getCompany(value){
this.queryParam.companyId = ''
if (value.length>=2){
this.queryParam.companyId = null
if(value == 1){
this.companData = []
this.companypage = 1
}
if (this.queryParam.ownerCompany.length>=2){
let param = {
keyword:value,
keyword:this.queryParam.ownerCompany,
page:{
limit:20,
page:1
page:this.companypage
}
}
getEnterprise(JSON.stringify(param)).then(result=>{
if(result.code != 200)
return
this.showlist = true
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
}
})
}
},
......@@ -167,6 +190,11 @@
})
}
},
load(){
if(this.isscroll){
this.getCompany(2)
}
},
selCompany(item){
this.queryParam.companyId = item.jskEid
this.queryParam.ownerCompany = item.name.replace(/<[^>]+>/g, '')
......
......@@ -40,7 +40,7 @@
<div style="position: relative">
<el-input placeholder="待添加" id="biaoqian" :disabled="isDisabled" v-model="tipsvalue" @input="getValue" :style="spanWidth"></el-input><span class="spanText">{{ tipsvalue }}</span>
</div>
<div class="addbtn" v-if="isDisabled == false" @click="addtips"></div>
<!--<div class="addbtn" v-if="isDisabled == false" @click="addtips"></div>-->
</div>
</div>
</div>
......
......@@ -3,6 +3,7 @@ package com.dsk.system.domain.business.dto;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -72,4 +73,16 @@ public class BusinessListDto extends BaseEntity {
* 业主单位
*/
private String ownerCompany;
/**
* 项目状态
*/
private Integer status;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
package com.dsk.system.domain.business.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -14,30 +15,33 @@ import java.util.Map;
@Data
@NoArgsConstructor
public class BusinessSearchDto implements Serializable {
/**
* 状态
*/
private Integer status;
/**
* 用户id
*/
private Long userId;
/**
* 状态
*/
private Integer status;
/**
* 数据权限
*/
private Map<String,Object> params;
private Map<String, Object> params;
public Map<String, Object> getParams()
{
if (params == null)
{
public Map<String, Object> getParams() {
if (params == null) {
params = new HashMap<>();
}
return params;
}
public BusinessSearchDto(Long userId){
public BusinessSearchDto(Long userId) {
this.userId = userId;
}
public BusinessSearchDto(Long userId, Integer status) {
this.userId = userId;
this.status = status;
}
}
package com.dsk.system.domain.business.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 项目金额分析
*
* @author lcl
* @create 2023/8/15
*/
@Data
public class BusinessAnalyzeVo implements Serializable {
/**
* 项目类型
*/
private String projectType;
/**
* 资金来源
*/
private String amountSource;
/**
* 项目数量
*/
private Integer businessCount;
/**
* 总投资金额
*/
private Double totalAmount;
}
......@@ -3,6 +3,8 @@ package com.dsk.system.dskService;
import cn.hutool.core.bean.BeanException;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.utils.DskOpenApiUtil;
......@@ -88,4 +90,24 @@ public class JskCombineInfoService {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/combine/group/certificateCount", BeanUtil.beanToMap(dto, false, false));
return BeanUtil.toBean(map, R.class);
}
public AjaxResult index(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/groupCompany", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprse() {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse", null);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult centralEnterprseChild() {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/centralEnterprse/child", null);
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);
}
}
package com.dsk.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.common.annotation.DataScope;
import com.dsk.common.core.domain.entity.BusinessInfo;
import com.dsk.system.domain.business.dto.BusinessListDto;
import com.dsk.system.domain.business.dto.BusinessSearchDto;
import com.dsk.system.domain.business.vo.BusinessAnalyzeVo;
import com.dsk.system.domain.business.vo.BusinessLikeProjectNameListVo;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
......@@ -112,4 +112,8 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo> {
int selectCountByStatus(BusinessSearchDto dto);
List<BusinessAnalyzeVo> selectAmountAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> selectTypeAnalyze(BusinessSearchDto dto);
}
......@@ -3,7 +3,9 @@ package com.dsk.system.service;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.system.domain.business.dto.BusinessSearchDto;
import com.dsk.system.domain.business.vo.BusinessAnalyzeVo;
import java.util.List;
import java.util.Map;
/**
......@@ -12,7 +14,11 @@ import java.util.Map;
*/
public interface IBusinessOverviewService {
Map<String, Object> statistics(BusinessSearchDto dto);
Map<String, Object> statusStatistics(BusinessSearchDto dto);
List<BusinessAnalyzeVo> amountAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> typeAnalyze(BusinessSearchDto dto);
AjaxResult countGroupByProvince(JSONObject object);
......
package com.dsk.system.service.impl;
import com.dsk.common.annotation.DataScope;
import com.dsk.common.core.domain.entity.BusinessFollowRecord;
import com.dsk.common.utils.DateUtils;
import com.dsk.system.domain.business.dto.BusinessIdDto;
......@@ -44,6 +45,7 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
}
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public List<BusinessFollowRecord> allFollow(BusinessListDto dto) {
//userId不传值,就查询全部
// if (dto.getUserId() == null) {
......
......@@ -4,10 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.annotation.DataScope;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.utils.DskOpenApiUtil;
import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.business.dto.BusinessSearchDto;
import com.dsk.system.domain.business.vo.BusinessAnalyzeVo;
import com.dsk.system.mapper.BusinessInfoMapper;
import com.dsk.system.service.IBusinessOverviewService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,6 +14,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -32,7 +32,7 @@ public class BusinessOverviewServiceImpl implements IBusinessOverviewService {
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public Map<String, Object> statistics(BusinessSearchDto dto) {
public Map<String, Object> statusStatistics(BusinessSearchDto dto) {
Map<String, Object> resultMap = new HashMap<>();
//总
resultMap.put("totalCount",businessInfoMapper.selectCountByStatus(dto));
......@@ -48,6 +48,18 @@ public class BusinessOverviewServiceImpl implements IBusinessOverviewService {
return resultMap;
}
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public List<BusinessAnalyzeVo> amountAnalyze(BusinessSearchDto dto) {
return businessInfoMapper.selectAmountAnalyze(dto);
}
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public List<BusinessAnalyzeVo> typeAnalyze(BusinessSearchDto dto) {
return businessInfoMapper.selectTypeAnalyze(dto);
}
@Override
public AjaxResult countGroupByProvince(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/marketAnalysis/project/countGroupByProvince", object);
......
......@@ -68,10 +68,12 @@
from business_follow_record f
left join business_info i on i.id = f.business_id
left join sys_user u on f.user_id = u.user_id
left join sys_dept d on u.dept_id = d.dept_id
<where>
<if test="userId != null">
and f.user_id = #{userId}
</if>
<if test="userId != null"> and (f.user_id = #{userId} or i.is_private = 1)</if>
<if test="startTime != null and startTime != '' "> and f.creat_time &gt;= #{startTime} </if>
<if test="endTime != null and endTime != '' "> and f.creat_time &lt;= #{endTime} </if>
${params.dataScope}
</where>
ORDER BY f.creat_time DESC
</select>
......
......@@ -114,6 +114,7 @@
</if>
<if test="minAmount != null and minAmount != ''"> and i.investment_amount &gt;= #{minAmount} </if>
<if test="maxAmount != null and maxAmount != ''"> and i.investment_amount &lt;= #{maxAmount}</if>
<if test="status != null "> and i.status = #{status}</if>
<if test="projectStage != null and projectStage != ''">
and i.project_stage in
<foreach collection="projectStage" item="projectStage" open="(" separator="," close=")">
......@@ -374,15 +375,32 @@
<if test="companyName != null and companyName != '' "> and ct.company_name =#{companyName}</if>
</select>
<select id="selectCountByStatus" resultType="java.lang.Integer">
select
count(bi.id)
<sql id="businessSearchSql">
from business_info bi
join business_user bu on bu.business_id = bi.id
left join sys_user u on bu.user_id = u.user_id
left join sys_dept d on u.dept_id = d.dept_id
where (bu.user_id = #{userId} or bi.is_private = 1)
<if test="status != null"> and bi.status = #{status}</if>
<if test="status != null"> and bi.status = #{status} </if>
${params.dataScope}
</sql>
<select id="selectCountByStatus" resultType="java.lang.Integer">
select count(bi.id) <include refid="businessSearchSql"/>
</select>
<select id="selectAmountAnalyze" resultType="com.dsk.system.domain.business.vo.BusinessAnalyzeVo">
select
bi.amount_source,count(bi.id) businessCount,sum(bi.investment_amount) totalAmount
<include refid="businessSearchSql"/>
group by bi.amount_source
</select>
<select id="selectTypeAnalyze" resultType="com.dsk.system.domain.business.vo.BusinessAnalyzeVo">
select
bi.project_type,count(bi.id) businessCount,sum(bi.investment_amount) totalAmount
<include refid="businessSearchSql"/>
group by bi.project_type
</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