模型相关/支持文件数据过滤|制度手册相关/支持文件生成代码调整

This commit is contained in:
zhal 2024-08-15 17:27:49 +08:00
parent e163004cee
commit ed772c66b8
2 changed files with 6 additions and 6 deletions

View File

@ -1031,8 +1031,8 @@ public class OutputWordUtil {
//支持文件 //支持文件
JSONArray supportfiles = new JSONArray(); //组织职责Table JSONArray related_support_files = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files"); List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "related_support_files");
relationList.sort(Comparator.comparing(DesignerShapeRelationModel::getShapeText)); relationList.sort(Comparator.comparing(DesignerShapeRelationModel::getShapeText));
@ -1053,7 +1053,7 @@ public class OutputWordUtil {
JSONObject tmp = new JSONObject(); JSONObject tmp = new JSONObject();
tmp.put("name", name); tmp.put("name", name);
tmp.put("desc", index); tmp.put("desc", index);
supportfiles.add(tmp); related_support_files.add(tmp);
} }
@ -1073,10 +1073,10 @@ public class OutputWordUtil {
//定义表格数据 //定义表格数据
String[] header = {"序号", "文件名称"}; String[] header = {"序号", "文件名称"};
String[][] strArray2 = new String[supportfiles.size()][]; String[][] strArray2 = new String[related_support_files.size()][];
List<String[]> list = new LinkedList<>(); List<String[]> list = new LinkedList<>();
for (int i = 0; i < supportfiles.size(); i++) { for (int i = 0; i < related_support_files.size(); i++) {
JSONObject jsonObject = supportfiles.getJSONObject(i); JSONObject jsonObject = related_support_files.getJSONObject(i);
String[] strArray = new String[2]; String[] strArray = new String[2];
strArray[0] = jsonObject.getString("desc").toString(); strArray[0] = jsonObject.getString("desc").toString();
strArray[1] = jsonObject.getString("name").toString(); strArray[1] = jsonObject.getString("name").toString();