伊利项目 流程清单导出增加上级名称字段

This commit is contained in:
qinoy 2023-01-05 14:57:54 +08:00
parent de6da5efb5
commit f8bf840f34
2 changed files with 17 additions and 0 deletions

View File

@ -727,6 +727,7 @@ public class PALRepositoryListWeb extends ActionWeb {
JSONObject statusObj = getJsonObject("status", "status", "状态", "状态", "150", "150", false, columnType, "selectStatus");
statusObj.put("filters", getProcessStatusFilters());
map.put("status", statusObj);
// map.put("parent_name",getJsonObject("parent_name","parent_name","上级名称","上级名称","250","250",false,columnType,"name"));
}
return map;
}
@ -1208,11 +1209,19 @@ public class PALRepositoryListWeb extends ActionWeb {
object.put(valueObj.getString("key"), valueObj.getString("value"));
}
extendAttrValObj = object;
int parentNameCellIndex = 0;
for (int j = 0; j < tempArr.size(); j++) {
HSSFCell attrCell = row.createCell(++cellIndex);
String attrCellValue = "";
JSONObject config = tempArr.getJSONObject(j);
String propId = config.getString("id");
// 伊利定制化需求23-01-05
if ("status".equals(propId)){
parentNameCellIndex = ++cellIndex;
}
// 标准列
if ("default".equals(config.getString("columnType"))) {
attrCellValue = getDefaultFixedValueById(propId, model.getId());
@ -1225,6 +1234,11 @@ public class PALRepositoryListWeb extends ActionWeb {
}
attrCell.setCellValue(attrCellValue);
}
HSSFCell attrCell = row.createCell(parentNameCellIndex);
String parentName = model.getParentId().length() < 36 ? I18nRes.findValue(CoEConstant.APP_ID,model.getParentId()) : PALRepositoryCache.getCache().get(model.getParentId()).getName();
attrCell.setCellValue(parentName);
for (int j = 0; j <= cellIndex; j++) {
HSSFCell tempCell = row.getCell(j);
if (tempCell == null) {
@ -1283,6 +1297,9 @@ public class PALRepositoryListWeb extends ActionWeb {
// excel表格扩展字段
for (int i = 0; i < tableHeadConfigArr.size(); i++) {
result.add(tableHeadConfigArr.getJSONObject(i).getString("name"));
if ("status".equals(tableHeadConfigArr.getJSONObject(i).getString("id"))){
result.add("上级名称");
}
}
return result;
}