|
|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.TypeReference;
|
|
|
import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
|
|
|
+import com.mooctest.crowd.domain.domainobject.CrowdTestProjectStatus;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
@@ -41,6 +42,7 @@ public class CrowdProjectVO {
|
|
|
private String usage;
|
|
|
private Integer status;
|
|
|
private Long regionManagerId;
|
|
|
+ private StatusVO statusVO;
|
|
|
|
|
|
public CrowdProjectVO(CrowdTestProject project){
|
|
|
this.id = project.getCode();
|
|
|
@@ -63,6 +65,22 @@ public class CrowdProjectVO {
|
|
|
this.usage = null;
|
|
|
this.status = project.getStatus();
|
|
|
this.regionManagerId = project.getRegionalManagerId();
|
|
|
+ this.renderStatus();
|
|
|
}
|
|
|
|
|
|
+ private void renderStatus(){
|
|
|
+ if (this.status == CrowdTestProjectStatus.HAS_REJECTED){
|
|
|
+ this.statusVO.setText("已被拒绝");
|
|
|
+ this.statusVO.setStyle("info");
|
|
|
+ }else if (this.status > CrowdTestProjectStatus.HAS_REJECTED && this.status < CrowdTestProjectStatus.HAS_RECEIVED){
|
|
|
+ this.statusVO.setText("等待接收");
|
|
|
+ this.statusVO.setStyle("warning");
|
|
|
+ }else if (this.status >= CrowdTestProjectStatus.HAS_RECEIVED && this.status < CrowdTestProjectStatus.HAS_FINISHED){
|
|
|
+ this.statusVO.setText("进行中");
|
|
|
+ this.statusVO.setStyle("primary");
|
|
|
+ }else if (this.status == CrowdTestProjectStatus.HAS_FINISHED) {
|
|
|
+ this.statusVO.setText("已完成");
|
|
|
+ this.statusVO.setStyle("success");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|