问题单修复&&报告模版配置接口联调

This commit is contained in:
zhuxinyu
2023-04-19 17:50:16 +08:00
parent d2183a5818
commit ed1e288ec2
5 changed files with 10 additions and 4 deletions

View File

@@ -74,7 +74,7 @@
line.`Level`as 'Level', line.`Level`as 'Level',
line.Update_Time AS 'updateTime', line.Update_Time AS 'updateTime',
line.Sort as 'sort', line.Sort as 'sort',
pd.Call_Flag as 'ComFlag', pd.Com_Flag as 'ComFlag',
sdd.`Name` AS 'LineScale', sdd.`Name` AS 'LineScale',
device.`Name` AS 'deviceName', device.`Name` AS 'deviceName',
pd.IP AS 'ip', pd.IP AS 'ip',

View File

@@ -22,4 +22,6 @@ public interface TemplateRelMapper extends BaseMapper<TemplateRel> {
List<TemplateRel> selectRelevance(@Param("ids") List<String> ids); List<TemplateRel> selectRelevance(@Param("ids") List<String> ids);
boolean batchInsert(@Param("list") List<TemplateRel> list); boolean batchInsert(@Param("list") List<TemplateRel> list);
boolean deleteByRtId(@Param("rtId") String id);
} }

View File

@@ -13,6 +13,10 @@
</foreach> </foreach>
</insert> </insert>
<delete id="deleteByRtId">
DELETE FROM report_relevancy WHERE Rt_Id=#{rtId}
</delete>
<select id="selectRelevance" resultType="TemplateRel"> <select id="selectRelevance" resultType="TemplateRel">
select report_relevancy.* select report_relevancy.*
from report_relevancy report_relevancy from report_relevancy report_relevancy

View File

@@ -115,7 +115,7 @@ public class EventDictServiceImpl extends ServiceImpl<EventDictMapper, ReportDic
if (ObjectUtil.isAllNotEmpty(dictQueryParam.getSortBy(), dictQueryParam.getOrderBy())) { if (ObjectUtil.isAllNotEmpty(dictQueryParam.getSortBy(), dictQueryParam.getOrderBy())) {
queryWrapper.orderBy(true, dictQueryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(dictQueryParam.getSortBy())); queryWrapper.orderBy(true, dictQueryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(dictQueryParam.getSortBy()));
} else { } else {
//queryWrapper.eq("report_dict.pid",dictQueryParam.getPid()); queryWrapper.eq("report_dict.pid",dictQueryParam.getPid());
//没有排序参数默认根据sort字段排序没有排序字段的根据updateTime更新时间排序 //没有排序参数默认根据sort字段排序没有排序字段的根据updateTime更新时间排序
queryWrapper.orderBy(true, true, "report_dict.update_time"); queryWrapper.orderBy(true, true, "report_dict.update_time");
} }

View File

@@ -127,7 +127,7 @@ public class EventTemplateServiceImpl extends ServiceImpl<EventTemplateMapper, E
BeanUtils.copyProperties(eventTemplateUpdateParam,eventTemplate); BeanUtils.copyProperties(eventTemplateUpdateParam,eventTemplate);
boolean flag = this.updateById(eventTemplate); boolean flag = this.updateById(eventTemplate);
// 先删除字典表 // 先删除字典表
templateRelMapper.deleteById(id); templateRelMapper.deleteByRtId(id);
List<TemplateRel> list = new ArrayList<>(); List<TemplateRel> list = new ArrayList<>();
eventTemplateUpdateParam.getIds().forEach(rdId -> { eventTemplateUpdateParam.getIds().forEach(rdId -> {
TemplateRel relevancy = new TemplateRel(); TemplateRel relevancy = new TemplateRel();