fix(文档拆分): 发布问题修复
This commit is contained in:
+8
-6
@@ -237,10 +237,11 @@ public class LawsCustomCompareInfoController {
|
||||
@PostMapping(value = "/delById")
|
||||
@RequiresPermissions("customComparison:delete")
|
||||
public Result<T> delById(@RequestBody IdMapBody map) {
|
||||
if (StringUtils.isBlank(map.getId())){
|
||||
lawsCustomCompareInfoService.delById(map.getId());
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(map.getId());
|
||||
if (StringUtils.isBlank(map.getId())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
lawsCustomCompareInfoService.delById(map.getId());
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(map.getId());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
@@ -253,10 +254,11 @@ public class LawsCustomCompareInfoController {
|
||||
@PostMapping(value = "/delInventoryById")
|
||||
@RequiresPermissions("customComparison:edit")
|
||||
public Result<T> delInventoryById(@RequestBody IdMapBody map) {
|
||||
if (StringUtils.isBlank(map.getId())){
|
||||
lawsCustomCompareInventoryService.removeById(map.getId());
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(map.getId());
|
||||
if (StringUtils.isBlank(map.getId())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
lawsCustomCompareInventoryService.removeById(map.getId());
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(map.getId());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -190,12 +190,13 @@ public class DocumentSplitController {
|
||||
@PostMapping(value = "/delete")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:delete")
|
||||
@ApiOperationSupport(order = 9)
|
||||
public Result<T> delete(@RequestBody IdMapBody map) {
|
||||
if (StringUtils.isBlank(map.getId())){
|
||||
String id = map.getId();
|
||||
documentSplitService.checkOutOperation(Collections.singletonList(id));
|
||||
sarFileSplitInfoService.deleteById(id);
|
||||
public Result<T> delete(@RequestBody IdMapBody map){
|
||||
if (StringUtils.isBlank(map.getId())) {
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
documentSplitService.checkOutOperation(Collections.singletonList(map.getId()));
|
||||
sarFileSplitInfoService.deleteById(map.getId());
|
||||
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ public interface DocumentSplitMapper {
|
||||
* @param insertValue
|
||||
* @return
|
||||
*/
|
||||
int insertLawsDocumentSplit(@Param("insertField") String insertField, @Param("insertValue") String insertValue);
|
||||
int insertLawsDocumentSplit(@Param("insertField") String insertField, @Param("insertValue") List<String> insertValue);
|
||||
|
||||
/**
|
||||
* 条目批量删除根据itemId
|
||||
|
||||
+5
-2
@@ -20,7 +20,10 @@
|
||||
|
||||
<insert id="insertLawsDocumentSplit">
|
||||
insert into laws_document_split(${insertField})
|
||||
values (${insertValue})
|
||||
values
|
||||
<foreach item='value' index='index' collection='insertValue' open='(' separator=',' close=')'>
|
||||
#{value}
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertDocumentSplitInfo">
|
||||
@@ -109,7 +112,7 @@
|
||||
file_type,
|
||||
file_name,
|
||||
split_status,
|
||||
(IF(i.is_asms_import = '1', i.author, concat(u.realname, '(', u.username, ')'))) as author,
|
||||
(IF(i.is_asms_import = '1' and u.id is null, i.author, concat(u.realname, '(', u.username, ')'))) as author,
|
||||
i.create_time,
|
||||
i.split_result,
|
||||
u2.id createBy,
|
||||
|
||||
+5
-5
@@ -744,7 +744,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
resultMap.put("update_time", format);
|
||||
// 字段名和值
|
||||
manageData(resultMap, fieldsBuilder, valuesBuilder);
|
||||
documentSplitMapper.insertLawsDocumentSplit(fieldsBuilder.toString(), valuesBuilder.toString());
|
||||
documentSplitMapper.insertLawsDocumentSplit(fieldsBuilder.toString(), Arrays.asList(valuesBuilder.toString().split(",")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -993,11 +993,11 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
});
|
||||
|
||||
List<String> keyList = new ArrayList<>(map.keySet());
|
||||
List<String> valueList = map.values().stream().map(o -> (o + "").replace("'", "\\'") ).collect(Collectors.toList());
|
||||
List<String> valueList = map.values().stream().map(o -> (String.valueOf(o))).collect(Collectors.toList());
|
||||
// 新增数据
|
||||
String insertField = String.join(",", keyList);
|
||||
String insertValue = "'" + String.join("','", valueList)+ "'";
|
||||
documentSplitMapper.insertLawsDocumentSplit(insertField, insertValue);
|
||||
// String insertValue = "'" + String.join("','", valueList)+ "'";
|
||||
documentSplitMapper.insertLawsDocumentSplit(insertField, valueList);
|
||||
|
||||
// 条目信息(旧)
|
||||
List<SarFileSplitItemsVal> sarFileSplitItemsVal = documentSplitMapper.querySarFileSplitItemsValByItemId(oldId);
|
||||
@@ -1106,7 +1106,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
// 所有key(字段名)
|
||||
resultMap.forEach((k, v) -> {
|
||||
fieldsBuilder.append(k).append(",");
|
||||
valuesBuilder.append("'").append(v).append("'").append(",");
|
||||
valuesBuilder.append(v).append(",");
|
||||
});
|
||||
fieldsBuilder.deleteCharAt(fieldsBuilder.length() - 1);
|
||||
valuesBuilder.deleteCharAt(valuesBuilder.length() - 1);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public interface SarFileSplitMenuEOMapper extends BaseMapper<SarFileSplitMenuEO>
|
||||
|
||||
int deleteByIdList(@Param("idList") List<String> idList);
|
||||
|
||||
SarFileSplitMenuEO selectGeneral(@Param("infoId") String infoId);
|
||||
List<SarFileSplitMenuEO> selectGeneral(@Param("infoId") String infoId);
|
||||
|
||||
int insert(SarFileSplitMenuEO sarFileSplitMenuEO);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user