|
|
@@ -170,6 +170,15 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
//获取分页数据 |
|
|
|
IPage<WorkOrder> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
IPage<WorkOrderInfoVo> pageData = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
//时间处理 |
|
|
|
Date startTime = null; |
|
|
|
Date endTime = null; |
|
|
|
if (StringUtils.isNotEmpty(query.getTime())) { |
|
|
|
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, query.getTime() + " 00:00:00"); |
|
|
|
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, query.getTime() + " 23:59:59"); |
|
|
|
} |
|
|
|
query.setOrderStartTime(startTime); |
|
|
|
query.setOrderEndTime(endTime); |
|
|
|
//根据登录用户判断角色 1超级管理员 2部门管理员 3普通用户 |
|
|
|
Integer type = user.getRoleId(); |
|
|
|
if (RoleEnum.SUPER_ADMIN.getCode() == type) { |
|
|
@@ -249,15 +258,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
pageData.setRecords(WorkOrderInfoList); |
|
|
|
return JsonResult.success(pageData); |
|
|
|
} |
|
|
|
//时间处理 |
|
|
|
Date startTime = null; |
|
|
|
Date endTime = null; |
|
|
|
if (StringUtils.isNotEmpty(query.getTime())) { |
|
|
|
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, query.getTime() + " 00:00:00"); |
|
|
|
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, query.getTime() + " 23:59:59"); |
|
|
|
} |
|
|
|
query.setOrderStartTime(startTime); |
|
|
|
query.setOrderEndTime(endTime); |
|
|
|
|
|
|
|
//用户角色为2部门管理员 3普通用户 |
|
|
|
if (RoleEnum.ADMIN.getCode() == type || RoleEnum.ORDINARY_USER.getCode() == type) { |
|
|
|
String deptId = user.getDeptId(); |