文档拆分模块、文档对比模块代码调整。

This commit is contained in:
wangzhijiang
2024-02-22 17:57:08 +08:00
parent 083d49b7d6
commit ed6c0b64a7
8 changed files with 9 additions and 56 deletions
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace=".dao.LawsCustomCompareCellDao">
<resultMap type=".entity.LawsCustomCompareCell" id="LawsCustomCompareCellMap">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="infoId" column="info_id" jdbcType="VARCHAR"/>
<result property="standardId" column="standard_id" jdbcType="VARCHAR"/>
<result property="featureId" column="feature_id" jdbcType="VARCHAR"/>
<result property="compareItemId" column="compare_item_id" jdbcType="VARCHAR"/>
<result property="content" column="content" jdbcType="VARCHAR"/>
<result property="fileId" column="file_id" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
</resultMap>
<!-- 批量插入 -->
<insert id="insertBatch" keyProperty="" useGeneratedKeys="true">
insert into laws-sinotruk-demo.laws_custom_compare_cell(id, info_id, standard_id, feature_id, compare_item_id, content, file_id, create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.id}, #{entity.infoId}, #{entity.standardId}, #{entity.featureId}, #{entity.compareItemId}, #{entity.content}, #{entity.fileId}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.delFlag})
</foreach>
</insert>
<!-- 批量插入或按主键更新 -->
<insert id="insertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
insert into laws-sinotruk-demo.laws_custom_compare_cell(id, info_id, standard_id, feature_id, compare_item_id, content, file_id, create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.id}, #{entity.infoId}, #{entity.standardId}, #{entity.featureId}, #{entity.compareItemId}, #{entity.content}, #{entity.fileId}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.delFlag})
</foreach>
on duplicate key update
id = values(id) , info_id = values(info_id) , standard_id = values(standard_id) , feature_id = values(feature_id) , compare_item_id = values(compare_item_id) , content = values(content) , file_id = values(file_id) , create_by = values(create_by) , create_time = values(create_time) , update_by = values(update_by) , update_time = values(update_time) , del_flag = values(del_flag) </insert>
</mapper>
@@ -162,8 +162,8 @@ public class SarFileCompareInfoController extends JeroController<SarFileCompareI
@PostMapping(value = "/delete") @PostMapping(value = "/delete")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public Result<?> delete(@RequestBody IdMapBody mapBody) { public Result<?> delete(@RequestBody IdMapBody mapBody) {
// 水平越权 // // 水平越权
sarFileCompareInfoService.isHorizontalOverstep(mapBody.getId()); // sarFileCompareInfoService.isHorizontalOverstep(mapBody.getId());
sarFileCompareInfoService.deleteById(mapBody.getId()); sarFileCompareInfoService.deleteById(mapBody.getId());
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
@@ -295,7 +295,7 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
@Override @Override
public SarFileCompareDetailVO getComparisonDetail(String id) { public SarFileCompareDetailVO getComparisonDetail(String id) {
// 水平越权 // 水平越权
isHorizontalOverstep(id); // isHorizontalOverstep(id);
SarFileCompareDetailVO sfVo = new SarFileCompareDetailVO(); SarFileCompareDetailVO sfVo = new SarFileCompareDetailVO();
SarFileCompareInfo sfcInfo = this.queryById(id); SarFileCompareInfo sfcInfo = this.queryById(id);
sfVo.setInfoId(id); sfVo.setInfoId(id);
@@ -80,8 +80,8 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
*/ */
@Override @Override
public void add(SarFileCompareItemComment sarFileCompareItemComment) { public void add(SarFileCompareItemComment sarFileCompareItemComment) {
// 水平越权 // // 水平越权
sarFileCompareInfoService.isHorizontalOverstep(sarFileCompareItemComment.getInfoId()); // sarFileCompareInfoService.isHorizontalOverstep(sarFileCompareItemComment.getInfoId());
Date now = new Date(); Date now = new Date();
sarFileCompareItemComment.setCreateTime(now); sarFileCompareItemComment.setCreateTime(now);
sarFileCompareItemComment.setUpdateTime(now); sarFileCompareItemComment.setUpdateTime(now);
@@ -175,8 +175,6 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
@Override @Override
public SarFileCompareResultVO queryCompareResult(String infoId,String comment) { public SarFileCompareResultVO queryCompareResult(String infoId,String comment) {
// 水平越权
sarFileCompareInfoService.isHorizontalOverstep(infoId);
SarFileCompareResultVO resultVO = new SarFileCompareResultVO(); SarFileCompareResultVO resultVO = new SarFileCompareResultVO();
SarFileCompareInfo sfcInfo = sarFileCompareInfoServiceImpl.queryById(infoId); SarFileCompareInfo sfcInfo = sarFileCompareInfoServiceImpl.queryById(infoId);
resultVO.setInfoId(infoId); resultVO.setInfoId(infoId);
@@ -235,8 +233,6 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
@Override @Override
public void exportResXls(HttpServletRequest request,HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut,String comment) { public void exportResXls(HttpServletRequest request,HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut,String comment) {
// 水平越权
sarFileCompareInfoService.isHorizontalOverstep(infoId);
List<SarFileCompareItemComment> list = null; List<SarFileCompareItemComment> list = null;
if (includeComments && MyStringUtils.isEmpty(selectIds)) { if (includeComments && MyStringUtils.isEmpty(selectIds)) {
//只导出全文评论的情况 //只导出全文评论的情况
@@ -40,8 +40,6 @@ public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileComp
*/ */
@Override @Override
public void add(SarFileCompareResComment sarFileCompareResComment) { public void add(SarFileCompareResComment sarFileCompareResComment) {
// 水平越权九
sarFileCompareInfoService.isHorizontalOverstep(sarFileCompareResComment.getInfoId());
Date now = new Date(); Date now = new Date();
sarFileCompareResComment.setCreateTime(now); sarFileCompareResComment.setCreateTime(now);
sarFileCompareResComment.setUpdateTime(now); sarFileCompareResComment.setUpdateTime(now);
@@ -146,8 +144,6 @@ public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileComp
@Override @Override
public List<SarFileCompareResComVO> queryListByInfoId(String id, String str) { public List<SarFileCompareResComVO> queryListByInfoId(String id, String str) {
// 水平越权九
sarFileCompareInfoService.isHorizontalOverstep(id);
if (MyStringUtils.isBlank(str)) { if (MyStringUtils.isBlank(str)) {
return queryListByInfoId(id); return queryListByInfoId(id);
} }
@@ -186,8 +186,8 @@ public class DocumentSplitController {
if (StringUtils.isBlank(map.getId())) { if (StringUtils.isBlank(map.getId())) {
return Result.error("请选择数据!"); return Result.error("请选择数据!");
} }
documentSplitService.isHorizontalOverstep(map.getId()); // documentSplitService.isHorizontalOverstep(map.getId());
documentSplitService.checkOutOperation(Collections.singletonList(map.getId())); // documentSplitService.checkOutOperation(Collections.singletonList(map.getId()));
sarFileSplitInfoService.deleteById(map.getId()); sarFileSplitInfoService.deleteById(map.getId());
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED)); return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED));
} }
@@ -1198,7 +1198,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
String infoId = UUID.randomUUID().toString().replace("-", ""); String infoId = UUID.randomUUID().toString().replace("-", "");
sarFileSplitInfoEO.setId(infoId); sarFileSplitInfoEO.setId(infoId);
sarFileSplitInfoEO.setSplitResult("成功"); sarFileSplitInfoEO.setSplitResult("成功");
sarFileSplitInfoEO.setSplitStatus(SplitEnum.SPLIT_STATUS1.getValue()); sarFileSplitInfoEO.setSplitStatus(SplitEnum.SPLIT_STATUS2.getValue());
sarFileSplitInfoEO.setAuthor(userId); sarFileSplitInfoEO.setAuthor(userId);
sarFileSplitInfoEO.setCreateTime(now); sarFileSplitInfoEO.setCreateTime(now);
sarFileSplitInfoEO.setUpdateTime(now); sarFileSplitInfoEO.setUpdateTime(now);
@@ -1694,7 +1694,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
String infoId = UUID.randomUUID().toString().replace("-", ""); String infoId = UUID.randomUUID().toString().replace("-", "");
sarFileSplitInfoEO.setId(infoId); sarFileSplitInfoEO.setId(infoId);
sarFileSplitInfoEO.setSplitResult("成功"); sarFileSplitInfoEO.setSplitResult("成功");
sarFileSplitInfoEO.setSplitStatus(SplitEnum.SPLIT_STATUS1.getValue()); sarFileSplitInfoEO.setSplitStatus(SplitEnum.SPLIT_STATUS2.getValue());
sarFileSplitInfoEO.setAuthor(userId); sarFileSplitInfoEO.setAuthor(userId);
sarFileSplitInfoEO.setCreateTime(now); sarFileSplitInfoEO.setCreateTime(now);
sarFileSplitInfoEO.setUpdateTime(now); sarFileSplitInfoEO.setUpdateTime(now);