hyingbo
6 天以前 cc0e9036de6e922e8fe254fef01d8de9996024b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?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="org.jeecg.modules.mdc.mapper.EquipmentWorklineMapper">
 
    <select id="getMacingDataList" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
        select top 1 [${tableName}].* from [${tableName}] order by CollectTime  desc
    </select>
 
    <select id="findRunningData" resultType="java.lang.String">
        SELECT ProductCount FROM [${tableName}] WHERE ProductCount &lt;&gt; '' AND CollectTime BETWEEN #{ startTime } AND #{ endTime } GROUP BY ProductCount ORDER BY ProductCount
    </select>
 
    <select id="getEquipProgramNum" resultType="org.jeecg.modules.mdc.dto.EquipmentMachingDto">
        select ProductName,CollectTime from [${tableName}] where CollectTime &gt; #{startTime} and CollectTime &lt;= #{endTime} and ProductName is not null
    </select>
 
    <select id="findProductCountStartTime" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
        SELECT TOP 1 [${tableName}].* FROM [${tableName}] WHERE ProductCount = #{ productCount } AND CollectTime BETWEEN #{ startTime } AND #{ endTime } ORDER BY CollectTime ASC
    </select>
 
    <select id="findProductCountEndTime" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
        SELECT TOP 1 [${tableName}].* FROM [${tableName}] WHERE ProductCount = #{ productCount } AND CollectTime BETWEEN #{ startTime } AND #{ endTime } ORDER BY CollectTime DESC
    </select>
 
    <select id="getDataList" resultType="java.util.Map">
        select top 1 [${tableName}].* from [${tableName}] order by CollectTime  desc
    </select>
</mapper>