Administrator пре 1 година
родитељ
комит
cc1a49a5e9

+ 2 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -92,11 +92,9 @@ public class CommonController {
      * 按照项目编号创建文件夹通用上传请求(单个)
      */
     @PostMapping("/uploadNew")
-    public AjaxResult uploadNewFile(@RequestBody UploadVo uploadVo) throws Exception {
+    public AjaxResult uploadNewFile( @RequestParam("file") MultipartFile file,@RequestParam("loanApplicationNumber") String loanApplicationNumber,@RequestParam("fileName") String originalFilename) throws Exception {
         try {
-            MultipartFile file = uploadVo.getFile();
-            String loanApplicationNumber = uploadVo.getLoanApplicationNumber();
-            String originalFilename = uploadVo.getFileName();
+
             // 上传文件路径
             String filePath = RuoYiConfig.getUploadPath();
             // 上传并返回新文件名称

+ 4 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/OcrController.java

@@ -4,7 +4,9 @@ package com.ruoyi.web.controller.common;
 import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.IdCardVo;
+import com.ruoyi.common.core.domain.SysUserIdcardVo;
 import com.ruoyi.common.utils.IdCardUtil;
+import com.ruoyi.system.domain.idcard.SysUserIdcard;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,7 +49,7 @@ public class OcrController {
      */
     @PostMapping("/ocrSample")
     @RepeatSubmit(interval = 1000, message = "请求过于频繁")
-    public AjaxResult ocrSample(@RequestBody IdCardVo idCardVo) {
-        return IdCardUtil.sample(idCardVo);
+    public AjaxResult ocrSample(@RequestBody SysUserIdcardVo sysUserIdcardVo) {
+        return IdCardUtil.sample(sysUserIdcardVo);
     }
 }

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/enterprise/SysUserEnterpriseController.java

@@ -43,6 +43,16 @@ public class SysUserEnterpriseController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 查询用户企业信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('enterprise:enterprise:listNoPage')")
+    @GetMapping("/listNoPage")
+    public TableDataInfo listNoPage(SysUserEnterprise sysUserEnterprise) {
+        List<SysUserEnterprise> list = sysUserEnterpriseService.selectSysUserEnterpriseList(sysUserEnterprise);
+        return getDataTable(list);
+    }
+
     /**
      * 导出用户企业信息列表
      */

+ 176 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/SysUserIdcardVo.java

@@ -0,0 +1,176 @@
+package com.ruoyi.common.core.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 用户身份证信息对象 sys_user_idcard
+ * 
+ * @author boman
+ * @date 2024-04-22
+ */
+public class SysUserIdcardVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 用户ID */
+    private Long userId;
+
+    /** 身份证号码 */
+    private String idCard;
+
+    /** 真实姓名 */
+    @Excel(name = "真实姓名")
+    private String realName;
+
+    /** 失效日期 */
+    @Excel(name = "失效日期")
+    private String expirationDate;
+
+    /** 手机号码 */
+    @Excel(name = "手机号码")
+    private String phonenumber;
+
+    /** 居住地址 */
+    @Excel(name = "居住地址")
+    private String address;
+
+    /** 正面地址 */
+    @Excel(name = "正面地址")
+    private String front;
+
+    /** 反面地址 */
+    @Excel(name = "反面地址")
+    private String back;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /**
+     * 图片
+     */
+    private String image;
+    /**
+     * 认证结果
+     */
+    private String result;
+
+    public String getImage() {
+        return image;
+    }
+
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public void setUserId(Long userId)
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+    public void setRealName(String realName) 
+    {
+        this.realName = realName;
+    }
+
+    public String getRealName() 
+    {
+        return realName;
+    }
+    public void setExpirationDate(String expirationDate) 
+    {
+        this.expirationDate = expirationDate;
+    }
+
+    public String getExpirationDate() 
+    {
+        return expirationDate;
+    }
+    public void setPhonenumber(String phonenumber) 
+    {
+        this.phonenumber = phonenumber;
+    }
+
+    public String getPhonenumber() 
+    {
+        return phonenumber;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setFront(String front) 
+    {
+        this.front = front;
+    }
+
+    public String getFront() 
+    {
+        return front;
+    }
+    public void setBack(String back) 
+    {
+        this.back = back;
+    }
+
+    public String getBack() 
+    {
+        return back;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("userId", getUserId())
+            .append("idCard", getIdCard())
+            .append("realName", getRealName())
+            .append("expirationDate", getExpirationDate())
+            .append("phonenumber", getPhonenumber())
+            .append("address", getAddress())
+            .append("front", getFront())
+            .append("back", getBack())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 5 - 4
ruoyi-common/src/main/java/com/ruoyi/common/utils/IdCardUtil.java

@@ -7,6 +7,7 @@ package com.ruoyi.common.utils;
  */
 
 import cn.hutool.http.HttpUtil;
+import com.ruoyi.common.core.domain.SysUserIdcardVo;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
@@ -554,10 +555,10 @@ public class IdCardUtil {
      *
      * @throws IOException
      */
-    public static AjaxResult sample(IdCardVo idCardVo) {
-        String image = idCardVo.getImage();
-        String idCardNumber = idCardVo.getIdCard();
-        String name = idCardVo.getName();
+    public static AjaxResult sample(SysUserIdcardVo sysUserIdcardVo) {
+        String image = sysUserIdcardVo.getImage();
+        String idCardNumber = sysUserIdcardVo.getIdCard();
+        String name = sysUserIdcardVo.getRealName();
         if (StringUtils.isEmpty(image) || StringUtils.isEmpty(idCardNumber) || StringUtils.isEmpty(name)) {
             return AjaxResult.error("参数不完整");
         }

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java

@@ -138,7 +138,7 @@ public class FileUploadUtils {
     public static final String uploadLoanApplicationNumber(String baseDir, MultipartFile file, String loanApplicationNumber, String originalFilename, String[] allowedExtension)
             throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
             InvalidExtensionException {
-        int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
+        int fileNamelength = Objects.requireNonNull(originalFilename).length();
         if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) {
             throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
         }

+ 1 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -117,6 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
                 .antMatchers("/Excel.html", "/Word.html", "/*.zz", "/**/*.zz", "/pageoffice.js","/jquery.min.js").permitAll()
+                .antMatchers("/common/uploadNew").permitAll()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
                 .and()

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/loan/impl/LoanApplicationServiceImpl.java

@@ -133,7 +133,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
         loanSchedule.setLoanApplicationNumber(loanApplication.getLoanApplicationNumber());
         loanSchedule.setLoanScheduleName(loanApplication.getLoanScheduleName());
         loanSchedule.setLoanScheduleValue(loanApplication.getLoanSchedule());
-        loanSchedule.setLoanScheduleScore("0");
+        loanSchedule.setLoanScheduleScore(0L);
         loanSchedule.setLoanScheduleTime(DateUtils.getNowDate());
         loanScheduleMapper.insertLoanSchedule(loanSchedule);
         return i;