Browse Source

分配处理人员 接口

tags/v1.1.0^2
wanghaoran 1 year ago
parent
commit
babb6e9759
4 changed files with 35 additions and 5 deletions
  1. +11
    -5
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/WorkOrderController.java
  2. +11
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/WorkOrderRequest.java
  3. +2
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/IWorkOrderService.java
  4. +11
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java

+ 11
- 5
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/WorkOrderController.java View File

@@ -1,16 +1,12 @@
package com.tuoheng.admin.controller;

import com.tuoheng.admin.entity.request.CallbackRequest;
import com.tuoheng.admin.entity.request.QuestionStatusRequest;
import com.tuoheng.admin.entity.request.WorkOrderRequest;
import com.tuoheng.admin.service.IWorkOrderService;
import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
* 工单表 前端控制器
@@ -45,4 +41,14 @@ public class WorkOrderController {
public JsonResult generate(@PathVariable("ids") Integer[] ids) {
return workOrderService.generate(ids);
}

/**
* 分配处理人员
*
* @return
*/
@PostMapping("/assign")
public JsonResult assign(@RequestBody WorkOrderRequest request) {
return workOrderService.assign(request);
}
}

+ 11
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/WorkOrderRequest.java View File

@@ -4,12 +4,18 @@ import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class WorkOrderRequest extends BaseQuery implements Serializable {

private static final long serialVersionUID = 1L;

/**
* 工单ID
*/
private Integer id;

/**
* 问题工单号
*/
@@ -30,4 +36,9 @@ public class WorkOrderRequest extends BaseQuery implements Serializable {
*/
private String createEndTime;

/**
* 处理人员
*/
private List<Integer> handleUserList;

}

+ 2
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/IWorkOrderService.java View File

@@ -10,4 +10,6 @@ public interface IWorkOrderService extends IBaseService<WorkOrder> {
JsonResult queryPage(WorkOrderRequest request);

JsonResult generate(Integer[] ids);

JsonResult assign(WorkOrderRequest request);
}

+ 11
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java View File

@@ -120,4 +120,15 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
}
return JsonResult.success();
}

@Override
public JsonResult assign(WorkOrderRequest request) {
WorkOrder workOrder = new WorkOrder();
workOrder.setId(request.getId());
workOrder.setStatus(10);
workOrder.setAssignUser(StringUtils.join(request.getHandleUserList(), ","));
workOrder.setAssignTime(new Date());
workOrderMapper.updateById(workOrder);
return JsonResult.success();
}
}

Loading…
Cancel
Save