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