fix:统计近线上会议

pg_adapter
wangxy 6 months ago
parent 9f2a7ccac9
commit 554761b5c7

@ -64,6 +64,9 @@ public class SysMeetingnumController extends BaseController {
public AjaxResult countMeetingMonth() {
List<String> recentlyTwelveMonth = ObtainLastSixMonthsUtil.getRecentlyTwelveMonth();
List<Long> yAxisData = new ArrayList<>();
List<Long> yAxisDataW = new ArrayList<>();
List<Long> yAxisDataXs= new ArrayList<>();
List<Long> yAxisDataXx = new ArrayList<>();
recentlyTwelveMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
@ -82,13 +85,47 @@ public class SysMeetingnumController extends BaseController {
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
AtomicReference<Long> yAxisW = new AtomicReference<>(0L);
Integer countW = new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,0).count();
if (Objects.isNull(countW)) {
countW = 0;
}
yAxisW.set(Long.valueOf(countW));
yAxisDataW.add(yAxisW.get());
AtomicReference<Long> yAxisXs = new AtomicReference<>(0L);
Integer countXs= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,0).count();
if (Objects.isNull(countXs)) {
countXs = 0;
}
yAxisXs.set(Long.valueOf(countXs));
yAxisDataXs.add(yAxisXs.get());
AtomicReference<Long> yAxisXx = new AtomicReference<>(0L);
Integer countXx= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,1).count();
if (Objects.isNull(countXx)) {
countXx = 0;
}
yAxisXx.set(Long.valueOf(countXx));
yAxisDataXx.add(yAxisXx.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlyTwelveMonth.toArray());
obj.put("yAxisData", yAxisData);
obj.put("yAxisDataW", yAxisDataW);
obj.put("yAxisDataXs", yAxisDataXs);
obj.put("yAxisDataXx", yAxisDataXx);
return AjaxResult.success(obj);
}
/**
*
*/

@ -145,7 +145,7 @@
},
tooltip: {},
legend: {
data:['次数']
data:['已召开','未召开','线上会议','线下会议']
},
xAxis: {
data: response.data.data.xAxisData,
@ -159,12 +159,36 @@
},
series: [
{
name: '次数',
name: '已召开',
type: 'bar',
data: response.data.data.yAxisData,
itemStyle: {
color: '#38dbe0'
}
},
{
name: '未召开',
type: 'bar',
data: response.data.data.yAxisDataW,
itemStyle: {
color: '#a2ea57'
}
},
{
name: '线上会议',
type: 'bar',
data: response.data.data.yAxisDataXs,
itemStyle: {
color: '#ead657'
}
},
{
name: '线下会议',
type: 'bar',
data: response.data.data.yAxisDataXx,
itemStyle: {
color: '#5792ea'
}
}
],
});

Loading…
Cancel
Save