Ver Fonte

Merge branch 'feature-V2.0' of ssh://git.mooctest.com:1022/crowd-2019/crowd-test-service-backend into feature-V2.0

guo00guo há 5 anos atrás
pai
commit
a5186b0477

+ 3 - 1
core/src/main/java/com/mooctest/crowd/domain/domainobject/EvaluationAgency.java

@@ -17,7 +17,9 @@ import java.util.List;
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
-public class EvaluationAgency {
+public class EvaluationAgency{
+    private  String IdCardNum;
+    private String  legalPersonName;
     private Long id;
     private Long userId;
     private String evaluationAgencyName;

+ 2 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/PersonalAuthentication.java

@@ -4,6 +4,7 @@ import com.mooctest.crowd.domain.exception.BaseException;
 import com.mooctest.crowd.domain.model.PersonalAuthenticationPO;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
+import java.util.*;
 
 import java.sql.Timestamp;
 
@@ -14,6 +15,7 @@ import java.sql.Timestamp;
 @Data
 public class PersonalAuthentication {
 
+
     private Long id;
     private Long userId;
     private String realName;

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/model/EvaluationAgencyPO.java

@@ -57,4 +57,7 @@ public class EvaluationAgencyPO{
     @Column(name = "EA_TYPE")
     private String type;
 
+    @Column(name = "EA_IDNUM")
+    private  String idCardNum;
+
 }

+ 6 - 1
site/src/main/java/com/mooctest/crowd/site/command/ApplyAgencyAuthCommand.java

@@ -19,6 +19,10 @@ import java.util.stream.Collectors;
  */
 @Data
 public class ApplyAgencyAuthCommand{
+
+    @NotNull(message = "身份证号码不能为空")
+    private  String  IdCardNum;
+
     @NotNull(message = "请选择性别")
     private String sex;
 //    @NotNull(message = "机构名称不可为空")
@@ -39,7 +43,8 @@ public class ApplyAgencyAuthCommand{
     private String agencyPhoto;
     @NotNull(message = "请选择认证研发机构或者评测机构")
     private ArrayList<Integer> roleList;
-
+//    @NotNull(message = "法人姓名不能为空")
+    private  String legalPersonName;
 
     public EvaluationAgency toAgency(){
         EvaluationAgency agency = UserFactory.defaultAgency();

+ 1 - 2
site/src/main/java/com/mooctest/crowd/site/data/vo/ResourceVO.java

@@ -28,7 +28,7 @@ public class ResourceVO implements Serializable {
     private String unitWork;
     private String standard;
     private String unit;
-    private int state;
+    private String state;
     private Timestamp startTime;
     private String personnel;
     private String remarks;
@@ -45,7 +45,6 @@ public class ResourceVO implements Serializable {
         unitWork=resource.getUnitWork();
         standard=resource.getStandard();
         unit=resource.getUnit();
-        state=resource.getState();
         startTime=resource.getStartTime();
         personnel=resource.getPersonnel();
         remarks=resource.getRemarks();

+ 18 - 19
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java

@@ -1273,20 +1273,15 @@ public class WebMediatorImpl implements ViewMediator {
             resourceVO.setUnitWork(resourcePO.getUnitWork());
             resourceVO.setStandard(resourcePO.getStandard());
             resourceVO.setUnit(resourcePO.getUnit());
-            resourceVO.setState(resourcePO.getState());
             StatusVO statusVO = new StatusVO();
             if(resourcePO.getState()==0){
-                statusVO.setText("空闲");
-                resourceVO.setStatusVO(statusVO);
+                resourceVO.setState("空闲");
             }else if(resourcePO.getState()==1){
-                statusVO.setText("占用");
-                resourceVO.setStatusVO(statusVO);
+                resourceVO.setState("占用");
             }else if(resourcePO.getState()==2){
-                statusVO.setText("可用");
-                resourceVO.setStatusVO(statusVO);
+                resourceVO.setState("可用");
             }else if(resourcePO.getState()==3){
-                statusVO.setText("故障");
-                resourceVO.setStatusVO(statusVO);
+                resourceVO.setState("故障");
             }
             resourceVO.setStartTime(resourcePO.getStartTime());
             resourceVO.setPersonnel(resourcePO.getPersonnel());
@@ -1312,20 +1307,15 @@ public class WebMediatorImpl implements ViewMediator {
         resourceVO.setUnitWork(resourcePO.get().getUnitWork());
         resourceVO.setStandard(resourcePO.get().getStandard());
         resourceVO.setUnit(resourcePO.get().getUnit());
-        resourceVO.setState(resourcePO.get().getState());
         StatusVO statusVO = new StatusVO();
         if(resourcePO.get().getState()==0){
-            statusVO.setText("空闲");
-            resourceVO.setStatusVO(statusVO);
+            resourceVO.setState("空闲");
         }else if(resourcePO.get().getState()==1){
-            statusVO.setText("占用");
-            resourceVO.setStatusVO(statusVO);
+            resourceVO.setState("占用");
         }else if(resourcePO.get().getState()==2){
-            statusVO.setText("可用");
-            resourceVO.setStatusVO(statusVO);
+            resourceVO.setState("可用");
         }else if(resourcePO.get().getState()==3){
-            statusVO.setText("故障");
-            resourceVO.setStatusVO(statusVO);
+            resourceVO.setState("故障");
         }
         resourceVO.setStartTime(resourcePO.get().getStartTime());
         resourceVO.setPersonnel(resourcePO.get().getPersonnel());
@@ -1349,7 +1339,16 @@ public class WebMediatorImpl implements ViewMediator {
             resourceVO.setUnitWork(resourcePO.getUnitWork());
             resourceVO.setStandard(resourcePO.getStandard());
             resourceVO.setUnit(resourcePO.getUnit());
-            resourceVO.setState(resourcePO.getState());
+            StatusVO statusVO = new StatusVO();
+            if(resourcePO.getState()==0){
+                resourceVO.setState("空闲");
+            }else if(resourcePO.getState()==1){
+                resourceVO.setState("占用");
+            }else if(resourcePO.getState()==2){
+                resourceVO.setState("可用");
+            }else if(resourcePO.getState()==3){
+                resourceVO.setState("故障");
+            }
             resourceVO.setStartTime(resourcePO.getStartTime());
             resourceVO.setPersonnel(resourcePO.getPersonnel());
             resourceVO.setRemarks(resourcePO.getRemarks());