Browse Source

修改 获取工单列表(分页) 接口

tags/v1.1.0^2
wanghaoran 1 year ago
parent
commit
ebd0853a77
2 changed files with 7 additions and 0 deletions
  1. +5
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/WorkOrderRequest.java
  2. +2
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java

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

@@ -41,4 +41,9 @@ public class WorkOrderRequest extends BaseQuery implements Serializable {
*/
private List<Integer> handleUserList;

/**
* 处理标识,为1时,查询分配给当前登录人的数据
*/
private Integer handleFlag;

}

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

@@ -80,6 +80,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
.like(StringUtils.isNotEmpty(request.getCode()), WorkOrder::getCode, request.getCode())
.eq(ObjectUtil.isNotEmpty(request.getStatus()), WorkOrder::getStatus, request.getStatus())
.between(ObjectUtil.isNotNull(startDate),WorkOrder::getCreateTime, startDate, endDate)
.apply(1 == request.getHandleFlag(),"FIND_IN_SET(" + ShiroUtils.getUserId()+",assign_user)")
.eq(WorkOrder::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(WorkOrder::getCreateTime));

@@ -175,6 +176,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
WorkOrder workOrder = new WorkOrder();
workOrder.setId(request.getWorkOrderId());
workOrder.setStatus(WorkOrderStatusEnum.COMPLETED.getCode());
workOrder.setFinishTime(new Date());
workOrderMapper.updateById(workOrder);
}
return JsonResult.success();

Loading…
Cancel
Save