Browse Source

app增加处理中的状态

yuejiaying 4 years ago
parent
commit
34ebc0a13c

+ 14 - 2
operation_manager/src/main/java/com/huaxu/order/controller/WorkOrderManageController.java

@@ -156,7 +156,7 @@ public class WorkOrderManageController {
             @ApiParam(value = "1任务、2工单", required = true) @RequestParam Integer flowType,
             @ApiParam(value = "任务、工单id", required = true) @RequestParam Integer flowId,
             @ApiParam(value = "处理结果", required = true) @RequestParam String flowResult,
-            @ApiParam(value = "1通过、2同意(暂时不用)、3驳回、4漏点定位、5停水、6提交、7拒单", required = true) @RequestParam Integer actionId) {
+            @ApiParam(value = "1通过、2同意(暂时不用)、3驳回、4漏点定位、5停水、6提交、7拒单、8接单", required = true) @RequestParam Integer actionId) {
         LoginUser currentUser = UserUtil.getCurrentUser();
 
         WorkFlowLog workFlowLog=new WorkFlowLog();
@@ -170,7 +170,7 @@ public class WorkOrderManageController {
 
         //流程流转 更新当前任务状态
         Action action=null;
-        if(actionId==1||actionId==6){
+        if(actionId==1||actionId==6||actionId==8){
             action=Action.ACTION_AUDIT;
         }else if(actionId==2){
             action=Action.ACTION_RECEIVE;
@@ -191,6 +191,11 @@ public class WorkOrderManageController {
                 plan.setCurrentTaskName(handleResult.size()>0?handleResult.get(0).getCurrentTaskName():null);
                 plan.setUpdateBy(currentUser.getId().toString());
                 plan.setDateUpdate(new Date());
+                if(actionId==6){
+                    plan.setInProcessStatus(2);
+                }else if(actionId==1){
+                    plan.setInProcessStatus(3);
+                }
                 if(handleResult.size()==0||handleResult==null) {
                     plan.setPlanStatus(2);
                     plan.setPlanEndDate(new Date());
@@ -250,6 +255,13 @@ public class WorkOrderManageController {
                 order.setCurrentTaskName(handleResult.size()>0?handleResult.get(0).getCurrentTaskName():null);
                 order.setUpdateBy(currentUser.getId().toString());
                 order.setDateUpdate(new Date());
+                if(actionId==6){
+                    order.setInProcessStatus(2);
+                }else if(actionId==8){
+                    order.setInProcessStatus(1);
+                }else if(actionId==1){
+                    order.setInProcessStatus(3);
+                }
                 if(handleResult.size()==0||handleResult==null) {
                     order.setOrderStatus(2);
                     order.setFinishDate(new Date());

+ 3 - 0
operation_manager/src/main/java/com/huaxu/order/entity/WorkOrderManage.java

@@ -135,4 +135,7 @@ public class WorkOrderManage implements Serializable {
 
     @ApiModelProperty(value = "场景名称")
     private String scenesName;
+
+    @ApiModelProperty(value = "处理中状态(null未接单、1已接单、2已提交、3已审核)")
+    private Integer inProcessStatus;
 }

+ 3 - 0
operation_manager/src/main/java/com/huaxu/task/entity/PlanManage.java

@@ -107,5 +107,8 @@ public class PlanManage implements Serializable {
     @ApiModelProperty(value = "签到坐标点")
     private String taskChecked;
 
+    @ApiModelProperty(value = "处理中状态(null未提交、2已提交、3已审核)")
+    private Integer inProcessStatus;
+
     private static final long serialVersionUID = 1L;
 }

+ 11 - 6
operation_manager/src/main/resources/mapper/order/WorkOrderManageMapper.xml

@@ -43,6 +43,7 @@
     <result column="scenes_name" property="scenesName" jdbcType="VARCHAR" />
     <result column="order_status_name" property="orderStatusName" jdbcType="VARCHAR" />
     <result column="order_count" property="orderCount" jdbcType="VARCHAR" />
+    <result column="in_process_status" property="inProcessStatus" jdbcType="INTEGER" />
   </resultMap>
 
   <resultMap id="workFlowLogResultMap" type="com.huaxu.order.entity.WorkFlowLog">
@@ -93,7 +94,7 @@
     department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id, 
     process_instance_id, process_def_id, current_task_id, current_users, current_task_name, 
     create_by, date_create, update_by, date_update, geo,videos, pictures, device_id, scenes_id,
-    device_name, scenes_name
+    device_name, scenes_name,in_process_status
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select
@@ -465,6 +466,9 @@
       <if test="pictures != null" >
         pictures=#{pictures,jdbcType=VARCHAR},
       </if>
+      <if test="inProcessStatus != null" >
+        in_process_status=#{inProcessStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -501,21 +505,22 @@
       date_update = #{dateUpdate,jdbcType=TIMESTAMP},
       geo = #{geo,jdbcType=VARCHAR},
       videos = #{videos,jdbcType=VARCHAR},
-      pictures = #{pictures,jdbcType=VARCHAR}
+      pictures = #{pictures,jdbcType=VARCHAR},
+      in_process_status=#{inProcessStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectAppTodo" resultMap="BaseResultMap">
-    select id,task_no,send_time,address,order_type_id,create_by,update_by,task_desc,order_status,current_task_name
+    select id,task_no,send_time,address,order_type_id,create_by,update_by,task_desc,order_status,current_task_name,in_process_status
     from sc_work_order_manage
     where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
     union
-    select id,plan_id,plan_date,task_area_name,task_type,create_by,update_by,task_content,plan_status,current_task_name
+    select id,plan_id,plan_date,task_area_name,task_type,create_by,update_by,task_content,plan_status,current_task_name,in_process_status
     from sc_plan_manage
     where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
     order by send_time desc
   </select>
   <select id="selectAppAll" resultMap="BaseResultMap">
-    select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status
+    select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status,in_process_status
     from sc_work_order_manage t1
     left join sc_work_flow_log t2 ON t1.id=t2.flow_id and flow_type=2 and find_in_set(#{userId},handle_user_id) and left(flow_result,2)='拒单'
     where (find_in_set(#{userId},current_users)
@@ -523,7 +528,7 @@
      and tenant_id = #{tenantId}
      and (t2.id is null or t1.order_user_id=t2.handle_user_id)
     union
-    select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status
+    select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status,in_process_status
     from sc_plan_manage
     where (find_in_set(#{userId},current_users)
      or id in(select flow_id from sc_work_flow_log where flow_type=1 and find_in_set(#{userId},handle_user_id)))

+ 7 - 2
operation_manager/src/main/resources/mapper/task/PlanManageMapper.xml

@@ -31,6 +31,7 @@
     <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
     <result column="task_count" property="taskCount" jdbcType="VARCHAR" />
     <result column="finished_count" property="finishedCount" jdbcType="VARCHAR" />
+    <result column="in_process_status" property="inProcessStatus" jdbcType="INTEGER" />
   </resultMap>
 
   <resultMap id="workFlowLogResultMap" type="com.huaxu.order.entity.WorkFlowLog">
@@ -81,7 +82,7 @@
     task_content, task_area_shape, task_area_name, task_type, plan_status, tenant_id, 
     process_instance_id, process_def_id, current_task_id, current_users, current_task_name, 
     create_by, date_create, update_by, date_update, company_org_id, department_org_id,
-    task_checked
+    task_checked,in_process_status
   </sql>
 
   <select id="getWorkFlowLog" resultMap="workFlowLogResultMap" parameterType="map">
@@ -352,6 +353,9 @@
       <if test="taskChecked != null" >
         task_checked = #{taskChecked,jdbcType=LONGVARCHAR},
       </if>
+      <if test="inProcessStatus != null" >
+        in_process_status = #{inProcessStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -382,7 +386,8 @@
       date_update = #{dateUpdate,jdbcType=TIMESTAMP},
       company_org_id = #{companyOrgId,jdbcType=VARCHAR},
       department_org_id = #{departmentOrgId,jdbcType=VARCHAR},
-      task_checked = #{taskChecked,jdbcType=LONGVARCHAR}
+      task_checked = #{taskChecked,jdbcType=LONGVARCHAR},
+      in_process_status = #{inProcessStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>