...
 
Commits (4)
    https://gitcode.net/O2OA/o2oa/-/commit/4e7c9e91f3c80041a57be939693a148d5bb90cdc 修复论坛板块置顶不生效的问题 2024-04-01T16:58:24+08:00 o2sword 171715986@qq.com https://gitcode.net/O2OA/o2oa/-/commit/b353cef67fd1412ccf366650bc315d37576922dc Merge branch 'hotfix/lastManualScript' into 'master' 2024-04-02T15:21:22+00:00 胡起 hq_1980@hotmail.com 修复在最后的人工环节在'活动流转完成'事件中无法获取recordList See merge request o2oa/o2oa!2617 (cherry picked from commit <a href="/O2OA/o2oa/-/commit/a8b72cf7c6b9761bfba6753bd1011fe45b871847" data-original="a8b72cf7c6b9761bfba6753bd1011fe45b871847" data-link="false" data-link-reference="false" data-project="26821" data-commit="a8b72cf7c6b9761bfba6753bd1011fe45b871847" data-reference-type="commit" data-container="body" data-placement="top" title="Merge branch 'hotfix/lastManualScript' into 'master'" class="gfm gfm-commit has-tooltip">a8b72cf7</a>) <a href="/O2OA/o2oa/-/commit/5c982ec17c3b178635395cfefe83b8b271dce936" data-original="5c982ec1" data-link="false" data-link-reference="false" data-project="26821" data-commit="5c982ec17c3b178635395cfefe83b8b271dce936" data-reference-type="commit" data-container="body" data-placement="top" title="修复在最后的人工环节在'活动流转完成'事件中无法获取recordList" class="gfm gfm-commit has-tooltip">5c982ec1</a> 修复在最后的人工环节在'活动流转完成'事件中无法获取recordList <a href="/O2OA/o2oa/-/commit/833d154854f3358964ec8a498ff383e41f71a5b3" data-original="833d1548" data-link="false" data-link-reference="false" data-project="26821" data-commit="833d154854f3358964ec8a498ff383e41f71a5b3" data-reference-type="commit" data-container="body" data-placement="top" title="增加输出recordList的排序" class="gfm gfm-commit has-tooltip">833d1548</a> 增加输出recordList的排序 https://gitcode.net/O2OA/o2oa/-/commit/9d033a80cd6821aa390b2ec683337931c740a164 Merge branch 'cherry-pick-a8b72cf7' into 'develop' 2024-04-02T15:21:32+00:00 胡起 hq_1980@hotmail.com Merge branch 'hotfix/lastManualScript' into 'master' See merge request o2oa/o2oa!2622 https://gitcode.net/O2OA/o2oa/-/commit/cac1e731bc717f65e37662e2ac5f807bb8def6c2 Merge branch '修复论坛板块置顶不生效的问题' into 'develop' 2024-04-02T15:21:42+00:00 胡起 hq_1980@hotmail.com 修复论坛板块置顶不生效的问题 See merge request o2oa/o2oa!2618
...@@ -370,14 +370,14 @@ public class SubjectInfoManagerUserAction extends StandardJaxrsAction { ...@@ -370,14 +370,14 @@ public class SubjectInfoManagerUserAction extends StandardJaxrsAction {
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
} }
@JaxrsMethodDescribe( value = "版块置顶", action = ActionSubjectTopToMainSection.class ) @JaxrsMethodDescribe( value = "版块置顶", action = ActionSubjectTopToSection.class )
@GET @GET
@Path("topToSection/{id}") @Path("topToSection/{id}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
public void topToSection( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, public void topToSection( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("主贴信息ID") @PathParam("id") String id ) { @JaxrsParameterDescribe("主贴信息ID") @PathParam("id") String id ) {
ActionResult<ActionSubjectTopToMainSection.Wo> result = new ActionResult<>(); ActionResult<ActionSubjectTopToSection.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request); EffectivePerson effectivePerson = this.effectivePerson(request);
Boolean check = true; Boolean check = true;
if( check ){ if( check ){
...@@ -389,7 +389,7 @@ public class SubjectInfoManagerUserAction extends StandardJaxrsAction { ...@@ -389,7 +389,7 @@ public class SubjectInfoManagerUserAction extends StandardJaxrsAction {
} }
if(check){ if(check){
try { try {
result = new ActionSubjectTopToMainSection().execute( request, effectivePerson, id ); result = new ActionSubjectTopToSection().execute( request, effectivePerson, id );
} catch (Exception e) { } catch (Exception e) {
result = new ActionResult<>(); result = new ActionResult<>();
Exception exception = new ExceptionRoleInfoProcess( e, "版块置顶时发生异常!" ); Exception exception = new ExceptionRoleInfoProcess( e, "版块置顶时发生异常!" );
......
...@@ -108,9 +108,17 @@ public class WorkContext { ...@@ -108,9 +108,17 @@ public class WorkContext {
list.addAll(aeiObjects.getRecords()); list.addAll(aeiObjects.getRecords());
list.addAll(aeiObjects.getCreateRecords()); list.addAll(aeiObjects.getCreateRecords());
} }
return gson.toJson( List<Record> records = list.stream()
list.stream().filter(o -> StringUtils.equals(o.getWork(), this.aeiObjects.getWork().getId())) .filter(o -> StringUtils.equals(o.getWork(), this.aeiObjects.getWork().getId()))
.collect(Collectors.toList())); .collect(Collectors.toList());
// 考虑到比如已经是最后一个人工环节,那么work已经转为workCompleted,那么直接返回全部record
if (records.isEmpty()) {
return gson.toJson(list.stream().sorted(Comparator.nullsLast(Comparator.comparing(Record::getOrder)))
.collect(Collectors.toList()));
} else {
return gson.toJson(records.stream().sorted(Comparator.nullsLast(Comparator.comparing(Record::getOrder)))
.collect(Collectors.toList()));
}
} catch (Exception e) { } catch (Exception e) {
throw new IllegalStateException("getRecordList error.", e); throw new IllegalStateException("getRecordList error.", e);
} }
...@@ -333,6 +341,7 @@ public class WorkContext { ...@@ -333,6 +341,7 @@ public class WorkContext {
throw new IllegalStateException("getReadCompletedList error.", e); throw new IllegalStateException("getReadCompletedList error.", e);
} }
} }
@Deprecated(forRemoval = true, since = "never use.") @Deprecated(forRemoval = true, since = "never use.")
public String getReviewList() { public String getReviewList() {
try { try {
......