lvzhikai лет назад: 5
Родитель
Сommit
1e0491afd4

+ 9 - 1
src/main/java/com/chinaitop/depot/supervise/controller/CcZyController.java

@@ -48,16 +48,24 @@ public class CcZyController {
48 48
             @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
49 49
             @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
50 50
             @ApiImplicitParam(name = "houseId", value = "仓房ID", paramType = "query"),
51
+            @ApiImplicitParam(name = "houseCode", value = "仓房Code", paramType = "query"),
52
+            @ApiImplicitParam(name = "homeworkType", value = "作业类型", paramType = "query"),
51 53
             @ApiImplicitParam(name = "startDate", value = "作业开始时间", paramType = "query"),
52 54
             @ApiImplicitParam(name = "endDate", value = "作业结束时间", paramType = "query")
53 55
     })
54
-    public PageInfo<Map<String,Object>> getCcZyList(Integer pageNum, Integer pageSize,Integer houseId,String startDate,String endDate){
56
+    public PageInfo<Map<String,Object>> getCcZyList(Integer pageNum, Integer pageSize,Integer houseId,String houseCode,String homeworkType,String startDate,String endDate){
55 57
 
56 58
         Map<String,Object> map = new HashMap<>();
57 59
 
58 60
         if(ParameterUtil.isnotnull(houseId)){
59 61
             map.put("houseId",houseId);
60 62
         }
63
+        if(ParameterUtil.isnotnull(houseCode)){
64
+            map.put("houseCode",houseCode);
65
+        }
66
+        if(ParameterUtil.isnotnull(homeworkType)){
67
+            map.put("homeworkType",homeworkType);
68
+        }
61 69
         if(ParameterUtil.isnotnull(startDate)){
62 70
             map.put("startTime",startDate);
63 71
         }

+ 9 - 3
src/main/java/com/chinaitop/depot/supervise/mapper/CcZyMapper.xml

@@ -15,8 +15,8 @@
15 15
 	LEFT JOIN t_job_application tja ON tf.aeration_plan_number = tja.areation_plan_number
16 16
 	WHERE
17 17
 		tf.task_start_time IS NOT NULL
18
-      <if test="houseId != null">
19
-          and tf.house_id = #{houseId,jdbcType=INTEGER}
18
+      <if test="houseCode != null">
19
+          and tja.v_cf_code = #{houseCode,jdbcType=INTEGER}
20 20
       </if>
21 21
       <if test="startTime != null">
22 22
           and tf.task_start_time &gt;= #{startTime,jdbcType=TIMESTAMP}
@@ -24,6 +24,9 @@
24 24
       <if test="endTime != null">
25 25
           and tf.task_end_time &lt;= #{endTime,jdbcType=TIMESTAMP}
26 26
       </if>
27
+      <if test="homeworkType != null">
28
+          and 1 = #{homeworkType,jdbcType=VARCHAR}
29
+      </if>
27 30
     UNION ALL
28 31
         SELECT
29 32
 			xz.id,
@@ -37,7 +40,7 @@
37 40
 			t_fumigation_plan xz
38 41
 		LEFT JOIN t_fumigation_process tfp ON xz.id = tfp.fumigation_id
39 42
 		WHERE
40
-			xz.updatetime IS NOT NULL and xz.state=5
43
+			xz.updatetime IS NOT NULL and xz.state=6
41 44
       <if test="houseId != null">
42 45
           AND xz.house_id = #{houseId,jdbcType=INTEGER}
43 46
       </if>
@@ -47,6 +50,9 @@
47 50
       <if test="endTime != null">
48 51
           AND tfp.task_end_time &lt;= #{endTime,jdbcType=TIMESTAMP}
49 52
       </if>
53
+      <if test="homeworkType != null">
54
+          and 2 = #{homeworkType,jdbcType=VARCHAR}
55
+      </if>
50 56
   </select>
51 57
   <select id="selectById" parameterType="java.lang.Integer" resultType="java.util.HashMap">
52 58
     SELECT