[修改] 标签回显

This commit is contained in:
bupengxiang
2023-05-09 14:15:40 +08:00
parent 8df19abcef
commit a06a6e93f1
28 changed files with 180 additions and 45 deletions
@@ -18,6 +18,7 @@ import com.adc.da.report.vo.ReportVo;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import com.adc.da.util.utils.FileUtil;
import com.adc.da.util.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
@@ -469,13 +470,15 @@ public class ReportManageConroller {
} catch (Exception ex) {
log.info(ex.getMessage(),ex);
}
ReportLogBook reportLog = new ReportLogBook();
reportLog.setId(UUID.randomUUID().toString().replaceAll("-",""));
reportLog.setReportId(repostId);
reportLog.setType(2);
reportLog.setUpdateTime(new Date());
reportLog.setUserId(UserUtils.getUserId());
reportLogBookDao.insert(reportLog);
if (StringUtils.isNotEmpty(repostId)){
ReportLogBook reportLog = new ReportLogBook();
reportLog.setId(UUID.randomUUID().toString().replaceAll("-",""));
reportLog.setReportId(repostId);
reportLog.setType(2);
reportLog.setUpdateTime(new Date());
reportLog.setUserId(UserUtils.getUserId());
reportLogBookDao.insert(reportLog);
}
}
@@ -3,6 +3,8 @@ package com.adc.da.report.dao.mysql;
import com.adc.da.report.eo.TreeLabelEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* @author ThinkBook
* @description 针对表【ts_tree_label】的数据库操作Mapper
@@ -17,6 +19,8 @@ public interface TreeLabelDao extends BaseMapper<TreeLabelEntity> {
* @return
*/
double getMaxNum(String parentId);
List<String> selectIdByReport(String reportId);
}
@@ -125,6 +125,4 @@ public class TtReportManageAct {
@TableField(exist = false)
private List<String> labelList;
@TableField(exist = false)
private List<LabelEntity> labelEOList;
}
@@ -93,4 +93,5 @@ public class TtReportManageActPageVO extends BasePageVO {
private Integer delFlag;
private List<PowerApplyActPageVO> powerList;
}
@@ -19,10 +19,10 @@
<insert id="saveReportAct">
insert into TT_REPORT_MANAGE (<include refid="BaseColumnList"/>)
value (
#{Vo.dataId},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
#{Vo.dataId},#{Vo.name},#{Vo.keyContent},#{Vo.mainContent},#{Vo.department},#{Vo.year},#{Vo.fileId},
#{Vo.confidentialLevel},#{Vo.privacyLevel},
#{Vo.createUserId},
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag},
#{Vo.createDate},#{Vo.updateDate},#{Vo.delFlag},
#{Vo.secrecyLast})
</insert>
@@ -18,4 +18,9 @@
from ts_tree_label t
where t.parent_id = #{parentId}
</select>
<select id="selectIdByReport" resultType="java.lang.String">
select lab.id from ts_tree_label lab
LEFT JOIN ts_report_label rl on lab.id = rl.label_id
where rl.report_id = #{reportId}
</select>
</mapper>
@@ -22,10 +22,6 @@
<result column="del_flag" property="delFlag" />
<result column="secrecy_last" property="secrecyLast" />
<result column="file_name" property="fileName" />
<collection property="labelEOList" ofType="com.adc.da.report.eo.LabelEntity">
<id column="lableId" property="id"/>
<result column="lableName" property="name"/>
</collection>
</resultMap>
<!--表名信息-->
@@ -129,10 +125,7 @@
a.id,
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
,secrecy_last,file_name
,label.label as lableName,label.id as labelId
FROM <include refid="TableName"/> a
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
LEFT JOIN ts_tree_label label on rl.label_id = label.id
<where>
data_id = #{dataId}
</where>
@@ -142,10 +135,7 @@
a.id,
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
,secrecy_last,file_name
,label.label as lableName,label.id as labelId
FROM <include refid="TableName"/> a
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
LEFT JOIN ts_tree_label label on rl.label_id = label.id
<where>
prc_id = #{prcId}
</where>