Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
234fb62a
由
张雷
编写于
2023-02-06 14:40:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
孪生体筛选问题修改
1 个父辈
432e1897
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
56 行增加
和
1 行删除
fm-product/src/main/java/com/skua/modules/twin/mapper/FmTwinManageMapper.java
fm-product/src/main/java/com/skua/modules/twin/mapper/xml/FmTwinManageMapper.xml
fm-product/src/main/java/com/skua/modules/twin/service/impl/FmTwinServiceImpl.java
fm-product/src/main/java/com/skua/modules/twin/mapper/FmTwinManageMapper.java
查看文件 @
234fb62
...
...
@@ -21,4 +21,7 @@ public interface FmTwinManageMapper extends BaseMapper<FmTwinManage> {
@Param
(
"twinType"
)
String
twinType
,
@Param
(
"twinName"
)
String
twinName
);
FmTwinManage
getOneByTwinId
(
@Param
(
"twinId"
)
String
twinId
,
@Param
(
"projectId"
)
String
projectId
);
List
<
FmTwinSqlResult
>
getListNoBound
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"twinType"
)
String
twinType
,
@Param
(
"twinName"
)
String
twinName
);
}
...
...
fm-product/src/main/java/com/skua/modules/twin/mapper/xml/FmTwinManageMapper.xml
查看文件 @
234fb62
...
...
@@ -36,6 +36,53 @@
</if>
</select>
<select
id=
"getListNoBound"
resultType=
"com.skua.modules.twin.vo.FmTwinSqlResult"
>
SELECT
a.id,
a.twin_id,
a.twin_name,
a.twin_type,
a.project_id,
a.loca_x,
a.loca_y,
a.loca_z,
a.rotate_x,
a.rotate_y,
a.rotate_z
FROM
(
SELECT
fe.twin_id AS equip_twin_id,
fm.id,
fm.twin_id,
fm.twin_name,
fm.twin_type,
fm.project_id,
l.loca_x,
l.loca_y,
l.loca_z,
l.rotate_x,
l.rotate_y,
l.rotate_z
FROM
fm_twin_manage fm
LEFT JOIN fm_twin_equip fe ON fm.twin_id = fe.twin_id
LEFT JOIN fm_twin_location l ON fm.twin_id = l.twin_id
WHERE
fm.project_id = #{projectId}
AND fm.twin_type = '设备'
AND fm.del_flag = '1'
) a
WHERE
a.equip_twin_id IS NULL
<if
test=
"twinType!=null and twinType!=''"
>
AND a.twin_type = #{twinType}
</if>
<if
test=
"twinName!=null and twinName!=''"
>
AND a.twin_name LIKE CONCAT(CONCAT('%', #{twinName}),'%')
</if>
</select>
<select
id=
"getOneByTwinId"
resultType=
"com.skua.modules.twin.entity.FmTwinManage"
>
select * from fm_twin_manage where twin_id = #{twinId} and project_id = #{projectId} limit 1
</select>
...
...
fm-product/src/main/java/com/skua/modules/twin/service/impl/FmTwinServiceImpl.java
查看文件 @
234fb62
...
...
@@ -53,7 +53,12 @@ public class FmTwinServiceImpl implements IFmTwinService {
@Override
public
List
<
FmTwinResultVO
>
queryList
(
FmTwinQueryVO
fmTwinQueryVO
)
{
List
<
FmTwinResultVO
>
list
=
new
ArrayList
<>();
List
<
FmTwinSqlResult
>
sqlList
=
fmTwinManageMapper
.
getSqlList
(
fmTwinQueryVO
.
getProjectId
(),
fmTwinQueryVO
.
getType
(),
fmTwinQueryVO
.
getKeyword
());
List
<
FmTwinSqlResult
>
sqlList
=
new
ArrayList
<>();
if
(
"false"
.
equals
(
fmTwinQueryVO
.
getUnbound
())){
sqlList
=
fmTwinManageMapper
.
getListNoBound
(
fmTwinQueryVO
.
getProjectId
(),
fmTwinQueryVO
.
getType
(),
fmTwinQueryVO
.
getKeyword
());
}
else
{
sqlList
=
fmTwinManageMapper
.
getSqlList
(
fmTwinQueryVO
.
getProjectId
(),
fmTwinQueryVO
.
getType
(),
fmTwinQueryVO
.
getKeyword
());
}
for
(
FmTwinSqlResult
twinSqlResult
:
sqlList
)
{
FmTwinResultVO
twinResultVO
=
new
FmTwinResultVO
();
FmTwinLocationEntity
twinLocation
=
new
FmTwinLocationEntity
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论