Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b39daaac
authored
Oct 12, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(工程师动态): 【ID1003746】 博西PEA_V1.0-工作台-工单详情:查看工程师动态弹窗页面报“服务器错误,请联系管理员”
日期查询参数类型与数据库类型不匹配, 造成非法参数错误
1 parent
47ca8aea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.java
View file @
b39daaa
...
...
@@ -2,9 +2,16 @@ package com.dituhui.pea.order.service.impl;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.TimeUtils
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dao.EngineerInfoDao
;
import
com.dituhui.pea.order.dao.OrderInfoDao
;
import
com.dituhui.pea.order.dao.OrgGroupDao
;
import
com.dituhui.pea.order.dao.OrgWarehouseInfoDao
;
import
com.dituhui.pea.order.dto.EngineerTimelineResp
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.entity.EngineerInfoEntity
;
import
com.dituhui.pea.order.entity.OrderEventEntity
;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.entity.OrgGroupEntity
;
import
com.dituhui.pea.order.entity.OrgWarehouseInfoEntity
;
import
com.dituhui.pea.order.service.EngineerTimelineService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -17,7 +24,15 @@ import javax.persistence.criteria.CriteriaQuery;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
...
...
@@ -87,8 +102,9 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
List
<
Predicate
>
predicates
=
new
ArrayList
<>();
predicates
.
add
(
root
.
get
(
"orderId"
).
in
(
orderIds
));
predicates
.
add
(
criteriaBuilder
.
greaterThanOrEqualTo
(
root
.
get
(
"happen"
),
date
+
" 00:00:00"
));
predicates
.
add
(
criteriaBuilder
.
lessThanOrEqualTo
(
root
.
get
(
"happen"
),
date
+
" 23:59:59"
));
LocalDate
paramLocalDate
=
LocalDate
.
parse
(
date
);
predicates
.
add
(
criteriaBuilder
.
greaterThanOrEqualTo
(
root
.
get
(
"happen"
),
LocalDateTime
.
of
(
paramLocalDate
,
LocalTime
.
MIN
)));
predicates
.
add
(
criteriaBuilder
.
lessThanOrEqualTo
(
root
.
get
(
"happen"
),
LocalDateTime
.
of
(
paramLocalDate
,
LocalTime
.
MAX
)));
predicates
.
add
(
root
.
get
(
"event"
).
in
(
events
));
criteriaQuery
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
]));
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment