fix: 流程详情页文件上传时间倒序改为主服务排序
This commit is contained in:
@@ -882,12 +882,6 @@ public class TodoTaskController extends BaseAction {
|
|||||||
|
|
||||||
JSONObject object3 = JSONObject.parseObject(list.get(0).getMesg());
|
JSONObject object3 = JSONObject.parseObject(list.get(0).getMesg());
|
||||||
|
|
||||||
// 对文件排序
|
|
||||||
compareFile("FBGBUSS",object3);
|
|
||||||
compareFile("BZSMBUSS",object3);
|
|
||||||
compareFile("LSBBBUSS",object3);
|
|
||||||
compareFile("QTWJBUSS",object3);
|
|
||||||
|
|
||||||
JSONArray arr2 = new JSONArray();
|
JSONArray arr2 = new JSONArray();
|
||||||
object3.put("taskBreak", arr2);
|
object3.put("taskBreak", arr2);
|
||||||
processNew.setMesg(object3.toJSONString());
|
processNew.setMesg(object3.toJSONString());
|
||||||
@@ -3324,27 +3318,4 @@ public class TodoTaskController extends BaseAction {
|
|||||||
return processNew;
|
return processNew;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于对文件字段的文件根据上传时间倒序
|
|
||||||
* @param attFileField 文件字段
|
|
||||||
* @param object 传输对象
|
|
||||||
*/
|
|
||||||
private void compareFile(String attFileField, JSONObject object) {
|
|
||||||
String attFileId = object.getString(attFileField);
|
|
||||||
// 字段不为空并且文件数量大于1,才需要排序
|
|
||||||
if (StringUtils.isNotBlank(attFileId) && attFileId.split(",").length > 1) {
|
|
||||||
ResponseMessage<List<AttFileEO>> attInfoByAttIds = lawsUserInfoService.getAttInfoByAttIds(attFileId);
|
|
||||||
List<AttFileEO> attFileEOList = attInfoByAttIds.getData();
|
|
||||||
attFileEOList.sort(Comparator.comparing(AttFileEO::getCreationTime).reversed());
|
|
||||||
List<String> attFileIdList = new ArrayList<>();
|
|
||||||
List<String> attFileNameList = new ArrayList<>();
|
|
||||||
for (AttFileEO attFileEO : attFileEOList) {
|
|
||||||
attFileIdList.add(attFileEO.getId());
|
|
||||||
attFileNameList.add(attFileEO.getOldFileName());
|
|
||||||
}
|
|
||||||
object.put(attFileField, String.join(",", attFileIdList));
|
|
||||||
object.put(attFileField + "Name", String.join(",", attFileNameList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user