Yansen 2 år sedan
förälder
incheckning
cc41a541cd

+ 1
- 1
pom.xml Visa fil

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.yunzhi</groupId>
12 12
 	<artifactId>nanyang</artifactId>
13
-	<version>0.0.4</version>
13
+	<version>0.0.6</version>
14 14
 	<name>main-service</name>
15 15
 	<description>Demo project for Spring Boot</description>
16 16
 

+ 2
- 1
src/main/resources/mapper/TaDeviceJobMapper.xml Visa fil

@@ -38,6 +38,7 @@
38 38
         <if test="startDate != null and startDate != ''">
39 39
             AND t.job_date BETWEEN #{startDate} AND #{endDate}
40 40
         </if>
41
+        AND s.`status` &gt; -1
41 42
         ORDER BY
42 43
             t.job_date DESC
43 44
     </sql>
@@ -72,7 +73,7 @@
72 73
             t.*
73 74
         FROM
74 75
             ta_device_job t
75
-        LEFT JOIN ta_machinery s ON t.machinery_id = s.machinery_id
76
+        LEFT JOIN ta_machinery s ON t.machinery_id = s.machinery_id AND s.`status` &gt; -1
76 77
         WHERE
77 78
             1 = 1
78 79
             <if test="deviceKind != null and deviceKind != ''">

+ 1
- 0
src/main/resources/mapper/TaMachineryMapper.xml Visa fil

@@ -57,6 +57,7 @@
57 57
                 OR n.`name` LIKE CONCAT('%', #{q}, '%')
58 58
             )
59 59
         </if>
60
+            AND s.`status` &gt; -1
60 61
          GROUP BY
61 62
             t.org_id,
62 63
             t.type_id

+ 2
- 1
src/main/resources/mapper/TdDeviceMapper.xml Visa fil

@@ -19,7 +19,7 @@
19 19
             td_raw_device t
20 20
                 LEFT JOIN td_device s ON t.device_kind = s.device_type
21 21
                     AND t.device_no = s.device_no AND s.`status` &gt; -1
22
-                LEFT JOIN ta_machinery m ON s.machinery_id = m.machinery_id
22
+                LEFT JOIN ta_machinery m ON s.machinery_id = m.machinery_id AND m.`status` &gt; -1
23 23
         WHERE 1 = 1
24 24
         <if test="deviceType != null and deviceType != ''">
25 25
             AND t.device_kind = #{deviceType}
@@ -50,6 +50,7 @@
50 50
         WHERE
51 51
             t.location IS NOT NULL
52 52
           AND t.status &gt; -1
53
+            AND s.status &gt; -1
53 54
           AND t.device_type IN
54 55
             <foreach collection="typeList" index="index" item="item" open="(" separator="," close=")">
55 56
                 #{item}