Commit 804e367b by 吕明尚

保洁管理显示订单结束页面

parent 3933280e
package share.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -10,6 +11,7 @@ import share.common.core.domain.BaseEntity;
import share.system.domain.SPack;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
......@@ -109,6 +111,15 @@ public class SRoomVo extends BaseEntity
*/
private Long recordsId;
/**
* 订单时间
*/
/**
* 结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date recordsTime;
/** 门店名称 */
......
......@@ -339,6 +339,13 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
List<Long> roomIdList = Optional.ofNullable(sRoomVoList).orElse(new ArrayList<>()).stream().map(SRoomVo::getId).collect(Collectors.toList());
List<SCleanRecords> sCleanRecordsList = cleanRecordsService.unCleanedListByRoomIds(roomIdList);
Map<Long,List<SCleanRecords>> recordsMap = Optional.ofNullable(sCleanRecordsList).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(SCleanRecords::getRoomId));
LambdaQueryWrapper<SOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SOrder::getStoreId, storeIdList);
wrapper.in(SOrder::getRoomId, roomIdList);
wrapper.eq(SOrder::getStatus, OrderStatusEnum.INUSE.getCode());
//正序
wrapper.orderByAsc(SOrder::getEndDate);
List<SOrder> list = orderService.list(wrapper);
Optional.ofNullable(storeList).orElse(new ArrayList<>()).forEach(item -> {
item.setRoolList(roomMap.get(item.getId()));
item.getRoolList().forEach(room -> {
......@@ -350,6 +357,13 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
}
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(order -> {
if (order.getRoomId().compareTo(room.getId()) == 0) {
room.setRecordsTime(order.getEndDate());
}
});
}
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment