系统预警修复,打包完善
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -32,5 +32,5 @@ build/
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
*.log
|
||||
logs/
|
||||
*/*.log
|
||||
/logs/
|
||||
|
||||
69
pom.xml
69
pom.xml
@@ -134,36 +134,49 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<!--<plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <annotationProcessorPaths>-->
|
||||
<!-- <path>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-configuration-processor</artifactId>-->
|
||||
<!-- </path>-->
|
||||
<!-- <path>-->
|
||||
<!-- <groupId>org.projectlombok</groupId>-->
|
||||
<!-- <artifactId>lombok</artifactId>-->
|
||||
<!-- </path>-->
|
||||
<!-- </annotationProcessorPaths>-->
|
||||
<!-- </configuration>-->
|
||||
<!--</plugin>-->
|
||||
<!--<plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <exclude>-->
|
||||
<!-- <groupId>org.projectlombok</groupId>-->
|
||||
<!-- <artifactId>lombok</artifactId>-->
|
||||
<!-- </exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- </configuration>-->
|
||||
<!--</plugin>-->
|
||||
<!-- maven打包插件 -> 将整个工程打成一个 fatjar -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<!-- 作用:项目打成jar,同时把本地jar包也引入进去 -->
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
<mainClass>com.dc.dc_project.DcProjectApplication</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--添加配置跳过测试-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>dc-project</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -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