大屏统计信息
This commit is contained in:
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface RecordReportMapper extends BaseMapper<RecordReport> {
|
||||
|
||||
Long getCountByTime(String startTimeStr, String endTimeStr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ public class RecordEntrustStatisticsVo {
|
||||
/**
|
||||
* 委托总数量
|
||||
*/
|
||||
private Integer entrustCount;
|
||||
private Long entrustCount;
|
||||
|
||||
/**
|
||||
* 报告数量
|
||||
*/
|
||||
private Integer reportCount;
|
||||
private Long reportCount;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.dc.dc_project.service;
|
||||
import com.dc.dc_project.model.pojo.RecordEntrust;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author ADMIN
|
||||
* @description 针对表【sys_record_entrust(检测委托单)】的数据库操作Service
|
||||
@@ -10,4 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface RecordEntrustService extends IService<RecordEntrust> {
|
||||
|
||||
Long getCountByTime(String startTimeStr, String endTime);
|
||||
}
|
||||
|
||||
@@ -10,4 +10,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface RecordReportService extends IService<RecordReport> {
|
||||
|
||||
Long getCountByTime(String startTimeStr, String endTimeStr);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public class BigScreenServiceImpl implements BigScreenService {
|
||||
private final StandardService standardService;
|
||||
private final PersonnelService personnelService;
|
||||
private final RecordEntrustService recordEntrustService;
|
||||
private final RecordReportService recordReportService;
|
||||
@Override
|
||||
public ResponseResult getPigStatistics() {
|
||||
BigScreenStatistics bigScreenStatistics = new BigScreenStatistics();
|
||||
@@ -50,7 +51,12 @@ public class BigScreenServiceImpl implements BigScreenService {
|
||||
for (int i = 1; i < 13; i++) {
|
||||
RecordEntrustStatisticsVo recordEntrustStatistics = new RecordEntrustStatisticsVo();
|
||||
recordEntrustStatistics.setMonth(i);
|
||||
recordEntrustStatistics.setEntrustCount(recordEntrustService.count(new LambdaQueryWrapper<>().between(, startTime, endTime)));
|
||||
recordEntrustStatistics.setEntrustCount(
|
||||
recordEntrustService.getCountByTime(startTimeStr, endTimeStr)
|
||||
);
|
||||
recordEntrustStatistics.setReportCount(
|
||||
recordReportService.getCountByTime(startTimeStr, endTimeStr)
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class RecordEntrustServiceImpl extends ServiceImpl<RecordEntrustMapper, RecordEntrust>
|
||||
implements RecordEntrustService{
|
||||
|
||||
@Override
|
||||
public Long getCountByTime(String startTimeStr, String endTime) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class RecordReportServiceImpl extends ServiceImpl<RecordReportMapper, RecordReport>
|
||||
implements RecordReportService{
|
||||
|
||||
@Override
|
||||
public Long getCountByTime(String startTimeStr, String endTimeStr) {
|
||||
|
||||
return baseMapper.getCountByTime(startTimeStr, endTimeStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,4 +24,7 @@
|
||||
status,conclusion,file_url,remark,created_at,
|
||||
updated_at
|
||||
</sql>
|
||||
<select id="getCountByTime" resultType="java.lang.Long">
|
||||
select COUNT(*) from record_report
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user