guo00guo 5 年 前
コミット
b2da196caf

+ 2 - 0
core/src/main/java/com/mooctest/crowd/domain/dao/BankLogoDao.java

@@ -14,4 +14,6 @@ public interface BankLogoDao extends CrudRepository<BankLogoPO, Long>{
     Optional<BankLogoPO> findByCode(String code);
 
     List<BankLogoPO> findAll();
+
+    Optional<BankLogoPO> findByName(String name);
 }

+ 5 - 17
core/src/main/java/com/mooctest/crowd/domain/domainobject/EnterpriseAuthentication.java

@@ -14,6 +14,7 @@ import java.sql.Timestamp;
 @Data
 public class EnterpriseAuthentication {
     private  String isDaOrEa;//是研发机构还是评测机构
+    private  String   enterpriseName;
     private Long id;
     private Long userId;
     private String IDCardNum;//身份证号码
@@ -21,8 +22,9 @@ public class EnterpriseAuthentication {
     private String businessLicensePhoto;
     private String unifiedSocialCreditCode;
     private String sex;//2.0新加性别
-    private String IDcardPositivePhoto;//身份证正面照
-    private String IDCardBackPhoto;//身份证反面照
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private String address;
     private int isDeleted;
     private int isAuthentication;
     private String explain;
@@ -30,21 +32,7 @@ public class EnterpriseAuthentication {
     private Timestamp checkTime;
     private Timestamp IDCardDeadTime;//身份证过期时间
 
-    @Override
-    public String toString() {
-        return "CompanyAuth{" +
-                "id=" + id +
-                ", userId=" + userId +
-                ", legalPersonName='" + legalPersonName + '\'' +
-                ", businessLicensePhoto='" + businessLicensePhoto + '\'' +
-                ", unifiedSocialCreditCode='" + unifiedSocialCreditCode + '\'' +
-                ", isDeleted=" + isDeleted +
-                ", isAuthentication=" + isAuthentication +
-                ", explain=" + explain +
-                ", applyTime='" + applyTime + '\'' +
-                ", checkTime='" + checkTime + '\'' +
-                '}';
-    }
+
 
     public EnterpriseAuthentication getByPo(EnterpriseAuthenticationPO enterpriseAuthenticationPO) {
         this.applyTime = enterpriseAuthenticationPO.getApplyTime();

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

@@ -5,5 +5,5 @@ public class ResourceStatus {
     public static final int R_FREE = 0;  //空闲
     public static final int R_OCCUPY = 1; //占用
     public static final int R_USABLE = 2; //可用
-    public static final int R_FAULT = 4; //故障
+    public static final int R_FAULT = 3; //故障
 }

+ 2 - 2
core/src/main/java/com/mooctest/crowd/domain/model/EnterpriseAuthenticationPO.java

@@ -57,8 +57,8 @@ public class EnterpriseAuthenticationPO {
 
 
     @Column(name = "DA_ID_CARD_BACK_PHOTO")
-    private String IDCardBackPhoto;
+    private String idCardBackPhoto;
     @Column(name = "DA_ID_CARD_POS_PHOTO")
-    private String IDcardPositivePhoto;
+    private String idCardPositivePhoto;
 
 }

+ 12 - 2
core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java

@@ -274,10 +274,20 @@ public class UserRepo implements IUserRepo {
         /*企业认证保存企业信息*/
         if(user.getEnterpriseAuthentication() != null){
             if(user.getEnterpriseAuthentication().getIsDaOrEa().equals("研发机构")){
-            enterpriseAuthenticationDao.save(Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication()));
+                System.out.println("认证消息为==========="+user.getPersonalAuthentication());
+                EnterpriseAuthenticationPO authenticationPO = Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication());
+                System.out.println("认证消息为PO==========="+authenticationPO);
+            enterpriseAuthenticationDao.save(authenticationPO);
         }
+
+
             else if(user.getEnterpriseAuthentication().getIsDaOrEa().equals("评测机构")){
-                agencyDao.save(Converter.convert(EvaluationAgencyPO.class,user.getEnterpriseAuthentication()));
+                EvaluationAgencyPO evaluationAgencyPO=new EvaluationAgencyPO();
+                 evaluationAgencyPO.setUserId(user.getId());
+                 evaluationAgencyPO.setAddress(user.getEnterpriseAuthentication().getAddress());
+                 evaluationAgencyPO.setEvaluationAgencyName(user.getEnterpriseAuthentication().getEnterpriseName());
+                 evaluationAgencyPO.setUpdateTime(new Timestamp(System.currentTimeMillis()));
+                agencyDao.save(evaluationAgencyPO);
             }
 
 

+ 1 - 0
site/src/main/java/com/mooctest/crowd/site/command/ApplyEnterpriseAuthCommand.java

@@ -42,6 +42,7 @@ public class ApplyEnterpriseAuthCommand {
         EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
         BeanUtils.copyProperties(this, enterpriseAuthentication);
         enterpriseAuthentication.setApplyTime(new Timestamp(System.currentTimeMillis()));
+        System.out.println(enterpriseAuthentication + "哈哈哈哈哈哈");
         return enterpriseAuthentication;
     }
 }

+ 0 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/BankCardVO.java

@@ -14,5 +14,4 @@ public class BankCardVO {
     private String code;
     private Long userId;
     private String logoUrl;
-
 }

+ 25 - 1
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java

@@ -1010,6 +1010,12 @@ public class WebMediatorImpl implements ViewMediator {
     @Override
     public QualificationDTO addQualification(long userId, QualificationVO qualificationVO) {
         QualificationPO qualificationPO = new QualificationPO();
+        List<QualificationPO>  qualificationPOList=qualificationDao.findByUserIdAndIsDeleted(userId, DeletedStatus.isNotDeleted);
+        for(int i=0;i<qualificationPOList.size();i++){
+            if(qualificationVO.getName().equals(qualificationPOList.get(i).getName())){
+                throw new HttpBadRequestException("资质已存在");
+            }
+        }
         qualificationPO.setName(qualificationVO.getName());
         qualificationPO.setNumber(qualificationVO.getNumber());
         qualificationPO.setLicensingAuthority(qualificationVO.getLicensingAuthority());
@@ -1083,6 +1089,16 @@ public class WebMediatorImpl implements ViewMediator {
             throw new HttpBadRequestException("请输入正确的卡号");
         }
         String bank = String.valueOf(json.get("bank"));
+        Optional<BankLogoPO> bankLogoPO=bankLogoDao.findByName(bankCardVO.getName());
+        if(!bank.equals(bankLogoPO.get().getName())){
+            throw new HttpBadRequestException("请输入与选定银行一致的账号");
+        }
+        List<BankCardPO> bankCardPOList=bankCardDao.findByUserIdAndIsDeleted(userId, DeletedStatus.isNotDeleted);
+        for(int i=0;i<bankCardPOList.size();i++){
+            if(bankCardVO.getNumber().equals(bankCardPOList.get(i).getNumber())){
+                throw new HttpBadRequestException("银行卡已存在");
+            }
+        }
         bankCardPO.setUser(bankCardVO.getUser());
         bankCardPO.setNumber(bankCardVO.getNumber());
         bankCardPO.setCode(bank);
@@ -1148,7 +1164,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());
+        if(resourcePO.get().getState()==0){
+            resourceVO.setState(ResourceStatus.R_FREE);
+        }else if(resourcePO.get().getState()==1){
+            resourceVO.setState(ResourceStatus.R_OCCUPY);
+        }else if(resourcePO.get().getState()==2){
+            resourceVO.setState(ResourceStatus.R_USABLE);
+        }else {
+            resourceVO.setState(ResourceStatus.R_FAULT);
+        }
         resourceVO.setStartTime(resourcePO.get().getStartTime());
         resourceVO.setPersonnel(resourcePO.get().getPersonnel());
         resourceVO.setRemarks(resourcePO.get().getRemarks());

ファイルの差分が大きいため隠しています
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません