Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
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
station
YeeAmosFireAutoSysRoot
Commits
758842b4
Commit
758842b4
authored
Feb 26, 2020
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询关联点列表接口
parent
9f881e0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
36 deletions
+57
-36
PointListParam.java
...a/com/yeejoin/amos/fas/business/param/PointListParam.java
+10
-0
QueryParamUtil.java
...a/com/yeejoin/amos/fas/business/param/QueryParamUtil.java
+37
-36
dbTemplate_common.xml
...sStart/src/main/resources/db/mapper/dbTemplate_common.xml
+10
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/PointListParam.java
View file @
758842b4
...
...
@@ -36,6 +36,8 @@ public class PointListParam extends CommonPageable{
*/
private
String
orgCode
;
private
String
[]
bindingPointIds
;
public
String
getPointNo
()
{
return
pointNo
;
}
...
...
@@ -91,4 +93,12 @@ public class PointListParam extends CommonPageable{
public
void
setFmeaId
(
Long
fmeaId
)
{
this
.
fmeaId
=
fmeaId
;
}
public
String
[]
getBindingPointIds
()
{
return
bindingPointIds
;
}
public
void
setBindingPointIds
(
String
[]
bindingPointIds
)
{
this
.
bindingPointIds
=
bindingPointIds
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/QueryParamUtil.java
View file @
758842b4
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
...
...
@@ -8,39 +7,41 @@ import com.yeejoin.amos.fas.core.common.request.CommonRequest;
public
class
QueryParamUtil
{
public
static
PointListParam
fillPointListParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
PointListParam
param
)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
value
=
toString
(
queryRequests
.
get
(
i
).
getValue
());
if
(
"departmentId"
.
equals
(
name
))
{
param
.
setDepartmentId
(
Long
.
valueOf
(
value
));
}
else
if
(
"pointNo"
.
equals
(
name
)){
param
.
setPointNo
(
value
);
}
else
if
(
"pointName"
.
equals
(
name
)){
param
.
setPointName
(
value
);
}
else
if
(
"pointId"
.
equals
(
name
)){
param
.
setPointId
(
Long
.
valueOf
(
value
));
}
else
if
(
"inputType"
.
equals
(
name
)){
param
.
setInputType
(
value
);
}
else
if
(
"fmeaId"
.
equals
(
name
)){
param
.
setFmeaId
(
Long
.
valueOf
(
value
));
}
}
if
(
commonPageable
!=
null
)
{
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
return
param
;
}
private
static
String
toString
(
Object
value
)
{
if
(
null
==
value
||
value
==
""
)
{
return
null
;
}
else
{
return
value
.
toString
();
}
}
public
static
PointListParam
fillPointListParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
PointListParam
param
)
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
String
value
=
toString
(
queryRequests
.
get
(
i
).
getValue
());
if
(
"departmentId"
.
equals
(
name
))
{
param
.
setDepartmentId
(
Long
.
valueOf
(
value
));
}
else
if
(
"pointNo"
.
equals
(
name
))
{
param
.
setPointNo
(
value
);
}
else
if
(
"pointName"
.
equals
(
name
))
{
param
.
setPointName
(
value
);
}
else
if
(
"pointId"
.
equals
(
name
))
{
param
.
setPointId
(
Long
.
valueOf
(
value
));
}
else
if
(
"inputType"
.
equals
(
name
))
{
param
.
setInputType
(
value
);
}
else
if
(
"fmeaId"
.
equals
(
name
))
{
param
.
setFmeaId
(
Long
.
valueOf
(
value
));
}
else
if
(
"bindPointIds"
.
equals
(
name
))
{
param
.
setBindingPointIds
(
value
.
split
(
","
));
}
}
if
(
commonPageable
!=
null
)
{
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
return
param
;
}
private
static
String
toString
(
Object
value
)
{
if
(
null
==
value
||
value
==
""
)
{
return
null
;
}
else
{
return
value
.
toString
();
}
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_common.xml
View file @
758842b4
...
...
@@ -13,6 +13,11 @@
<if
test=
"pointNo!=null"
>
and p.point_no like concat(concat("%",#{pointNo}),"%")
</if>
<if
test=
"pointId!=null"
>
and p.id = #{pointId}
</if>
<if
test=
"pointName!=null"
>
and p.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"bindingPointIds!=null"
>
and p.id not in
<foreach
collection=
"bindingPointIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
</select>
<select
id=
"getPointList"
resultType=
"java.util.HashMap"
>
SELECT
...
...
@@ -27,6 +32,11 @@
<if
test=
"pointNo!=null"
>
and p.point_no like concat(concat("%",#{pointNo}),"%")
</if>
<if
test=
"pointId!=null"
>
and p.id = #{pointId}
</if>
<if
test=
"pointName!=null"
>
and p.name like concat(concat("%",#{pointName}),"%")
</if>
<if
test=
"bindingPointIds!=null"
>
and p.id not in
<foreach
collection=
"bindingPointIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
order by p.point_no
<choose>
<when
test=
"pageSize==-1"
></when>
...
...
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