调整ID是否导出问题

This commit is contained in:
袁东强 2025-07-27 11:40:27 +08:00 committed by zhaolei
parent 9249e580d3
commit a488bb9bfe

View File

@ -49,6 +49,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alipay.remoting.util.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont; import org.apache.poi.hssf.usermodel.HSSFFont;
@ -1529,10 +1530,15 @@ public class PALRepositoryListWeb extends ActionWeb {
int parentNameCellIndex = 0; int parentNameCellIndex = 0;
for (int j = 0; j < tempArr.size(); j++) { for (int j = 0; j < tempArr.size(); j++) {
HSSFCell attrCell = row.createCell(++cellIndex);
String attrCellValue = "";
JSONObject config = tempArr.getJSONObject(j); JSONObject config = tempArr.getJSONObject(j);
String propId = config.getString("id"); String propId = config.getString("id");
// 当idVisible为false时跳过group_id和file_id列
if (!idVisible && (StringUtils.isNotBlank(propId) && ("group_id".equals(propId) || "file_id".equals(propId)))) {
continue;
}
HSSFCell attrCell = row.createCell(++cellIndex);
String attrCellValue = "";
// 伊利定制化需求23-01-05 // 伊利定制化需求23-01-05
if ("status".equals(propId)){ if ("status".equals(propId)){
@ -1637,6 +1643,12 @@ public class PALRepositoryListWeb extends ActionWeb {
result.add("版本号"); result.add("版本号");
// excel表格扩展字段 // excel表格扩展字段
for (int i = 0; i < tableHeadConfigArr.size(); i++) { for (int i = 0; i < tableHeadConfigArr.size(); i++) {
if (!idVisible){
String id = tableHeadConfigArr.getJSONObject(i).getString("id");
if (StringUtils.isNotBlank( id)&&("group_id".equals( id)||"file_id".equals( id))){
continue;
}
}
result.add(tableHeadConfigArr.getJSONObject(i).getString("name")); result.add(tableHeadConfigArr.getJSONObject(i).getString("name"));
if ("status".equals(tableHeadConfigArr.getJSONObject(i).getString("id"))){ if ("status".equals(tableHeadConfigArr.getJSONObject(i).getString("id"))){
result.add("上级名称"); result.add("上级名称");