系统预警修复,打包完善
This commit is contained in:
@@ -21,9 +21,9 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
|
||||
* @param nowStr
|
||||
* @return
|
||||
*/
|
||||
BasePageVo<SystemWarningItemVo> getCheckOverdueCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
Page<SystemWarningItemVo> getCheckOverdueCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
|
||||
BasePageVo<SystemWarningItemVo> getCheckExpiringCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
Page<SystemWarningItemVo> getCheckExpiringCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.dc.dc_project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.dc.dc_project.model.pojo.RecordSample;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dc.dc_project.model.vo.BasePageVo;
|
||||
@@ -14,9 +15,9 @@ import com.dc.dc_project.model.vo.bigScreen.SystemWarningItemVo;
|
||||
*/
|
||||
public interface RecordSampleMapper extends BaseMapper<RecordSample> {
|
||||
|
||||
BasePageVo<SystemWarningItemVo> getCheckNotCheckedCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
Page<SystemWarningItemVo> getCheckNotCheckedCount(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
|
||||
BasePageVo<SystemWarningItemVo> getCheckNotChecked(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
Page<SystemWarningItemVo> getCheckNotChecked(String nowStr, IPage<SystemWarningItemVo> page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.dc.dc_project.model.vo.bigScreen;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.dc.dc_project.model.vo.BasePageVo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -39,7 +40,7 @@ public class SystemWarningVo {
|
||||
/**
|
||||
* 预警信息
|
||||
*/
|
||||
private BasePageVo<SystemWarningItemVo> equipmentWarningItemVos;
|
||||
private Page<SystemWarningItemVo> equipmentWarningItemVos;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -114,10 +114,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
||||
// 数量统计
|
||||
IPage<SystemWarningItemVo> page = new Page<>(systemWarningDto.getCurrent(), systemWarningDto.getSize());
|
||||
|
||||
BasePageVo<SystemWarningItemVo> checkOverdue = equipmentMapper.getCheckOverdueCount(nowStr, page);
|
||||
BasePageVo<SystemWarningItemVo> checkExpiring = equipmentMapper.getCheckExpiringCount(nowStr, page);
|
||||
BasePageVo<SystemWarningItemVo> checkNotCheckedCount = recordSampleMapper.getCheckNotCheckedCount(nowStr, page);
|
||||
BasePageVo<SystemWarningItemVo> checkNotChecked = recordSampleMapper.getCheckNotChecked(nowStr, page);
|
||||
Page<SystemWarningItemVo> checkOverdue = equipmentMapper.getCheckOverdueCount(nowStr, page);
|
||||
Page<SystemWarningItemVo> checkExpiring = equipmentMapper.getCheckExpiringCount(nowStr, page);
|
||||
Page<SystemWarningItemVo> checkNotCheckedCount = recordSampleMapper.getCheckNotCheckedCount(nowStr, page);
|
||||
Page<SystemWarningItemVo> checkNotChecked = recordSampleMapper.getCheckNotChecked(nowStr, page);
|
||||
|
||||
SystemWarningVo systemWarningVo = new SystemWarningVo(
|
||||
checkOverdue.getTotal(),
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
AND se.is_deleted = 0
|
||||
</where>
|
||||
ORDER BY se.valid_until ASC
|
||||
Limit #{page.offset}, #{page.size}
|
||||
Limit #{page.current}, #{page.size}
|
||||
</select>
|
||||
<select id="getCheckExpiringCount" resultType="com.dc.dc_project.model.vo.bigScreen.SystemWarningItemVo">
|
||||
SELECT se.id, se.name, se.valid_until AS date, DATEDIFF(se.valid_until, #{nowStr}) AS day FROM sys_equipment se
|
||||
@@ -28,5 +28,6 @@
|
||||
AND se.is_deleted = 0
|
||||
</where>
|
||||
ORDER BY se.valid_until ASC
|
||||
Limit #{page.current}, #{page.size}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
AND sys.calibration_date < #{nowStr}
|
||||
</where>
|
||||
ORDER BY sys.calibration_date ASC
|
||||
LIMIT #{page.offset}, #{page.size}
|
||||
LIMIT #{page.current}, #{page.size}
|
||||
</select>
|
||||
<select id="getCheckNotChecked" resultType="com.dc.dc_project.model.vo.bigScreen.SystemWarningItemVo">
|
||||
SELECT
|
||||
@@ -34,6 +34,6 @@
|
||||
AND sys.calibration_date BETWEEN #{nowStr} AND DATE_ADD(#{nowStr}, INTERVAL 15 DAY)
|
||||
</where>
|
||||
ORDER BY sys.calibration_date ASC
|
||||
LIMIT #{page.offset}, #{page.size}
|
||||
LIMIT #{page.current}, #{page.size}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user