Commit f3774e21 authored by linruibiao's avatar linruibiao

接口编写

parent bfa7df25
......@@ -12,10 +12,7 @@ import com.syc.slm.common.core.constant.SlmConstants;
import com.syc.slm.slmbi.dao.InstrumentPanelMapper;
import com.syc.slm.slmbi.dto.QueryInstrumentPanelDTO;
import com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO;
import com.syc.slm.slmbi.entity.BaseEntity;
import com.syc.slm.slmbi.entity.InstrumentPanel;
import com.syc.slm.slmbi.entity.InstrumentPanelDraft;
import com.syc.slm.slmbi.entity.InstrumentPanelTree;
import com.syc.slm.slmbi.entity.*;
import com.syc.slm.slmbi.enums.AccessType;
import com.syc.slm.slmbi.enums.NodeType;
import com.syc.slm.slmbi.enums.PublishedStatus;
......@@ -58,6 +55,9 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe
@Autowired
private InstrumentPanelDraftService draftService;
@Autowired
private InstrumentPanelGroupService panelGroupService;
@Override
@Transactional(readOnly = true)
public IPage<InstrumentPanelVo> selectInstrumentPanelList(String appId, QueryInstrumentPanelDTO query) {
......@@ -70,7 +70,12 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe
if(StringUtils.isEmpty(query.getGroupId())){
throw new SysException("必须选择需要查询的仪表板分组");
}
where.eq("p.group_id", query.getGroupId());
InstrumentPanelGroup group = panelGroupService.getById(query.getGroupId());
if(StringUtils.isNotEmpty(group.getParentId())){
where.eq("p.group_id", query.getGroupId());
}
where.eq("p.record_status", SlmConstants.DATA_VALID);
if (StringUtils.isNotEmpty(query.getName())) {
where.and(x->x.like("p.name", query.getName()).or().like("p.creator_name", query.getName()).or().like("p.updater_name", query.getName()));
......
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