手册附件按附件名称排序
This commit is contained in:
parent
35b5b0c426
commit
d49f93bcfd
@ -294,7 +294,7 @@ public class Report1Gener {
|
||||
// 流程附件列表
|
||||
UpFileDao upFileDao = new UpFileDao();
|
||||
StringBuffer sqlWhere = new StringBuffer();
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY CREATETIME ASC");
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY FILENAME ASC");
|
||||
List<UpfileModel> search = upFileDao.search(sqlWhere.toString());
|
||||
File file = null;
|
||||
//三员管理下,用户密级与文件密级过滤显示
|
||||
@ -400,6 +400,7 @@ public class Report1Gener {
|
||||
fileIndex++;
|
||||
}
|
||||
}
|
||||
fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name")));
|
||||
if(shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("shape_file_name", "");
|
||||
@ -414,6 +415,12 @@ public class Report1Gener {
|
||||
JSONObject obj = dataAttributes.getJSONObject(i);
|
||||
String attrId = obj.getString("key");
|
||||
String attrValue = obj.getString("value");
|
||||
if(attrValue.contains("<")||attrValue.contains(">")||attrValue.contains("&")||attrValue.contains("'")||attrValue.contains("\"")) {
|
||||
//attrValue= attrValue.replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&").replaceAll("'", "'").replaceAll("\"", """);
|
||||
attrValue= attrValue.replaceAll("<", "小于").replaceAll(">", "").replaceAll("&", "&").replaceAll("'", "'").replaceAll("\"", """);
|
||||
}
|
||||
|
||||
|
||||
_tr.put("shape_" + attrId, attrValue.replace("\n", WRAPSTRING));
|
||||
if (raciRelationType) {// 涉及部门、岗位/角色关联的是bpm组织部门、岗位、角色
|
||||
if ("bpm_duty_r".equals(attrId)) {
|
||||
@ -541,6 +548,8 @@ public class Report1Gener {
|
||||
//相关文件 R_relevant_flies
|
||||
JSONArray relevant_flies = new JSONArray();
|
||||
try {
|
||||
|
||||
//相关文件
|
||||
int count = 0;
|
||||
String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'R_relevant_flies'";
|
||||
String relatFileJson = DBSql.getString(sql);
|
||||
@ -559,6 +568,38 @@ public class Report1Gener {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//外部相关文件
|
||||
String sqlOut = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'Out_relevant_files'";
|
||||
String outRelatFileJson = DBSql.getString(sqlOut);
|
||||
if(UtilString.isNotEmpty(outRelatFileJson)) {
|
||||
if(outRelatFileJson.contains(",")) {
|
||||
String[] split = outRelatFileJson.split(",");
|
||||
for (String str : split) {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", str+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
relevant_flies.add(tmp);
|
||||
}
|
||||
}else if(outRelatFileJson.contains(",")) {
|
||||
String[] split = outRelatFileJson.split(",");
|
||||
for (String str : split) {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", str+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
relevant_flies.add(tmp);
|
||||
}
|
||||
}else {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", outRelatFileJson+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
relevant_flies.add(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
@ -622,8 +663,10 @@ public class Report1Gener {
|
||||
dataMap.put(OutputWordUtil.TABLE_REGULATE, regulateTable);
|
||||
dataMap.put(OutputWordUtil.TABLE_KPI, KPITable);
|
||||
ReportRepositoryCompare compare = new ReportRepositoryCompare();
|
||||
if(compare!=null) {
|
||||
JSONArray historyVersionModify = compare.getModifyVersionHistory(repositoryId);
|
||||
dataMap.put("history_table", historyVersionModify);
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
|
||||
@ -583,10 +583,12 @@ public class ReportRepositoryCompare {
|
||||
// 获取属性内容
|
||||
PALRepositoryPropertyModel currPropertyModel = PALRepositoryPropertyCache.getPropertyByPropertyId(currModel.getId(), model.getAttrId());
|
||||
PALRepositoryPropertyModel prevPropertyModel = PALRepositoryPropertyCache.getPropertyByPropertyId(prevModel.getId(), model.getAttrId());
|
||||
if(currPropertyModel!=null&&prevPropertyModel!=null) {
|
||||
String compareResult = compareTextContent(currPropertyModel.getPropertyValue(), prevPropertyModel.getPropertyValue());
|
||||
if (compareResult != null) {
|
||||
result.add(assemblePropertyName(model.getAttrName()) + compareResult);
|
||||
}
|
||||
}
|
||||
} else if (model.getType().equalsIgnoreCase("relation")) {// 对比PAL关联属性
|
||||
List<DesignerShapeRelationModel> currRelationModels = DesignerShapeRelationCache.getListByAttrId(currModel.getId(), "", model.getAttrId());
|
||||
List<DesignerShapeRelationModel> prevRelationModels = DesignerShapeRelationCache.getListByAttrId(prevModel.getId(), "", model.getAttrId());
|
||||
@ -605,6 +607,7 @@ public class ReportRepositoryCompare {
|
||||
// 获取属性内容
|
||||
PALRepositoryPropertyModel currPropertyModel = PALRepositoryPropertyCache.getPropertyByPropertyId(currModel.getId(), model.getAttrId());
|
||||
PALRepositoryPropertyModel prevPropertyModel = PALRepositoryPropertyCache.getPropertyByPropertyId(prevModel.getId(), model.getAttrId());
|
||||
if(currPropertyModel!=null&&prevPropertyModel!=null) {
|
||||
String compareResult = compareTextContent(currPropertyModel.getPropertyValue(), prevPropertyModel.getPropertyValue());
|
||||
if (compareResult != null) {
|
||||
result.add(assemblePropertyName(model.getAttrName()) + compareResult);
|
||||
@ -613,6 +616,7 @@ public class ReportRepositoryCompare {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 对比文件附件
|
||||
String compareResult = compareRepositoryUpfileFile(currModel, prevModel);
|
||||
if (compareResult != null) {
|
||||
|
||||
@ -72,6 +72,8 @@ public class Report1Gener {
|
||||
* @see PlatformAPIImpl#getlanguages()
|
||||
*/
|
||||
public ResponseObject execute(OutputTaskModel model, String wizardJsonData, DCContext dcContext) {
|
||||
|
||||
|
||||
try {
|
||||
// synchronized (_lock) {
|
||||
// isRunning = true;
|
||||
@ -224,7 +226,7 @@ public class Report1Gener {
|
||||
// 流程附件列表
|
||||
UpFileDao upFileDao = new UpFileDao();
|
||||
StringBuffer sqlWhere = new StringBuffer();
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY CREATETIME ASC");
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY FILENAME ASC");
|
||||
List<UpfileModel> search = upFileDao.search(sqlWhere.toString());
|
||||
File file = null;
|
||||
//三员管理下,用户密级与文件密级过滤显示
|
||||
@ -327,6 +329,7 @@ public class Report1Gener {
|
||||
fileIndex++;
|
||||
}
|
||||
}
|
||||
fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name")));
|
||||
if(shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("shape_file_name", "");
|
||||
|
||||
@ -453,7 +453,7 @@ public class Report1Gener {
|
||||
String shpId = "";
|
||||
UpFileDao upFileDao = new UpFileDao();
|
||||
StringBuffer sqlWhere = new StringBuffer();
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY CREATETIME ASC");
|
||||
sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY FILENAME ASC");
|
||||
List<UpfileModel> search = upFileDao.search(sqlWhere.toString());
|
||||
File file = null;
|
||||
//三员管理下,用户密级与文件密级过滤显示
|
||||
@ -563,6 +563,7 @@ public class Report1Gener {
|
||||
*/
|
||||
}
|
||||
}
|
||||
fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name")));
|
||||
if(shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("shape_file_name", "");
|
||||
@ -754,6 +755,37 @@ public class Report1Gener {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//外部相关文件
|
||||
String sqlOut = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'Out_related_files'";
|
||||
String outRelatFileJson = DBSql.getString(sqlOut);
|
||||
if(UtilString.isNotEmpty(outRelatFileJson)) {
|
||||
if(outRelatFileJson.contains(",")) {
|
||||
String[] split = outRelatFileJson.split(",");
|
||||
for (String str : split) {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", str+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
related_files.add(tmp);
|
||||
}
|
||||
}else if(outRelatFileJson.contains(",")) {
|
||||
String[] split = outRelatFileJson.split(",");
|
||||
for (String str : split) {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", str+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
related_files.add(tmp);
|
||||
}
|
||||
}else {
|
||||
count++;
|
||||
JSONObject tmp = new JSONObject();
|
||||
tmp.put("name", outRelatFileJson+"【外部】");
|
||||
tmp.put("desc", count);
|
||||
related_files.add(tmp);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user