feat(文档拆分): 批量删除条款标题
This commit is contained in:
+17
@@ -373,6 +373,23 @@ public class DocumentSplitController {
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除条款标题
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准拆分详情-批量删除条款标题")
|
||||
@ApiOperation(value="标准拆分详情-批量删除条款标题", notes="标准拆分详情-批量删除条款标题")
|
||||
@PostMapping(value = "/deleteBatchTitle")
|
||||
@RequiresPermissions("deleteBatchDocumentSplitDetailTitle")
|
||||
public Result<T> deleteBatchTitle(@RequestBody IdsMapBody map) {
|
||||
if (StringUtils.isBlank(map.getIds())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
documentSplitService.deleteBatchTitle(map.getIds());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准拆分详情-合并条款
|
||||
* @param parameter
|
||||
|
||||
+7
@@ -210,4 +210,11 @@ public interface DocumentSplitMapper extends BaseMapper<LawsDocumentSplit> {
|
||||
* @param infoId
|
||||
*/
|
||||
List<String> queryLawsDocumentSplitGroupByMenuId(@Param("infoId") String infoId);
|
||||
|
||||
/**
|
||||
* 清除目录标题
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
int updateMenuItemNameByIdList(@Param("idList") List<String> idList);
|
||||
}
|
||||
|
||||
+8
-1
@@ -208,7 +208,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryDocumentSplitDetailById" resultType="java.util.Map">
|
||||
select *
|
||||
from laws_document_split
|
||||
@@ -272,4 +272,11 @@
|
||||
SET ${updateSet}
|
||||
WHERE ${updateCondition}
|
||||
</update>
|
||||
|
||||
<update id="updateMenuItemNameByIdList">
|
||||
update sar_file_split_menu set item_name = null where id in
|
||||
<foreach collection="idList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
+6
@@ -237,4 +237,10 @@ public interface IDocumentSplitService {
|
||||
* @return
|
||||
*/
|
||||
String queryItemValueByMenuId(String menuId);
|
||||
|
||||
/**
|
||||
* 标准拆分详情-批量删除条款标题
|
||||
* @param ids
|
||||
*/
|
||||
void deleteBatchTitle(String ids);
|
||||
}
|
||||
|
||||
+13
@@ -1482,6 +1482,19 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBatchTitle(String ids) {
|
||||
// List<LawsDocumentSplit> lawsDocumentSplits =
|
||||
// documentSplitMapper.selectBatchIds(Arrays.asList(ids.split(",")));
|
||||
documentSplitMapper.update(null,
|
||||
new LambdaUpdateWrapper<LawsDocumentSplit>()
|
||||
.in(LawsDocumentSplit::getId, Arrays.asList(ids.split(",")))
|
||||
.set(LawsDocumentSplit::getItemTitle, null));
|
||||
// List<String> menuIdList =
|
||||
// lawsDocumentSplits.stream().map(LawsDocumentSplit::getMenuId).collect(Collectors.toList());
|
||||
// documentSplitMapper.updateMenuItemNameByIdList(menuIdList);
|
||||
}
|
||||
|
||||
private void manageData(Map<String, Object> resultMap, StringBuilder fieldsBuilder, List<String> valuesList) {
|
||||
// 所有key(字段名)
|
||||
resultMap.forEach((k, v) -> {
|
||||
|
||||
Reference in New Issue
Block a user