Yansen 2 年之前
父節點
當前提交
bab8710cad

+ 1
- 1
pom.xml 查看文件

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

+ 1
- 1
src/main/java/com/yunzhi/nanyang/controller/TaDeviceJobController.java 查看文件

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

+ 3
- 3
src/main/java/com/yunzhi/nanyang/entity/TaDeviceJob.java 查看文件

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

二進制
src/main/resources/job.xlsx 查看文件


+ 7
- 15
src/main/resources/mapper/TaDeviceJobMapper.xml 查看文件

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