1.污区图
2.过程监督-终端 代码提交
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.njcn.process.pojo.param.TerminalParam;
|
||||
import com.njcn.process.pojo.po.PmsTerminalDetection;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.vo.TerminalVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-02-27
|
||||
*/
|
||||
public interface PmsTerminalDetectionMapper extends BaseMapper<PmsTerminalDetection> {
|
||||
|
||||
/***
|
||||
* 终端入网检测台账统计
|
||||
* @author wr
|
||||
* @date 2023-02-28 11:14
|
||||
* @param param
|
||||
* @param ids
|
||||
* @return List<TerminalStatistics>
|
||||
*/
|
||||
List<TerminalVO.TerminalStatistics> selectStatistics(@Param("param") TerminalParam param,
|
||||
@Param("ids") List<String> ids);
|
||||
|
||||
/***
|
||||
* 周期检测统计
|
||||
* @author wr
|
||||
* @date 2023-02-28 11:14
|
||||
* @param param
|
||||
* @param ids
|
||||
* @return List<TerminalStatistics>
|
||||
*/
|
||||
List<TerminalVO.TerminalStatistics> selectCycleStatistics(@Param("param") TerminalParam.TerminalCycleParam param,
|
||||
@Param("ids") List<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.PmsTerminalDetectionMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.PmsTerminalDetection">
|
||||
<id column="Id" property="id" />
|
||||
<result column="Create_Time" property="createTime" />
|
||||
<result column="Update_Time" property="updateTime" />
|
||||
<result column="Name" property="name" />
|
||||
<result column="Org_Name" property="orgName" />
|
||||
<result column="Org_No" property="orgNo" />
|
||||
<result column="Manufacture" property="manufacture" />
|
||||
<result column="Install_place" property="installPlace" />
|
||||
<result column="Inspection_Name" property="inspectionName" />
|
||||
<result column="Test_results" property="testResults" />
|
||||
<result column="Inspection_Time" property="inspectionTime" />
|
||||
<result column="Next_inspection_Time" property="nextInspectionTime" />
|
||||
<result column="Inspection_Report" property="inspectionReport" />
|
||||
<result column="Original_Report" property="originalReport" />
|
||||
<result column="Status" property="status" />
|
||||
<result column="Create_By" property="createBy" />
|
||||
<result column="Update_By" property="updateBy" />
|
||||
</resultMap>
|
||||
<select id="selectStatistics" resultType="com.njcn.process.pojo.vo.TerminalVO$TerminalStatistics">
|
||||
SELECT
|
||||
Org_No,
|
||||
count( id ) AS count
|
||||
FROM
|
||||
pms_terminal_detection
|
||||
<where>
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
Org_No
|
||||
</select>
|
||||
<select id="selectCycleStatistics" resultType="com.njcn.process.pojo.vo.TerminalVO$TerminalStatistics">
|
||||
SELECT
|
||||
Org_No,
|
||||
count( id ) AS count
|
||||
FROM
|
||||
pms_terminal_detection
|
||||
<where>
|
||||
Next_inspection_Time <= DATE_FORMAT( now(), '%Y-%m-%d' )
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND org_no IN
|
||||
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.testResults != null and param.testResults !=''">
|
||||
AND Test_results = #{param.testResults}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
Org_No
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user