Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
佟礼
HYH.APSJ
Commits
f3011df8
Commit
f3011df8
authored
May 28, 2026
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
插单和工单查询
parent
bc529e67
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
169 additions
and
69 deletions
+169
-69
aps.log
logs/aps.log
+106
-66
pom.xml
pom.xml
+11
-1
ConditionEntity.java
src/main/java/com/aps/entity/common/ConditionEntity.java
+13
-2
ChromosomeDataService.java
...in/java/com/aps/service/common/ChromosomeDataService.java
+39
-0
No files found.
logs/aps.log
View file @
f3011df8
This diff is collapsed.
Click to expand it.
pom.xml
View file @
f3011df8
...
...
@@ -132,6 +132,16 @@
<artifactId>
lombok
</artifactId>
</exclude>
</excludes>
<requiresUnpack>
<dependency>
<groupId>
com.google.ortools
</groupId>
<artifactId>
ortools-java
</artifactId>
</dependency>
<dependency>
<groupId>
com.google.ortools
</groupId>
<artifactId>
ortools-linux-x86-64
</artifactId>
</dependency>
</requiresUnpack>
</configuration>
</plugin>
...
...
src/main/java/com/aps/entity/common/ConditionEntity.java
View file @
f3011df8
package
com
.
aps
.
entity
.
common
;
import
java.util.List
;
import
java.util.stream.Collectors
;
public
class
ConditionEntity
{
private
String
fieldName
;
...
...
@@ -22,8 +25,16 @@ public class ConditionEntity {
String
safe
=
fieldValue
.
replaceAll
(
"(?i)(delete|drop|\\s|%|;|or|‘)"
,
""
);
return
safe
;
}
public
void
setFieldValue
(
String
fieldValue
)
{
this
.
fieldValue
=
fieldValue
;
public
void
setFieldValue
(
Object
fieldValue
)
{
if
(
fieldValue
==
null
)
{
this
.
fieldValue
=
null
;
}
else
if
(
fieldValue
instanceof
List
)
{
this
.
fieldValue
=
((
List
<?>)
fieldValue
).
stream
()
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
joining
(
","
));
}
else
{
this
.
fieldValue
=
String
.
valueOf
(
fieldValue
);
}
}
public
String
getConditionalType
()
{
...
...
src/main/java/com/aps/service/common/ChromosomeDataService.java
View file @
f3011df8
...
...
@@ -2192,6 +2192,13 @@ public class ChromosomeDataService {
// 特殊处理时间类型字段
if
(
actualValue
instanceof
LocalDateTime
)
{
LocalDateTime
actualDateTime
=
(
LocalDateTime
)
actualValue
;
if
(
conditionType
==
ConditionEnum
.
Between
)
{
LocalDateTime
[]
range
=
parseDateTimeRange
(
fieldValue
);
if
(
range
!=
null
)
{
// Between用于时间范围筛选时需要精确到时分秒,不能按日期截断。
return
!
actualDateTime
.
isBefore
(
range
[
0
])
&&
!
actualDateTime
.
isAfter
(
range
[
1
]);
}
}
// 尝试解析输入的时间字符串
LocalDateTime
inputDateTime
=
parseDateTimeString
(
fieldValue
);
...
...
@@ -2244,6 +2251,11 @@ public class ChromosomeDataService {
return
compareValues
(
actualValueStr
,
fieldValue
)
<
0
;
case
LessThanOrEqual:
return
compareValues
(
actualValueStr
,
fieldValue
)
<=
0
;
case
Between:
String
[]
range
=
splitBetweenValue
(
fieldValue
);
return
range
!=
null
&&
compareValues
(
actualValueStr
,
range
[
0
])
>=
0
&&
compareValues
(
actualValueStr
,
range
[
1
])
<=
0
;
case
In:
return
Arrays
.
asList
(
fieldValue
.
split
(
","
)).
contains
(
actualValueStr
);
case
NotIn:
...
...
@@ -2261,6 +2273,33 @@ public class ChromosomeDataService {
}
}
private
String
[]
splitBetweenValue
(
String
fieldValue
)
{
if
(
fieldValue
==
null
||
fieldValue
.
trim
().
isEmpty
())
{
return
null
;
}
String
[]
values
=
fieldValue
.
split
(
","
,
2
);
if
(
values
.
length
!=
2
)
{
return
null
;
}
return
new
String
[]{
values
[
0
].
trim
(),
values
[
1
].
trim
()};
}
private
LocalDateTime
[]
parseDateTimeRange
(
String
fieldValue
)
{
String
[]
values
=
splitBetweenValue
(
fieldValue
);
if
(
values
==
null
)
{
return
null
;
}
LocalDateTime
start
=
parseDateTimeString
(
values
[
0
]);
LocalDateTime
end
=
parseDateTimeString
(
values
[
1
]);
if
(
start
==
null
||
end
==
null
)
{
return
null
;
}
if
(
start
.
isAfter
(
end
))
{
return
new
LocalDateTime
[]{
end
,
start
};
}
return
new
LocalDateTime
[]{
start
,
end
};
}
/**
* 解析时间字符串为LocalDateTime(兼容Java 8)
* @param dateTimeStr 时间字符串
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment