Yansen 2 yıl önce
ebeveyn
işleme
bab8710cad

+ 1
- 1
pom.xml Dosyayı Görüntüle

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

+ 1
- 1
src/main/java/com/yunzhi/nanyang/controller/TaDeviceJobController.java Dosyayı Görüntüle

@@ -99,7 +99,6 @@ public class TaDeviceJobController extends BaseController {
99 99
         IPage<TaDeviceJob> pg = new Page<>(pageNum, pageSize);
100 100
         IPage<TaDeviceJob> list = taDeviceJobService.statisOrgBy(pg, orgId, orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone, machineryId, userId);
101 101
         Double totalArea = taDeviceJobService.statisTotalArea(orgId, orgName, deviceKind, deviceNo, startDate, endDate, machineryName, userName, phone, machineryId, userId);
102
-
103 102
         return ResponseBean.success(new HashMap<String, Object>(){{
104 103
             put("list", list);
105 104
             put("totalArea", totalArea);
@@ -128,6 +127,7 @@ public class TaDeviceJobController extends BaseController {
128 127
                                @ApiParam("人员手机") @RequestParam(value = "phone", required = false) String phone,
129 128
                                @ApiParam("设备分类") @RequestParam(value = "deviceKind", required = false) String deviceKind,
130 129
                                @ApiParam("设备编号") @RequestParam(value = "deviceNo", required = false) String deviceNo,
130
+//                               @ApiParam("位置") @RequestParam(value = "address", required = false) String address,
131 131
                                @ApiParam(value = "开始时间", example = "2022-10-01") @RequestParam(value = "startDate") String startDate,
132 132
                                @ApiParam(value = "结束时间", example = "2022-10-31") @RequestParam(value = "endDate") String endDate,
133 133
                                HttpServletResponse response) throws Exception {

+ 3
- 3
src/main/java/com/yunzhi/nanyang/entity/TaDeviceJob.java Dosyayı Görüntüle

@@ -49,11 +49,9 @@ public class TaDeviceJob implements Serializable, Cloneable {
49 49
     private String userId;
50 50
 
51 51
     @ApiModelProperty(name = "人员名称", notes = "")
52
-    @TableField(exist = false)
53 52
     private String userName;
54 53
 
55 54
     @ApiModelProperty(name = "人员手机", notes = "")
56
-    @TableField(exist = false)
57 55
     private String phone;
58 56
     /**
59 57
      * 农机ID
@@ -106,6 +104,8 @@ public class TaDeviceJob implements Serializable, Cloneable {
106 104
     private String address;
107 105
 
108 106
     @ApiModelProperty(name = "合作社名称")
109
-    @TableField(exist = false)
110 107
     private String orgName;
108
+
109
+    @ApiModelProperty(name = "合作社ID")
110
+    private String orgId;
111 111
 }

BIN
src/main/resources/job.xlsx Dosyayı Görüntüle


+ 7
- 15
src/main/resources/mapper/TaDeviceJobMapper.xml Dosyayı Görüntüle

@@ -7,8 +7,8 @@
7 7
         FROM
8 8
             ta_device_job t
9 9
             INNER JOIN ta_machinery s ON t.machinery_id = s.machinery_id
10
-            INNER JOIN ta_org m ON s.org_id = m.org_id
11
-            LEFT JOIN sys_user n ON t.user_id = n.user_id
10
+--             INNER JOIN ta_org m ON s.org_id = m.org_id
11
+--             LEFT JOIN sys_user n ON t.user_id = n.user_id
12 12
         WHERE
13 13
             1 = 1
14 14
         <if test="deviceKind != null and deviceKind != ''">
@@ -18,10 +18,10 @@
18 18
             AND t.device_no = #{deviceNo}
19 19
         </if>
20 20
         <if test="orgId != null and orgId != ''">
21
-            AND m.org_id = #{orgId}
21
+            AND t.org_id = #{orgId}
22 22
         </if>
23 23
         <if test="orgName != null and orgName != ''">
24
-            AND m.`name` LIKE CONCAT( '%', #{orgName}, '%' )
24
+            AND t.org_name LIKE CONCAT( '%', #{orgName}, '%' )
25 25
         </if>
26 26
         <if test="machineryId != null and machineryId != ''">
27 27
             AND s.machinery_id = #{machineryId}
@@ -33,25 +33,21 @@
33 33
             AND s.`name` LIKE CONCAT( '%', #{machineryName}, '%' )
34 34
         </if>
35 35
         <if test="userName != null and userName != ''">
36
-            AND n.user_name LIKE CONCAT( '%', #{userName}, '%' )
36
+            AND t.user_name LIKE CONCAT( '%', #{userName}, '%' )
37 37
         </if>
38 38
         <if test="phone != null and phone != ''">
39
-            AND n.phone LIKE CONCAT( '%', #{phone}, '%' )
39
+            AND t.phone LIKE CONCAT( '%', #{phone}, '%' )
40 40
         </if>
41 41
         <if test="startDate != null and startDate != ''">
42 42
             AND t.job_date BETWEEN #{startDate} AND #{endDate}
43 43
         </if>
44 44
         AND s.`status` &gt; -1
45 45
         ORDER BY
46
-            t.job_date DESC
46
+            t.job_date DESC, t.job_time DESC
47 47
     </sql>
48 48
 
49 49
     <select id="statisOrgBy" resultType="com.yunzhi.nanyang.entity.TaDeviceJob">
50 50
         SELECT
51
-            m.`name` AS org_name,
52
-            n.user_id,
53
-            n.user_name,
54
-            n.phone,
55 51
             s.`name` AS machinery_name,
56 52
             t.*
57 53
         <include refid="statisOrg"></include>
@@ -62,10 +58,6 @@
62 58
     </select>
63 59
     <select id="listOrgBy" resultType="com.yunzhi.nanyang.entity.TaDeviceJob">
64 60
         SELECT
65
-            m.`name` AS org_name,
66
-            n.user_id,
67
-            n.user_name,
68
-            n.phone,
69 61
             s.`name` AS machinery_name,
70 62
             t.*
71 63
         <include refid="statisOrg"></include>