This commit is contained in:
caozehui
2025-04-09 16:16:33 +08:00
parent 0c30603f31
commit b96d0cdeb1
12 changed files with 294 additions and 26 deletions

View File

@@ -2,6 +2,7 @@ package com.njcn.gather.icd.mapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.njcn.gather.icd.pojo.po.PqIcdPath;
import org.apache.ibatis.annotations.Param;
/**
* @author caozehui
@@ -9,5 +10,12 @@ import com.njcn.gather.icd.pojo.po.PqIcdPath;
*/
public interface PqIcdPathMapper extends MPJBaseMapper<PqIcdPath> {
/**
* 根据设备类型id获取Icd
*
* @param devTypeId
* @return
*/
PqIcdPath selectIcdByDevType(@Param("devTypeId") String devTypeId);
}

View File

@@ -3,5 +3,11 @@
<mapper namespace="com.njcn.gather.icd.mapper.PqIcdPathMapper">
<select id="selectIcdByDevType" resultType="com.njcn.gather.icd.pojo.po.PqIcdPath">
select *
from pq_icd_path path
inner join pq_dev_type type on path.id = type.icd
where type.id = #{devTypeId}
</select>
</mapper>

View File

@@ -51,4 +51,12 @@ public interface IPqIcdPathService extends IService<PqIcdPath> {
* @return 成功返回true失败返回false
*/
boolean deleteIcd(List<String> ids);
/**
* 根据设备类型id获取Icd
*
* @param devTypeId
* @return
*/
PqIcdPath getIcdByDevType(String devTypeId);
}

View File

@@ -69,6 +69,11 @@ public class PqIcdPathServiceImpl extends ServiceImpl<PqIcdPathMapper, PqIcdPath
return this.lambdaUpdate().in(PqIcdPath::getId, ids).set(PqIcdPath::getState, DataStateEnum.DELETED.getCode()).update();
}
@Override
public PqIcdPath getIcdByDevType(String devTypeId) {
return this.baseMapper.selectIcdByDevType(devTypeId);
}
private void checkRepeat(PqIcdPathParam param, boolean isExcludeSelf) {
LambdaQueryWrapper<PqIcdPath> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PqIcdPath::getName, param.getName())