张延森 3 years ago
parent
commit
60a244591d

+ 3
- 1
src/main/java/com/yunzhi/nanyang/controller/TaWorkJobController.java View File

107
             return ResponseBean.error("非工作状态, 不能操作");
107
             return ResponseBean.error("非工作状态, 不能操作");
108
         }
108
         }
109
 
109
 
110
-        int status = mode ? Constants.WORK_DOING : Constants.WORK_PAUSE;
110
+//        int status = mode ? Constants.WORK_DOING : Constants.WORK_PAUSE;
111
+        int status = Constants.WORK_DOING;
111
 
112
 
112
         taWorkJob.setStatus(status);
113
         taWorkJob.setStatus(status);
114
+        taWorkJob.setStartDate(LocalDateTime.now());
113
 
115
 
114
         // 联动状态
116
         // 联动状态
115
         iTaOrderService.updateStatus(taWorkJob.getOrderId(), "work_status", Constants.WORK_DOING);
117
         iTaOrderService.updateStatus(taWorkJob.getOrderId(), "work_status", Constants.WORK_DOING);

+ 2
- 2
src/main/resources/mapper/TaMachineryMapper.xml View File

11
                      fn_distance ( t.location, #{location} ) AS distance
11
                      fn_distance ( t.location, #{location} ) AS distance
12
                 FROM ta_machinery t
12
                 FROM ta_machinery t
13
                 WHERE
13
                 WHERE
14
-                      t.`status` = 1
14
+                      t.`status` > -1
15
                 <if test="orgId != null and orgId != ''">
15
                 <if test="orgId != null and orgId != ''">
16
                     AND t.org_id = #{orgId}
16
                     AND t.org_id = #{orgId}
17
                 </if>
17
                 </if>
32
         INNER JOIN ta_org s on t.org_id = s.org_id
32
         INNER JOIN ta_org s on t.org_id = s.org_id
33
         WHERE
33
         WHERE
34
             t.machinery_id = #{machineryId}
34
             t.machinery_id = #{machineryId}
35
-            AND t.`status` = 1
35
+            AND t.`status` &gt; -1
36
     </select>
36
     </select>
37
     <select id="getOneOfTypes" resultType="com.yunzhi.nanyang.vo.MachineSummary">
37
     <select id="getOneOfTypes" resultType="com.yunzhi.nanyang.vo.MachineSummary">
38
         SELECT
38
         SELECT