Browse Source

添加按创建时间倒序排序

tags/v1.0.0^2^2
chengwang 1 year ago
parent
commit
abb993da06
2 changed files with 12 additions and 6 deletions
  1. +6
    -3
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java
  2. +6
    -3
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 6
- 3
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java View File

IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery() IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery()
.eq(InspectionFile::getInspectionId, query.getInspectionId()) .eq(InspectionFile::getInspectionId, query.getInspectionId())
.eq(InspectionFile::getMark, 1) .eq(InspectionFile::getMark, 1)
.eq(InspectionFile::getStatus, 5));
.eq(InspectionFile::getStatus, 5)
.orderByDesc(InspectionFile::getCheckTime));
IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result); IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result);


return JsonResult.success(pageData); return JsonResult.success(pageData);
IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery() IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery()
.eq(InspectionFile::getInspectionId, query.getInspectionId()) .eq(InspectionFile::getInspectionId, query.getInspectionId())
.eq(InspectionFile::getMark, 1) .eq(InspectionFile::getMark, 1)
.eq(InspectionFile::getStatus, 15));
.eq(InspectionFile::getStatus, 15)
.orderByDesc(InspectionFile::getCheckTime));
IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result); IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result);


return JsonResult.success(pageData); return JsonResult.success(pageData);
IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery() IPage<InspectionFile> result = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery()
.eq(InspectionFile::getInspectionId, query.getInspectionId()) .eq(InspectionFile::getInspectionId, query.getInspectionId())
.eq(InspectionFile::getMark, 1) .eq(InspectionFile::getMark, 1)
.eq(InspectionFile::getStatus, 10));
.eq(InspectionFile::getStatus, 10)
.orderByDesc(InspectionFile::getCheckTime));
IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result); IPage<InspectionFileInfoVo> pageData = getInspectionFileInfoVoIPage(inspection, result);


return JsonResult.success(pageData); return JsonResult.success(pageData);

+ 6
- 3
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java View File

.like(StringUtils.isNotEmpty(user.getId()), WorkOrder::getAssignUser, user.getId()) .like(StringUtils.isNotEmpty(user.getId()), WorkOrder::getAssignUser, user.getId())
.eq(WorkOrder::getTenantId, tenantId) .eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime()) .between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
.eq(WorkOrder::getMark, 1));
.eq(WorkOrder::getMark, 1)
.orderByDesc(WorkOrder::getCreateTime));
if (null == workPageData.getRecords()) { if (null == workPageData.getRecords()) {
return null; return null;
} }
.eq(WorkOrder::getStatus, 15) .eq(WorkOrder::getStatus, 15)
.eq(WorkOrder::getTenantId, tenantId) .eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime()) .between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
.eq(WorkOrder::getMark, 1));
.eq(WorkOrder::getMark, 1)
.orderByDesc(WorkOrder::getCreateTime));
//设置每条工单对应的已完成问题数量 问题状态为25问题已处理 //设置每条工单对应的已完成问题数量 问题状态为25问题已处理
List<WorkOrderInfoVo> collect = workPageData.getRecords().stream().map(s -> { List<WorkOrderInfoVo> collect = workPageData.getRecords().stream().map(s -> {
WorkOrderInfoVo vo = new WorkOrderInfoVo(); WorkOrderInfoVo vo = new WorkOrderInfoVo();
.like(StringUtils.isNotEmpty(user.getId()), WorkOrder::getAssignUser, user.getId()) .like(StringUtils.isNotEmpty(user.getId()), WorkOrder::getAssignUser, user.getId())
.eq(WorkOrder::getTenantId, tenantId) .eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime()) .between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
.eq(WorkOrder::getMark, 1));
.eq(WorkOrder::getMark, 1)
.orderByDesc(WorkOrder::getCreateTime));
//设置每条工单对应的状态问题数量 //设置每条工单对应的状态问题数量
List<WorkOrderInfoVo> collect1 = workPageData1.getRecords().stream().map(g -> { List<WorkOrderInfoVo> collect1 = workPageData1.getRecords().stream().map(g -> {
WorkOrderInfoVo vo = new WorkOrderInfoVo(); WorkOrderInfoVo vo = new WorkOrderInfoVo();

Loading…
Cancel
Save