1.修复单据时间查询无效问题

master
x_z 3 years ago
parent 0d62de6925
commit dc81571cde

@ -91,13 +91,21 @@ public class OrderService {
* @return
*/
private static QueryWrapper<OrderEntity> buildQueryWrapper(OrderFilterRequest orderFilterRequest) {
if (null != orderFilterRequest) {
if (StrUtil.isNotBlank(orderFilterRequest.getStartTime())) {
orderFilterRequest.setStartTime(DateUtil.parse(orderFilterRequest.getStartTime()).toString(DatePattern.NORM_DATE_PATTERN) + " 00:00:00");
}
if (StrUtil.isNotBlank(orderFilterRequest.getEndTime())) {
orderFilterRequest.setEndTime(DateUtil.parse(orderFilterRequest.getEndTime()).toString(DatePattern.NORM_DATE_PATTERN) + " 23:59:59");
}
}
QueryWrapper<OrderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StrUtil.isNotBlank(orderFilterRequest.getId()), "orderId", orderFilterRequest.getId())
.or(StrUtil.isNotBlank(orderFilterRequest.getId()))
.eq(StrUtil.isNotBlank(orderFilterRequest.getId()),"corpOrderId", orderFilterRequest.getId())
.in(CollUtil.isNotEmpty(orderFilterRequest.getInvCodes()), "locStorageCode", orderFilterRequest.getInvCodes())
.ge(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getStartTime()) ? null : DateUtil.parse(orderFilterRequest.getStartTime()).toString(DatePattern.NORM_DATETIME_PATTERN))
.le(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", StrUtil.isBlank(orderFilterRequest.getEndTime()) ? null : DateUtil.parse(orderFilterRequest.getEndTime()).toString(DatePattern.NORM_DATETIME_PATTERN))
.ge(StrUtil.isNotBlank(orderFilterRequest.getStartTime()), "actDate", orderFilterRequest.getStartTime())
.le(StrUtil.isNotBlank(orderFilterRequest.getEndTime()), "actDate", orderFilterRequest.getEndTime())
.eq(StrUtil.isNotBlank(orderFilterRequest.getIsError()), "status", orderFilterRequest.getStatus())
.eq(StrUtil.isNotBlank(orderFilterRequest.getAction()), "action", orderFilterRequest.getAction())
.ne(StrUtil.isBlank(orderFilterRequest.getAction()), "action", "StockCheck")

Loading…
Cancel
Save