fix(文档拆分): 参数类型问题
This commit is contained in:
+7
@@ -72,6 +72,13 @@ public interface DocumentSplitMapper {
|
|||||||
*/
|
*/
|
||||||
List<SarFileSplitItemsValEO> queryItemsValByItemId(@Param("itemId") String itemId);
|
List<SarFileSplitItemsValEO> queryItemsValByItemId(@Param("itemId") String itemId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条目删除根据itemId
|
||||||
|
* @param itemId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteItemsValByItemId(@Param("itemId") String itemId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 目录删除根据menuId集合
|
* 目录删除根据menuId集合
|
||||||
* @param menuIdList
|
* @param menuIdList
|
||||||
|
|||||||
+5
@@ -15,6 +15,11 @@
|
|||||||
where #{updateCondition}
|
where #{updateCondition}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteItemsValByItemId">
|
||||||
|
delete from sar_file_split_items_val
|
||||||
|
where item_id = #{itemId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<select id="queryByPage" resultType="com.jero.modules.laws.documenttool.entity.DocumentSplitInfo">
|
<select id="queryByPage" resultType="com.jero.modules.laws.documenttool.entity.DocumentSplitInfo">
|
||||||
select *
|
select *
|
||||||
from (select i.id as id,
|
from (select i.id as id,
|
||||||
|
|||||||
+34
-24
@@ -120,8 +120,8 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
.equals(String.valueOf(v.getIsQuery()))).collect(Collectors.toList());
|
.equals(String.valueOf(v.getIsQuery()))).collect(Collectors.toList());
|
||||||
|
|
||||||
// 分页参数
|
// 分页参数
|
||||||
Integer pageNo = (Integer) parameter.get("pageNo");
|
int pageNo = Integer.parseInt((String) parameter.get("pageNo"));
|
||||||
Integer pageSize =(Integer) parameter.get("pageSize");
|
int pageSize = Integer.parseInt((String) parameter.get("pageSize"));
|
||||||
|
|
||||||
// sql查询列字段拼接
|
// sql查询列字段拼接
|
||||||
String selectColumn = getSelectColumn(fieldListSelect);
|
String selectColumn = getSelectColumn(fieldListSelect);
|
||||||
@@ -158,13 +158,17 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
fieldList = fieldList.stream().filter(v -> YesOrNoEnum.YES.getInteger()
|
fieldList = fieldList.stream().filter(v -> YesOrNoEnum.YES.getInteger()
|
||||||
.equals(v.getIsShowFormCreate())).collect(Collectors.toList());
|
.equals(v.getIsShowFormCreate())).collect(Collectors.toList());
|
||||||
List<LawsTag> finalFieldList = fieldList;
|
List<LawsTag> finalFieldList = fieldList;
|
||||||
parameter.forEach((k, v) -> {
|
StringBuilder updateSet = new StringBuilder();
|
||||||
|
parameter.forEach((k, v) ->
|
||||||
// 修改字段
|
// 修改字段
|
||||||
String updateSet = getUpdateValue(finalFieldList, k, (String) v);
|
updateSet.append(getUpdateValue(finalFieldList, k, (String) v))
|
||||||
// where条件
|
);
|
||||||
String updateCondition = (String) parameter.get("id");
|
// 更新人和更新时间
|
||||||
documentSplitMapper.editDocumentSplitDetail(updateSet, updateCondition);
|
String updateByAndUpdateTime = new UniversalImpl().getUpdateByAndUpdateTime();
|
||||||
});
|
updateSet.insert(0, updateByAndUpdateTime + ",");
|
||||||
|
// where条件
|
||||||
|
String updateCondition = "id = '" + parameter.get("id") + "'";
|
||||||
|
documentSplitMapper.editDocumentSplitDetail(updateSet.toString(), updateCondition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -182,9 +186,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 修改数据
|
// 修改数据
|
||||||
String updateByAndUpdateTime = new UniversalImpl().getUpdateByAndUpdateTime();
|
return String.join(",", sqlList);
|
||||||
String join = String.join(",", sqlList);
|
|
||||||
return updateByAndUpdateTime + "," + join;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -195,20 +197,28 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
fieldList = fieldList.stream().filter(v -> YesOrNoEnum.YES.getInteger()
|
fieldList = fieldList.stream().filter(v -> YesOrNoEnum.YES.getInteger()
|
||||||
.equals(v.getIsShowFormCreate())).collect(Collectors.toList());
|
.equals(v.getIsShowFormCreate())).collect(Collectors.toList());
|
||||||
List<LawsTag> finalFieldList = fieldList;
|
List<LawsTag> finalFieldList = fieldList;
|
||||||
parameter.forEach((k, v) -> {
|
StringBuilder updateSet = new StringBuilder();
|
||||||
|
parameter.forEach((k, v) ->
|
||||||
// 修改字段
|
// 修改字段
|
||||||
String updateSet = getUpdateValue(finalFieldList, k, (String) v);
|
updateSet.append(getUpdateValue(finalFieldList, k, (String) v))
|
||||||
// where条件
|
);
|
||||||
String updateCondition = "";
|
// 更新人和更新时间
|
||||||
if (parameter.containsKey("id")){
|
String updateByAndUpdateTime = new UniversalImpl().getUpdateByAndUpdateTime();
|
||||||
String id = (String) parameter.get("id");
|
updateSet.insert(0, updateByAndUpdateTime + ",");
|
||||||
updateCondition = "id = " + "'" + id + "'";
|
// where条件
|
||||||
}else {
|
String updateCondition = "";
|
||||||
String infoId = (String) parameter.get(INFO_ID);
|
if (parameter.containsKey("ids")){
|
||||||
updateCondition = "info_id = " + "'" + infoId + "'";
|
String ids = (String) parameter.get("ids");
|
||||||
}
|
List<String> list = Arrays.asList(ids.split(","));
|
||||||
documentSplitMapper.editDocumentSplitDetail(updateSet, updateCondition);
|
updateCondition = "id in " + "'" + String.join(",", list) + "'";
|
||||||
});
|
}else {
|
||||||
|
String infoId = (String) parameter.get(INFO_ID);
|
||||||
|
updateCondition = "info_id = " + "'" + infoId + "'";
|
||||||
|
}
|
||||||
|
documentSplitMapper.editDocumentSplitDetail(updateSet.toString(), updateCondition);
|
||||||
|
// 条目更新
|
||||||
|
// 删除旧数据
|
||||||
|
// documentSplitMapper.deleteItemsValByItemId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user