Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
dinggang 2022-07-14 11:02:30 +08:00
commit 1a4d495af5
3 changed files with 84 additions and 0 deletions

View File

@ -77,4 +77,15 @@ public class ProcessInstanceDTO {
@ApiModelProperty(value = "流程直接被终止?") @ApiModelProperty(value = "流程直接被终止?")
private Boolean termination = Boolean.FALSE; private Boolean termination = Boolean.FALSE;
@ApiModelProperty(value = "需求情况")
private Integer demandFlag;
@ApiModelProperty(value = "需求情况")
private String demandFlagTip;
@ApiModelProperty(value = "评论情况")
private Integer demandCommentFlag;
@ApiModelProperty(value = "评论情况")
private String demandCommentFlagTip;
} }

View File

@ -5,8 +5,10 @@ import io.renren.common.page.PageData;
import io.renren.modules.activiti.dto.ProcessInstanceDTO; import io.renren.modules.activiti.dto.ProcessInstanceDTO;
import io.renren.modules.activiti.dto.TaskDTO; import io.renren.modules.activiti.dto.TaskDTO;
import io.renren.modules.demanData.dto.TDemandDataDTO; import io.renren.modules.demanData.dto.TDemandDataDTO;
import io.renren.modules.demanData.entity.TDemandDataEntityFlag;
import io.renren.modules.demanData.service.TDemandDataService; import io.renren.modules.demanData.service.TDemandDataService;
import io.renren.modules.demandComment.dto.TDemandCommentDTO; import io.renren.modules.demandComment.dto.TDemandCommentDTO;
import io.renren.modules.demandComment.entity.TDemandCommentEntityDelFlag;
import io.renren.modules.demandComment.service.TDemandCommentService; import io.renren.modules.demandComment.service.TDemandCommentService;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
@ -316,11 +318,21 @@ public class ActHistoryService {
if (tDemandCommentDTO != null) { if (tDemandCommentDTO != null) {
dto.setName("发表需求评论"); dto.setName("发表需求评论");
dto.setResourceId(null); dto.setResourceId(null);
dto.setDemandCommentFlag(tDemandCommentDTO.getDelFlag());
Optional<TDemandCommentEntityDelFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandCommentEntityDelFlag.getByFlag(tDemandCommentDTO.getDelFlag()));
if (tDemandCommentEntityDelFlag.isPresent()) {
dto.setDemandCommentFlagTip(tDemandCommentEntityDelFlag.get().getTip());
}
} else { } else {
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey())); TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey()));
if (tDemandDataDTO != null) { if (tDemandDataDTO != null) {
dto.setName(tDemandDataDTO.getDemandSubject()); dto.setName(tDemandDataDTO.getDemandSubject());
dto.setResourceId(null); dto.setResourceId(null);
dto.setDemandFlag(tDemandDataDTO.getFlag());
Optional<TDemandDataEntityFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandDataEntityFlag.getByFlag(tDemandDataDTO.getFlag()));
if (tDemandCommentEntityDelFlag.isPresent()) {
dto.setDemandFlagTip(tDemandCommentEntityDelFlag.get().getTip());
}
} }
} }
} }

View File

@ -0,0 +1,61 @@
package io.renren.modules.demandComment.entity;
import java.util.Arrays;
/**
* ResourceEntity del_flag 枚举
*/
public enum TDemandCommentEntityDelFlag {
/**
* 正常
*/
NORMAL(0, "正常"),
/**
* 已删除
*/
DELETED(1, "已删除"),
/**
* 上架待审核
*/
PENDING_REVIEW(2, "待审核"),
/**
* 上架审核中
*/
UNDER_REVIEW(3, "审核中"),
/**
* 其他
*/
OTHER(9, "其他");
private int flag;
private String tip;
TDemandCommentEntityDelFlag(int flag, String tip) {
this.flag = flag;
this.tip = tip;
}
public static TDemandCommentEntityDelFlag getByFlag(int flag) {
TDemandCommentEntityDelFlag[] index = TDemandCommentEntityDelFlag.values();
return Arrays.asList(index).stream().filter(index_ -> index_.flag == flag).findAny().orElse(TDemandCommentEntityDelFlag.OTHER);
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
public String getTip() {
return tip;
}
public void setTip(String tip) {
this.tip = tip;
}
}