Commit 758842b4 authored by taabe's avatar taabe

修改查询关联点列表接口

parent 9f881e0a
...@@ -36,6 +36,8 @@ public class PointListParam extends CommonPageable{ ...@@ -36,6 +36,8 @@ public class PointListParam extends CommonPageable{
*/ */
private String orgCode; private String orgCode;
private String[] bindingPointIds;
public String getPointNo() { public String getPointNo() {
return pointNo; return pointNo;
} }
...@@ -91,4 +93,12 @@ public class PointListParam extends CommonPageable{ ...@@ -91,4 +93,12 @@ public class PointListParam extends CommonPageable{
public void setFmeaId(Long fmeaId) { public void setFmeaId(Long fmeaId) {
this.fmeaId = fmeaId; this.fmeaId = fmeaId;
} }
public String[] getBindingPointIds() {
return bindingPointIds;
}
public void setBindingPointIds(String[] bindingPointIds) {
this.bindingPointIds = bindingPointIds;
}
} }
package com.yeejoin.amos.fas.business.param; package com.yeejoin.amos.fas.business.param;
import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yeejoin.amos.fas.core.common.request.CommonPageable; import com.yeejoin.amos.fas.core.common.request.CommonPageable;
...@@ -17,16 +16,18 @@ public class QueryParamUtil { ...@@ -17,16 +16,18 @@ public class QueryParamUtil {
String value = toString(queryRequests.get(i).getValue()); String value = toString(queryRequests.get(i).getValue());
if ("departmentId".equals(name)) { if ("departmentId".equals(name)) {
param.setDepartmentId(Long.valueOf(value)); param.setDepartmentId(Long.valueOf(value));
}else if("pointNo".equals(name)){ } else if ("pointNo".equals(name)) {
param.setPointNo(value); param.setPointNo(value);
}else if("pointName".equals(name)){ } else if ("pointName".equals(name)) {
param.setPointName(value); param.setPointName(value);
}else if("pointId".equals(name)){ } else if ("pointId".equals(name)) {
param.setPointId(Long.valueOf(value)); param.setPointId(Long.valueOf(value));
}else if("inputType".equals(name)){ } else if ("inputType".equals(name)) {
param.setInputType(value); param.setInputType(value);
}else if("fmeaId".equals(name)){ } else if ("fmeaId".equals(name)) {
param.setFmeaId(Long.valueOf(value)); param.setFmeaId(Long.valueOf(value));
} else if ("bindPointIds".equals(name)) {
param.setBindingPointIds(value.split(","));
} }
} }
if (commonPageable != null) { if (commonPageable != null) {
......
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
<if test="pointNo!=null"> and p.point_no like concat(concat("%",#{pointNo}),"%") </if> <if test="pointNo!=null"> and p.point_no like concat(concat("%",#{pointNo}),"%") </if>
<if test="pointId!=null"> and p.id = #{pointId} </if> <if test="pointId!=null"> and p.id = #{pointId} </if>
<if test="pointName!=null"> and p.name like concat(concat("%",#{pointName}),"%")</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>
<select id="getPointList" resultType="java.util.HashMap"> <select id="getPointList" resultType="java.util.HashMap">
SELECT SELECT
...@@ -27,6 +32,11 @@ ...@@ -27,6 +32,11 @@
<if test="pointNo!=null"> and p.point_no like concat(concat("%",#{pointNo}),"%") </if> <if test="pointNo!=null"> and p.point_no like concat(concat("%",#{pointNo}),"%") </if>
<if test="pointId!=null"> and p.id = #{pointId} </if> <if test="pointId!=null"> and p.id = #{pointId} </if>
<if test="pointName!=null"> and p.name like concat(concat("%",#{pointName}),"%")</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 order by p.point_no
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
......
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